From: Mehmet Fide <mehmet.fide@gmail.com>
To: Ping-Ke Shih <pkshih@realtek.com>
Cc: Luka Gejak <luka.gejak@linux.dev>,
Sascha Hauer <s.hauer@pengutronix.de>,
Zong-Zhe Yang <kevin_yang@realtek.com>,
Tzu-En Huang <tehuang@realtek.com>,
Yan-Hsuan Chuang <yhchuang@realtek.com>,
Kalle Valo <kvalo@kernel.org>,
Stanislaw Gruszka <sgruszka@redhat.com>,
Brian Norris <briannorris@chromium.org>,
linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org,
mehmet.fide@screeningeagle.com
Subject: [PATCH rtw-next v3 5/5] wifi: rtw88: clear the restart flag when the device is stopped
Date: Tue, 17 Nov 2026 18:10:03 +0100 [thread overview]
Message-ID: <20261117171003.1840491-6-mehmet.fide@gmail.com> (raw)
In-Reply-To: <20261117171003.1840491-1-mehmet.fide@gmail.com>
From: Mehmet Fide <mehmet.fide@screeningeagle.com>
The firmware recovery sets RTW_FLAG_RESTARTING, and rtw_reconfig_complete()
clears it once mac80211 has restarted the hardware. If the last interface
goes down before the restart work runs, ieee80211_reconfig() finds no open
interface and does not call reconfig_complete(), so the flag is still set
when an interface comes up again. rtw_fw_recovery() then ignores every
later firmware crash, and writing the fw_crash debugfs file returns
-EINPROGRESS.
Clear the flag in rtw_ops_stop(). mac80211 does not stop the device while
it restarts it, so a stop leaves no restart to wait for.
Reported-by: Luka Gejak <luka.gejak@linux.dev>
Closes: https://lore.kernel.org/linux-wireless/5285DA11-651F-4286-A0FD-52A6051B3A88@linux.dev/
Fixes: 5c831644e1f4 ("rtw88: handle and recover when firmware crash")
Signed-off-by: Mehmet Fide <mehmet.fide@screeningeagle.com>
---
Notes:
v3: new (Luka Gejak)
drivers/net/wireless/realtek/rtw88/mac80211.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/wireless/realtek/rtw88/mac80211.c b/drivers/net/wireless/realtek/rtw88/mac80211.c
index 5e40cf06a9e3..10f1ae08f383 100644
--- a/drivers/net/wireless/realtek/rtw88/mac80211.c
+++ b/drivers/net/wireless/realtek/rtw88/mac80211.c
@@ -68,6 +68,7 @@ static void rtw_ops_stop(struct ieee80211_hw *hw, bool suspend)
mutex_lock(&rtwdev->mutex);
rtw_core_stop(rtwdev);
+ clear_bit(RTW_FLAG_RESTARTING, rtwdev->flags);
mutex_unlock(&rtwdev->mutex);
}
--
2.56.0
prev parent reply other threads:[~2026-11-17 17:10 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-17 17:09 [PATCH rtw-next v3 0/5] wifi: rtw88: fixes around the firmware recovery Mehmet Fide
2026-11-17 17:09 ` [PATCH rtw-next v3 1/5] wifi: rtw88: free the reserved pages of an interface on " Mehmet Fide
2026-11-17 17:10 ` [PATCH rtw-next v3 2/5] wifi: rtw88: report the frames purged from the TX report queue Mehmet Fide
2026-11-17 17:10 ` [PATCH rtw-next v3 3/5] wifi: rtw88: do not drop stations when collecting them for an iteration Mehmet Fide
2026-11-17 17:10 ` [PATCH rtw-next v3 4/5] wifi: rtw88: reset the stations outside of RCU on firmware recovery Mehmet Fide
2026-11-17 17:10 ` Mehmet Fide [this message]
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=20261117171003.1840491-6-mehmet.fide@gmail.com \
--to=mehmet.fide@gmail.com \
--cc=briannorris@chromium.org \
--cc=kevin_yang@realtek.com \
--cc=kvalo@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=luka.gejak@linux.dev \
--cc=mehmet.fide@screeningeagle.com \
--cc=pkshih@realtek.com \
--cc=s.hauer@pengutronix.de \
--cc=sgruszka@redhat.com \
--cc=tehuang@realtek.com \
--cc=yhchuang@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
all inboxes | Powered by JetHome®