Skip to contentSkip to conversation

wifi: ath12k: set MSDU payload correctly

PATCH Applied Kang Yang 4 participants 4 messages Oct 20 – Oct 29 Qualcomm ATH12K wireless driver

lore
Share & tools
lore

Kang Yang

author
#0 lore raw

PATCH 1/1 wifi: ath12k: set MSDU payload correctly

ath12k_dp_mon_rx_merg_msdus() mistakenly passes head_msdu to ath12k_dp_mon_rx_msdus_set_payload() while iterating over all MSDUs in the chain.

As a result, skb_pull() is applied repeatedly to the head MSDU, whereas the remaining MSDUs are never adjusted.

Pass the current MSDU instead so each MSDU is processed exactly once.

Also rename the helper parameter from head_msdu to msdu since the helper operates on any MSDU in the chain.

Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.1.c7-00108-QCAHMTSWPL_V1.0_V2.0_SILICONZ_UPSTREAM-3

Fixes 1cf514fdc790 ("wifi: ath12k: use different packet offset for WCN7850")
---
 drivers/net/wireless/ath/ath12k/dp_mon.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/net/wireless/ath/ath12k/dp_mon.c +4 -4
index 709507d44d8e..ae14e118fe36 100644
@@ -186,7 +186,7 @@ ath12k_dp_mon_fill_rx_rate(struct ath12k_pdev_dp *dp_pdev,
 }
 
 static void ath12k_dp_mon_rx_msdus_set_payload(struct ath12k_base *ab,
-					       struct sk_buff *head_msdu,
+					       struct sk_buff *msdu,
 					       struct sk_buff *tail_msdu)
 {
 	u32 rx_pkt_offset, l2_hdr_offset, total_offset;
@@ -200,7 +200,7 @@ static void ath12k_dp_mon_rx_msdus_set_payload(struct ath12k_base *ab,
 	else
 		total_offset = rx_pkt_offset + l2_hdr_offset;
 
-	skb_pull(head_msdu, total_offset);
+	skb_pull(msdu, total_offset);
 }
 
 struct sk_buff *
@@ -261,7 +261,7 @@ ath12k_dp_mon_rx_merg_msdus(struct ath12k_pdev_dp *dp_pdev,
 		head_frag_list = NULL;
 
 		while (msdu) {
-			ath12k_dp_mon_rx_msdus_set_payload(ab, head_msdu, tail_msdu);
+			ath12k_dp_mon_rx_msdus_set_payload(ab, msdu, tail_msdu);
 
 			if (!head_frag_list)
 				head_frag_list = msdu;
@@ -296,7 +296,7 @@ ath12k_dp_mon_rx_merg_msdus(struct ath12k_pdev_dp *dp_pdev,
 		msdu = head_msdu;
 
 		while (msdu) {
-			ath12k_dp_mon_rx_msdus_set_payload(ab, head_msdu, tail_msdu);
+			ath12k_dp_mon_rx_msdus_set_payload(ab, msdu, tail_msdu);
 			if (qos_pkt) {
 				dest = skb_push(msdu, sizeof(__le16));
 				if (!dest)

---
base-commit: cd026e68fdbf88b9cc522b76c7a9d92c9a41f709
change-id: 20261020-msdupayload-2c8d4c1e54b4

Best regards,

Signature · 1 line
Kang Yang <[email protected]>
Reviewed-by on v1 1/1
#1 lore raw
Quoted 9 lines · Kang Yang

ath12k_dp_mon_rx_merg_msdus() mistakenly passes head_msdu to ath12k_dp_mon_rx_msdus_set_payload() while iterating over all MSDUs in the chain.

As a result, skb_pull() is applied repeatedly to the head MSDU, whereas the remaining MSDUs are never adjusted.

Pass the current MSDU instead so each MSDU is processed exactly once.

Quoted 7 lines

Also rename the helper parameter from head_msdu to msdu since the helper operates on any MSDU in the chain.

Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.1.c7-00108-QCAHMTSWPL_V1.0_V2.0_SILICONZ_UPSTREAM-3

Fixes 1cf514fdc790 ("wifi: ath12k: use different packet offset for WCN7850")
Reviewed-by on v1 1/1
#2 lore raw
In reply to Kang Yang
Quoted 9 lines · Kang Yang

ath12k_dp_mon_rx_merg_msdus() mistakenly passes head_msdu to ath12k_dp_mon_rx_msdus_set_payload() while iterating over all MSDUs in the chain.

As a result, skb_pull() is applied repeatedly to the head MSDU, whereas the remaining MSDUs are never adjusted.

Pass the current MSDU instead so each MSDU is processed exactly once.

Quoted 7 lines

Also rename the helper parameter from head_msdu to msdu since the helper operates on any MSDU in the chain.

Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.1.c7-00108-QCAHMTSWPL_V1.0_V2.0_SILICONZ_UPSTREAM-3

Fixes 1cf514fdc790 ("wifi: ath12k: use different packet offset for WCN7850")
Applied
#3 lore raw
In reply to Kang Yang
Quoted 8 lines · Kang Yang

ath12k_dp_mon_rx_merg_msdus() mistakenly passes head_msdu to ath12k_dp_mon_rx_msdus_set_payload() while iterating over all MSDUs in the chain.

As a result, skb_pull() is applied repeatedly to the head MSDU, whereas the remaining MSDUs are never adjusted.

[...]

Applied, thanks!

[1/1] wifi: ath12k: set MSDU payload correctly

      commit: fe74d991f3387febfd57b65c7383d2d49e14e19a

Best regards,

Signature · 1 line
Jeff Johnson <[email protected]>