diff options
| author | Sriram Madhvapathi <msriram@qti.qualcomm.com> | 2016-08-05 12:16:52 +0530 |
|---|---|---|
| committer | Anjaneedevi Kapparapu <akappa@codeaurora.org> | 2016-08-08 19:55:44 +0530 |
| commit | 46732882e0e38767653175d31e81704cba42844e (patch) | |
| tree | b6fdc98ce6f47ea4caefc0e49ad0a341ab16c209 | |
| parent | 6ee97a9efd6f6552611e2c656bade7ab0d0a00dc (diff) | |
qcacld-2.0: Correct the IBSS tx rate information
GETIBSSPEERINFO(ALL) fetches IBSS peer information which
includes tx rate. However, only lower 3 bytes of txRate
field is relevant. Mask out irrelevant fields when passing
tx rate info to the user.
CRs-Fixed: 1050973
Change-Id: Ice0199b84899e7452bf64353c744118f109d9c14
| -rwxr-xr-x | CORE/HDD/src/wlan_hdd_main.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/CORE/HDD/src/wlan_hdd_main.c b/CORE/HDD/src/wlan_hdd_main.c index 3d5b9c9113e4..69a435fb55c5 100755 --- a/CORE/HDD/src/wlan_hdd_main.c +++ b/CORE/HDD/src/wlan_hdd_main.c @@ -7122,8 +7122,10 @@ static int hdd_driver_command(hdd_adapter_t *pAdapter, pHddStaCtx->ibss_peer_info.peerInfoParams[idx].mac_addr, sizeof(mac_addr)); - tx_rate = - pHddStaCtx->ibss_peer_info.peerInfoParams[idx].txRate; + tx_rate = pHddStaCtx->ibss_peer_info.peerInfoParams[idx].txRate; + /* Only lower 3 bytes are rate info. Mask of the MSByte */ + tx_rate &= 0x00FFFFFF; + rssi = pHddStaCtx->ibss_peer_info.peerInfoParams[idx].rssi; length += scnprintf((extra + length), @@ -7250,6 +7252,8 @@ static int hdd_driver_command(hdd_adapter_t *pAdapter, if (VOS_STATUS_SUCCESS == status) { v_U32_t txRate = pHddStaCtx->ibss_peer_info.peerInfoParams[0].txRate; + /* Only lower 3 bytes are rate info. Mask of the MSByte */ + txRate &= 0x00FFFFFF; length = scnprintf( extra, sizeof(extra), "%d %d", (int)txRate, (int)pHddStaCtx->ibss_peer_info.peerInfoParams[0].rssi); |
