From 3a7bba649eaaa2068aa6e86ed8bcd10245d1f817 Mon Sep 17 00:00:00 2001 From: Emmanuel Grumbach Date: Wed, 20 Mar 2013 17:05:45 +0200 Subject: [PATCH] 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 Signed-off-by: Johannes Berg --- net/mac80211/util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) /* non-managed type inferfaces */ return 0; } - return ifmgd->ave_beacon_signal; + return ifmgd->ave_beacon_signal / 16; } EXPORT_SYMBOL_GPL(ieee80211_ave_rssi); -- 2.30.2