cfg80211: clean up signal type

It wasn't a good idea to make the signal type a per-BSS option,
although then it is closer to the actual value. Move it to be
a per-wiphy setting, update mac80211 to match.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
Johannes Berg
2009-02-18 18:45:06 +01:00
committed by John W. Linville
parent 630e64c487
commit 77965c970d
6 changed files with 24 additions and 26 deletions

View File

@@ -63,20 +63,15 @@ ieee80211_bss_info_update(struct ieee80211_local *local,
{
struct ieee80211_bss *bss;
int clen;
enum cfg80211_signal_type sigtype = CFG80211_SIGNAL_TYPE_NONE;
s32 signal = 0;
if (local->hw.flags & IEEE80211_HW_SIGNAL_DBM) {
sigtype = CFG80211_SIGNAL_TYPE_MBM;
if (local->hw.flags & IEEE80211_HW_SIGNAL_DBM)
signal = rx_status->signal * 100;
} else if (local->hw.flags & IEEE80211_HW_SIGNAL_UNSPEC) {
sigtype = CFG80211_SIGNAL_TYPE_UNSPEC;
else if (local->hw.flags & IEEE80211_HW_SIGNAL_UNSPEC)
signal = (rx_status->signal * 100) / local->hw.max_signal;
}
bss = (void *)cfg80211_inform_bss_frame(local->hw.wiphy, channel,
mgmt, len, signal, sigtype,
GFP_ATOMIC);
mgmt, len, signal, GFP_ATOMIC);
if (!bss)
return NULL;