diff --git a/sys/dev/usb/wlan/if_uath.c b/sys/dev/usb/wlan/if_uath.c index 98c494355bc..f647daec99f 100644 --- a/sys/dev/usb/wlan/if_uath.c +++ b/sys/dev/usb/wlan/if_uath.c @@ -517,12 +517,12 @@ uath_detach(device_t dev) sc->sc_flags |= UATH_FLAG_INVALID; uath_stop(ifp); - ieee80211_ifdetach(ic); callout_drain(&sc->stat_ch); callout_drain(&sc->watchdog_ch); usb2_transfer_unsetup(sc->sc_xfer, UATH_N_XFERS); + ieee80211_ifdetach(ic); /* free buffers */ UATH_LOCK(sc); diff --git a/sys/dev/usb/wlan/if_upgt.c b/sys/dev/usb/wlan/if_upgt.c index 3bef0b43359..d99c7400863 100644 --- a/sys/dev/usb/wlan/if_upgt.c +++ b/sys/dev/usb/wlan/if_upgt.c @@ -2002,12 +2002,12 @@ upgt_detach(device_t dev) return 0; upgt_stop(sc); - ieee80211_ifdetach(ic); callout_drain(&sc->sc_led_ch); callout_drain(&sc->sc_watchdog_ch); usb2_transfer_unsetup(sc->sc_xfer, UPGT_N_XFERS); + ieee80211_ifdetach(ic); upgt_free_rx(sc); upgt_free_tx(sc);