Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 21156
b: refs/heads/master
c: 7bd6436
h: refs/heads/master
v: v3
  • Loading branch information
Zhu Yi authored and John W. Linville committed Jan 27, 2006
1 parent 4396868 commit e4d0f37
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d128f6c176bff9c4929476e13132804321a6d5c5
refs/heads/master: 7bd64366044565d6861783613db191c8aaec691e
31 changes: 29 additions & 2 deletions trunk/net/ieee80211/ieee80211_wx.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,7 @@ static char *ipw2100_translate_scan(struct ieee80211_device *ieee,
iwe.u.qual.updated |= IW_QUAL_QUAL_INVALID |
IW_QUAL_LEVEL_INVALID;
iwe.u.qual.qual = 0;
iwe.u.qual.level = 0;
} else {
iwe.u.qual.level = network->stats.rssi;
if (ieee->perfect_rssi == ieee->worst_rssi)
iwe.u.qual.qual = 100;
else
Expand Down Expand Up @@ -179,6 +177,13 @@ static char *ipw2100_translate_scan(struct ieee80211_device *ieee,
iwe.u.qual.noise = network->stats.noise;
}

if (!(network->stats.mask & IEEE80211_STATMASK_SIGNAL)) {
iwe.u.qual.updated |= IW_QUAL_LEVEL_INVALID;
iwe.u.qual.level = 0;
} else {
iwe.u.qual.level = network->stats.signal;
}

start = iwe_stream_add_event(start, stop, &iwe, IW_EV_QUAL_LEN);

iwe.cmd = IWEVCUSTOM;
Expand Down Expand Up @@ -229,6 +234,28 @@ static char *ipw2100_translate_scan(struct ieee80211_device *ieee,
if (iwe.u.data.length)
start = iwe_stream_add_point(start, stop, &iwe, custom);

/* Add spectrum management information */
iwe.cmd = -1;
p = custom;
p += snprintf(p, MAX_CUSTOM_LEN - (p - custom), " Channel flags: ");

if (ieee80211_get_channel_flags(ieee, network->channel) &
IEEE80211_CH_INVALID) {
iwe.cmd = IWEVCUSTOM;
p += snprintf(p, MAX_CUSTOM_LEN - (p - custom), "INVALID ");
}

if (ieee80211_get_channel_flags(ieee, network->channel) &
IEEE80211_CH_RADAR_DETECT) {
iwe.cmd = IWEVCUSTOM;
p += snprintf(p, MAX_CUSTOM_LEN - (p - custom), "DFS ");
}

if (iwe.cmd == IWEVCUSTOM) {
iwe.u.data.length = p - custom;
start = iwe_stream_add_point(start, stop, &iwe, custom);
}

return start;
}

Expand Down

0 comments on commit e4d0f37

Please sign in to comment.