mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 08:43:19 -04:00
Merge r200530 from head:
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 PRs, but not the attach failure. PR: kern/139079, kern/143874 Tested by: Steven Noonan <steven uplinklabs.net> Reviewed by: thompsa
This commit is contained in:
parent
16a11310f0
commit
3390bcf4cf
1 changed files with 5 additions and 4 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue