Răsfoiți Sursa

qcacmn: Populate additional parameters from CFR capture event

Add CFO, agc_gain and rx start timestamp related parameters
to wmi_cfr_peer_tx_event_param and populate the same with
data from FW peer tx event.

Change-Id: I462fa56a854b18d1f9b46d1e14eea85da0d45f23
Shwetha G K 4 ani în urmă
părinte
comite
d384cff416
2 a modificat fișierele cu 15 adăugiri și 1 ștergeri
  1. 4 0
      wmi/inc/wmi_unified_param.h
  2. 11 1
      wmi/src/wmi_unified_cfr_tlv.c

+ 4 - 0
wmi/inc/wmi_unified_param.h

@@ -7587,6 +7587,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;
 
 /**

+ 11 - 1
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);
 		}
 	}