Skip to contentSkip to conversation

wifi: ath12k: Prevent multicast duplication for dynamic VLAN

PATCH Applied Muna Sinada 3 participants 3 messages Apr 24, 2025 – May 16, 2025 Qualcomm ATH12K wireless driver

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 wifi: ath12k: Prevent multicast duplication for dynamic VLAN

Since dynamic VLAN traffic is software encrypted and encapsulated, mac80211 handles the duplication on each link for MLO dynamic VLAN multicast.

Currently in ath12k_mac_op_tx(), all multicast frames are duplicated and are assigned a mcbc_gsn. This is causing dynamic VLAN multicast traffic to be dropped in hardware.

Prevent dynamic VLAN multicast traffic from being duplicated again in the driver. Check if incoming packet is a dynamic VLAN packet and avoid defaulting to multicast conditional.

Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1
Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3

---
v2:
- rebase
- minor changes in commit message to spell out abbreviations

---
 drivers/net/wireless/ath/ath12k/mac.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
drivers/net/wireless/ath/ath12k/mac.c +9 -1
index d170bca72948..c5f07361c1ef 100644
@@ -7452,6 +7452,7 @@ static void ath12k_mac_op_tx(struct ieee80211_hw *hw,
 	struct ath12k_peer *peer;
 	unsigned long links_map;
 	bool is_mcast = false;
+	bool is_dvlan = false;
 	struct ethhdr *eth;
 	bool is_prb_rsp;
 	u16 mcbc_gsn;
@@ -7517,7 +7518,14 @@ static void ath12k_mac_op_tx(struct ieee80211_hw *hw,
 	if (vif->type == NL80211_IFTYPE_AP && vif->p2p)
 		ath12k_mac_add_p2p_noa_ie(ar, vif, skb, is_prb_rsp);
 
-	if (!vif->valid_links || !is_mcast ||
+	/* Checking if it is a DVLAN frame */
+	if (!test_bit(ATH12K_FLAG_HW_CRYPTO_DISABLED, &ar->ab->dev_flags) &&
+	    !(skb_cb->flags & ATH12K_SKB_HW_80211_ENCAP) &&
+	    !(skb_cb->flags & ATH12K_SKB_CIPHER_SET) &&
+	    ieee80211_has_protected(hdr->frame_control))
+		is_dvlan = true;
+
+	if (!vif->valid_links || !is_mcast || is_dvlan ||
 	    test_bit(ATH12K_FLAG_RAW_MODE, &ar->ab->dev_flags)) {
 		ret = ath12k_dp_tx(ar, arvif, skb, false, 0, is_mcast);
 		if (unlikely(ret)) {

base-commit: 75f90ba47b2cda7de7a7bc1d099172516f6f96fa

Signature · 1 line
2.34.1
Reviewed-by on v2 1/1
#1 lore raw
Quoted 8 lines · Muna Sinada

Since dynamic VLAN traffic is software encrypted and encapsulated, mac80211 handles the duplication on each link for MLO dynamic VLAN multicast.

Currently in ath12k_mac_op_tx(), all multicast frames are duplicated and are assigned a mcbc_gsn. This is causing dynamic VLAN multicast traffic to be dropped in hardware.

Quoted 8 lines

Prevent dynamic VLAN multicast traffic from being duplicated again in the driver. Check if incoming packet is a dynamic VLAN packet and avoid defaulting to multicast conditional.

Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1
Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3

Applied
#2 lore raw
In reply to Muna Sinada
Quoted 9 lines · Muna Sinada

Since dynamic VLAN traffic is software encrypted and encapsulated, mac80211 handles the duplication on each link for MLO dynamic VLAN multicast.

Currently in ath12k_mac_op_tx(), all multicast frames are duplicated and are assigned a mcbc_gsn. This is causing dynamic VLAN multicast traffic to be dropped in hardware.

[...]

Applied, thanks!

[1/1] wifi: ath12k: Prevent multicast duplication for dynamic VLAN

      commit: a5f95d3d02d92421edceb597f93c7348e54a5264

Best regards,

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