Skip to contentSkip to conversation

wifi: mt76: mt792x: skip MLD header rewrite for 802.3 encap TX

PATCH New Sean Wang 1 participant 1 message Apr 25

Subsystems (2)
lore
Share & tools
lore

Sean Wang

author
#0 lore raw

PATCH 1/1 wifi: mt76: mt792x: skip MLD header rewrite for 802.3 encap TX

From: Sean Wang <[email protected]>

mt792x_tx() rewrites addr1/addr2/addr3 by treating skb->data as an 802.11 header for MLD traffic.

That is only valid for native 802.11 frames. Direct 802.3 TX can also reach this path with IEEE80211_TX_CTL_HW_80211_ENCAP set, where skb->data is not an 802.11 header.

Skip the MLD header rewrite for HW-encap packets to avoid corrupting 802.3 frame contents.

Fixes ebb1406813c6 ("wifi: mt76: mt7925: add link handling to txwi")
---
 drivers/net/wireless/mediatek/mt76/mt792x_core.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/wireless/mediatek/mt76/mt792x_core.c +2 -1
index 152cfcca2f90..157e48e33412 100644
@@ -105,7 +105,8 @@ void mt792x_tx(struct ieee80211_hw *hw, struct ieee80211_tx_control *control,
 		wcid = &mvif->sta.deflink.wcid;
 	}
 
-	if (vif && control->sta && ieee80211_vif_is_mld(vif)) {
+	if (vif && control->sta && ieee80211_vif_is_mld(vif) &&
+	    !(info->flags & IEEE80211_TX_CTL_HW_80211_ENCAP)) {
 		struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
 		struct ieee80211_link_sta *link_sta;
 		struct ieee80211_bss_conf *conf;

base-commit: e8c819df02436f2c2379766946735e1f06a7c923

Signature · 1 line
2.43.0