From 28ed233c3c488220da541818c4b30c4de1143f71 Mon Sep 17 00:00:00 2001 From: Wu Gao Date: Thu, 2 Dec 2021 18:17:16 +0800 Subject: [PATCH] qcacmn: Populate additional params to CFR info for QCA6490 HAL changes to populate agc gain, CFO, rx_start_ts, mcs_rate and gi_type to CFR info for QCA6490. Change-Id: I6f6f47c87d40bd661162f764fb3a360230a56457 CRs-Fixed: 3086667 --- hal/wifi3.0/qca6490/hal_6490_rx.h | 40 +++++++++++++++++++++++++++++++ target_if/cfr/src/target_if_cfr.c | 3 ++- 2 files changed, 42 insertions(+), 1 deletion(-) diff --git a/hal/wifi3.0/qca6490/hal_6490_rx.h b/hal/wifi3.0/qca6490/hal_6490_rx.h index 828a036692..98daa4f191 100644 --- a/hal/wifi3.0/qca6490/hal_6490_rx.h +++ b/hal/wifi3.0/qca6490/hal_6490_rx.h @@ -1,5 +1,6 @@ /* * Copyright (c) 2019-2021 The Linux Foundation. All rights reserved. + * Copyright (c) 2021 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 @@ -465,6 +466,45 @@ void hal_rx_get_rtt_info_6490(void *rx_tlv, HAL_RX_GET(rx_tlv, PHYRX_PKT_END_13_RX_PKT_END_DETAILS_RX_LOCATION_INFO_DETAILS, RESERVED_8); + 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 diff --git a/target_if/cfr/src/target_if_cfr.c b/target_if/cfr/src/target_if_cfr.c index a1f6d75c03..5384c6e9a3 100644 --- a/target_if/cfr/src/target_if_cfr.c +++ b/target_if/cfr/src/target_if_cfr.c @@ -255,7 +255,8 @@ void target_if_cfr_fill_header(struct csi_cfr_header *hdr, hdr->cmn.chip_type = CFR_CAPTURE_RADIO_ALDER; } else { if (target_type == TARGET_TYPE_QCN9000 || - target_type == TARGET_TYPE_QCN9224) + target_type == TARGET_TYPE_QCN9224 || + target_type == TARGET_TYPE_QCA6490) hdr->cmn.cfr_metadata_version = CFR_META_VERSION_7; else if ((target_type == TARGET_TYPE_QCA6018) || ((target_type == TARGET_TYPE_QCA5018) && (!is_rcc)))