static int ath_pci_suspend(struct device *device) { struct pci_dev *pdev = to_pci_dev(device); struct ieee80211_hw *hw = pci_get_drvdata(pdev); struct ath_softc *sc = hw->priv; /* The device has to be moved to FULLSLEEP forcibly. * Otherwise the chip never moved to full sleep, * when no interface is up. */ ath9k_stop_btcoex(sc); ath9k_btcoex_ath9k_hw_disable(sc->sc_ah); ath9k_btcoex_ath9k_hw_setpower(sc->sc_ah, ATH9K_PM_FULL_SLEEP); return 0; }
static int ath_pci_suspend(struct device *device) { struct pci_dev *pdev = to_pci_dev(device); struct ieee80211_hw *hw = pci_get_drvdata(pdev); struct ath_softc *sc = hw->priv; struct ath_common *common = ath9k_hw_common(sc->sc_ah); if (test_bit(ATH_OP_WOW_ENABLED, &common->op_flags)) { dev_info(&pdev->dev, "WOW is enabled, bypassing PCI suspend\n"); return 0; } /* The device has to be moved to FULLSLEEP forcibly. * Otherwise the chip never moved to full sleep, * when no interface is up. */ ath9k_stop_btcoex(sc); ath9k_hw_disable(sc->sc_ah); del_timer_sync(&sc->sleep_timer); ath9k_hw_setpower(sc->sc_ah, ATH9K_PM_FULL_SLEEP); return 0; }