* [PATCH rtw-next] wifi: rtw89: leave PS mode before switching chanctx
@ 2026-11-30 8:08 Ping-Ke Shih
0 siblings, 0 replies; only message in thread
From: Ping-Ke Shih @ 2026-11-30 8:08 UTC (permalink / raw)
To: linux-wireless; +Cc: luccazoppi, kevin_yang
From: Zong-Zhe Yang <kevin_yang@realtek.com>
During switching chanctx, driver needs to configure HW settings for
the new chanctx. However, if FW runs with PS mode, it will backup/
restore HW settings when entering/leaving PS mode. So, there may be
a racing. Fix it by leaving PS mode first.
When the racing happens, the following logs likely show up.
... read/write rf busy swsi ...
Reported-by: Lucca Moura <luccazoppi@gmail.com>
Closes: https://lore.kernel.org/linux-wireless/CAJC97KF1omvgtJ=jsQpauVhrTdpr_WgiVDxs5eRCby4fU415hA@mail.gmail.com/T/#u
Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
---
drivers/net/wireless/realtek/rtw89/mac80211.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/net/wireless/realtek/rtw89/mac80211.c b/drivers/net/wireless/realtek/rtw89/mac80211.c
index 98f4b5c98f61..801ed6be8d5f 100644
--- a/drivers/net/wireless/realtek/rtw89/mac80211.c
+++ b/drivers/net/wireless/realtek/rtw89/mac80211.c
@@ -1416,6 +1416,8 @@ static void rtw89_ops_change_chanctx(struct ieee80211_hw *hw,
lockdep_assert_wiphy(hw->wiphy);
+ rtw89_leave_ps_mode(rtwdev);
+
rtw89_chanctx_ops_change(rtwdev, ctx, changed);
}
@@ -1481,6 +1483,8 @@ int rtw89_ops_switch_vif_chanctx(struct ieee80211_hw *hw,
lockdep_assert_wiphy(hw->wiphy);
+ rtw89_leave_ps_mode(rtwdev);
+
switch (mode) {
case CHANCTX_SWMODE_REASSIGN_VIF:
replace = false;
base-commit: ae6b9e98b9045e47f609ec2a8197a3f3109627cb
--
2.53.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-30 8:08 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-30 8:08 [PATCH rtw-next] wifi: rtw89: leave PS mode before switching chanctx Ping-Ke Shih
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox