diff options
author | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2013-03-20 11:05:45 -0400 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-03-20 14:25:12 -0400 |
commit | 3a7bba649eaaa2068aa6e86ed8bcd10245d1f817 (patch) | |
tree | b3a6daa5ddfcdca2f1dec4af242b8d53c9217e20 /net | |
parent | f00f188f8212fec9976394976c4fd5d4a3bc4dcf (diff) |
mac80211: return the RSSI in dBm
For the sake of speed of calculation and number accuracy,
mac80211 tracks the RSSI in dBm * 16. But it forgot to
divide back by 16 when the RSSI is asked by the driver.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/mac80211/util.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/mac80211/util.c b/net/mac80211/util.c index a7368870c8ee..90cc2b82869b 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c | |||
@@ -2056,7 +2056,7 @@ int ieee80211_ave_rssi(struct ieee80211_vif *vif) | |||
2056 | /* non-managed type inferfaces */ | 2056 | /* non-managed type inferfaces */ |
2057 | return 0; | 2057 | return 0; |
2058 | } | 2058 | } |
2059 | return ifmgd->ave_beacon_signal; | 2059 | return ifmgd->ave_beacon_signal / 16; |
2060 | } | 2060 | } |
2061 | EXPORT_SYMBOL_GPL(ieee80211_ave_rssi); | 2061 | EXPORT_SYMBOL_GPL(ieee80211_ave_rssi); |
2062 | 2062 | ||