]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
mac80211: return the RSSI in dBm
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Wed, 20 Mar 2013 15:05:45 +0000 (17:05 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 20 Mar 2013 18:25:12 +0000 (19:25 +0100)
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>
net/mac80211/util.c

index a7368870c8ee10cf7ee48dc764bc466974eac8ae..90cc2b82869bea7dd5cb85ad8c88e711d3770b8f 100644 (file)
@@ -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);