Skip to content

Commit

Permalink
ath5k: Restore saved initval after POST
Browse files Browse the repository at this point in the history
 * Restore saved initial value after POST

Changes-licensed-under: ISC
Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Nick Kossifidis authored and John W. Linville committed Aug 1, 2008
1 parent 0bacdf3 commit ba37746
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/net/wireless/ath5k/hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,8 @@ static int ath5k_hw_post(struct ath5k_hw *ah)
for (c = 0; c < 2; c++) {

cur_reg = regs[c];

/* Save previous value */
init_val = ath5k_hw_reg_read(ah, cur_reg);

for (i = 0; i < 256; i++) {
Expand Down Expand Up @@ -170,6 +172,10 @@ static int ath5k_hw_post(struct ath5k_hw *ah)
var_pattern = 0x003b080f;
ath5k_hw_reg_write(ah, var_pattern, cur_reg);
}

/* Restore previous value */
ath5k_hw_reg_write(ah, init_val, cur_reg);

}

return 0;
Expand Down

0 comments on commit ba37746

Please sign in to comment.