From: stsp Date: Tue, 2 Jan 2024 17:39:08 +0000 (+0000) Subject: set attached flag properly when fw fails to load during config_mountroot() X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=a2b2fc7fc4f38f5a51c087d41001f842f3bd8ad0;p=openbsd set attached flag properly when fw fails to load during config_mountroot() --- 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);