summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAmitkumar Karwar <akarwar@marvell.com>2012-03-16 04:51:47 +0100
committerJohn W. Linville <linville@tuxdriver.com>2012-04-09 22:05:57 +0200
commitc9919be642252baae7a80cacff52a3ed586b0547 (patch)
tree6f8960439995ea08775b422146c5cdf10e78d79e /drivers
parentmac80211: Add iface name when calling WARN-ON. (diff)
downloadlinux-c9919be642252baae7a80cacff52a3ed586b0547.tar.xz
linux-c9919be642252baae7a80cacff52a3ed586b0547.zip
mwifiex: update signal strength in mBm units
During wiphy registration signal_type is initialized to CFG80211_SIGNAL_TYPE_MBM. So convert signal strength from dBm to mBm. Also, the value is absolute. Make it negative before sending to cfg80211. Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/mwifiex/scan.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/wireless/mwifiex/scan.c b/drivers/net/wireless/mwifiex/scan.c
index 5948905ff615..ef84a1a6742f 100644
--- a/drivers/net/wireless/mwifiex/scan.c
+++ b/drivers/net/wireless/mwifiex/scan.c
@@ -1667,8 +1667,9 @@ int mwifiex_ret_802_11_scan(struct mwifiex_private *priv,
memcpy(bssid, bcn_param->bssid, ETH_ALEN);
- rssi = (s32) (bcn_param->rssi);
- dev_dbg(adapter->dev, "info: InterpretIE: RSSI=%02X\n", rssi);
+ rssi = (s32) bcn_param->rssi;
+ rssi = (-rssi) * 100; /* Convert dBm to mBm */
+ dev_dbg(adapter->dev, "info: InterpretIE: RSSI=%d\n", rssi);
beacon_period = le16_to_cpu(bcn_param->beacon_period);