Skip to content

Commit

Permalink
mwifiex: update signal strength in mBm units
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Amitkumar Karwar authored and John W. Linville committed Apr 9, 2012
1 parent d17087e commit c9919be
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/net/wireless/mwifiex/scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit c9919be

Please sign in to comment.