[PATCH 2/2] wifi: ath12k: don't leave a monitor link started when its stop fails

Christopher Griffin via B4 Relay devnull+christophergriffin05.gmail.com at kernel.org
Thu Nov 5 10:12:23 PST 2026


From: Christopher Griffin <christophergriffin05 at gmail.com>

ath12k_mac_op_unassign_vif_chanctx() returns early, with
arvif->is_started still set, when ath12k_mac_monitor_stop() fails.
mac80211 can't fail an unassignment and considers the channel context
released, so the link's next assignment hits WARN_ON(arvif->is_started)
in ath12k_mac_op_assign_vif_chanctx() and fails with -EBUSY. A firmware
crash during a monitor channel change is enough: the vdev stop times
out.

ath11k has the same flow and shows the warning that way on a QCN9074.

Fall through to the common path, which clears is_started.
ath12k_mac_monitor_stop() already warns on failure.

Compile-tested only.

Fixes: d889913205cf ("wifi: ath12k: driver for Qualcomm Wi-Fi 7 devices")
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Christopher Griffin <christophergriffin05 at gmail.com>
---
 drivers/net/wireless/ath/ath12k/mac.c | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c
index 9fd3841f71b71..7d04f16f99e37 100644
--- a/drivers/net/wireless/ath/ath12k/mac.c
+++ b/drivers/net/wireless/ath/ath12k/mac.c
@@ -12422,13 +12422,11 @@ ath12k_mac_op_unassign_vif_chanctx(struct ieee80211_hw *hw,
 
 	WARN_ON(!arvif->is_started);
 
-	if (ahvif->vdev_type == WMI_VDEV_TYPE_MONITOR) {
-		ret = ath12k_mac_monitor_stop(ar);
-		if (ret)
-			return;
-
-		arvif->is_started = false;
-	}
+	/* mac80211 can't fail an unassignment, so the link counts as stopped
+	 * below even if the monitor stop fails (that warns on its own).
+	 */
+	if (ahvif->vdev_type == WMI_VDEV_TYPE_MONITOR)
+		ath12k_mac_monitor_stop(ar);
 
 	if (ahvif->vdev_type != WMI_VDEV_TYPE_STA &&
 	    ahvif->vdev_type != WMI_VDEV_TYPE_MONITOR) {

-- 
2.43.0





More information about the ath12k mailing list