From 403d510e5ef7ef7ff6fb3cb88a038beead30ba34 Mon Sep 17 00:00:00 2001 From: Shwetha G K Date: Thu, 10 Jun 2021 19:00:58 +0530 Subject: [PATCH] qcacmn: Populate mcs & gI parameters to cfr_info Populate mcs rate & gI type parameters to cfr_info CRs-Fixed: 2966865 Change-Id: Id9cc720a12d2aa3840620bde97fa44ede66d86c6 --- hal/wifi3.0/hal_api_mon.h | 43 ++++++++++++++++++++++++++- hal/wifi3.0/qca8074v2/hal_8074v2_rx.h | 10 +++++++ hal/wifi3.0/qcn9000/hal_9000.c | 10 +++++++ 3 files changed, 62 insertions(+), 1 deletion(-) diff --git a/hal/wifi3.0/hal_api_mon.h b/hal/wifi3.0/hal_api_mon.h index 277e5c7b90..1e88d38bde 100644 --- a/hal/wifi3.0/hal_api_mon.h +++ b/hal/wifi3.0/hal_api_mon.h @@ -580,8 +580,47 @@ struct hal_rx_ppdu_cfr_user_info { * d. CAPTURE_NO_BUFFER: next buffer in IPC ring not available * * @cfr_user_info: Peer mac for upto 4 MU users + * + * @rtt_cfo_measurement : raw cfo data extracted from hardware, which is 14 bit + * signed number. The first bit used for sign representation and 13 bits for + * fractional part. + * + * @agc_gain_info0: Chain 0 & chain 1 agc gain information reported by PHY + * + * @agc_gain_info1: Chain 2 & chain 3 agc gain information reported by PHY + * + * @agc_gain_info2: Chain 4 & chain 5 agc gain information reported by PHY + * + * @agc_gain_info3: Chain 6 & chain 7 agc gain information reported by PHY + * + * @rx_start_ts: Rx packet timestamp, the time the first L-STF ADC sample + * arrived at Rx antenna. + * + * @mcs_rate: Indicates the mcs/rate in which packet is received. + * If HT, + * 0-7: MCS0-MCS7 + * If VHT, + * 0-9: MCS0 to MCS9 + * If HE, + * 0-11: MCS0 to MCS11, + * 12-13: 4096QAM, + * 14-15: reserved + * If Legacy, + * 0: 48 Mbps + * 1: 24 Mbps + * 2: 12 Mbps + * 3: 6 Mbps + * 4: 54 Mbps + * 5: 36 Mbps + * 6: 18 Mbps + * 7: 9 Mbps + * + * @gi_type: Indicates the gaurd interval. + * 0: 0.8 us + * 1: 0.4 us + * 2: 1.6 us + * 3: 3.2 us */ - struct hal_rx_ppdu_cfr_info { bool bb_captured_channel; bool bb_captured_timeout; @@ -597,6 +636,8 @@ struct hal_rx_ppdu_cfr_info { uint32_t agc_gain_info2; uint32_t agc_gain_info3; uint32_t rx_start_ts; + uint32_t mcs_rate; + uint32_t gi_type; }; #else struct hal_rx_ppdu_cfr_info {}; diff --git a/hal/wifi3.0/qca8074v2/hal_8074v2_rx.h b/hal/wifi3.0/qca8074v2/hal_8074v2_rx.h index 2d67c0fba9..38e349f56e 100644 --- a/hal/wifi3.0/qca8074v2/hal_8074v2_rx.h +++ b/hal/wifi3.0/qca8074v2/hal_8074v2_rx.h @@ -589,6 +589,16 @@ void hal_rx_get_rtt_info_8074v2(void *rx_tlv, 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 diff --git a/hal/wifi3.0/qcn9000/hal_9000.c b/hal/wifi3.0/qcn9000/hal_9000.c index 43ad2fced7..801d03aea9 100644 --- a/hal/wifi3.0/qcn9000/hal_9000.c +++ b/hal/wifi3.0/qcn9000/hal_9000.c @@ -368,6 +368,16 @@ void hal_rx_get_rtt_info_9000(void *rx_tlv, void *ppdu_info_hdl) 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 /**