Skip to content

Commit

Permalink
ath9k_hw: dynamically choose the SERDES array for low power
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Luis R. Rodriguez authored and John W. Linville committed Jun 23, 2010
1 parent 6a0ec30 commit d5c4d19
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions drivers/net/wireless/ath/ath9k/ar9003_hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
}
}
Expand Down

0 comments on commit d5c4d19

Please sign in to comment.