diff options
-rw-r--r-- | drivers/net/wireless/ath/ath9k/hw.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c index f1405042a48d..ea831f575a9d 100644 --- a/drivers/net/wireless/ath/ath9k/hw.c +++ b/drivers/net/wireless/ath/ath9k/hw.c | |||
@@ -2036,6 +2036,11 @@ static void ath9k_set_power_sleep(struct ath_hw *ah, int setChip) | |||
2036 | } | 2036 | } |
2037 | } | 2037 | } |
2038 | 2038 | ||
2039 | /* | ||
2040 | * Notify Power Management is enabled in self-generating | ||
2041 | * frames. If request, set power mode of chip to | ||
2042 | * auto/normal. Duration in units of 128us (1/8 TU). | ||
2043 | */ | ||
2039 | static void ath9k_set_power_network_sleep(struct ath_hw *ah, int setChip) | 2044 | static void ath9k_set_power_network_sleep(struct ath_hw *ah, int setChip) |
2040 | { | 2045 | { |
2041 | REG_SET_BIT(ah, AR_STA_ID1, AR_STA_ID1_PWR_SAV); | 2046 | REG_SET_BIT(ah, AR_STA_ID1, AR_STA_ID1_PWR_SAV); |
@@ -2043,9 +2048,14 @@ static void ath9k_set_power_network_sleep(struct ath_hw *ah, int setChip) | |||
2043 | struct ath9k_hw_capabilities *pCap = &ah->caps; | 2048 | struct ath9k_hw_capabilities *pCap = &ah->caps; |
2044 | 2049 | ||
2045 | if (!(pCap->hw_caps & ATH9K_HW_CAP_AUTOSLEEP)) { | 2050 | if (!(pCap->hw_caps & ATH9K_HW_CAP_AUTOSLEEP)) { |
2051 | /* Set WakeOnInterrupt bit; clear ForceWake bit */ | ||
2046 | REG_WRITE(ah, AR_RTC_FORCE_WAKE, | 2052 | REG_WRITE(ah, AR_RTC_FORCE_WAKE, |
2047 | AR_RTC_FORCE_WAKE_ON_INT); | 2053 | AR_RTC_FORCE_WAKE_ON_INT); |
2048 | } else { | 2054 | } else { |
2055 | /* | ||
2056 | * Clear the RTC force wake bit to allow the | ||
2057 | * mac to go to sleep. | ||
2058 | */ | ||
2049 | REG_CLR_BIT(ah, AR_RTC_FORCE_WAKE, | 2059 | REG_CLR_BIT(ah, AR_RTC_FORCE_WAKE, |
2050 | AR_RTC_FORCE_WAKE_EN); | 2060 | AR_RTC_FORCE_WAKE_EN); |
2051 | } | 2061 | } |