blob: 4fb5802d8d51a0c30f3063264a1472bda4bf7491 [file] [log] [blame]
From bd1f21a77b832ff70db23751789006090a4c5cd8 Mon Sep 17 00:00:00 2001
From: Peter Chiu <chui-hao.chiu@mediatek.com>
Date: Mon, 14 Oct 2024 10:33:39 +0800
Subject: [PATCH] wifi: mt76: mt7915: delete twt flow before remove stations
Send a mcu command to FW to remove twt flows before removing stations.
If we remove stations first, twt flows may not be remove correctly.
Signed-off-by: Peter Chiu <chui-hao.chiu@mediatek.com>
---
mt7915/main.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/mt7915/main.c b/mt7915/main.c
index 35b97db7..a7aba999 100644
--- a/mt7915/main.c
+++ b/mt7915/main.c
@@ -812,14 +812,14 @@ void mt7915_mac_sta_remove(struct mt76_dev *mdev, struct ieee80211_vif *vif,
struct mt7915_phy *phy = msta->vif->phy;
int i;
+ for (i = 0; i < ARRAY_SIZE(msta->twt.flow); i++)
+ mt7915_mac_twt_teardown_flow(dev, msta, i);
+
mt7915_mcu_add_sta(dev, vif, sta, false);
mt7915_mac_wtbl_update(dev, msta->wcid.idx,
MT_WTBL_UPDATE_ADM_COUNT_CLEAR);
- for (i = 0; i < ARRAY_SIZE(msta->twt.flow); i++)
- mt7915_mac_twt_teardown_flow(dev, msta, i);
-
spin_lock_bh(&mdev->sta_poll_lock);
if (!list_empty(&msta->wcid.poll_list))
list_del_init(&msta->wcid.poll_list);
--
2.45.2