From fe40221e05eba428335bb3bdcb636047ad2597a4 Mon Sep 17 00:00:00 2001 From: Chad Monroe Date: Tue, 30 Jun 2026 14:24:23 +0200 Subject: [PATCH] wifi: mt76: mt7996: fix EAPOL source BSS for non-MLD stations A non-MLD station's EAPOL and data frames are tagged with link_id == IEEE80211_LINK_UNSPECIFIED, which now skips the per-link lookup in mt7996_mac_write_txwi() and leaves omac_idx/band_idx/wmm_idx at slot 0. When the radio also runs AP VAPs the station's omac is non-zero (get_omac_idx() prefers HW BSSID slots 1-3), so its EAPOL frames egress from the wrong BSS and the 4-way handshake times out even though association succeeds. In mt7996_tx_prepare_skb(), resolve the link from the peer wcid when link_id is UNSPECIFIED and the wcid is not the global entry, restoring the pre-MLO behaviour for station traffic. Fixes: 934f64710479 ("wifi: mt76: mt7996: fix reading zeroed info->control.flags after mt76_tx_status_skb_add()") Signed-off-by: Chad Monroe Signed-off-by: Felix Fietkau --- mt7996/mac.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mt7996/mac.c b/mt7996/mac.c index 367b51ae..9f03f988 100644 --- a/mt7996/mac.c +++ b/mt7996/mac.c @@ -1030,6 +1030,11 @@ int mt7996_tx_prepare_skb(struct mt76_dev *mdev, void *txwi_ptr, IEEE80211_TX_CTRL_MLO_LINK); } + /* non-MLD frames are LINK_UNSPECIFIED; use the wcid's own link */ + if (link_id == IEEE80211_LINK_UNSPECIFIED && + wcid != &dev->mt76.global_wcid) + link_id = wcid->link_id; + if (link_id != wcid->link_id && link_id != IEEE80211_LINK_UNSPECIFIED) { if (msta) { struct mt7996_sta_link *msta_link =