Skip to content

Commit

Permalink
ath9k_hw: enable PCIe low power mode for AR9003
Browse files Browse the repository at this point in the history
Cc: Paul Shaw <paul.shaw@atheros.com>
Cc: Don Breslin <don.breslin@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Luis R. Rodriguez authored and John W. Linville committed May 10, 2010
1 parent 9e385c5 commit 5efa3a6
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions drivers/net/wireless/ath/ath9k/hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -573,6 +573,26 @@ static int __ath9k_hw_init(struct ath_hw *ah)

ath9k_hw_init_mode_regs(ah);

/*
* Configire PCIE after Ini init. SERDES values now come from ini file
* This enables PCIe low power mode.
*/
if (AR_SREV_9300_20_OR_LATER(ah)) {
u32 regval;
unsigned int i;

/* Set Bits 16 and 17 in the AR_WA register. */
regval = REG_READ(ah, AR_WA);
regval |= 0x00030000;
REG_WRITE(ah, AR_WA, regval);

for (i = 0; i < ah->iniPcieSerdesLowPower.ia_rows; i++) {
REG_WRITE(ah,
INI_RA(&ah->iniPcieSerdesLowPower, i, 0),
INI_RA(&ah->iniPcieSerdesLowPower, i, 1));
}
}

if (ah->is_pciexpress)
ath9k_hw_configpcipowersave(ah, 0, 0);
else
Expand Down

0 comments on commit 5efa3a6

Please sign in to comment.