if_iwm - Check sc->sc_attached flag in suspend/resume callbacks.
* There is (almost) nothing to do in suspend/resume if if_iwm has failed during initialization (e.g. because of firmware load failure) and was already uninitialized by iwm_detach_local(). Submitted by: Augustin Cavalier <waddlesplash@gmail.com> (Haiku) Obtained from: DragonFlyBSD (67b5e090efb225654815fed91020db6cfc16bb19)
This commit is contained in:
parent
9f72dada01
commit
f25aeab82b
@ -6301,6 +6301,10 @@ iwm_resume(device_t dev)
|
||||
* PCI Tx retries from interfering with C3 CPU state.
|
||||
*/
|
||||
pci_write_config(dev, PCI_CFG_RETRY_TIMEOUT, 0x00, 1);
|
||||
|
||||
if (!sc->sc_attached)
|
||||
return 0;
|
||||
|
||||
iwm_init_task(device_get_softc(dev));
|
||||
|
||||
IWM_LOCK(sc);
|
||||
@ -6324,6 +6328,9 @@ iwm_suspend(device_t dev)
|
||||
|
||||
do_stop = !! (sc->sc_ic.ic_nrunning > 0);
|
||||
|
||||
if (!sc->sc_attached)
|
||||
return (0);
|
||||
|
||||
ieee80211_suspend_all(&sc->sc_ic);
|
||||
|
||||
if (do_stop) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user