Browse Source

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
Surabhi Vishnoi 3 years ago
parent
commit
d24b3c4526

+ 2 - 0
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;
 };
 
 /**

+ 5 - 2
components/pkt_capture/core/src/wlan_pkt_capture_data_txrx.c

@@ -291,12 +291,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 ==
@@ -320,6 +321,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;

+ 1 - 0
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) <