* [PATCH] ath9k: Set TSF fix
@ 2009-01-24 8:15 Alina Friedrichsen
2009-01-24 14:22 ` Johannes Berg
0 siblings, 1 reply; 6+ messages in thread
From: Alina Friedrichsen @ 2009-01-24 8:15 UTC (permalink / raw)
To: linux-wireless, linville, johannes
It seems that some Atheros hardware more like this code for setting the=
TSF.
Signed-off-by: Alina Friedrichsen <x-alina@gmx.net>
---
diff -urN wireless-testing.orig/drivers/net/wireless/ath9k/hw.c wireles=
s-testing/drivers/net/wireless/ath9k/hw.c
--- wireless-testing.orig/drivers/net/wireless/ath9k/hw.c 2009-01-23 22=
:54:08.000000000 +0100
+++ wireless-testing/drivers/net/wireless/ath9k/hw.c 2009-01-24 08:47:4=
5.000000000 +0100
@@ -3736,9 +3736,8 @@
=20
void ath9k_hw_settsf64(struct ath_hal *ah, u64 tsf64)
{
- REG_WRITE(ah, AR_TSF_L32, 0x00000000);
- REG_WRITE(ah, AR_TSF_U32, (tsf64 >> 32) & 0xffffffff);
REG_WRITE(ah, AR_TSF_L32, tsf64 & 0xffffffff);
+ REG_WRITE(ah, AR_TSF_U32, (tsf64 >> 32) & 0xffffffff);
}
=20
void ath9k_hw_reset_tsf(struct ath_hal *ah)
--=20
NUR NOCH BIS 31.01.! GMX FreeDSL - Telefonanschluss + DSL=20
f=FCr nur 16,37 EURO/mtl.!* http://dsl.gmx.de/?ac=3DOM.AD.PD003K11308T4=
569a
--
To unsubscribe from this list: send the line "unsubscribe linux-wireles=
s" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] ath9k: Set TSF fix
2009-01-24 8:15 Alina Friedrichsen
@ 2009-01-24 14:22 ` Johannes Berg
2009-01-24 14:29 ` Dan Williams
0 siblings, 1 reply; 6+ messages in thread
From: Johannes Berg @ 2009-01-24 14:22 UTC (permalink / raw)
To: Alina Friedrichsen; +Cc: linux-wireless, linville
[-- Attachment #1: Type: text/plain, Size: 218 bytes --]
On Sat, 2009-01-24 at 09:15 +0100, Alina Friedrichsen wrote:
> It seems that some Atheros hardware more like this code for setting the TSF.
Why don't you back that claim by something more substantial?
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] ath9k: Set TSF fix
2009-01-24 14:22 ` Johannes Berg
@ 2009-01-24 14:29 ` Dan Williams
2009-01-24 21:53 ` Alina Friedrichsen
0 siblings, 1 reply; 6+ messages in thread
From: Dan Williams @ 2009-01-24 14:29 UTC (permalink / raw)
To: Johannes Berg; +Cc: Alina Friedrichsen, linux-wireless, linville
On Sat, 2009-01-24 at 15:22 +0100, Johannes Berg wrote:
> On Sat, 2009-01-24 at 09:15 +0100, Alina Friedrichsen wrote:
> > It seems that some Atheros hardware more like this code for setting the TSF.
>
> Why don't you back that claim by something more substantial?
Yeah, at *least* which hardware likes it better, and some regression
testing to ensure that other hardware doesn't break with the change.
Dan
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] ath9k: Set TSF fix
2009-01-24 14:29 ` Dan Williams
@ 2009-01-24 21:53 ` Alina Friedrichsen
2009-01-28 18:04 ` Jouni Malinen
0 siblings, 1 reply; 6+ messages in thread
From: Alina Friedrichsen @ 2009-01-24 21:53 UTC (permalink / raw)
To: linville, linux-wireless, johannes
Hallo Dan!
> > Why don't you back that claim by something more substantial?
>=20
> Yeah, at *least* which hardware likes it better,
The old version I have taken from an several years old madwifi patch. I=
t works only with old ath5k hardware. With my new Atheros-Cards the low=
er 32 bits of the TSF are only set to zero, not set to the new value. T=
he new code does work with all my ath5k and ath9k cards.
> and some regression
> testing to ensure that other hardware doesn't break with the change.
This does break nothing, because it's only debugging code, which I have=
submitted a few day ago, and is not used for any other things.
By the way the TSF in ath5k is completely broken. I'm looking with this=
patch for the reasons...
Regards
Alina
--=20
Psssst! Schon vom neuen GMX MultiMessenger geh=F6rt? Der kann`s mit all=
en: http://www.gmx.net/de/go/multimessenger
--=20
NUR NOCH BIS 31.01.! GMX FreeDSL - Telefonanschluss + DSL=20
f=FCr nur 16,37 EURO/mtl.!* http://dsl.gmx.de/?ac=3DOM.AD.PD003K11308T4=
569a
--
To unsubscribe from this list: send the line "unsubscribe linux-wireles=
s" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] ath9k: Set TSF fix
2009-01-24 21:53 ` Alina Friedrichsen
@ 2009-01-28 18:04 ` Jouni Malinen
0 siblings, 0 replies; 6+ messages in thread
From: Jouni Malinen @ 2009-01-28 18:04 UTC (permalink / raw)
To: Alina Friedrichsen; +Cc: linville, linux-wireless, johannes, Dan Williams
On Sat, Jan 24, 2009 at 10:53:22PM +0100, Alina Friedrichsen wrote:
> Hallo Dan!
Uhm.. Dan was not on To: or Cc: field.. Anyway..
> The old version I have taken from an several years old madwifi patch. It works only with old ath5k hardware. With my new Atheros-Cards the lower 32 bits of the TSF are only set to zero, not set to the new value. The new code does work with all my ath5k and ath9k cards.
The proposed ath9k change looks fine. The AR_TSF_L32 write does not
actually change TSF and hardware will just store the value temporarily.
The actual change is started by writing the AR_TSF_U32.
It looks like there are some corner cases where the TSF may not actually
change if it is being updated (e.g., a Beacon is received) or we are
waking up from sleep mode etc., but I would hope they do not matter too
much with this debugging need.
--
Jouni Malinen PGP id EFC895FA
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] ath9k: Set TSF fix
@ 2009-03-02 22:28 Alina Friedrichsen
0 siblings, 0 replies; 6+ messages in thread
From: Alina Friedrichsen @ 2009-03-02 22:28 UTC (permalink / raw)
To: linux-wireless, linville, johannes
The old code doesn't work correctly e.g. on newer chipsets like AR5418+=
AR2122 and AR5416+AR2133.
Signed-off-by: Alina Friedrichsen <x-alina@gmx.net>
---
diff -urN wireless-testing.orig/drivers/net/wireless/ath9k/hw.c wireles=
s-testing/drivers/net/wireless/ath9k/hw.c
--- wireless-testing.orig/drivers/net/wireless/ath9k/hw.c 2009-01-23 22=
:54:08.000000000 +0100
+++ wireless-testing/drivers/net/wireless/ath9k/hw.c 2009-01-24 08:47:4=
5.000000000 +0100
@@ -3736,9 +3736,8 @@
=20
void ath9k_hw_settsf64(struct ath_hal *ah, u64 tsf64)
{
- REG_WRITE(ah, AR_TSF_L32, 0x00000000);
- REG_WRITE(ah, AR_TSF_U32, (tsf64 >> 32) & 0xffffffff);
REG_WRITE(ah, AR_TSF_L32, tsf64 & 0xffffffff);
+ REG_WRITE(ah, AR_TSF_U32, (tsf64 >> 32) & 0xffffffff);
}
=20
void ath9k_hw_reset_tsf(struct ath_hal *ah)
--=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 majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2009-03-02 22:28 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-02 22:28 [PATCH] ath9k: Set TSF fix Alina Friedrichsen
-- strict thread matches above, loose matches on Subject: below --
2009-01-24 8:15 Alina Friedrichsen
2009-01-24 14:22 ` Johannes Berg
2009-01-24 14:29 ` Dan Williams
2009-01-24 21:53 ` Alina Friedrichsen
2009-01-28 18:04 ` Jouni Malinen
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).