diff options
| author | John W. Linville <linville@tuxdriver.com> | 2011-01-05 16:06:25 -0500 |
|---|---|---|
| committer | John W. Linville <linville@tuxdriver.com> | 2011-01-05 16:06:25 -0500 |
| commit | c96e96354a6c9456cdf1f150eca504e2ea35301e (patch) | |
| tree | 751bec601fb8152116b8e31e0f1f83d687a37d6f /drivers/net/wireless/ath/ath9k/pci.c | |
| parent | dbbe68bb12b34f3e450da7a73c20e6fa1f85d63a (diff) | |
| parent | 33af88138b859f515b365a074e0a014d7cdbf846 (diff) | |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem
Conflicts:
net/bluetooth/Makefile
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/pci.c')
| -rw-r--r-- | drivers/net/wireless/ath/ath9k/pci.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath9k/pci.c b/drivers/net/wireless/ath/ath9k/pci.c index 7ca8499249ec..78ef1f13386f 100644 --- a/drivers/net/wireless/ath/ath9k/pci.c +++ b/drivers/net/wireless/ath/ath9k/pci.c @@ -96,7 +96,7 @@ static void ath_pci_bt_coex_prep(struct ath_common *common) struct pci_dev *pdev = to_pci_dev(sc->dev); u8 aspm; - if (!pdev->is_pcie) + if (!pci_is_pcie(pdev)) return; pci_read_config_byte(pdev, ATH_PCIE_CAP_LINK_CTRL, &aspm); @@ -264,6 +264,8 @@ static void ath_pci_remove(struct pci_dev *pdev) struct ath_softc *sc = aphy->sc; void __iomem *mem = sc->mem; + if (!is_ath9k_unloaded) + sc->sc_ah->ah_flags |= AH_UNPLUGGED; ath9k_deinit_device(sc); free_irq(sc->irq, sc); ieee80211_free_hw(sc->hw); @@ -309,7 +311,16 @@ static int ath_pci_resume(struct device *device) AR_GPIO_OUTPUT_MUX_AS_OUTPUT); ath9k_hw_set_gpio(sc->sc_ah, sc->sc_ah->led_pin, 1); + /* + * Reset key cache to sane defaults (all entries cleared) instead of + * semi-random values after suspend/resume. + */ + ath9k_ps_wakeup(sc); + ath9k_init_crypto(sc); + ath9k_ps_restore(sc); + sc->ps_idle = true; + ath9k_set_wiphy_idle(aphy, true); ath_radio_disable(sc, hw); return 0; |
