diff options
| author | Gavin Atkinson <gavin@FreeBSD.org> | 2009-12-14 19:18:02 +0000 |
|---|---|---|
| committer | Gavin Atkinson <gavin@FreeBSD.org> | 2009-12-14 19:18:02 +0000 |
| commit | 4e7ebd34eff1e41f0e7537e3c0bb9876b58ed7d6 (patch) | |
| tree | cee7ace8d6a1eff61dbd544923061937ecc2bd52 /sys/dev/wpi | |
| parent | 420d0abff82c4ae773205c584c58ab0033678bd3 (diff) | |
Notes
Diffstat (limited to 'sys/dev/wpi')
| -rw-r--r-- | sys/dev/wpi/if_wpi.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/dev/wpi/if_wpi.c b/sys/dev/wpi/if_wpi.c index 858123752185..1797c2d7271f 100644 --- a/sys/dev/wpi/if_wpi.c +++ b/sys/dev/wpi/if_wpi.c @@ -713,13 +713,14 @@ wpi_detach(device_t dev) { struct wpi_softc *sc = device_get_softc(dev); struct ifnet *ifp = sc->sc_ifp; - struct ieee80211com *ic = ifp->if_l2com; + struct ieee80211com *ic; int ac; - ieee80211_draintask(ic, &sc->sc_restarttask); - ieee80211_draintask(ic, &sc->sc_radiotask); - if (ifp != NULL) { + ic = ifp->if_l2com; + + ieee80211_draintask(ic, &sc->sc_restarttask); + ieee80211_draintask(ic, &sc->sc_radiotask); wpi_stop(sc); callout_drain(&sc->watchdog_to); callout_drain(&sc->calib_to); |
