mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
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:
parent
a3c2b42158
commit
c009dcfdc2
1 changed files with 3 additions and 2 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue