mt7925_mac_write_txwi_8023() gets the station from the wcid with container_of(). This is only valid for the wcid at the start of struct mt792x_sta. The wcid of any other link of an MLO station is part of a separately allocated struct mt792x_link_sta. For such a wcid, the function reads sta->wme from memory in front of that allocation. Use wcid_to_sta(), which follows wcid->def_wcid, like mt76_connac_pm_dequeue_skbs() does. This is currently not reachable. mac80211 queues every 802.3 encapsulated frame of a station to a TXQ. The TXQs name the wcid at the start of struct mt792x_sta until mt7925_mac_sta_deflink_move() moves them to another link. That move does not happen, because mt7925_can_activate_links() keeps the default link of a station interface active, and an AP MLD on mt7925 has one link. Found by inspection. Signed-off-by: Felix Fietkau --- drivers/net/wireless/mediatek/mt76/mt7925/mac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7925/mac.c b/drivers/net/wireless/mediatek/mt76/mt7925/mac.c index cc8ea0d37430..1adec01f6832 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7925/mac.c +++ b/drivers/net/wireless/mediatek/mt76/mt7925/mac.c @@ -686,7 +686,7 @@ mt7925_mac_write_txwi_8023(__le32 *txwi, struct sk_buff *skb, if (wcid->sta) { struct ieee80211_sta *sta; - sta = container_of((void *)wcid, struct ieee80211_sta, drv_priv); + sta = wcid_to_sta(wcid); wmm = sta->wme; } -- 2.47.3