Fix a couple of bugs in the resume handler. Don't call the if_init

function unless the device is configured up.  Without this fix, the
device ends up in the RUNNING state even though it is configured down.
Also, check the RUNNING flag before calling the if_start function, in
case the if_init function failed for one reason or another.
This commit is contained in:
jdp 2003-07-26 20:54:57 +00:00
parent 8a39e4ec05
commit 6938f24e5b

View File

@ -265,9 +265,10 @@ wi_pci_resume(device_t dev)
if (sc->wi_bus_type != WI_BUS_PCI_NATIVE)
return (0);
ifp->if_init(ifp->if_softc);
if (ifp->if_flags & IFF_UP) {
ifp->if_start(ifp);
ifp->if_init(ifp->if_softc);
if (ifp->if_flags & IFF_RUNNING)
ifp->if_start(ifp);
}
return (0);