summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorStefan Sperling <stsp@cvs.openbsd.org>2016-06-22 11:32:13 +0000
committerStefan Sperling <stsp@cvs.openbsd.org>2016-06-22 11:32:13 +0000
commit2f16522fde9e66a0840502e3d672baca6a1f69d5 (patch)
tree9a5b726a7b61717625efaa2ca5c8f9c9a7c1662d /sys/dev
parent6a2da0d5345127e2a27f3d36b627a027a7f7d0f9 (diff)
In iwm(4), clear the in_assoc flag when going down. This flag affects behaviour
early during startup, e.g. where the BSSID for the MAC context is copied from. Pointed out by Imre Vadasz.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pci/if_iwm.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/dev/pci/if_iwm.c b/sys/dev/pci/if_iwm.c
index 8296bcec95e..0729cbe3f34 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.91 2016/06/22 11:30:00 stsp Exp $ */
+/* $OpenBSD: if_iwm.c,v 1.92 2016/06/22 11:32:12 stsp Exp $ */
/*
* Copyright (c) 2014, 2016 genua gmbh <info@genua.de>
@@ -6837,6 +6837,7 @@ iwm_stop(struct ifnet *ifp, int disable)
{
struct iwm_softc *sc = ifp->if_softc;
struct ieee80211com *ic = &sc->sc_ic;
+ struct iwm_node *in = (void *)ic->ic_bss;
sc->sc_flags &= ~IWM_FLAG_HW_INITED;
sc->sc_flags |= IWM_FLAG_STOPPED;
@@ -6845,6 +6846,9 @@ iwm_stop(struct ifnet *ifp, int disable)
ifp->if_flags &= ~IFF_RUNNING;
ifq_clr_oactive(&ifp->if_snd);
+ in->in_phyctxt = NULL;
+ in->in_assoc = 0;
+
task_del(systq, &sc->init_task);
task_del(sc->sc_nswq, &sc->newstate_task);
task_del(sc->sc_eswq, &sc->sc_eswk);