diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2009-02-18 12:45:06 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-02-27 14:52:42 -0500 |
commit | 77965c970d7da9c9b6349ff2b1d9adecf54c403b (patch) | |
tree | bda8a85fa872a46d5cb5c48891cf3ee21c91e838 /net/mac80211 | |
parent | 630e64c487c0a9550f05b465216a1cd9125b52f2 (diff) |
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>
Diffstat (limited to 'net/mac80211')
-rw-r--r-- | net/mac80211/main.c | 5 | ||||
-rw-r--r-- | net/mac80211/scan.c | 11 |
2 files changed, 8 insertions, 8 deletions
diff --git a/net/mac80211/main.c b/net/mac80211/main.c index fce9d08986e9..f38db4d37e5d 100644 --- a/net/mac80211/main.c +++ b/net/mac80211/main.c | |||
@@ -861,6 +861,11 @@ int ieee80211_register_hw(struct ieee80211_hw *hw) | |||
861 | /* mac80211 always supports monitor */ | 861 | /* mac80211 always supports monitor */ |
862 | local->hw.wiphy->interface_modes |= BIT(NL80211_IFTYPE_MONITOR); | 862 | local->hw.wiphy->interface_modes |= BIT(NL80211_IFTYPE_MONITOR); |
863 | 863 | ||
864 | if (local->hw.flags & IEEE80211_HW_SIGNAL_DBM) | ||
865 | local->hw.wiphy->signal_type = CFG80211_SIGNAL_TYPE_MBM; | ||
866 | else if (local->hw.flags & IEEE80211_HW_SIGNAL_UNSPEC) | ||
867 | local->hw.wiphy->signal_type = CFG80211_SIGNAL_TYPE_UNSPEC; | ||
868 | |||
864 | result = wiphy_register(local->hw.wiphy); | 869 | result = wiphy_register(local->hw.wiphy); |
865 | if (result < 0) | 870 | if (result < 0) |
866 | goto fail_wiphy_register; | 871 | goto fail_wiphy_register; |
diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c index c063f8204263..23f4de274744 100644 --- a/net/mac80211/scan.c +++ b/net/mac80211/scan.c | |||
@@ -63,20 +63,15 @@ ieee80211_bss_info_update(struct ieee80211_local *local, | |||
63 | { | 63 | { |
64 | struct ieee80211_bss *bss; | 64 | struct ieee80211_bss *bss; |
65 | int clen; | 65 | int clen; |
66 | enum cfg80211_signal_type sigtype = CFG80211_SIGNAL_TYPE_NONE; | ||
67 | s32 signal = 0; | 66 | s32 signal = 0; |
68 | 67 | ||
69 | if (local->hw.flags & IEEE80211_HW_SIGNAL_DBM) { | 68 | if (local->hw.flags & IEEE80211_HW_SIGNAL_DBM) |
70 | sigtype = CFG80211_SIGNAL_TYPE_MBM; | ||
71 | signal = rx_status->signal * 100; | 69 | signal = rx_status->signal * 100; |
72 | } else if (local->hw.flags & IEEE80211_HW_SIGNAL_UNSPEC) { | 70 | else if (local->hw.flags & IEEE80211_HW_SIGNAL_UNSPEC) |
73 | sigtype = CFG80211_SIGNAL_TYPE_UNSPEC; | ||
74 | signal = (rx_status->signal * 100) / local->hw.max_signal; | 71 | signal = (rx_status->signal * 100) / local->hw.max_signal; |
75 | } | ||
76 | 72 | ||
77 | bss = (void *)cfg80211_inform_bss_frame(local->hw.wiphy, channel, | 73 | bss = (void *)cfg80211_inform_bss_frame(local->hw.wiphy, channel, |
78 | mgmt, len, signal, sigtype, | 74 | mgmt, len, signal, GFP_ATOMIC); |
79 | GFP_ATOMIC); | ||
80 | 75 | ||
81 | if (!bss) | 76 | if (!bss) |
82 | return NULL; | 77 | return NULL; |