From a2b2fc7fc4f38f5a51c087d41001f842f3bd8ad0 Mon Sep 17 00:00:00 2001 From: stsp Date: Tue, 2 Jan 2024 17:39:08 +0000 Subject: [PATCH] set attached flag properly when fw fails to load during config_mountroot() --- sys/dev/ic/qwx.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/dev/ic/qwx.c b/sys/dev/ic/qwx.c index 3ed1b4e91d5..e9c4dbf2d6a 100644 --- a/sys/dev/ic/qwx.c +++ b/sys/dev/ic/qwx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: qwx.c,v 1.1 2023/12/28 17:36:29 stsp Exp $ */ +/* $OpenBSD: qwx.c,v 1.2 2024/01/02 17:39:08 stsp Exp $ */ /* * Copyright 2023 Stefan Sperling @@ -208,6 +208,8 @@ qwx_init(struct ifnet *ifp) ieee80211_begin_scan(ifp); } else { + sc->attached = 1; + /* Configure MAC address at boot-time. */ error = if_setlladdr(ifp, ic->ic_myaddr); if (error) @@ -18329,8 +18331,6 @@ qwx_attach(struct qwx_softc *sc) if (error) return error; - sc->attached = 1; - /* Turn device off until interface comes up. */ qwx_core_deinit(sc); -- 2.20.1