diff options
author | Stefan Sperling <stsp@cvs.openbsd.org> | 2021-11-19 13:05:20 +0000 |
---|---|---|
committer | Stefan Sperling <stsp@cvs.openbsd.org> | 2021-11-19 13:05:20 +0000 |
commit | c8c92323ed8af3cedd9039558aad8e3aec6814ae (patch) | |
tree | 10f323f6cace97c9cc2d5a7b8d91ce85ea7bb9c9 /sys/dev/pci/if_iwm.c | |
parent | 9a07ca9807e64a072adc08bea54454abe316a51b (diff) |
Fix monitor mode on iwm(4) and iwx(4).
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.
Diffstat (limited to 'sys/dev/pci/if_iwm.c')
-rw-r--r-- | sys/dev/pci/if_iwm.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/pci/if_iwm.c b/sys/dev/pci/if_iwm.c index 6ecf1dd8915..32d831f78f3 100644 --- a/sys/dev/pci/if_iwm.c +++ b/sys/dev/pci/if_iwm.c @@ -1,4 +1,4 @@ -/* $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> @@ -10075,6 +10075,7 @@ iwm_stop(struct ifnet *ifp) 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++) { |