From: Bitterblue Smith <rtl8821cerfe2@gmail.com>
To: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Cc: Ping-Ke Shih <pkshih@realtek.com>
Subject: [PATCH rtw-next] wifi: rtw88: Iterate stas non-atomically in rtw_wow_fw_media_status()
Date: Sat, 5 Dec 2026 00:03:11 +0200 [thread overview]
Message-ID: <7c0b56be-d941-4fc8-b1c5-999d0c254d6e@gmail.com> (raw)
rtw_wow_fw_media_status() calls ieee80211_iterate_stations_atomic() with
an iterator which accesses hardware registers. This doesn't work
("Voluntary context switch within RCU read-side critical section!") for
USB and SDIO because register accesses can sleep.
Use the non-atomic rtw_iterate_stas() wrapper instead. It needs
rtwdev->mutex to be held, which rtw_ops_suspend() and rtw_ops_resume()
both do.
It must have been forgotten from 78d5bf925f30 ("wifi: rtw88: iterate
over vif/sta list non-atomically") because no one tested Wowlan with
USB devices.
Fixes: 78d5bf925f30 ("wifi: rtw88: iterate over vif/sta list non-atomically")
Cc: stable@vger.kernel.org
Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
---
drivers/net/wireless/realtek/rtw88/wow.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/realtek/rtw88/wow.c b/drivers/net/wireless/realtek/rtw88/wow.c
index 16ddee577efe..9de9144e7e04 100644
--- a/drivers/net/wireless/realtek/rtw88/wow.c
+++ b/drivers/net/wireless/realtek/rtw88/wow.c
@@ -468,7 +468,7 @@ static void rtw_wow_fw_media_status(struct rtw_dev *rtwdev, bool connect)
data.rtwdev = rtwdev;
data.connect = connect;
- rtw_iterate_stas_atomic(rtwdev, rtw_wow_fw_media_status_iter, &data);
+ rtw_iterate_stas(rtwdev, rtw_wow_fw_media_status_iter, &data);
}
static int rtw_wow_config_wow_fw_rsvd_page(struct rtw_dev *rtwdev)
--
2.56.1
next reply other threads:[~2026-12-04 22:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-04 22:03 Bitterblue Smith [this message]
2026-12-05 16:00 ` [PATCH rtw-next] wifi: rtw88: Iterate stas non-atomically in rtw_wow_fw_media_status() Luka Gejak
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=7c0b56be-d941-4fc8-b1c5-999d0c254d6e@gmail.com \
--to=rtl8821cerfe2@gmail.com \
--cc=linux-wireless@vger.kernel.org \
--cc=pkshih@realtek.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