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) <