From ab53b9b1681d77770e32589856b07d100e40c83f Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Tue, 24 Nov 2009 00:28:23 +0000 Subject: kill hooks and timeouts before calling complex sleeping code from detach; ok jsg --- sys/dev/ic/rtw.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'sys/dev') diff --git a/sys/dev/ic/rtw.c b/sys/dev/ic/rtw.c index 214c140f2a9..c8cb26389d5 100644 --- a/sys/dev/ic/rtw.c +++ b/sys/dev/ic/rtw.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rtw.c,v 1.77 2009/08/16 18:21:57 jsg Exp $ */ +/* $OpenBSD: rtw.c,v 1.78 2009/11/24 00:28:22 deraadt Exp $ */ /* $NetBSD: rtw.c,v 1.29 2004/12/27 19:49:16 dyoung Exp $ */ /*- @@ -4151,11 +4151,12 @@ rtw_detach(struct rtw_softc *sc) { sc->sc_flags |= RTW_F_INVALID; - rtw_stop(&sc->sc_if, 1); - rtw_disestablish_hooks(&sc->sc_hooks, sc->sc_dev.dv_xname, (void*)sc); timeout_del(&sc->sc_scan_to); + + rtw_stop(&sc->sc_if, 1); + ieee80211_ifdetach(&sc->sc_if); if_detach(&sc->sc_if); -- cgit v1.2.3