From: Martin <martin@rfdeck.de>
To: Ping-Ke Shih <pkshih@realtek.com>
Cc: linux-wireless@vger.kernel.org, Luka Gejak <luka.gejak@linux.dev>,
Bitterblue Smith <rtl8821cerfe2@gmail.com>,
linux-kernel@vger.kernel.org, Martin <martin@rfdeck.de>
Subject: [PATCH rtw-next v2] wifi: rtw88: restore channel when leaving idle in monitor mode
Date: Thu, 3 Dec 2026 09:46:44 +0100 [thread overview]
Message-ID: <20261203084644.39269-1-martin@rfdeck.de> (raw)
After a monitor interface is set up a second time on the same channel
(down, monitor, up, same frequency), the chip no longer works on that
channel. On 5 GHz the RTL8814AU neither receives nor transmits, and
the RTL8812AU does not transmit. Setting up the interface on a
different channel works.
Tested with RTL8814AU and RTL8812AU (USB).
Closes: https://lore.kernel.org/linux-wireless/20261201205032.Horde.Z7ChCCtVnG0Kme7KFHo6v7B@mail.your-server.de/
Suggested-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Martin <martin@rfdeck.de>
---
v2:
- Shorten the commit message and name the tested adapters (Ping-Ke)
- Drop the code comment (Ping-Ke)
v1: https://lore.kernel.org/linux-wireless/20261203080413.37311-1-martin@rfdeck.de/
Same check as in rtw89 commit e07c9af7bbc8 ("wifi: rtw89: restore
channel when leaving idle on non-chanctx devices").
AI tool use (Documentation/process/generated-content.rst): the
analysis, the patch and the changelog were written with help from
Claude Code, from the register dumps and mac80211 traces of my tests
and the discussion on the list. I reviewed and tested the change.
drivers/net/wireless/realtek/rtw88/mac80211.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/net/wireless/realtek/rtw88/mac80211.c b/drivers/net/wireless/realtek/rtw88/mac80211.c
index b14d7fffb98..0e4970d6595 100644
--- a/drivers/net/wireless/realtek/rtw88/mac80211.c
+++ b/drivers/net/wireless/realtek/rtw88/mac80211.c
@@ -86,6 +86,12 @@ static int rtw_ops_config(struct ieee80211_hw *hw, int radio_idx, u32 changed)
rtw_leave_lps_deep(rtwdev);
+ if (changed & IEEE80211_CONF_CHANGE_IDLE &&
+ changed & IEEE80211_CONF_CHANGE_MONITOR &&
+ !(hw->conf.flags & IEEE80211_CONF_IDLE) &&
+ hw->conf.flags & IEEE80211_CONF_MONITOR)
+ changed |= IEEE80211_CONF_CHANGE_CHANNEL;
+
if ((changed & IEEE80211_CONF_CHANGE_IDLE) &&
!(hw->conf.flags & IEEE80211_CONF_IDLE)) {
ret = rtw_leave_ips(rtwdev);
--
2.43.0
next reply other threads:[~2026-12-03 8:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-03 8:46 Martin [this message]
2026-12-03 8:56 ` [PATCH rtw-next v2] wifi: rtw88: restore channel when leaving idle in monitor mode Ping-Ke Shih
2026-12-03 10:24 ` martin
2026-12-03 9:43 ` Luka Gejak
2026-12-04 6:22 ` Ping-Ke Shih
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=20261203084644.39269-1-martin@rfdeck.de \
--to=martin@rfdeck.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=luka.gejak@linux.dev \
--cc=pkshih@realtek.com \
--cc=rtl8821cerfe2@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.