浏览代码

qcacmn: Using HAL_RX_GET_64 to read cfr elements

	RCC mode of CFR capturing was not working on miami as
	bb_captured_channel field which is being accessed from
	RXPCU_PPDU_END_INFO tlv is not being set in host.
	These fields of cfr are fetched from HAL_RX_GET()
	which is being failed to read by host as it
	follows 32 bit approach and miami uses 64 bit format.
	Reading 4 bytes is not enough ,So changing HAL_RX_GET()
	to HAL_RX_GET_64() and this will read 8 bytes with
	which we get elements properly.

Change-Id: I8c669e5cc78ce856c1bc4b0449125aac45461a9b
CRs-Fixed: 3572563
Vaishnavi Chekuru 1 年之前
父节点
当前提交
e2b1461482
共有 1 个文件被更改,包括 39 次插入29 次删除
  1. 39 29
      hal/wifi3.0/qca5332/hal_5332.c

+ 39 - 29
hal/wifi3.0/qca5332/hal_5332.c

@@ -265,13 +265,13 @@ void hal_rx_get_bb_info_5332(void *rx_tlv, void *ppdu_info_hdl)
 	struct hal_rx_ppdu_info *ppdu_info  = ppdu_info_hdl;
 	struct hal_rx_ppdu_info *ppdu_info  = ppdu_info_hdl;
 
 
 	ppdu_info->cfr_info.bb_captured_channel =
 	ppdu_info->cfr_info.bb_captured_channel =
-		HAL_RX_GET(rx_tlv, RXPCU_PPDU_END_INFO, BB_CAPTURED_CHANNEL);
+		HAL_RX_GET_64(rx_tlv, RXPCU_PPDU_END_INFO, BB_CAPTURED_CHANNEL);
 
 
 	ppdu_info->cfr_info.bb_captured_timeout =
 	ppdu_info->cfr_info.bb_captured_timeout =
-		HAL_RX_GET(rx_tlv, RXPCU_PPDU_END_INFO, BB_CAPTURED_TIMEOUT);
+		HAL_RX_GET_64(rx_tlv, RXPCU_PPDU_END_INFO, BB_CAPTURED_TIMEOUT);
 
 
 	ppdu_info->cfr_info.bb_captured_reason =
 	ppdu_info->cfr_info.bb_captured_reason =
-		HAL_RX_GET(rx_tlv, RXPCU_PPDU_END_INFO, BB_CAPTURED_REASON);
+		HAL_RX_GET_64(rx_tlv, RXPCU_PPDU_END_INFO, BB_CAPTURED_REASON);
 }
 }
 
 
 static inline
 static inline
@@ -280,55 +280,65 @@ void hal_rx_get_rtt_info_5332(void *rx_tlv, void *ppdu_info_hdl)
 	struct hal_rx_ppdu_info *ppdu_info  = ppdu_info_hdl;
 	struct hal_rx_ppdu_info *ppdu_info  = ppdu_info_hdl;
 
 
 	ppdu_info->cfr_info.rx_location_info_valid =
 	ppdu_info->cfr_info.rx_location_info_valid =
-	HAL_RX_GET(rx_tlv, PHYRX_LOCATION_RX_LOCATION_INFO_DETAILS,
-		   RX_LOCATION_INFO_VALID);
+	HAL_RX_GET_64(rx_tlv, PHYRX_LOCATION_RX_LOCATION_INFO_DETAILS,
+		      RX_LOCATION_INFO_VALID);
 
 
 	ppdu_info->cfr_info.rtt_che_buffer_pointer_low32 =
 	ppdu_info->cfr_info.rtt_che_buffer_pointer_low32 =
-	HAL_RX_GET(rx_tlv,
-		   PHYRX_LOCATION_RX_LOCATION_INFO_DETAILS,
-		   RTT_CHE_BUFFER_POINTER_LOW32);
+	HAL_RX_GET_64(rx_tlv,
+		      PHYRX_LOCATION_RX_LOCATION_INFO_DETAILS,
+		      RTT_CHE_BUFFER_POINTER_LOW32);
 
 
 	ppdu_info->cfr_info.rtt_che_buffer_pointer_high8 =
 	ppdu_info->cfr_info.rtt_che_buffer_pointer_high8 =
-	HAL_RX_GET(rx_tlv,
-		   PHYRX_LOCATION_RX_LOCATION_INFO_DETAILS,
-		   RTT_CHE_BUFFER_POINTER_HIGH8);
+	HAL_RX_GET_64(rx_tlv,
+		      PHYRX_LOCATION_RX_LOCATION_INFO_DETAILS,
+		      RTT_CHE_BUFFER_POINTER_HIGH8);
 
 
 	ppdu_info->cfr_info.chan_capture_status =
 	ppdu_info->cfr_info.chan_capture_status =
 	HAL_GET_RX_LOCATION_INFO_CHAN_CAPTURE_STATUS(rx_tlv);
 	HAL_GET_RX_LOCATION_INFO_CHAN_CAPTURE_STATUS(rx_tlv);
 
 
 	ppdu_info->cfr_info.rx_start_ts =
 	ppdu_info->cfr_info.rx_start_ts =
-	HAL_RX_GET(rx_tlv,
-		   PHYRX_LOCATION_RX_LOCATION_INFO_DETAILS,
-		   RX_START_TS);
+	HAL_RX_GET_64(rx_tlv,
+		      PHYRX_LOCATION_RX_LOCATION_INFO_DETAILS,
+		      RX_START_TS);
 
 
 	ppdu_info->cfr_info.rtt_cfo_measurement = (int16_t)
 	ppdu_info->cfr_info.rtt_cfo_measurement = (int16_t)
-	HAL_RX_GET(rx_tlv,
-		   PHYRX_LOCATION_RX_LOCATION_INFO_DETAILS,
-		   RTT_CFO_MEASUREMENT);
+	HAL_RX_GET_64(rx_tlv,
+		      PHYRX_LOCATION_RX_LOCATION_INFO_DETAILS,
+		      RTT_CFO_MEASUREMENT);
 
 
 	ppdu_info->cfr_info.agc_gain_info0 =
 	ppdu_info->cfr_info.agc_gain_info0 =
-	HAL_RX_GET(rx_tlv,
-		   PHYRX_LOCATION_RX_LOCATION_INFO_DETAILS,
-		   GAIN_CHAIN0);
+	HAL_RX_GET_64(rx_tlv,
+		      PHYRX_LOCATION_RX_LOCATION_INFO_DETAILS,
+		      GAIN_CHAIN0);
 
 
 	ppdu_info->cfr_info.agc_gain_info0 |=
 	ppdu_info->cfr_info.agc_gain_info0 |=
-	(((uint32_t)HAL_RX_GET(rx_tlv,
-		    PHYRX_LOCATION_RX_LOCATION_INFO_DETAILS,
-		    GAIN_CHAIN1)) << 16);
+	(((uint32_t)HAL_RX_GET_64(rx_tlv,
+					PHYRX_LOCATION_RX_LOCATION_INFO_DETAILS,
+					GAIN_CHAIN1)) << 16);
 
 
 	ppdu_info->cfr_info.agc_gain_info1 =
 	ppdu_info->cfr_info.agc_gain_info1 =
-	HAL_RX_GET(rx_tlv,
-		   PHYRX_LOCATION_RX_LOCATION_INFO_DETAILS,
-		   GAIN_CHAIN2);
+	HAL_RX_GET_64(rx_tlv,
+		      PHYRX_LOCATION_RX_LOCATION_INFO_DETAILS,
+		      GAIN_CHAIN2);
 
 
 	ppdu_info->cfr_info.agc_gain_info1 |=
 	ppdu_info->cfr_info.agc_gain_info1 |=
-	(((uint32_t)HAL_RX_GET(rx_tlv,
-		    PHYRX_LOCATION_RX_LOCATION_INFO_DETAILS,
-		    GAIN_CHAIN3)) << 16);
+	(((uint32_t)HAL_RX_GET_64(rx_tlv,
+					PHYRX_LOCATION_RX_LOCATION_INFO_DETAILS,
+					GAIN_CHAIN3)) << 16);
 
 
 	ppdu_info->cfr_info.agc_gain_info2 = 0;
 	ppdu_info->cfr_info.agc_gain_info2 = 0;
 
 
 	ppdu_info->cfr_info.agc_gain_info3 = 0;
 	ppdu_info->cfr_info.agc_gain_info3 = 0;
+
+	ppdu_info->cfr_info.mcs_rate =
+	HAL_RX_GET_64(rx_tlv,
+		      PHYRX_LOCATION_RX_LOCATION_INFO_DETAILS,
+		      RTT_MCS_RATE);
+
+	ppdu_info->cfr_info.gi_type =
+	HAL_RX_GET_64(rx_tlv,
+		      PHYRX_LOCATION_RX_LOCATION_INFO_DETAILS,
+		      RTT_GI_TYPE);
 }
 }
 #endif
 #endif
 #ifdef CONFIG_WORD_BASED_TLV
 #ifdef CONFIG_WORD_BASED_TLV