Set sc->ns_nstate when bypassing the driver's newstate handler while
bringing the interface down.
Otherwise, if the interface was already running, the INIT->RUN transition
which kicks off monitor mode will appear as a RUN->RUN transition to the
driver's newstate handler, and the handler will do nothing.
Monitor mode did not work as a result.
-/* $OpenBSD: if_iwm.c,v 1.379 2021/11/17 15:15:32 stsp Exp $ */
+/* $OpenBSD: if_iwm.c,v 1.380 2021/11/19 13:05:19 stsp Exp $ */
/*
* Copyright (c) 2014, 2016 genua gmbh <info@genua.de>
sc->ba_tx.stop_tidmask = 0;
sc->sc_newstate(ic, IEEE80211_S_INIT, -1);
+ sc->ns_nstate = IEEE80211_S_INIT;
timeout_del(&sc->sc_calib_to); /* XXX refcount? */
for (i = 0; i < nitems(sc->sc_rxba_data); i++) {
-/* $OpenBSD: if_iwx.c,v 1.120 2021/11/16 12:56:11 stsp Exp $ */
+/* $OpenBSD: if_iwx.c,v 1.121 2021/11/19 13:05:19 stsp Exp $ */
/*
* Copyright (c) 2014, 2016 genua gmbh <info@genua.de>
sc->ba_tx.stop_tidmask = 0;
sc->sc_newstate(ic, IEEE80211_S_INIT, -1);
+ sc->ns_nstate = IEEE80211_S_INIT;
for (i = 0; i < nitems(sc->sc_rxba_data); i++) {
struct iwx_rxba_data *rxba = &sc->sc_rxba_data[i];