Эх сурвалжийг харах

qcacmn: Use addr1 for RA in TXMON generated ACK frame

ACK frame captured via TXMON as part of LPC has incorrect
RA field populated using addr2 from TLVs. This is resulting
in the TX ACK frame to be misinterpreted as RX ACK frame.

Fix is to use addr1 from TLVs to populate RA for TX ACK
frames.

Change-Id: I23022c5cbabafc7025abef9ef2e9e2370750dad7
CRs-Fixed: 3787647
Yeshwanth Sriram Guntuka 1 жил өмнө
parent
commit
410a2ae521

+ 6 - 14
dp/wifi3.0/monitor/2.0/dp_tx_mon_status_2.0.c

@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2021, The Linux Foundation. All rights reserved.
- * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
@@ -468,14 +468,12 @@ dp_tx_mon_generate_rts_frm(struct dp_pdev *pdev,
  * dp_tx_mon_generate_ack_frm() - API to generate ack frame
  * @pdev: pdev Handle
  * @tx_ppdu_info: pointer to tx ppdu info structure
- * @window_flag: frame generated window
  *
  * Return: void
  */
 static void
 dp_tx_mon_generate_ack_frm(struct dp_pdev *pdev,
-			   struct dp_tx_ppdu_info *tx_ppdu_info,
-			   uint8_t window_flag)
+			   struct dp_tx_ppdu_info *tx_ppdu_info)
 {
 	/* allocate and populate ACK frame */
 	/* enqueue 802.11 payload to per user mpdu_q */
@@ -520,15 +518,9 @@ dp_tx_mon_generate_ack_frm(struct dp_pdev *pdev,
 	wh_addr1->i_fc[1] = 0;
 	wh_addr1->i_fc[0] = frm_ctl;
 
-	if (window_flag == INITIATOR_WINDOW) {
-		qdf_mem_copy(wh_addr1->i_addr1,
-			     TXMON_STATUS_INFO(tx_status_info, addr1),
-			     QDF_MAC_ADDR_SIZE);
-	} else {
-		qdf_mem_copy(wh_addr1->i_addr1,
-			     TXMON_STATUS_INFO(tx_status_info, addr2),
-			     QDF_MAC_ADDR_SIZE);
-	}
+	qdf_mem_copy(wh_addr1->i_addr1,
+		     TXMON_STATUS_INFO(tx_status_info, addr1),
+		     QDF_MAC_ADDR_SIZE);
 
 	/* set duration zero for ack frame */
 	*(u_int16_t *)(&wh_addr1->i_dur) = qdf_cpu_to_le16(0x0000);
@@ -1167,7 +1159,7 @@ dp_tx_mon_generated_response_frm(struct dp_pdev *pdev,
 	switch (gen_response) {
 	case TXMON_GEN_RESP_SELFGEN_ACK:
 	{
-		dp_tx_mon_generate_ack_frm(pdev, tx_ppdu_info, RESPONSE_WINDOW);
+		dp_tx_mon_generate_ack_frm(pdev, tx_ppdu_info);
 		break;
 	}
 	case TXMON_GEN_RESP_SELFGEN_CTS: