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:
John Polstra 2003-07-26 20:54:57 +00:00
parent a3c2b42158
commit c009dcfdc2

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