]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
wifi: mt76: mt7925: add link handling in mt7925_mac_sta_remove
authorSean Wang <sean.wang@mediatek.com>
Sat, 6 Jul 2024 08:27:50 +0000 (01:27 -0700)
committerFelix Fietkau <nbd@nbd.name>
Tue, 9 Jul 2024 21:02:03 +0000 (23:02 +0200)
Added link handling to mt7925_mac_sta_remove, supporting the MLO-enabled
firmware. The change remains comptabile with the non-MLO mode.

Co-developed-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Co-developed-by: Deren Wu <deren.wu@mediatek.com>
Signed-off-by: Deren Wu <deren.wu@mediatek.com>
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Link: https://patch.msgid.link/20d53511fe1f64984d893f4d3ec87cb9f87d3070.1720248331.git.sean.wang@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/mt7925/main.c

index 042c9fe5a2d92f4c4041c57d1bf8b2678bac02fd..79b43101237c12f4bbde84d4b9cca2232ac7a3d7 100644 (file)
@@ -1033,7 +1033,13 @@ mt7925_mac_sta_remove_links(struct mt792x_dev *dev, struct ieee80211_vif *vif,
 void mt7925_mac_sta_remove(struct mt76_dev *mdev, struct ieee80211_vif *vif,
                           struct ieee80211_sta *sta)
 {
-       mt7925_mac_link_sta_remove(mdev, vif, &sta->deflink);
+       struct mt792x_dev *dev = container_of(mdev, struct mt792x_dev, mt76);
+       struct mt792x_sta *msta = (struct mt792x_sta *)sta->drv_priv;
+       unsigned long rem;
+
+       rem = ieee80211_vif_is_mld(vif) ? msta->valid_links : BIT(0);
+
+       mt7925_mac_sta_remove_links(dev, vif, sta, rem);
 
        if (vif->type == NL80211_IFTYPE_STATION) {
                struct mt792x_vif *mvif = (struct mt792x_vif *)vif->drv_priv;