summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSriram Madhvapathi <msriram@codeaurora.org>2016-09-30 11:35:28 +0530
committerqcabuildsw <qcabuildsw@localhost>2016-10-03 17:38:45 -0700
commit85df7c7d2f2720a60301789549ae61ebf8cbefd0 (patch)
treed3c7d7b744e2ac6032aeb56cec0e6479dba9c1a6
parent6213c01b1b27a3255e217a9997aaeb9376bbcce8 (diff)
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
-rw-r--r--core/hdd/src/wlan_hdd_ioctl.c7
1 files changed, 7 insertions, 0 deletions
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,