wifi: mt76: mt7925: fix the wrong bss cleanup for SAP
authorMing Yen Hsieh <mingyen.hsieh@mediatek.com>
Mon, 28 Jul 2025 05:26:12 +0000 (13:26 +0800)
committerFelix Fietkau <nbd@nbd.name>
Wed, 27 Aug 2025 08:56:35 +0000 (10:56 +0200)
When in SAP mode, if a STA disconnect, the SAP's BSS
should not be cleared.

Fixes: 0ebb60da8416 ("wifi: mt76: mt7925: adjust rm BSS flow to prevent next connection failure")
Cc: stable@vger.kernel.org
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Link: https://patch.msgid.link/20250728052612.39751-1-mingyen.hsieh@mediatek.com
Signed-off-by: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/mt7925/main.c

index 10390930751836f972baeff04b0869593244d11d..b0e053b15227396cc1334455f6164a5bc4756fe2 100644 (file)
@@ -1191,6 +1191,9 @@ mt7925_mac_sta_remove_links(struct mt792x_dev *dev, struct ieee80211_vif *vif,
                struct mt792x_bss_conf *mconf;
                struct mt792x_link_sta *mlink;
 
+               if (vif->type == NL80211_IFTYPE_AP)
+                       break;
+
                link_sta = mt792x_sta_to_link_sta(vif, sta, link_id);
                if (!link_sta)
                        continue;