aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath
diff options
context:
space:
mode:
authorLuis R. Rodriguez <lrodriguez@atheros.com>2010-06-21 18:38:50 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-06-23 15:14:03 -0400
commitd5c4d1930ce16b79990f8bb049d090eafd1fedde (patch)
treeca791d265b31a2a74aee10fc1b4679786d4d708b /drivers/net/wireless/ath
parentath9k_hw: add pcieSerDesWrite to disable SERDES ASPM tweaks (diff)
downloadlinux-dev-d5c4d1930ce16b79990f8bb049d090eafd1fedde.tar.xz
linux-dev-d5c4d1930ce16b79990f8bb049d090eafd1fedde.zip
ath9k_hw: dynamically choose the SERDES array for low power
The array we use will vary depending on whether or not we are to go to lower power or not. The default values (iniPcieSerdes) are a copy or what go into the registers through the INI files. Cc: Aeolus Yang <aeolus.yang@atheros.com> Cc: Madhan Jaganathan <madhan.jaganathan@atheros.com> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath')
-rw-r--r--drivers/net/wireless/ath/ath9k/ar9003_hw.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_hw.c b/drivers/net/wireless/ath/ath9k/ar9003_hw.c
index 99bde5f96a83..064168909108 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_hw.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_hw.c
@@ -305,11 +305,15 @@ static void ar9003_hw_configpcipowersave(struct ath_hw *ah,
*/
if (ah->config.pcieSerDesWrite) {
unsigned int i;
+ struct ar5416IniArray *array;
- for (i = 0; i < ah->iniPcieSerdesLowPower.ia_rows; i++) {
+ array = power_off ? &ah->iniPcieSerdes :
+ &ah->iniPcieSerdesLowPower;
+
+ for (i = 0; i < array->ia_rows; i++) {
REG_WRITE(ah,
- INI_RA(&ah->iniPcieSerdesLowPower, i, 0),
- INI_RA(&ah->iniPcieSerdesLowPower, i, 1));
+ INI_RA(array, i, 0),
+ INI_RA(array, i, 1));
}
}
}