* [PATCH 2/12] ath5k: Restore saved initval after POST
@ 2008-07-20 3:32 Nick Kossifidis
2008-07-24 21:26 ` Pavel Roskin
0 siblings, 1 reply; 4+ messages in thread
From: Nick Kossifidis @ 2008-07-20 3:32 UTC (permalink / raw)
To: ath5k-devel, linux-wireless; +Cc: linville, jirislaby, mcgrof
* Restore saved initial value after POST
Changes-licensed-under: ISC
Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
---
diff --git a/drivers/net/wireless/ath5k/hw.c b/drivers/net/wireless/ath5k/hw.c
index 2e60cf0..3e889f1 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)
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;
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 2/12] ath5k: Restore saved initval after POST
2008-07-20 3:32 [PATCH 2/12] ath5k: Restore saved initval after POST Nick Kossifidis
@ 2008-07-24 21:26 ` Pavel Roskin
2008-07-24 21:36 ` Nick Kossifidis
0 siblings, 1 reply; 4+ messages in thread
From: Pavel Roskin @ 2008-07-24 21:26 UTC (permalink / raw)
To: Nick Kossifidis; +Cc: ath5k-devel, linux-wireless, linville, jirislaby, mcgrof
On Sun, 2008-07-20 at 06:32 +0300, Nick Kossifidis wrote:
> * Restore saved initial value after POST
...
> @@ -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.
--
Regards,
Pavel Roskin
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2/12] ath5k: Restore saved initval after POST
2008-07-24 21:26 ` Pavel Roskin
@ 2008-07-24 21:36 ` Nick Kossifidis
2008-07-24 21:40 ` Pavel Roskin
0 siblings, 1 reply; 4+ messages in thread
From: Nick Kossifidis @ 2008-07-24 21:36 UTC (permalink / raw)
To: Pavel Roskin
Cc: Nick Kossifidis, ath5k-devel, linux-wireless, linville, jirislaby,
mcgrof
2008/7/25 Pavel Roskin <proski@gnu.org>:
> On Sun, 2008-07-20 at 06:32 +0300, Nick Kossifidis wrote:
>> * Restore saved initial value after POST
> ...
>> @@ -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
--
GPG ID: 0xD21DB2DB
As you read this post global entropy rises. Have Fun ;-)
Nick
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2/12] ath5k: Restore saved initval after POST
2008-07-24 21:36 ` Nick Kossifidis
@ 2008-07-24 21:40 ` Pavel Roskin
0 siblings, 0 replies; 4+ messages in thread
From: Pavel Roskin @ 2008-07-24 21:40 UTC (permalink / raw)
To: Nick Kossifidis
Cc: Nick Kossifidis, ath5k-devel, linux-wireless, linville, jirislaby,
mcgrof
On Fri, 2008-07-25 at 00:36 +0300, Nick Kossifidis wrote:
> 2008/7/25 Pavel Roskin <proski@gnu.org>:
> > On Sun, 2008-07-20 at 06:32 +0300, Nick Kossifidis wrote:
> >> * Restore saved initial value after POST
> > ...
> >> @@ -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
OK, fine with me.
--
Regards,
Pavel Roskin
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-07-24 21:40 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-20 3:32 [PATCH 2/12] ath5k: Restore saved initval after POST Nick Kossifidis
2008-07-24 21:26 ` Pavel Roskin
2008-07-24 21:36 ` Nick Kossifidis
2008-07-24 21:40 ` Pavel Roskin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).