diff options
author | Nick Kossifidis <mick@madwifi.org> | 2008-07-19 23:32:32 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-08-01 15:31:31 -0400 |
commit | ba37746e547e14703a5ac86560c6e056620bc4cf (patch) | |
tree | 720e5b61c29da61a39bdb6543bcf91db4484c5a5 /drivers | |
parent | 0bacdf303f72a3ed34252934114bc04e79222687 (diff) |
ath5k: Restore saved initval after POST
* 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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/ath5k/hw.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath5k/hw.c b/drivers/net/wireless/ath5k/hw.c index 42ef41ed5d18..b3b9baa551bc 100644 --- a/drivers/net/wireless/ath5k/hw.c +++ b/drivers/net/wireless/ath5k/hw.c | |||
@@ -139,6 +139,8 @@ static int ath5k_hw_post(struct ath5k_hw *ah) | |||
139 | for (c = 0; c < 2; c++) { | 139 | for (c = 0; c < 2; c++) { |
140 | 140 | ||
141 | cur_reg = regs[c]; | 141 | cur_reg = regs[c]; |
142 | |||
143 | /* Save previous value */ | ||
142 | init_val = ath5k_hw_reg_read(ah, cur_reg); | 144 | init_val = ath5k_hw_reg_read(ah, cur_reg); |
143 | 145 | ||
144 | for (i = 0; i < 256; i++) { | 146 | for (i = 0; i < 256; i++) { |
@@ -170,6 +172,10 @@ static int ath5k_hw_post(struct ath5k_hw *ah) | |||
170 | var_pattern = 0x003b080f; | 172 | var_pattern = 0x003b080f; |
171 | ath5k_hw_reg_write(ah, var_pattern, cur_reg); | 173 | ath5k_hw_reg_write(ah, var_pattern, cur_reg); |
172 | } | 174 | } |
175 | |||
176 | /* Restore previous value */ | ||
177 | ath5k_hw_reg_write(ah, init_val, cur_reg); | ||
178 | |||
173 | } | 179 | } |
174 | 180 | ||
175 | return 0; | 181 | return 0; |