Commit c9919be6 authored by Amitkumar Karwar's avatar Amitkumar Karwar Committed by John W. Linville

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: default avatarAmitkumar Karwar <akarwar@marvell.com>
Signed-off-by: default avatarBing Zhao <bzhao@marvell.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent d17087e7
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment