Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 314035
b: refs/heads/master
c: 153dccd
h: refs/heads/master
i:
  314033: 0518bde
  314031: bfe7e14
v: v3
  • Loading branch information
Rajkumar Manoharan authored and John W. Linville committed Jun 6, 2012
1 parent 5116b89 commit a9d49cf
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 17 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c9ae6ab4c7d7aa29f9607ac69daafbc241fc123e
refs/heads/master: 153dccd467b818b1dd3a6801b14e94a7a48ef859
25 changes: 9 additions & 16 deletions trunk/drivers/net/wireless/ath/ath9k/hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -2009,12 +2009,9 @@ static void ath9k_set_power_sleep(struct ath_hw *ah)
REG_SET_BIT(ah, AR_STA_ID1, AR_STA_ID1_PWR_SAV);

if (AR_SREV_9462(ah)) {
REG_WRITE(ah, AR_TIMER_MODE,
REG_READ(ah, AR_TIMER_MODE) & 0xFFFFFF00);
REG_WRITE(ah, AR_NDP2_TIMER_MODE,
REG_READ(ah, AR_NDP2_TIMER_MODE) & 0xFFFFFF00);
REG_WRITE(ah, AR_SLP32_INC,
REG_READ(ah, AR_SLP32_INC) & 0xFFF00000);
REG_CLR_BIT(ah, AR_TIMER_MODE, 0xff);
REG_CLR_BIT(ah, AR_NDP2_TIMER_MODE, 0xff);
REG_CLR_BIT(ah, AR_SLP32_INC, 0xfffff);
/* xxx Required for WLAN only case ? */
REG_WRITE(ah, AR_MCI_INTERRUPT_RX_MSG_EN, 0);
udelay(100);
Expand All @@ -2026,7 +2023,7 @@ static void ath9k_set_power_sleep(struct ath_hw *ah)
*/
REG_CLR_BIT(ah, AR_RTC_FORCE_WAKE, AR_RTC_FORCE_WAKE_EN);

if (AR_SREV_9462(ah))
if (ath9k_hw_mci_is_enabled(ah))
udelay(100);

if (!AR_SREV_9100(ah) && !AR_SREV_9300_20_OR_LATER(ah))
Expand All @@ -2051,7 +2048,6 @@ static void ath9k_set_power_sleep(struct ath_hw *ah)
static void ath9k_set_power_network_sleep(struct ath_hw *ah)
{
struct ath9k_hw_capabilities *pCap = &ah->caps;
u32 val;

REG_SET_BIT(ah, AR_STA_ID1, AR_STA_ID1_PWR_SAV);

Expand All @@ -2070,19 +2066,16 @@ static void ath9k_set_power_network_sleep(struct ath_hw *ah)
* SYS_WAKING and SYS_SLEEPING messages which will make
* BT CPU to busy to process.
*/
if (AR_SREV_9462(ah)) {
val = REG_READ(ah, AR_MCI_INTERRUPT_RX_MSG_EN) &
~AR_MCI_INTERRUPT_RX_HW_MSG_MASK;
REG_WRITE(ah, AR_MCI_INTERRUPT_RX_MSG_EN, val);
}
if (ath9k_hw_mci_is_enabled(ah))
REG_CLR_BIT(ah, AR_MCI_INTERRUPT_RX_MSG_EN,
AR_MCI_INTERRUPT_RX_HW_MSG_MASK);
/*
* Clear the RTC force wake bit to allow the
* mac to go to sleep.
*/
REG_CLR_BIT(ah, AR_RTC_FORCE_WAKE,
AR_RTC_FORCE_WAKE_EN);
REG_CLR_BIT(ah, AR_RTC_FORCE_WAKE, AR_RTC_FORCE_WAKE_EN);

if (AR_SREV_9462(ah))
if (ath9k_hw_mci_is_enabled(ah))
udelay(30);
}

Expand Down

0 comments on commit a9d49cf

Please sign in to comment.