developer | 1f55fcf | 2024-10-17 14:52:33 +0800 | [diff] [blame^] | 1 | From bd1f21a77b832ff70db23751789006090a4c5cd8 Mon Sep 17 00:00:00 2001 |
| 2 | From: Peter Chiu <chui-hao.chiu@mediatek.com> |
| 3 | Date: Mon, 14 Oct 2024 10:33:39 +0800 |
| 4 | Subject: [PATCH] wifi: mt76: mt7915: delete twt flow before remove stations |
| 5 | |
| 6 | Send a mcu command to FW to remove twt flows before removing stations. |
| 7 | If we remove stations first, twt flows may not be remove correctly. |
| 8 | |
| 9 | Signed-off-by: Peter Chiu <chui-hao.chiu@mediatek.com> |
| 10 | --- |
| 11 | mt7915/main.c | 6 +++--- |
| 12 | 1 file changed, 3 insertions(+), 3 deletions(-) |
| 13 | |
| 14 | diff --git a/mt7915/main.c b/mt7915/main.c |
| 15 | index 35b97db7..a7aba999 100644 |
| 16 | --- a/mt7915/main.c |
| 17 | +++ b/mt7915/main.c |
| 18 | @@ -812,14 +812,14 @@ void mt7915_mac_sta_remove(struct mt76_dev *mdev, struct ieee80211_vif *vif, |
| 19 | struct mt7915_phy *phy = msta->vif->phy; |
| 20 | int i; |
| 21 | |
| 22 | + for (i = 0; i < ARRAY_SIZE(msta->twt.flow); i++) |
| 23 | + mt7915_mac_twt_teardown_flow(dev, msta, i); |
| 24 | + |
| 25 | mt7915_mcu_add_sta(dev, vif, sta, false); |
| 26 | |
| 27 | mt7915_mac_wtbl_update(dev, msta->wcid.idx, |
| 28 | MT_WTBL_UPDATE_ADM_COUNT_CLEAR); |
| 29 | |
| 30 | - for (i = 0; i < ARRAY_SIZE(msta->twt.flow); i++) |
| 31 | - mt7915_mac_twt_teardown_flow(dev, msta, i); |
| 32 | - |
| 33 | spin_lock_bh(&mdev->sta_poll_lock); |
| 34 | if (!list_empty(&msta->wcid.poll_list)) |
| 35 | list_del_init(&msta->wcid.poll_list); |
| 36 | -- |
| 37 | 2.45.2 |
| 38 | |