From: Vladyslav Tymoshchuk <tvlad744@gmail.com>
To: Jeff Johnson <jjohnson@kernel.org>
Cc: Baochen Qiang <baochen.qiang@oss.qualcomm.com>,
linux-wireless@vger.kernel.org, ath12k@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: [PATCH 4/4] wifi: ath12k: skip the links without a radio when a scan fails
Date: Thu, 12 Nov 2026 13:00:08 +0200 [thread overview]
Message-ID: <20261112110008.1229-5-tvlad744@gmail.com> (raw)
In-Reply-To: <20261112110008.1229-1-tvlad744@gmail.com>
ath12k_mac_vdev_create() clears arvif->ar when the vdev creation fails,
and the link stays in ahvif->links_map. When a scan fails after that,
ath12k_mac_op_hw_scan() walks all the links of the vif to clean up and
dereferences the NULL radio:
ath12k_wifi7_pci 0000:01:00.0: failed to create WMI vdev 1: -108
ath12k_wifi7_pci 0000:01:00.0: failed to create vdev 00:03:7f:12:34:56 ret -108
Unable to handle kernel paging request at virtual address 0000000000001508
pc : ath12k_mac_op_hw_scan+0x9cc/0xb28 [ath12k]
Call trace:
ath12k_mac_op_hw_scan+0x9cc/0xb28 [ath12k] (P)
__ieee80211_start_scan+0x4e8/0x6e0 [mac80211]
ieee80211_request_scan+0x10/0x1c [mac80211]
ieee80211_scan+0x98/0x14c [mac80211]
cfg80211_scan+0x50/0x1f4 [cfg80211]
nl80211_trigger_scan+0x694/0x6cc [cfg80211]
This happens when the firmware crashes a second time while mac80211 is
reconfiguring the device after a first crash: the WMI commands fail
with -ESHUTDOWN, and so do the vdev creation of the station link and
the scan that wpa_supplicant requests next. The oops leaves the wiphy
mutex locked, and everything that needs it hangs.
Such a link has neither a scan to stop nor a vdev to remove.
Fixes: feed05f1526e ("wifi: ath12k: Split scan request for split band device")
Signed-off-by: Vladyslav Tymoshchuk <tvlad744@gmail.com>
---
drivers/net/wireless/ath/ath12k/mac.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c
index 4cb41b8b1d3b..49cb9bd8dda1 100644
--- a/drivers/net/wireless/ath/ath12k/mac.c
+++ b/drivers/net/wireless/ath/ath12k/mac.c
@@ -5889,6 +5889,9 @@ int ath12k_mac_op_hw_scan(struct ieee80211_hw *hw,
continue;
ar = arvif->ar;
+ if (!ar)
+ continue;
+
if (ar->scan.arvif == arvif) {
wiphy_work_cancel(hw->wiphy, &ar->scan.vdev_clean_wk);
spin_lock_bh(&ar->data_lock);
--
2.43.0
prev parent reply other threads:[~2026-11-12 11:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-12 11:00 [PATCH 0/4] wifi: ath12k: recover from a firmware crash during resume Vladyslav Tymoshchuk
2026-11-12 11:00 ` [PATCH 1/4] wifi: ath12k: disable and enable the CE interrupts only once Vladyslav Tymoshchuk
2026-11-12 11:00 ` [PATCH 2/4] wifi: ath12k: do not wait in resume for a reset that cannot finish there Vladyslav Tymoshchuk
2026-11-12 11:00 ` [PATCH 3/4] wifi: ath12k: unregister the thermal devices of a radio only once Vladyslav Tymoshchuk
2026-11-12 11:00 ` Vladyslav Tymoshchuk [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=20261112110008.1229-5-tvlad744@gmail.com \
--to=tvlad744@gmail.com \
--cc=ath12k@lists.infradead.org \
--cc=baochen.qiang@oss.qualcomm.com \
--cc=jjohnson@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
/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®