summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2002-04-17 17:33:45 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2002-04-17 17:33:45 +0000
commit9ec0201bbcfd710c0e7c28fb8877b45ab450eb57 (patch)
treeecb0dfc950db3409991dbe1d98af1cf932dc11ef
parenta93a2b4a47db2d7298248e9b92efa077b72d1fa0 (diff)
Clear flags indicating whether or not wi or hostap is active as
early as possible. Also the timeout_del() in wi_stop() to before we disable wi(4) so it doesn't fire at the wrong time. Joint effort between mickey@ and myself.
-rw-r--r--sys/dev/pcmcia/if_wi_pcmcia.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/pcmcia/if_wi_pcmcia.c b/sys/dev/pcmcia/if_wi_pcmcia.c
index d0f4695940b..6af11d3968d 100644
--- a/sys/dev/pcmcia/if_wi_pcmcia.c
+++ b/sys/dev/pcmcia/if_wi_pcmcia.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_wi_pcmcia.c,v 1.27 2002/04/07 23:23:49 millert Exp $ */
+/* $OpenBSD: if_wi_pcmcia.c,v 1.28 2002/04/17 17:33:44 millert Exp $ */
/* $NetBSD: if_wi_pcmcia.c,v 1.14 2001/11/26 04:34:56 ichiro Exp $ */
/*
@@ -388,14 +388,14 @@ wi_pcmcia_detach(dev, flags)
if (ifp->if_flags & IFF_RUNNING)
wi_stop(sc);
+ sc->wi_flags = 0;
+
pcmcia_io_unmap(psc->sc_pf, psc->sc_io_window);
pcmcia_io_free(psc->sc_pf, &psc->sc_pcioh);
ether_ifdetach(ifp);
if_detach(ifp);
- sc->wi_flags = 0;
-
return (0);
}