summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2009-11-21 14:18:35 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2009-11-21 14:18:35 +0000
commitf4b3d25c9d33aa8c7b3953cda5f2c2b6703f1845 (patch)
treee0199597ab0f8ffd236a904c5a80a75214f1db18 /sys
parentcd96bff0a02708dba82059193626bb2f6c540b83 (diff)
Do the operations in atu_detach in the right order, as done in
other drivers recently.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/usb/if_atu.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/dev/usb/if_atu.c b/sys/dev/usb/if_atu.c
index 56ea8031a45..02163dec98b 100644
--- a/sys/dev/usb/if_atu.c
+++ b/sys/dev/usb/if_atu.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_atu.c,v 1.93 2009/10/13 19:33:17 pirofti Exp $ */
+/* $OpenBSD: if_atu.c,v 1.94 2009/11/21 14:18:34 deraadt Exp $ */
/*
* Copyright (c) 2003, 2004
* Daan Vreeken <Danovitsch@Vitsch.net>. All rights reserved.
@@ -1496,15 +1496,16 @@ atu_detach(struct device *self, int flags)
if (sc->sc_state != ATU_S_UNCONFIG) {
atu_stop(ifp, 1);
- ieee80211_ifdetach(ifp);
- if_detach(ifp);
+
+ usb_rem_task(sc->atu_udev, &sc->sc_task);
if (sc->atu_ep[ATU_ENDPT_TX] != NULL)
usbd_abort_pipe(sc->atu_ep[ATU_ENDPT_TX]);
if (sc->atu_ep[ATU_ENDPT_RX] != NULL)
usbd_abort_pipe(sc->atu_ep[ATU_ENDPT_RX]);
- usb_rem_task(sc->atu_udev, &sc->sc_task);
+ ieee80211_ifdetach(ifp);
+ if_detach(ifp);
}
return(0);