wifi: ath12k: correctly handle mcast packets for clients
Subsystems (2)
PATCH 1/1 wifi: ath12k: correctly handle mcast packets for clients
From: Sarika Sharma <[email protected]>
[ Upstream commit 4541b0c8c3c1b85564971d497224e57cf8076a02 ]
Currently, RX is_mcbc bit is set for packets sent from client as destination address (DA) is multicast/broadcast address, but packets are actually unicast as receiver address (RA) is not multicast address. Hence, packets are not handled properly due to this is_mcbc bit.
Therefore, reset the is_mcbc bit if interface type is AP.
Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.4.1-00199-QCAHKSWPL_SILICONZ-1
---
Context:
The issue was introduced in 6.12.y by the backport of commit f66971c608c4 ("wifi: ath12k: using msdu end descriptor to check for rx multicast packets"), which was part of a patchset:
https://lore.kernel.org/all/[email protected]/
That commit, without this follow-up patch, causes mac80211 to drop encrypted ARP request frames.
As a result, ARP resolution fails, and connectivity from a station to an AP does not work reliably until traffic is initiated by the AP.
This follow-up commit is necessary to restore correct network functionality for ath12k clients on 6.12.y.
Note:
The patch has been modified to apply cleanly, including adjustments for API changes.
The copyright header change has been omitted.
drivers/net/wireless/ath/ath12k/dp_rx.c | 5 +++++ drivers/net/wireless/ath/ath12k/peer.c | 3 +++ drivers/net/wireless/ath/ath12k/peer.h | 2 ++ 3 files changed, 10 insertions(+)
drivers/net/wireless/ath/ath12k/dp_rx.c +5 -0
@@ -2214,6 +2214,11 @@ static void ath12k_dp_rx_h_mpdu(struct ath12k *ar,spin_lock_bh (&ar->ab->base_lock); peer =ath12k_dp_rx_h_find_peer (ar->ab, msdu);if (peer) { +/* resetting mcbc bit because mcbc packets are unicast +* packets only for AP as STA sends unicast packets. +*/ + rxcb->is_mcbc = rxcb->is_mcbc && !peer->ucast_ra_only; +if (rxcb->is_mcbc) enctype = peer->sec_type_grp;else
drivers/net/wireless/ath/ath12k/peer.c +3 -0
@@ -331,6 +331,9 @@ int ath12k_peer_create(struct ath12k *ar, struct ath12k_vif *arvif, arvif->ast_idx = peer->hw_peer_id; } +if (arvif->vif->type ==NL80211_IFTYPE_AP ) + peer->ucast_ra_only = true; + peer->sec_type =HAL_ENCRYPT_TYPE_OPEN ; peer->sec_type_grp =HAL_ENCRYPT_TYPE_OPEN ;
drivers/net/wireless/ath/ath12k/peer.h +2 -0
@@ -47,6 +47,8 @@ struct ath12k_peer {/* protected by ab->data_lock */ bool dp_setup_done; + +bool ucast_ra_only; };void ath12k_peer_unmap_event (struct ath12k_base *ab,u16 peer_id);
--
2.39.5