From: Ping-Ke Shih <pkshih@realtek.com>
To: <linux-wireless@vger.kernel.org>
Cc: <luccazoppi@gmail.com>, <kevin_yang@realtek.com>
Subject: [PATCH rtw-next] wifi: rtw89: leave PS mode before switching chanctx
Date: Mon, 30 Nov 2026 16:08:08 +0800 [thread overview]
Message-ID: <20261130080808.17741-1-pkshih@realtek.com> (raw)
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
reply other threads:[~2026-11-30 8:08 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261130080808.17741-1-pkshih@realtek.com \
--to=pkshih@realtek.com \
--cc=kevin_yang@realtek.com \
--cc=linux-wireless@vger.kernel.org \
--cc=luccazoppi@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox