wifi: mt76: mt7996: Reset mtxq->idx if primary link is removed in mt7996_vif_link_remove()

Reset WCID index in mt76_txq struct if primary link is removed in
mt7996_vif_link_remove routine.

Fixes: a3316d2fc669f ("wifi: mt76: mt7996: set vif default link_id adding/removing vif links")
Signed-off-by: Lorenzo Bianconi <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
Lorenzo Bianconi
2026-01-27 10:19:14 +00:00
committed by Felix Fietkau
parent 21cb565607
commit be3d1224cc
+14 -3
View File
@@ -410,12 +410,23 @@ void mt7996_vif_link_remove(struct mt76_phy *mphy, struct ieee80211_vif *vif,
struct ieee80211_bss_conf *iter;
unsigned int link_id;
/* Primary link will be removed, look for a new one */
mvif->mt76.deflink_id = IEEE80211_LINK_UNSPECIFIED;
for_each_vif_active_link(vif, iter, link_id) {
if (link_id != IEEE80211_LINK_UNSPECIFIED) {
mvif->mt76.deflink_id = link_id;
break;
struct mt7996_vif_link *link;
link = mt7996_vif_link(dev, vif, link_id);
if (!link)
continue;
if (vif->txq) {
struct mt76_txq *mtxq;
mtxq = (struct mt76_txq *)vif->txq->drv_priv;
mtxq->wcid = link->msta_link.wcid.idx;
}
mvif->mt76.deflink_id = link_id;
break;
}
}