]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
wifi: mt76: mt792x: skip MLD header rewrite for 802.3 encap TX
authorSean Wang <sean.wang@mediatek.com>
Sat, 25 Apr 2026 14:46:48 +0000 (09:46 -0500)
committerFelix Fietkau <nbd@nbd.name>
Tue, 9 Jun 2026 10:15:21 +0000 (10:15 +0000)
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")
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Link: https://patch.msgid.link/20260425144648.734030-1-sean.wang@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/mt792x_core.c

index 1d807abc7125a32c6bb5af0914614c9c929c4f34..e5ef724dd2d3d395d7b96cafc77a6d5ecb85f535 100644 (file)
@@ -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;