summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/pci.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2012-10-03 21:07:51 +0200
committerJohn W. Linville <linville@tuxdriver.com>2012-10-05 16:26:17 -0400
commitceb26a6013b962b82f644189ea29d802490fc8fc (patch)
tree72b22bf99cd0848df867d821231e52be36a40cbe /drivers/net/wireless/ath/ath9k/pci.c
parent93170516a4d64319ffcc43bc9dd61f12775bd297 (diff)
ath9k: improve suspend/resume reliability
Ensure that drv_start() always returns true, as a failing hw start usually eventually leads to crashes when there's still a station entry present. Call a power-on reset after a resume and after a hw reset failure to bring the hardware back to life again. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/pci.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/pci.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath9k/pci.c b/drivers/net/wireless/ath/ath9k/pci.c
index 270abf720f3..f088f4bf9a2 100644
--- a/drivers/net/wireless/ath/ath9k/pci.c
+++ b/drivers/net/wireless/ath/ath9k/pci.c
@@ -326,7 +326,8 @@ static int ath_pci_resume(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);
+ struct ath_hw *ah = sc->sc_ah;
+ struct ath_common *common = ath9k_hw_common(ah);
u32 val;
/*
@@ -339,6 +340,7 @@ static int ath_pci_resume(struct device *device)
pci_write_config_dword(pdev, 0x40, val & 0xffff00ff);
ath_pci_aspm_init(common);
+ ah->reset_power_on = false;
return 0;
}