summaryrefslogtreecommitdiff
path: root/sys/dev/ic/an.c
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2006-02-20 11:13:58 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2006-02-20 11:13:58 +0000
commit98fe99c0f12914206a11f76541c15578818d03f8 (patch)
treec7f3506b00d5b95071fce40dd0d1f674201ff7c6 /sys/dev/ic/an.c
parent78165d1eb976072d34d5199a0d618af48ed40e1a (diff)
Be sure to call shutdownhook_disestablish() as this is a removeable device.
ok mickey@
Diffstat (limited to 'sys/dev/ic/an.c')
-rw-r--r--sys/dev/ic/an.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/ic/an.c b/sys/dev/ic/an.c
index f2429b4c042..fcdba9a0702 100644
--- a/sys/dev/ic/an.c
+++ b/sys/dev/ic/an.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: an.c,v 1.46 2006/01/30 11:41:00 jsg Exp $ */
+/* $OpenBSD: an.c,v 1.47 2006/02/20 11:13:57 jsg Exp $ */
/* $NetBSD: an.c,v 1.34 2005/06/20 02:49:18 atatat Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
@@ -331,7 +331,7 @@ an_attach(struct an_softc *sc)
sizeof(struct ieee80211_frame) + 64);
#endif
- shutdownhook_establish(an_shutdown, sc);
+ sc->sc_sdhook = shutdownhook_establish(an_shutdown, sc);
sc->sc_attached = 1;
@@ -1673,6 +1673,7 @@ an_detach(struct an_softc *sc)
ifmedia_delete_instance(&sc->sc_ic.ic_media, IFM_INST_ANY);
ieee80211_ifdetach(ifp);
if_detach(ifp);
+ shutdownhook_disestablish(sc->sc_sdhook);
splx(s);
return 0;
}