mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
wifi: mt76: mt7925: restore the legacy BSS after MLO teardown
Removing the last link of an MLD interface leaves the firmware with the
MLD BSS and DEV entry: the removal loop skips the deflink, and the
hweight16(mvif->valid_links) fallback reads the stale pre-update
valid_links, which is still non-zero. The entry keeps the per-link MAC
address, so every subsequent legacy association fails authentication
until the interface is removed or the module is reloaded.
Remove the deflink BSS and add it back as a legacy BSS on the transition
to zero links.
Fixes: 69acd6d910b0 ("wifi: mt76: mt7925: add mt7925_change_vif_links")
Signed-off-by: Aaron Ma <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
@@ -2308,6 +2308,18 @@ mt7925_change_vif_links(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
|
||||
|
||||
mvif->valid_links = new_links;
|
||||
|
||||
/* Restore the legacy BSS after disabling MLO */
|
||||
if (old_links && !new_links) {
|
||||
mt792x_mac_link_bss_remove(dev, &mvif->bss_conf,
|
||||
&mvif->sta.deflink);
|
||||
err = mt7925_mac_link_bss_add(dev, &vif->bss_conf,
|
||||
&mvif->sta.deflink);
|
||||
if (err < 0) {
|
||||
mt792x_mutex_release(dev);
|
||||
return err;
|
||||
}
|
||||
}
|
||||
|
||||
mt792x_mutex_release(dev);
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user