Skip to content

Commit 8498118

Browse files
Oliver Sedlbauerhauke
authored andcommitted
mac80211: ath12k: backport correctly handle mcast packets
Backport upstream commit that fixes handling of multicast packets. Without this patch, ARP resolution fails, and connectivity from a station to an AP does not work reliably until traffic is initiated by the AP. Signed-off-by: Oliver Sedlbauer <[email protected]> Link: openwrt/openwrt#21088 Signed-off-by: Hauke Mehrtens <[email protected]>
1 parent 6a92e68 commit 8498118

File tree

1 file changed

+66
-0
lines changed

1 file changed

+66
-0
lines changed
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
From a1eb56723b3203d366d2293a368b8bc8ef8894cd Mon Sep 17 00:00:00 2001
2+
From: Sarika Sharma <[email protected]>
3+
Date: Fri, 11 Apr 2025 11:45:23 +0530
4+
Subject: [PATCH] wifi: ath12k: correctly handle mcast packets for clients
5+
6+
commit 4541b0c8c3c1b85564971d497224e57cf8076a02 upstream.
7+
8+
Currently, RX is_mcbc bit is set for packets sent from client as
9+
destination address (DA) is multicast/broadcast address, but packets
10+
are actually unicast as receiver address (RA) is not multicast address.
11+
Hence, packets are not handled properly due to this is_mcbc bit.
12+
13+
Therefore, reset the is_mcbc bit if interface type is AP.
14+
15+
Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.4.1-00199-QCAHKSWPL_SILICONZ-1
16+
17+
Signed-off-by: Sarika Sharma <[email protected]>
18+
Reviewed-by: Vasanthakumar Thiagarajan <[email protected]>
19+
Link: https://patch.msgid.link/[email protected]
20+
Signed-off-by: Jeff Johnson <[email protected]>
21+
[ Adjust context ]
22+
Signed-off-by: Oliver Sedlbauer <[email protected]>
23+
Signed-off-by: Greg Kroah-Hartman <[email protected]>
24+
---
25+
drivers/net/wireless/ath/ath12k/dp_rx.c | 5 +++++
26+
drivers/net/wireless/ath/ath12k/peer.c | 3 +++
27+
drivers/net/wireless/ath/ath12k/peer.h | 2 ++
28+
3 files changed, 10 insertions(+)
29+
30+
--- a/drivers/net/wireless/ath/ath12k/dp_rx.c
31+
+++ b/drivers/net/wireless/ath/ath12k/dp_rx.c
32+
@@ -2214,6 +2214,11 @@ static void ath12k_dp_rx_h_mpdu(struct a
33+
spin_lock_bh(&ar->ab->base_lock);
34+
peer = ath12k_dp_rx_h_find_peer(ar->ab, msdu);
35+
if (peer) {
36+
+ /* resetting mcbc bit because mcbc packets are unicast
37+
+ * packets only for AP as STA sends unicast packets.
38+
+ */
39+
+ rxcb->is_mcbc = rxcb->is_mcbc && !peer->ucast_ra_only;
40+
+
41+
if (rxcb->is_mcbc)
42+
enctype = peer->sec_type_grp;
43+
else
44+
--- a/drivers/net/wireless/ath/ath12k/peer.c
45+
+++ b/drivers/net/wireless/ath/ath12k/peer.c
46+
@@ -331,6 +331,9 @@ int ath12k_peer_create(struct ath12k *ar
47+
arvif->ast_idx = peer->hw_peer_id;
48+
}
49+
50+
+ if (arvif->vif->type == NL80211_IFTYPE_AP)
51+
+ peer->ucast_ra_only = true;
52+
+
53+
peer->sec_type = HAL_ENCRYPT_TYPE_OPEN;
54+
peer->sec_type_grp = HAL_ENCRYPT_TYPE_OPEN;
55+
56+
--- a/drivers/net/wireless/ath/ath12k/peer.h
57+
+++ b/drivers/net/wireless/ath/ath12k/peer.h
58+
@@ -47,6 +47,8 @@ struct ath12k_peer {
59+
60+
/* protected by ab->data_lock */
61+
bool dp_setup_done;
62+
+
63+
+ bool ucast_ra_only;
64+
};
65+
66+
void ath12k_peer_unmap_event(struct ath12k_base *ab, u16 peer_id);

0 commit comments

Comments
 (0)