Browse Source

qca-wifi: Fix to include SA in addr3 in tx capture

In Tx capture feature, Addr 3 is wrongly populated
with peer mac. Add fix to pick correct SA from
ethernet frame and use in wireless hdr.

Change-Id: I457c3118a1e8e5e7aace4e784e2978e89dda2eda
CRs-Fixed:2532324
sumedh baikady 5 years ago
parent
commit
6024ab97e2
1 changed files with 5 additions and 2 deletions
  1. 5 2
      dp/wifi3.0/dp_tx_capture.c

+ 5 - 2
dp/wifi3.0/dp_tx_capture.c

@@ -593,7 +593,8 @@ static uint32_t dp_tx_update_80211_hdr(struct dp_pdev *pdev,
 				       struct dp_peer *peer,
 				       void *data,
 				       qdf_nbuf_t nbuf,
-				       uint16_t ether_type)
+				       uint16_t ether_type,
+				       uint8_t *src_addr)
 {
 	struct cdp_tx_completion_ppdu *ppdu_desc;
 	struct ieee80211_frame *ptr_wh;
@@ -621,6 +622,8 @@ static uint32_t dp_tx_update_80211_hdr(struct dp_pdev *pdev,
 		ptr_qoscntl->i_qos[1] = (ppdu_desc->user[0].qos_ctrl &
 					 0xFF00) >> 8;
 		ptr_qoscntl->i_qos[0] = (ppdu_desc->user[0].qos_ctrl & 0xFF);
+		/* Update Addr 3 (SA) with SA derived from ether packet */
+		qdf_mem_copy(ptr_wh->i_addr3, src_addr, QDF_MAC_ADDR_SIZE);
 
 		peer->tx_capture.tx_wifi_ppdu_id = ppdu_desc->ppdu_id;
 	}
@@ -736,7 +739,7 @@ dp_tx_mon_restitch_mpdu_from_msdus(struct dp_pdev *pdev,
 
 			dp_tx_update_80211_hdr(pdev, peer,
 					       ppdu_desc, mpdu_nbuf,
-					       ether_type);
+					       ether_type, eh->ether_shost);
 
 			/* update first buffer to previous buffer */
 			prev_nbuf = curr_nbuf;