qcacmn: Correct registers when populate CFR elements from tlv

This is requirement change about correcting the registers when
populate CFR elements from tlv.

Change-Id: I424a0d3ae569dae3378137b84067a30b0fa28413
CRs-Fixed: 3218220
This commit is contained in:
Wu Gao
2022-06-10 22:28:14 +08:00
committed by Madan Koyyalamudi
parent 025b889ef6
commit e46707f810

View File

@@ -109,6 +109,18 @@ RX_MSDU_DETAILS_RX_MSDU_DESC_INFO_DETAILS_RESERVED_0A_OFFSET))
#if defined(QCA_WIFI_KIWI) && defined(WLAN_CFR_ENABLE) && \ #if defined(QCA_WIFI_KIWI) && defined(WLAN_CFR_ENABLE) && \
defined(WLAN_ENH_CFR_ENABLE) defined(WLAN_ENH_CFR_ENABLE)
#define PHYRX_LOCATION_RX_LOCATION_INFO_DETAILS_CHAN_CAPTURE_STATUS_BMASK 0x00000006
#define PHYRX_LOCATION_RX_LOCATION_INFO_DETAILS_CHAN_CAPTURE_STATUS_LSB 1
#define PHYRX_LOCATION_RX_LOCATION_INFO_DETAILS_CHAN_CAPTURE_STATUS_MSB 2
#define HAL_GET_RX_LOCATION_INFO_CHAN_CAPTURE_STATUS(rx_tlv) \
((HAL_RX_GET_64((rx_tlv), \
PHYRX_LOCATION_RX_LOCATION_INFO_DETAILS, \
RTT_CFR_STATUS) & \
PHYRX_LOCATION_RX_LOCATION_INFO_DETAILS_CHAN_CAPTURE_STATUS_BMASK) >> \
PHYRX_LOCATION_RX_LOCATION_INFO_DETAILS_CHAN_CAPTURE_STATUS_LSB)
static inline static inline
void hal_rx_get_bb_info_kiwi(void *rx_tlv, void hal_rx_get_bb_info_kiwi(void *rx_tlv,
void *ppdu_info_hdl) void *ppdu_info_hdl)
@@ -132,64 +144,65 @@ void hal_rx_get_rtt_info_kiwi(void *rx_tlv,
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, HAL_RX_GET_64(rx_tlv, PHYRX_LOCATION_RX_LOCATION_INFO_DETAILS,
RX_LOCATION_INFO_DETAILS_RX_LOCATION_INFO_VALID); 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, HAL_RX_GET_64(rx_tlv,
RX_LOCATION_INFO, PHYRX_LOCATION_RX_LOCATION_INFO_DETAILS,
RTT_CHE_BUFFER_POINTER_LOW32); 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, HAL_RX_GET_64(rx_tlv,
RX_LOCATION_INFO, PHYRX_LOCATION_RX_LOCATION_INFO_DETAILS,
RTT_CHE_BUFFER_POINTER_HIGH8); RTT_CHE_BUFFER_POINTER_HIGH8);
// TODO Beryllium - Changed reserved8 to reserved3 to avoid
// compilation failure for kiwi
ppdu_info->cfr_info.chan_capture_status = ppdu_info->cfr_info.chan_capture_status =
HAL_RX_GET(rx_tlv, HAL_GET_RX_LOCATION_INFO_CHAN_CAPTURE_STATUS(rx_tlv);
RX_LOCATION_INFO,
RESERVED_3);
ppdu_info->cfr_info.rx_start_ts = ppdu_info->cfr_info.rx_start_ts =
HAL_RX_GET(rx_tlv, HAL_RX_GET_64(rx_tlv,
RX_LOCATION_INFO, PHYRX_LOCATION_RX_LOCATION_INFO_DETAILS,
RX_START_TS); 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, HAL_RX_GET_64(rx_tlv,
RX_LOCATION_INFO, PHYRX_LOCATION_RX_LOCATION_INFO_DETAILS,
RTT_CFO_MEASUREMENT); RTT_CFO_MEASUREMENT);
ppdu_info->cfr_info.agc_gain_info0 = ppdu_info->cfr_info.agc_gain_info0 =
HAL_RX_GET(rx_tlv, HAL_RX_GET_64(rx_tlv,
PHYRX_PKT_END_RX_PKT_END_DETAILS, PHYRX_LOCATION_RX_LOCATION_INFO_DETAILS,
PHY_TIMESTAMP_1_LOWER_32); GAIN_CHAIN0);
ppdu_info->cfr_info.agc_gain_info0 |=
(((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, HAL_RX_GET_64(rx_tlv,
PHYRX_PKT_END_RX_PKT_END_DETAILS, PHYRX_LOCATION_RX_LOCATION_INFO_DETAILS,
PHY_TIMESTAMP_1_UPPER_32); GAIN_CHAIN2);
ppdu_info->cfr_info.agc_gain_info2 = ppdu_info->cfr_info.agc_gain_info1 |=
HAL_RX_GET(rx_tlv, (((uint32_t)HAL_RX_GET_64(rx_tlv,
PHYRX_PKT_END_RX_PKT_END_DETAILS, PHYRX_LOCATION_RX_LOCATION_INFO_DETAILS,
PHY_TIMESTAMP_2_LOWER_32); GAIN_CHAIN3)) << 16);
ppdu_info->cfr_info.agc_gain_info3 = ppdu_info->cfr_info.agc_gain_info2 = 0;
HAL_RX_GET(rx_tlv,
PHYRX_PKT_END_RX_PKT_END_DETAILS, ppdu_info->cfr_info.agc_gain_info3 = 0;
PHY_TIMESTAMP_2_UPPER_32);
ppdu_info->cfr_info.mcs_rate = ppdu_info->cfr_info.mcs_rate =
HAL_RX_GET(rx_tlv, HAL_RX_GET_64(rx_tlv,
PHYRX_LOCATION_RX_LOCATION_INFO_DETAILS, PHYRX_LOCATION_RX_LOCATION_INFO_DETAILS,
RTT_MCS_RATE); RTT_MCS_RATE);
ppdu_info->cfr_info.gi_type = ppdu_info->cfr_info.gi_type =
HAL_RX_GET(rx_tlv, HAL_RX_GET_64(rx_tlv,
PHYRX_LOCATION_RX_LOCATION_INFO_DETAILS, PHYRX_LOCATION_RX_LOCATION_INFO_DETAILS,
RTT_GI_TYPE); RTT_GI_TYPE);
} }
#endif #endif
#endif #endif