From 3b33c3f68fa216c2c41ee30eab6769ff286ee21e Mon Sep 17 00:00:00 2001 From: stsp Date: Sun, 31 May 2026 13:54:17 +0000 Subject: [PATCH] in the qwx newstate task, only attempt to reset the device if RUNNING If we are not RUNNING then we are being called from qwx_stop(), and any error recovery the init task would try to perform would at best be pointless and might even cause problems. --- sys/dev/ic/qwx.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/dev/ic/qwx.c b/sys/dev/ic/qwx.c index 961efb3bb5f..e10ad8ce384 100644 --- a/sys/dev/ic/qwx.c +++ b/sys/dev/ic/qwx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: qwx.c,v 1.123 2026/05/31 13:53:02 stsp Exp $ */ +/* $OpenBSD: qwx.c,v 1.124 2026/05/31 13:54:17 stsp Exp $ */ /* * Copyright 2023 Stefan Sperling @@ -1221,7 +1221,8 @@ next_scan: break; } out: - if (!test_bit(ATH11K_FLAG_CRASH_FLUSH, sc->sc_flags)) { + if (!test_bit(ATH11K_FLAG_CRASH_FLUSH, sc->sc_flags) && + (ifp->if_flags & IFF_RUNNING)) { if (err) task_add(systq, &sc->init_task); else