ath5k: Set TSF fix
PATCH 1/1 ath5k: Set TSF fix
The old code doesn't work correctly e.g. on newer chipsets like AR5418+= AR2122 and AR5416+AR2133.
---
diff -urN wireless-testing.orig/drivers/net/wireless/ath5k/pcu.c wirele= ss-testing/drivers/net/wireless/ath5k/pcu.c
--- wireless-testing.orig/drivers/net/wireless/ath5k/pcu.c 2009-01-23 2=
2:54:07.000000000 +0100
+++ wireless-testing/drivers/net/wireless/ath5k/pcu.c 2009-01-24 08:47:=
16.000000000 +0100
@@ -657,9 +657,8 @@
{
ATH5K_TRACE(ah->ah_sc);
=20
- ath5k_hw_reg_write(ah, 0x00000000, AR5K_TSF_L32);
- ath5k_hw_reg_write(ah, (tsf64 >> 32) & 0xffffffff, AR5K_TSF_U32);
ath5k_hw_reg_write(ah, tsf64 & 0xffffffff, AR5K_TSF_L32);
+ ath5k_hw_reg_write(ah, (tsf64 >> 32) & 0xffffffff, AR5K_TSF_U32);
}
=20
/**
--=20
Computer Bild Tarifsieger! GMX FreeDSL - Telefonanschluss + DSL f=FCr nur 17,95 =BF/mtl.!* http://dsl.gmx.de/?ac=3DOM.AD.PD003K11308T45=
69a
--
To unsubscribe from this list: send the line "unsubscribe linux-wireles= s" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
On Mon, Mar 2, 2009 at 5:29 PM, Alina Friedrichsen <[email protected]> wr= ote:
Quoted 1 line
The old code doesn't work correctly e.g. on newer chipsets like AR541=
8+AR2122 and AR5416+AR2133.
Quoted 4 lines
Signed-off-by Alina Friedrichsen <[email protected]>---
diff -urNwireless-testing.orig/drivers/net/wireless/ath5k/pcu.cwire=
less-testing/drivers/net/wireless/ath5k/pcu.c
Quoted 1 line
---
wireless-testing.orig/drivers/net/wireless/ath5k/pcu.c=A0 =A0 =A0=
2009-01-23 22:54:07.000000000 +0100
Quoted 1 line
+++
wireless-testing/drivers/net/wireless/ath5k/pcu.c=A0 2009-01-24 =
08:47:16.000000000 +0100
Review line 661
Quoted 6 lines
(quoted diff) +0
-2@@ -657,9 +657,8 @@ =A0{ =A0 =A0 =A0 =A0ATH5K_TRACE(ah->ah_sc); - =A0 =A0 =A0 ath5k_hw_reg_write(ah, 0x00000000, AR5K_TSF_L32); - =A0 =A0 =A0 ath5k_hw_reg_write(ah, (tsf64 >> 32) & 0xffffffff, AR5K=
_TSF_U32);
Quoted 1 line
=A0 =A0 =A0 =A0ath5k_hw_reg_write(ah, tsf64 &
0xffffffff, AR5K_TSF_L3=
2);
Quoted 1 line
+ =A0 =A0 =A0 ath5k_hw_reg_write(ah, (tsf64 >> 32) &
0xffffffff, AR5K=
_TSF_U32);
Quoted 1 line
=A0}
It's in the original so I guess it's ok, but it'd be nice to have a ver= sion
without the unnecessary "& 0xffffffff" part. Also can you use the -p o= ption
to diff in the future?
Otherwise,
--=20
Bob Copeland %% www.bobcopeland.com
--
To unsubscribe from this list: send the line "unsubscribe linux-wireles= s" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Hello Bob!
Quoted 3 lines
It's in the original so I guess it's ok, but it'd be nice to have a version
without the unnecessary "&0xffffffff" part. =20
I personally think with the "& 0xffffffff" it's cleaner, because it's t= ype independent. And the compiler should optimize it out, if the type i= s really 32 bit wide.
Quoted 3 lines
Also can you use the -p
option
to diff in the future?
This is an old patch, I now use git for it.
Regards
Alina
--=20
Computer Bild Tarifsieger! GMX FreeDSL - Telefonanschluss + DSL f=FCr nur 17,95 =BF/mtl.!* http://dsl.gmx.de/?ac=3DOM.AD.PD003K11308T45=
69a
--
To unsubscribe from this list: send the line "unsubscribe linux-wireles= s" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 4 lines · Alina Friedrichsen
I personally think with the "&
0xffffffff" it's cleaner, because it's type independent. And the compiler should optimize it out, if the type is really 32 bit wide.
Yes, the compiler will optimize it out, but it looks noisy to me. It's declared u64 one line above so it is clearly a no-op... I guess it is a personal taste thing.
Quoted 1 line
This is an old patch, I now use git for it.
Ok, thanks! I only mentioned it because I wanted to see the parameters and had to go back to the code.
Signature · 1 line
Bob Copeland %% www.bobcopeland.com
Hello Bob!
Quoted 1 line
Yes, the compiler will optimize it out, but it looks noisy to me. It=
's
Quoted 1 line
declared u64 one line above so it is clearly a no-op... I guess it i=
s a
Quoted 1 line
personal taste thing.
Yes, in assembly I would agree. In higher languages I like to write mor= e generally code.
Quoted 1 line
Ok, thanks! I only mentioned it because I wanted to see the paramete=
rs
Quoted 1 line
and had to go back to the code.
ACK
Regards
Alina
--=20
Psssst! Schon vom neuen GMX MultiMessenger geh=F6rt? Der kann`s mit all=
en: http://www.gmx.net/de/go/multimessenger01
--
To unsubscribe from this list: send the line "unsubscribe linux-wireles= s" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html