summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Bergamini <damien@cvs.openbsd.org>2010-11-15 19:11:58 +0000
committerDamien Bergamini <damien@cvs.openbsd.org>2010-11-15 19:11:58 +0000
commit7a2a4c31b994be46bac37b48a27646b94afc0b5b (patch)
tree474d9055f33670cd7d690ea86ad3e39b6ab93d58
parent5814886737337f7f733c38eafe95bd515bff4ffc (diff)
Reset ic_scan_lock in {ipw,iwi}_stop similarly to {wpi,iwn}_stop.
From Jeremy Chase.
-rw-r--r--sys/dev/pci/if_ipw.c5
-rw-r--r--sys/dev/pci/if_iwi.c5
2 files changed, 8 insertions, 2 deletions
diff --git a/sys/dev/pci/if_ipw.c b/sys/dev/pci/if_ipw.c
index e670fa0dec0..368a447645f 100644
--- a/sys/dev/pci/if_ipw.c
+++ b/sys/dev/pci/if_ipw.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ipw.c,v 1.93 2010/09/07 16:21:45 deraadt Exp $ */
+/* $OpenBSD: if_ipw.c,v 1.94 2010/11/15 19:11:57 damien Exp $ */
/*-
* Copyright (c) 2004-2008
@@ -2082,6 +2082,9 @@ ipw_stop(struct ifnet *ifp, int disable)
for (i = 0; i < IPW_NTBD; i++)
ipw_release_sbd(sc, &sc->stbd_list[i]);
+ /* in case we were scanning, release the scan "lock" */
+ ic->ic_scan_lock = IEEE80211_SCAN_UNLOCKED;
+
ieee80211_new_state(ic, IEEE80211_S_INIT, -1);
}
diff --git a/sys/dev/pci/if_iwi.c b/sys/dev/pci/if_iwi.c
index afdefcf79a3..8530ec401c0 100644
--- a/sys/dev/pci/if_iwi.c
+++ b/sys/dev/pci/if_iwi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_iwi.c,v 1.110 2010/09/07 16:21:45 deraadt Exp $ */
+/* $OpenBSD: if_iwi.c,v 1.111 2010/11/15 19:11:57 damien Exp $ */
/*-
* Copyright (c) 2004-2008
@@ -2339,6 +2339,9 @@ iwi_stop(struct ifnet *ifp, int disable)
ifp->if_timer = 0;
ifp->if_flags &= ~(IFF_RUNNING | IFF_OACTIVE);
+ /* in case we were scanning, release the scan "lock" */
+ ic->ic_scan_lock = IEEE80211_SCAN_UNLOCKED;
+
ieee80211_new_state(ic, IEEE80211_S_INIT, -1);
iwi_stop_master(sc);