From: Luis R. Rodriguez Date: Mon, 21 Jun 2010 22:38:50 +0000 (-0400) Subject: ath9k_hw: dynamically choose the SERDES array for low power X-Git-Tag: v2.6.36-rc1~571^2~107^2~168 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d5c4d1930ce16b79990f8bb049d090eafd1fedde;p=profile%2Fivi%2Fkernel-adaptation-intel-automotive.git 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 Cc: Madhan Jaganathan Signed-off-by: Luis R. Rodriguez Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/ath/ath9k/ar9003_hw.c b/drivers/net/wireless/ath/ath9k/ar9003_hw.c index 99bde5f9..0641689 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)); } } }