diff options
author | Vivek Natarajan <vnatarajan@atheros.com> | 2009-09-16 23:54:58 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-09-23 11:35:50 -0400 |
commit | 93b1b37f6a4de8bce17f55d9cfa10ef5c8c04e8a (patch) | |
tree | 16405891b20c8d73e80812d525ec45a9f71255f5 /drivers/net/wireless/ath/ath9k/main.c | |
parent | 6170cd5c72399f8536412ac75cba29cddc9919fb (diff) |
ath9k: Revamp PCIE workarounds
* Disable L1 state ONLY when device is in D3 mode.
* Clear bit 22 of register 0x4004.
* Handle power on/off properly
Not setting the workarounds properly resulted in the
disappearance of the card in certain cases.
Signed-off-by: Vivek Natarajan <vnatarajan@atheros.com>
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/main.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/main.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index 3dc7b5a13e64..5055f1842b89 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c | |||
@@ -1131,7 +1131,7 @@ void ath_radio_enable(struct ath_softc *sc) | |||
1131 | int r; | 1131 | int r; |
1132 | 1132 | ||
1133 | ath9k_ps_wakeup(sc); | 1133 | ath9k_ps_wakeup(sc); |
1134 | ath9k_hw_configpcipowersave(ah, 0); | 1134 | ath9k_hw_configpcipowersave(ah, 0, 0); |
1135 | 1135 | ||
1136 | if (!ah->curchan) | 1136 | if (!ah->curchan) |
1137 | ah->curchan = ath_get_curchannel(sc, sc->hw); | 1137 | ah->curchan = ath_get_curchannel(sc, sc->hw); |
@@ -1202,7 +1202,7 @@ void ath_radio_disable(struct ath_softc *sc) | |||
1202 | spin_unlock_bh(&sc->sc_resetlock); | 1202 | spin_unlock_bh(&sc->sc_resetlock); |
1203 | 1203 | ||
1204 | ath9k_hw_phy_disable(ah); | 1204 | ath9k_hw_phy_disable(ah); |
1205 | ath9k_hw_configpcipowersave(ah, 1); | 1205 | ath9k_hw_configpcipowersave(ah, 1, 1); |
1206 | ath9k_ps_restore(sc); | 1206 | ath9k_ps_restore(sc); |
1207 | ath9k_hw_setpower(ah, ATH9K_PM_FULL_SLEEP); | 1207 | ath9k_hw_setpower(ah, ATH9K_PM_FULL_SLEEP); |
1208 | } | 1208 | } |
@@ -1942,7 +1942,7 @@ static int ath9k_start(struct ieee80211_hw *hw) | |||
1942 | init_channel = ath_get_curchannel(sc, hw); | 1942 | init_channel = ath_get_curchannel(sc, hw); |
1943 | 1943 | ||
1944 | /* Reset SERDES registers */ | 1944 | /* Reset SERDES registers */ |
1945 | ath9k_hw_configpcipowersave(sc->sc_ah, 0); | 1945 | ath9k_hw_configpcipowersave(sc->sc_ah, 0, 0); |
1946 | 1946 | ||
1947 | /* | 1947 | /* |
1948 | * The basic interface to setting the hardware in a good | 1948 | * The basic interface to setting the hardware in a good |
@@ -2170,7 +2170,7 @@ static void ath9k_stop(struct ieee80211_hw *hw) | |||
2170 | 2170 | ||
2171 | /* disable HAL and put h/w to sleep */ | 2171 | /* disable HAL and put h/w to sleep */ |
2172 | ath9k_hw_disable(sc->sc_ah); | 2172 | ath9k_hw_disable(sc->sc_ah); |
2173 | ath9k_hw_configpcipowersave(sc->sc_ah, 1); | 2173 | ath9k_hw_configpcipowersave(sc->sc_ah, 1, 1); |
2174 | ath9k_hw_setpower(sc->sc_ah, ATH9K_PM_FULL_SLEEP); | 2174 | ath9k_hw_setpower(sc->sc_ah, ATH9K_PM_FULL_SLEEP); |
2175 | 2175 | ||
2176 | sc->sc_flags |= SC_OP_INVALID; | 2176 | sc->sc_flags |= SC_OP_INVALID; |