mirror of
https://github.com/torvalds/linux.git
synced 2026-05-28 09:04:39 +02:00
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: a3316d2fc6 ("wifi: mt76: mt7996: set vif default link_id adding/removing vif links")
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Link: https://patch.msgid.link/20251205-mt76-txq-wicd-fix-v2-2-f19ba48af7c1@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
parent
654abcbe45
commit
751a2679b1
|
|
@ -402,17 +402,28 @@ void mt7996_vif_link_remove(struct mt76_phy *mphy, struct ieee80211_vif *vif,
|
|||
|
||||
rcu_assign_pointer(dev->mt76.wcid[idx], NULL);
|
||||
|
||||
if (!mlink->wcid->offchannel &&
|
||||
if (vif->txq && !mlink->wcid->offchannel &&
|
||||
mvif->mt76.deflink_id == link_conf->link_id) {
|
||||
struct ieee80211_bss_conf *iter;
|
||||
struct mt76_txq *mtxq;
|
||||
unsigned int link_id;
|
||||
|
||||
mvif->mt76.deflink_id = IEEE80211_LINK_UNSPECIFIED;
|
||||
mtxq = (struct mt76_txq *)vif->txq->drv_priv;
|
||||
/* Primary link will be removed, look for a new one */
|
||||
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;
|
||||
|
||||
if (link_id == link_conf->link_id)
|
||||
continue;
|
||||
|
||||
link = mt7996_vif_link(dev, vif, link_id);
|
||||
if (!link)
|
||||
continue;
|
||||
|
||||
mtxq->wcid = link->msta_link.wcid.idx;
|
||||
mvif->mt76.deflink_id = link_id;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user