Kaynağa Gözat

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
Sriram Madhvapathi 8 yıl önce
ebeveyn
işleme
85df7c7d2f
1 değiştirilmiş dosya ile 7 ekleme ve 0 silme
  1. 7 0
      core/hdd/src/wlan_hdd_ioctl.c

+ 7 - 0
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,