Sfoglia il codice sorgente

qca-wifi: Add QoS NULL Check for Data Frames

Currently, there is no check for QoS NULL when
handling data frames in the TX Cap feature. This
leads to QoS NULL frames not being seen OTA. Add
a check in dp_tx_ppdu_stats_process to ensure data
frame is not a QoS NULL data frame before handling,
since QoS NULL payload comes in management path.

Change-Id: I9fa2e68115327a283b241214ff62534bcb1ed74a
CRs-Fixed: 2632712
Christopher Chopp 5 anni fa
parent
commit
4b2fd4033d
1 ha cambiato i file con 22 aggiunte e 7 eliminazioni
  1. 22 7
      dp/wifi3.0/dp_tx_capture.c

+ 22 - 7
dp/wifi3.0/dp_tx_capture.c

@@ -2937,10 +2937,10 @@ dp_check_ppdu_and_deliver(struct dp_pdev *pdev,
 			continue;
 		}
 
-		if (ppdu_desc->frame_type == CDP_PPDU_FTYPE_CTRL ||
-		    ppdu_desc->htt_frame_type ==
-		    HTT_STATS_FTYPE_SGEN_QOS_NULL ||
-		    type != FRAME_CTRL_TYPE_DATA) {
+		if ((ppdu_desc->frame_type == CDP_PPDU_FTYPE_CTRL) ||
+		    (ppdu_desc->htt_frame_type ==
+		     HTT_STATS_FTYPE_SGEN_QOS_NULL) ||
+		    (type != FRAME_CTRL_TYPE_DATA)) {
 			qdf_nbuf_t nbuf_ppdu = nbuf_ppdu_desc_list[desc_cnt];
 
 			if (dp_check_mgmt_ctrl_ppdu(pdev, nbuf_ppdu)) {
@@ -3236,6 +3236,7 @@ void dp_tx_ppdu_stats_process(void *context)
 			uint32_t num_msdu = 0;
 			uint32_t qlen = 0;
 			uint16_t peer_id;
+			uint8_t type, subtype;
 
 			qdf_nbuf_queue_init(&head_msdu);
 			qdf_nbuf_queue_init(&head_xretries);
@@ -3258,6 +3259,18 @@ void dp_tx_ppdu_stats_process(void *context)
 
 			ppdu_desc = (struct cdp_tx_completion_ppdu *)
 				qdf_nbuf_data(nbuf);
+			type = (ppdu_desc->frame_ctrl &
+				IEEE80211_FC0_TYPE_MASK);
+			subtype = (ppdu_desc->frame_ctrl &
+				   IEEE80211_FC0_SUBTYPE_MASK);
+
+			if ((type == IEEE80211_FC0_TYPE_DATA) &&
+			    (subtype == IEEE80211_FC0_SUBTYPE_QOS_NULL) &&
+			    (ppdu_desc->htt_frame_type ==
+			     HTT_STATS_FTYPE_TIDQ_DATA_SU)) {
+				ppdu_desc->htt_frame_type =
+					HTT_STATS_FTYPE_SGEN_QOS_NULL;
+			}
 
 			/* send WDI event */
 			if (pdev->tx_capture_enabled ==
@@ -3302,9 +3315,11 @@ void dp_tx_ppdu_stats_process(void *context)
 				continue;
 			}
 
-			if ((ppdu_desc->frame_type == CDP_PPDU_FTYPE_DATA) ||
-			    (ppdu_desc->num_mpdu &&
-			     ppdu_desc->frame_type == CDP_PPDU_FTYPE_BAR)) {
+			if (((ppdu_desc->frame_type == CDP_PPDU_FTYPE_DATA) &&
+			     (ppdu_desc->htt_frame_type !=
+			      HTT_STATS_FTYPE_SGEN_QOS_NULL)) ||
+			    ((ppdu_desc->num_mpdu) &&
+			     (ppdu_desc->frame_type == CDP_PPDU_FTYPE_BAR))) {
 				peer_id = ppdu_desc->user[0].peer_id;
 				peer = dp_peer_find_by_id(pdev->soc, peer_id);
 				/**