Browse Source

qcacmn: Avoid processing tx rate stats

Avoid processing tx rate stats if STATS_USR_RATE_TLV is not processed
in htt_ppdu_stats

Change-Id: Icce8ca0b351ae1ae784ba605d1d984dcdd033715
CRs-Fixed: 2316130
Amir Patel 6 years ago
parent
commit
8ae687908d
1 changed files with 10 additions and 0 deletions
  1. 10 0
      dp/wifi3.0/dp_htt.c

+ 10 - 0
dp/wifi3.0/dp_htt.c

@@ -2448,6 +2448,7 @@ void dp_ppdu_desc_deliver(struct dp_pdev *pdev,
 	struct dp_peer *peer = NULL;
 	qdf_nbuf_t nbuf;
 	uint16_t i;
+	uint32_t tlv_bitmap_expected;
 
 	ppdu_desc = (struct cdp_tx_completion_ppdu *)
 		qdf_nbuf_data(ppdu_info->nbuf);
@@ -2455,6 +2456,11 @@ void dp_ppdu_desc_deliver(struct dp_pdev *pdev,
 	ppdu_desc->num_users = ppdu_info->last_user;
 	ppdu_desc->ppdu_id = ppdu_info->ppdu_id;
 
+	tlv_bitmap_expected = HTT_PPDU_DEFAULT_TLV_BITMAP;
+	if (pdev->tx_sniffer_enable || pdev->mcopy_mode) {
+		if (ppdu_info->is_ampdu)
+			tlv_bitmap_expected = HTT_PPDU_SNIFFER_AMPDU_TLV_BITMAP;
+	}
 	for (i = 0; i < ppdu_desc->num_users; i++) {
 
 		ppdu_desc->num_mpdu += ppdu_desc->user[i].num_mpdu;
@@ -2469,6 +2475,10 @@ void dp_ppdu_desc_deliver(struct dp_pdev *pdev,
 		if (!peer)
 			continue;
 
+		if (ppdu_info->tlv_bitmap != tlv_bitmap_expected) {
+			dp_peer_unref_del_find_by_id(peer);
+			continue;
+		}
 		if (ppdu_desc->user[i].tid < CDP_DATA_TID_MAX) {
 
 			dp_tx_stats_update(pdev->soc, peer,