From 85df7c7d2f2720a60301789549ae61ebf8cbefd0 Mon Sep 17 00:00:00 2001 From: Sriram Madhvapathi Date: Fri, 30 Sep 2016 11:35:28 +0530 Subject: [PATCH] qcacld-3.0: Correct the IBSS tx rate information qcacld-2.0 to qcacld-3.0 propagation 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. Change-Id: Ice0199b84899e7452bf64353c744118f109d9c14 CRs-Fixed: 1050973 --- core/hdd/src/wlan_hdd_ioctl.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/core/hdd/src/wlan_hdd_ioctl.c b/core/hdd/src/wlan_hdd_ioctl.c index 91b0ebef9027..6745015e1a81 100644 --- a/core/hdd/src/wlan_hdd_ioctl.c +++ b/core/hdd/src/wlan_hdd_ioctl.c @@ -5058,6 +5058,11 @@ static int drv_cmd_get_ibss_peer_info_all(hdd_adapter_t *adapter, 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; @@ -5175,6 +5180,8 @@ static int drv_cmd_get_ibss_peer_info(hdd_adapter_t *adapter, if (QDF_STATUS_SUCCESS == status) { uint32_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,