ath5k: Restore saved initval after POST
PATCH 2/12 ath5k: Restore saved initval after POST
* Restore saved initial value after POST
Changes-licensed-under: ISC
---
drivers/net/wireless/ath5k/hw.c +6 -0
@@ -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++) {
@@ -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 ;
Quoted 1 line · Nick Kossifidis
* Restore saved initial value after POST
...
drivers/net/wireless/ath5k/hw.c static int ath5k_hw_post(struct ath5k_hw *ah) · line 179
Quoted 9 lines
drivers/net/wireless/ath5k/hw.c +4
-0@@ -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); + }
Perhaps "at the end of POST"? Anyway, the code looks good to me.
Signature · 2 lines
Regards, Pavel Roskin
2008/7/25 Pavel Roskin <[email protected]>:
Quoted 15 lines · Nick Kossifidis
Quoted 1 line
* Restore saved initial value after POST
...
drivers/net/wireless/ath5k/hw.c static int ath5k_hw_post(struct ath5k_hw *ah) · line 179
Quoted 9 lines
drivers/net/wireless/ath5k/hw.c +4
-0@@ -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); + }Perhaps "at the end of POST"? Anyway, the code looks good to me.
We are not restoring at the end of POST but after we end with each of the two registers, so i guess it's ok this way
Signature · 3 lines
GPG ID: 0xD21DB2DB As you read this post global entropy rises. Have Fun ;-) Nick
Quoted 17 lines · Nick Kossifidis
2008/7/25 Pavel Roskin <[email protected]>:
Quoted 15 lines · Nick Kossifidis
Quoted 1 line
* Restore saved initial value after POST
...
drivers/net/wireless/ath5k/hw.c static int ath5k_hw_post(struct ath5k_hw *ah) · line 179
Quoted 9 lines
drivers/net/wireless/ath5k/hw.c +4
-0@@ -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); + }Perhaps "at the end of POST"? Anyway, the code looks good to me.
Quoted 2 lines
We are not restoring at the end of POST but after we end with each of the two registers, so i guess it's ok this way
OK, fine with me.
Signature · 2 lines
Regards, Pavel Roskin