From 43301414080457b518d309211253cd57fbfee57e Mon Sep 17 00:00:00 2001 From: Surabhi Vishnoi Date: Wed, 28 Jul 2021 00:19:58 +0530 Subject: [PATCH] qcacld-3.0: Fill the nss in tx status in pkt capture mode Currently, nss is not filled for tx data packets. Fill the last received nss from ppdu stats in the tx status in pkt capture mode. Change-Id: I1833be5e19eaba4e88befe9970f079b91ec4bbe4 CRs-Fixed: 3004484 --- components/pkt_capture/core/inc/wlan_pkt_capture_priv.h | 2 ++ .../pkt_capture/core/src/wlan_pkt_capture_data_txrx.c | 7 +++++-- components/pkt_capture/core/src/wlan_pkt_capture_main.c | 1 + 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/components/pkt_capture/core/inc/wlan_pkt_capture_priv.h b/components/pkt_capture/core/inc/wlan_pkt_capture_priv.h index 6de315b58fbe..26e3bd4c4031 100644 --- a/components/pkt_capture/core/inc/wlan_pkt_capture_priv.h +++ b/components/pkt_capture/core/inc/wlan_pkt_capture_priv.h @@ -61,6 +61,7 @@ struct pkt_capture_cb_context { * @rx_avg_rssi: avg rssi of rx data packets * @ppdu_stats_q: list used for storing smu related ppdu stats * @lock_q: spinlock for ppdu_stats q + * @tx_nss: nss of tx data packets received from ppdu stats */ struct pkt_capture_vdev_priv { struct wlan_objmgr_vdev *vdev; @@ -71,6 +72,7 @@ struct pkt_capture_vdev_priv { int32_t rx_avg_rssi; qdf_list_t ppdu_stats_q; qdf_spinlock_t lock_q; + uint8_t tx_nss; }; /** 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 911d3131b50c..b31e499eed72 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 @@ -290,12 +290,13 @@ pkt_capture_update_tx_status( } } - pkt_capture_tx_get_phy_info(pktcapture_hdr, tx_status); - vdev_priv = pkt_capture_vdev_get_priv(vdev); if (qdf_unlikely(!vdev_priv)) goto skip_ppdu_stats; + /* Fill the nss received from ppdu_stats */ + pktcapture_hdr->nss = vdev_priv->tx_nss; + /* Remove the ppdu stats from front of list and fill it in tx_status */ qdf_spin_lock(&vdev_priv->lock_q); if (QDF_STATUS_SUCCESS == @@ -319,6 +320,8 @@ pkt_capture_update_tx_status( qdf_spin_unlock(&vdev_priv->lock_q); skip_ppdu_stats: + pkt_capture_tx_get_phy_info(pktcapture_hdr, tx_status); + tx_status->tsft = (u_int64_t)(pktcapture_hdr->timestamp); tx_status->ant_signal_db = pktcapture_hdr->rssi_comb; tx_status->rssi_comb = pktcapture_hdr->rssi_comb; diff --git a/components/pkt_capture/core/src/wlan_pkt_capture_main.c b/components/pkt_capture/core/src/wlan_pkt_capture_main.c index 9423a0598cfa..25f3f525b004 100644 --- a/components/pkt_capture/core/src/wlan_pkt_capture_main.c +++ b/components/pkt_capture/core/src/wlan_pkt_capture_main.c @@ -216,6 +216,7 @@ pkt_capture_process_ppdu_stats(void *log_data) return; smu = (htt_ppdu_stats_for_smu_tlv *)log_data; + vdev_priv->tx_nss = smu->nss; qdf_spin_lock(&vdev_priv->lock_q); if (qdf_list_size(&vdev_priv->ppdu_stats_q) <