From d1f58c14c136f0dd631f3fb5fae8574b68a5f3b5 Mon Sep 17 00:00:00 2001 From: Surabhi Vishnoi Date: Thu, 10 Jun 2021 16:55:48 +0530 Subject: [PATCH] qcacld-3.0: Fill the average rx rssi in rx data packets Currently, rssi of rx data packet is not received as part of rx_tlv_hdr. To mitigate this limitation, fill the average rx rssi received from firmware in wmi smart monitor event which is stored in pkt_capture's vdev_priv structure. Change-Id: I3a1b7b766979816d6b17f05edc1c25d503edec1d CRs-Fixed: 2958109 --- .../pkt_capture/core/src/wlan_pkt_capture_data_txrx.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/components/pkt_capture/core/src/wlan_pkt_capture_data_txrx.c b/components/pkt_capture/core/src/wlan_pkt_capture_data_txrx.c index 54d9cd41588a..1814cf5fd051 100644 --- a/components/pkt_capture/core/src/wlan_pkt_capture_data_txrx.c +++ b/components/pkt_capture/core/src/wlan_pkt_capture_data_txrx.c @@ -739,6 +739,7 @@ static void pkt_capture_rx_mon_get_rx_status(void *context, void *dp_soc, struct connection_info info[MAX_NUMBER_OF_CONC_CONNECTIONS]; struct wlan_objmgr_psoc *psoc; struct wlan_objmgr_vdev *vdev = context; + struct pkt_capture_vdev_priv *vdev_priv; uint32_t conn_count; uint8_t vdev_id; int i; @@ -756,6 +757,12 @@ static void pkt_capture_rx_mon_get_rx_status(void *context, void *dp_soc, return; } + vdev_priv = pkt_capture_vdev_get_priv(vdev); + if (qdf_unlikely(!vdev)) + return; + + rx_status->rssi_comb = vdev_priv->rx_avg_rssi; + /* Update the connected channel info from policy manager */ conn_count = policy_mgr_get_connection_info(psoc, info); for (i = 0; i < conn_count; i++) { @@ -966,7 +973,6 @@ pkt_capture_rx_data_cb( /* need to update this to fill rx_status*/ pkt_capture_rx_mon_get_rx_status(context, psoc, rx_tlv_hdr, &rx_status); - rx_status.chan_noise_floor = NORMALIZED_TO_NOISE_FLOOR; rx_status.tx_status = status; rx_status.tx_retry_cnt = tx_retry_cnt; rx_status.add_rtap_ext = true;