diff options
author | 2025-05-11 11:52:13 +0800 | |
---|---|---|
committer | 2025-05-16 08:43:12 +0800 | |
commit | 8ee99b998fc4a0c1aece047bb2f933903cf35f23 (patch) | |
tree | 52509ccb504e4b143d792700767cc14cf8b6af96 | |
parent | wifi: rtw89: mcc: pass whom to stop at when pausing chanctx (diff) | |
download | wireguard-linux-8ee99b998fc4a0c1aece047bb2f933903cf35f23.tar.xz wireguard-linux-8ee99b998fc4a0c1aece047bb2f933903cf35f23.zip |
wifi: rtw89: mcc: drop queued chanctx changes when stopping
When MCC is about to stop, there may be some chanctx changes which are
queued for work but have not yet been run. To avoid these changes from
being processed in a wrong state (e.g. next new MCC instance), cancel
the queued work and drop queued changes.
Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/20250511035217.10410-3-pkshih@realtek.com
Diffstat (limited to '')
-rw-r--r-- | drivers/net/wireless/realtek/rtw89/chan.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/wireless/realtek/rtw89/chan.c b/drivers/net/wireless/realtek/rtw89/chan.c index ff476bde39ab..e733564abc7a 100644 --- a/drivers/net/wireless/realtek/rtw89/chan.c +++ b/drivers/net/wireless/realtek/rtw89/chan.c @@ -2150,6 +2150,7 @@ static int rtw89_mcc_stop_sel_iterator(struct rtw89_dev *rtwdev, static void rtw89_mcc_stop(struct rtw89_dev *rtwdev, const struct rtw89_chanctx_pause_parm *pause) { + struct rtw89_hal *hal = &rtwdev->hal; struct rtw89_mcc_info *mcc = &rtwdev->mcc; struct rtw89_mcc_role *ref = &mcc->role_ref; struct rtw89_mcc_stop_sel sel = { @@ -2157,6 +2158,11 @@ static void rtw89_mcc_stop(struct rtw89_dev *rtwdev, }; int ret; + if (!pause) { + wiphy_delayed_work_cancel(rtwdev->hw->wiphy, &rtwdev->chanctx_work); + bitmap_zero(hal->changes, NUM_OF_RTW89_CHANCTX_CHANGES); + } + /* by default, stop at ref */ rtw89_iterate_mcc_roles(rtwdev, rtw89_mcc_stop_sel_iterator, &sel); if (!sel.filled) |