summaryrefslogtreecommitdiffstats
path: root/net/mac80211
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/main.c5
-rw-r--r--net/mac80211/scan.c11
2 files changed, 8 insertions, 8 deletions
diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index fce9d08986e..f38db4d37e5 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -861,6 +861,11 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
/* mac80211 always supports monitor */
local->hw.wiphy->interface_modes |= BIT(NL80211_IFTYPE_MONITOR);
+ if (local->hw.flags & IEEE80211_HW_SIGNAL_DBM)
+ local->hw.wiphy->signal_type = CFG80211_SIGNAL_TYPE_MBM;
+ else if (local->hw.flags & IEEE80211_HW_SIGNAL_UNSPEC)
+ local->hw.wiphy->signal_type = CFG80211_SIGNAL_TYPE_UNSPEC;
+
result = wiphy_register(local->hw.wiphy);
if (result < 0)
goto fail_wiphy_register;
diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c
index c063f820426..23f4de27474 100644
--- a/net/mac80211/scan.c
+++ b/net/mac80211/scan.c
@@ -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;