diff options
-rw-r--r-- | drivers/net/wireless/ath/ath5k/reset.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath5k/reset.c b/drivers/net/wireless/ath/ath5k/reset.c index 57f2e56bc064..0e89fc9a75a7 100644 --- a/drivers/net/wireless/ath/ath5k/reset.c +++ b/drivers/net/wireless/ath/ath5k/reset.c | |||
@@ -142,6 +142,7 @@ static void ath5k_hw_init_core_clock(struct ath5k_hw *ah) | |||
142 | 142 | ||
143 | /* Set 32MHz USEC counter */ | 143 | /* Set 32MHz USEC counter */ |
144 | if ((ah->ah_radio == AR5K_RF5112) || | 144 | if ((ah->ah_radio == AR5K_RF5112) || |
145 | (ah->ah_radio == AR5K_RF2413) || | ||
145 | (ah->ah_radio == AR5K_RF5413) || | 146 | (ah->ah_radio == AR5K_RF5413) || |
146 | (ah->ah_radio == AR5K_RF2316) || | 147 | (ah->ah_radio == AR5K_RF2316) || |
147 | (ah->ah_radio == AR5K_RF2317)) | 148 | (ah->ah_radio == AR5K_RF2317)) |
@@ -233,7 +234,7 @@ static void ath5k_hw_init_core_clock(struct ath5k_hw *ah) | |||
233 | static void ath5k_hw_set_sleep_clock(struct ath5k_hw *ah, bool enable) | 234 | static void ath5k_hw_set_sleep_clock(struct ath5k_hw *ah, bool enable) |
234 | { | 235 | { |
235 | struct ath5k_eeprom_info *ee = &ah->ah_capabilities.cap_eeprom; | 236 | struct ath5k_eeprom_info *ee = &ah->ah_capabilities.cap_eeprom; |
236 | u32 scal, spending; | 237 | u32 scal, spending, sclock; |
237 | 238 | ||
238 | /* Only set 32KHz settings if we have an external | 239 | /* Only set 32KHz settings if we have an external |
239 | * 32KHz crystal present */ | 240 | * 32KHz crystal present */ |
@@ -317,6 +318,15 @@ static void ath5k_hw_set_sleep_clock(struct ath5k_hw *ah, bool enable) | |||
317 | 318 | ||
318 | /* Set up tsf increment on each cycle */ | 319 | /* Set up tsf increment on each cycle */ |
319 | AR5K_REG_WRITE_BITS(ah, AR5K_TSF_PARM, AR5K_TSF_PARM_INC, 1); | 320 | AR5K_REG_WRITE_BITS(ah, AR5K_TSF_PARM, AR5K_TSF_PARM_INC, 1); |
321 | |||
322 | if ((ah->ah_radio == AR5K_RF5112) || | ||
323 | (ah->ah_radio == AR5K_RF5413) || | ||
324 | (ah->ah_radio == AR5K_RF2316) || | ||
325 | (ah->ah_radio == AR5K_RF2317)) | ||
326 | sclock = 40 - 1; | ||
327 | else | ||
328 | sclock = 32 - 1; | ||
329 | AR5K_REG_WRITE_BITS(ah, AR5K_USEC_5211, AR5K_USEC_32, sclock); | ||
320 | } | 330 | } |
321 | } | 331 | } |
322 | 332 | ||