diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2006-02-20 11:13:58 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2006-02-20 11:13:58 +0000 |
commit | 98fe99c0f12914206a11f76541c15578818d03f8 (patch) | |
tree | c7f3506b00d5b95071fce40dd0d1f674201ff7c6 /sys/dev/ic | |
parent | 78165d1eb976072d34d5199a0d618af48ed40e1a (diff) |
Be sure to call shutdownhook_disestablish() as this is a removeable device.
ok mickey@
Diffstat (limited to 'sys/dev/ic')
-rw-r--r-- | sys/dev/ic/an.c | 5 | ||||
-rw-r--r-- | sys/dev/ic/anvar.h | 4 |
2 files changed, 6 insertions, 3 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; } diff --git a/sys/dev/ic/anvar.h b/sys/dev/ic/anvar.h index 464f7d4a46e..2f7d8e9fc10 100644 --- a/sys/dev/ic/anvar.h +++ b/sys/dev/ic/anvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: anvar.h,v 1.20 2006/01/30 11:41:00 jsg Exp $ */ +/* $OpenBSD: anvar.h,v 1.21 2006/02/20 11:13:57 jsg Exp $ */ /* $NetBSD: anvar.h,v 1.10 2005/02/27 00:27:00 perry Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -115,6 +115,8 @@ struct an_softc { int sc_enabled; int sc_invalid; int sc_attached; + void *sc_sdhook; + int sc_bap_id; int sc_bap_off; |