wifi: rtw89: leave PS mode before switching chanctx
Ping-Ke Shih
maintainerPATCH 1/1 wifi: rtw89: leave PS mode before switching chanctx
From: Zong-Zhe Yang <[email protected]>
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 ...
--- drivers/net/wireless/realtek/rtw89/mac80211.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/net/wireless/realtek/rtw89/mac80211.c +4 -0
@@ -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
Signature · 1 line
2.53.0
Lucca Moura
Tested-byRan it for 1.5 days on RTL8852BE-VT (fw 0.29.122.3, Linux 7.3.6):
6 suspend/resume cycles, 6 APs on 2.4 and 5 GHz, including DFS channel 52. No regressions.
One ECSA occurred on channel 52 ("cannot understand ECSA IE operating class, 3"), with no "rf busy swsi" lines. The AP then disconnected the station, and it reconnected in 7 s. The original hang was rare, so I cannot fully confirm the fix.
Lucca