1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-17 10:26:15 +00:00

Don't panic on failure to attach if we fail before or during the

if_alloc() of ifp.  This fixes the panic reported in the PR, but
not the attach failure.

PR:		kern/139079
Tested by:      Steven Noonan <steven uplinklabs.net>
Reviewed by:	thompsa
Approved by:	ed (mentor)
MFC after:	2 weeks`
This commit is contained in:
Gavin Atkinson 2009-12-14 19:18:02 +00:00
parent 420d0abff8
commit 4e7ebd34ef
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=200530

View File

@ -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);