diff --git a/wmi/inc/wmi_unified_param.h b/wmi/inc/wmi_unified_param.h index 03a5b24689bd..41b324bb66ac 100644 --- a/wmi/inc/wmi_unified_param.h +++ b/wmi/inc/wmi_unified_param.h @@ -8123,6 +8123,10 @@ typedef struct { uint32_t counter; uint32_t chain_rssi[WMI_HOST_MAX_CHAINS]; uint16_t chain_phase[WMI_HOST_MAX_CHAINS]; + int32_t cfo_measurement; + uint8_t agc_gain[WMI_HOST_MAX_CHAINS]; + uint32_t rx_start_ts; + uint32_t rx_ts_reset; } wmi_cfr_peer_tx_event_param; /** diff --git a/wmi/src/wmi_unified_cfr_tlv.c b/wmi/src/wmi_unified_cfr_tlv.c index be782021f3ae..e2c6ce04198a 100644 --- a/wmi/src/wmi_unified_cfr_tlv.c +++ b/wmi/src/wmi_unified_cfr_tlv.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019-2020, The Linux Foundation. All rights reserved. + * Copyright (c) 2019-2021, The Linux Foundation. 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 above @@ -62,6 +62,14 @@ extract_cfr_peer_tx_event_param_tlv(wmi_unified_t wmi_handle, void *evt_buf, peer_tx_event->counter = peer_tx_event_ev->counter; qdf_mem_copy(peer_tx_event->chain_rssi, peer_tx_event_ev->chain_rssi, sizeof(peer_tx_event->chain_rssi)); + if (peer_tx_event_ev->cfo_measurement_valid) + peer_tx_event->cfo_measurement = + peer_tx_event_ev->cfo_measurement; + else + peer_tx_event->cfo_measurement = 0; + + peer_tx_event->rx_start_ts = peer_tx_event_ev->rx_start_ts; + peer_tx_event->rx_ts_reset = peer_tx_event_ev->rx_ts_reset; chain_phase_ev = param_buf->phase_param; if (chain_phase_ev) { @@ -74,6 +82,8 @@ extract_cfr_peer_tx_event_param_tlv(wmi_unified_t wmi_handle, void *evt_buf, */ peer_tx_event->chain_phase[idx] = (0xffff & chain_phase_ev->chain_phase[idx]); + peer_tx_event->agc_gain[idx] = + WMI_UNIFIED_AGC_GAIN_GET(chain_phase_ev, idx); } }