瀏覽代碼

qcacmn: Add CFR supports for KIWI

This change adds CFR supports for KIWI.

Change-Id: I895eeae41c7f8bba4a35ee46a2ad6a1eadf82f9b
CRs-Fixed: 3114230
Wu Gao 3 年之前
父節點
當前提交
cf7bae960f
共有 3 個文件被更改,包括 51 次插入4 次删除
  1. 40 1
      hal/wifi3.0/kiwi/hal_kiwi_rx.h
  2. 10 3
      target_if/cfr/src/target_if_cfr.c
  3. 1 0
      umac/cfr/dispatcher/inc/wlan_cfr_utils_api.h

+ 40 - 1
hal/wifi3.0/kiwi/hal_kiwi_rx.h

@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2021 The Linux Foundation. All rights reserved.
- * Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -151,6 +151,45 @@ void hal_rx_get_rtt_info_kiwi(void *rx_tlv,
 	HAL_RX_GET(rx_tlv,
 		   RX_LOCATION_INFO,
 		   RESERVED_3);
+	ppdu_info->cfr_info.rx_start_ts =
+	HAL_RX_GET(rx_tlv,
+		   PHYRX_PKT_END_9_RX_PKT_END_DETAILS_RX_LOCATION_INFO_DETAILS,
+		   RX_START_TS);
+
+	ppdu_info->cfr_info.rtt_cfo_measurement = (int16_t)
+	HAL_RX_GET(rx_tlv,
+		   PHYRX_PKT_END_13_RX_PKT_END_DETAILS_RX_LOCATION_INFO_DETAILS,
+		   RTT_CFO_MEASUREMENT);
+
+	ppdu_info->cfr_info.agc_gain_info0 =
+	HAL_RX_GET(rx_tlv,
+		   PHYRX_PKT_END_1_RX_PKT_END_DETAILS,
+		   PHY_TIMESTAMP_1_LOWER_32);
+
+	ppdu_info->cfr_info.agc_gain_info1 =
+	HAL_RX_GET(rx_tlv,
+		   PHYRX_PKT_END_2_RX_PKT_END_DETAILS,
+		   PHY_TIMESTAMP_1_UPPER_32);
+
+	ppdu_info->cfr_info.agc_gain_info2 =
+	HAL_RX_GET(rx_tlv,
+		   PHYRX_PKT_END_3_RX_PKT_END_DETAILS,
+		   PHY_TIMESTAMP_2_LOWER_32);
+
+	ppdu_info->cfr_info.agc_gain_info3 =
+	HAL_RX_GET(rx_tlv,
+		   PHYRX_PKT_END_4_RX_PKT_END_DETAILS,
+		   PHY_TIMESTAMP_2_UPPER_32);
+
+	ppdu_info->cfr_info.mcs_rate =
+	HAL_RX_GET(rx_tlv,
+		   PHYRX_PKT_END_8_RX_PKT_END_DETAILS_RX_LOCATION_INFO_DETAILS,
+		   RTT_MCS_RATE);
+
+	ppdu_info->cfr_info.gi_type =
+	HAL_RX_GET(rx_tlv,
+		   PHYRX_PKT_END_8_RX_PKT_END_DETAILS_RX_LOCATION_INFO_DETAILS,
+		   RTT_GI_TYPE);
 }
 #endif
 #endif

+ 10 - 3
target_if/cfr/src/target_if_cfr.c

@@ -246,7 +246,8 @@ void target_if_cfr_fill_header(struct csi_cfr_header *hdr,
 	} else {
 		if (target_type == TARGET_TYPE_QCN9000 ||
 		    target_type == TARGET_TYPE_QCN9224 ||
-		    target_type == TARGET_TYPE_QCA6490)
+		    target_type == TARGET_TYPE_QCA6490 ||
+		    target_type == TARGET_TYPE_KIWI)
 			hdr->cmn.cfr_metadata_version = CFR_META_VERSION_7;
 		else if ((target_type == TARGET_TYPE_QCA6018) ||
 			 ((target_type == TARGET_TYPE_QCA5018) && (!is_rcc)))
@@ -266,6 +267,8 @@ void target_if_cfr_fill_header(struct csi_cfr_header *hdr,
 			hdr->cmn.chip_type = CFR_CAPTURE_RADIO_HSP;
 		else if (target_type == TARGET_TYPE_QCA6750)
 			hdr->cmn.chip_type = CFR_CAPTURE_RADIO_MOSELLE;
+		else if (target_type == TARGET_TYPE_KIWI)
+			hdr->cmn.chip_type = CFR_CAPTURE_RADIO_KIWI;
 		else
 			hdr->cmn.chip_type = CFR_CAPTURE_RADIO_CYP;
 	}
@@ -329,6 +332,8 @@ static QDF_STATUS target_if_cfr_init_target(struct wlan_objmgr_psoc *psoc,
 		cfr_pdev->chip_type = CFR_CAPTURE_RADIO_HSP;
 	else if (target == TARGET_TYPE_QCA6750)
 		cfr_pdev->chip_type = CFR_CAPTURE_RADIO_MOSELLE;
+	else if (target == TARGET_TYPE_KIWI)
+		cfr_pdev->chip_type = CFR_CAPTURE_RADIO_KIWI;
 
 	return status;
 }
@@ -368,7 +373,8 @@ target_if_cfr_init_pdev(struct wlan_objmgr_psoc *psoc,
 	target_type = target_if_cfr_get_target_type(psoc);
 
 	if (target_type == TARGET_TYPE_QCA6490 ||
-	    target_type == TARGET_TYPE_QCA6750) {
+	    target_type == TARGET_TYPE_QCA6750 ||
+	    target_type == TARGET_TYPE_KIWI) {
 		status = target_if_cfr_init_target(psoc,
 						   pdev, target_type);
 	} else if (target_type == TARGET_TYPE_ADRASTEA) {
@@ -391,7 +397,8 @@ target_if_cfr_deinit_pdev(struct wlan_objmgr_psoc *psoc,
 	target_type = target_if_cfr_get_target_type(psoc);
 
 	if (target_type == TARGET_TYPE_QCA6490 ||
-	    target_type == TARGET_TYPE_QCA6750) {
+	    target_type == TARGET_TYPE_QCA6750 ||
+	    target_type == TARGET_TYPE_KIWI) {
 		status = target_if_cfr_deinit_target(psoc, pdev);
 	} else if (target_type == TARGET_TYPE_ADRASTEA) {
 		status = cfr_adrastea_deinit_pdev(psoc, pdev);

+ 1 - 0
umac/cfr/dispatcher/inc/wlan_cfr_utils_api.h

@@ -116,6 +116,7 @@ enum cfrradiotype {
 	CFR_CAPTURE_RADIO_SPRUCE,
 	CFR_CAPTURE_RADIO_ALDER,
 	CFR_CAPTURE_RADIO_WAIKIKI,
+	CFR_CAPTURE_RADIO_KIWI,
 	CFR_CAPTURE_RADIO_MAX = 0xFF,
 };