diff options
author | Sujith Manoharan <c_manoha@qca.qualcomm.com> | 2015-01-30 13:35:27 (GMT) |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2015-02-03 13:31:04 (GMT) |
commit | 249943a2215c4d03c5dacf549b4ef9bf8439f17b (patch) | |
tree | cefd3cf181f81c0f8a8d10545230f7031c027abf /drivers/net/wireless/ath/ath9k/pci.c | |
parent | 661d25815ea533d06c7535ddd1c4810fa7ab9e22 (diff) | |
download | linux-249943a2215c4d03c5dacf549b4ef9bf8439f17b.tar.xz |
ath9k: Check WOW triggers properly
This patch makes sure that valid WOW triggers
are present before trying to suspend the device.
Also, introduce and use ATH_OP_WOW_ENABLED to
bypass PCI suspend and clear it in resume().
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/pci.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/pci.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath9k/pci.c b/drivers/net/wireless/ath/ath9k/pci.c index cc5c681..e6fef1b 100644 --- a/drivers/net/wireless/ath/ath9k/pci.c +++ b/drivers/net/wireless/ath/ath9k/pci.c @@ -998,9 +998,12 @@ 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 (sc->wow_enabled) + 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, |