* [PATCH ath-current] wifi: ath12k: fix peer_id usage in normal RX path
@ 2026-04-27 5:51 Baochen Qiang
2026-04-29 6:44 ` Rameshkumar Sundaram
2026-05-04 14:21 ` Jeff Johnson
0 siblings, 2 replies; 3+ messages in thread
From: Baochen Qiang @ 2026-04-27 5:51 UTC (permalink / raw)
To: Jeff Johnson; +Cc: linux-wireless, ath12k, linux-kernel, Baochen Qiang
ath12k_dp_rx_deliver_msdu() currently uses hal_rx_desc_data::peer_id
parsed from mpdu_start descriptor to do peer lookup. However In an A-MSDU
aggregation scenario, hardware only populates mpdu_start descriptor for
the first sub-msdu, but not the following ones. In that case peer_id could
be invalid, leading to peer lookup failure:
ath12k_wifi7_pci 0000:06:00.0: rx skb 00000000c391c041 len 1532 peer (null) 0 ucast sn 0 eht320 rate_idx 12 vht_nss 2 freq 6105 band 3 flag 0x40d1a fcs-err 0 mic-err 0 amsdu-more 0
As a result pubsta is NULL and parts of ieee80211_rx_status structure are
left uninitialized, which may cause unexpected behavior.
Fix it by switching the normal RX path to use ath12k_skb_rxcb::peer_id
which is parsed from REO ring's rx_mpdu_desc and is always valid.
hal_rx_desc_data::peer_id is still used in
ath12k_wifi7_dp_rx_frag_h_mpdu(), which is safe since A-MSDU
aggregation does not occur for fragmented frames. Similarly,
ath12k_skb_rxcb::peer_id may be overwritten by hal_rx_desc_data::peer_id
in ath12k_wifi7_dp_rx_h_mpdu(), which only handles non-aggregated
multicast/broadcast traffic.
Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.1.c5-00302-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.115823.3
Fixes: 11157e0910fd ("wifi: ath12k: Use ath12k_dp_peer in per packet Tx & Rx paths")
Signed-off-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com>
---
drivers/net/wireless/ath/ath12k/dp_rx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/ath/ath12k/dp_rx.c b/drivers/net/wireless/ath/ath12k/dp_rx.c
index 25557dea5826..b108ccd0f637 100644
--- a/drivers/net/wireless/ath/ath12k/dp_rx.c
+++ b/drivers/net/wireless/ath/ath12k/dp_rx.c
@@ -1340,7 +1340,7 @@ void ath12k_dp_rx_deliver_msdu(struct ath12k_pdev_dp *dp_pdev, struct napi_struc
bool is_mcbc = rxcb->is_mcbc;
bool is_eapol = rxcb->is_eapol;
- peer = ath12k_dp_peer_find_by_peerid(dp_pdev, rx_info->peer_id);
+ peer = ath12k_dp_peer_find_by_peerid(dp_pdev, rxcb->peer_id);
pubsta = peer ? peer->sta : NULL;
---
base-commit: 7aa24d964a04648b547197c22364e2b76aec096e
change-id: 20260416-ath12k-fix-peer-id-source-140c23f17d8a
Best regards,
--
Baochen Qiang <baochen.qiang@oss.qualcomm.com>
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH ath-current] wifi: ath12k: fix peer_id usage in normal RX path
2026-04-27 5:51 [PATCH ath-current] wifi: ath12k: fix peer_id usage in normal RX path Baochen Qiang
@ 2026-04-29 6:44 ` Rameshkumar Sundaram
2026-05-04 14:21 ` Jeff Johnson
1 sibling, 0 replies; 3+ messages in thread
From: Rameshkumar Sundaram @ 2026-04-29 6:44 UTC (permalink / raw)
To: Baochen Qiang, Jeff Johnson; +Cc: linux-wireless, ath12k, linux-kernel
On 4/27/2026 11:21 AM, Baochen Qiang wrote:
> ath12k_dp_rx_deliver_msdu() currently uses hal_rx_desc_data::peer_id
> parsed from mpdu_start descriptor to do peer lookup. However In an A-MSDU
> aggregation scenario, hardware only populates mpdu_start descriptor for
> the first sub-msdu, but not the following ones. In that case peer_id could
> be invalid, leading to peer lookup failure:
>
> ath12k_wifi7_pci 0000:06:00.0: rx skb 00000000c391c041 len 1532 peer (null) 0 ucast sn 0 eht320 rate_idx 12 vht_nss 2 freq 6105 band 3 flag 0x40d1a fcs-err 0 mic-err 0 amsdu-more 0
>
> As a result pubsta is NULL and parts of ieee80211_rx_status structure are
> left uninitialized, which may cause unexpected behavior.
>
> Fix it by switching the normal RX path to use ath12k_skb_rxcb::peer_id
> which is parsed from REO ring's rx_mpdu_desc and is always valid.
>
> hal_rx_desc_data::peer_id is still used in
> ath12k_wifi7_dp_rx_frag_h_mpdu(), which is safe since A-MSDU
> aggregation does not occur for fragmented frames. Similarly,
> ath12k_skb_rxcb::peer_id may be overwritten by hal_rx_desc_data::peer_id
> in ath12k_wifi7_dp_rx_h_mpdu(), which only handles non-aggregated
> multicast/broadcast traffic.
>
> Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.1.c5-00302-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.115823.3
>
> Fixes: 11157e0910fd ("wifi: ath12k: Use ath12k_dp_peer in per packet Tx & Rx paths")
> Signed-off-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com>
Reviewed-by: Rameshkumar Sundaram <rameshkumar.sundaram@oss.qualcomm.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH ath-current] wifi: ath12k: fix peer_id usage in normal RX path
2026-04-27 5:51 [PATCH ath-current] wifi: ath12k: fix peer_id usage in normal RX path Baochen Qiang
2026-04-29 6:44 ` Rameshkumar Sundaram
@ 2026-05-04 14:21 ` Jeff Johnson
1 sibling, 0 replies; 3+ messages in thread
From: Jeff Johnson @ 2026-05-04 14:21 UTC (permalink / raw)
To: Jeff Johnson, Baochen Qiang; +Cc: linux-wireless, ath12k, linux-kernel
On Mon, 27 Apr 2026 13:51:41 +0800, Baochen Qiang wrote:
> ath12k_dp_rx_deliver_msdu() currently uses hal_rx_desc_data::peer_id
> parsed from mpdu_start descriptor to do peer lookup. However In an A-MSDU
> aggregation scenario, hardware only populates mpdu_start descriptor for
> the first sub-msdu, but not the following ones. In that case peer_id could
> be invalid, leading to peer lookup failure:
>
> ath12k_wifi7_pci 0000:06:00.0: rx skb 00000000c391c041 len 1532 peer (null) 0 ucast sn 0 eht320 rate_idx 12 vht_nss 2 freq 6105 band 3 flag 0x40d1a fcs-err 0 mic-err 0 amsdu-more 0
>
> [...]
Applied, thanks!
[1/1] wifi: ath12k: fix peer_id usage in normal RX path
commit: 0e1308803d2c3fd365a6d21e6be355ec1e28eaaf
Best regards,
--
Jeff Johnson <jeff.johnson@oss.qualcomm.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-05-04 14:21 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-27 5:51 [PATCH ath-current] wifi: ath12k: fix peer_id usage in normal RX path Baochen Qiang
2026-04-29 6:44 ` Rameshkumar Sundaram
2026-05-04 14:21 ` Jeff Johnson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox