1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-03 12:35:02 +00:00

Use a 64 bit TSF write to update the TSF adjust, rather than a 32 bit

TSF write.

The TSF_L32 update is fine for the AR5413 (and later, I guess) 11abg NICs
however on the 11n NICs this didn't work.  The TSF writes were causing
a much larger time to be skipped, leading to the timing to never
converge.

I've tested this 64 bit TSF read, adjust and write on both the
11n NICs and the AR5413 NIC I've been using for testing.  It works
fine on each.

This patch allows the AR5416/AR9280 to be used as a TDMA member.
I don't yet know why the AR9280 is ~7uS accurate rather than ~3uS;
I'll look into it soon.

Tested:

* AR5413, TDMA slave (~ 3us accuracy)
* AR5416, TDMA slave (~ 3us accuracy)
* AR9280, TDMA slave (~ 7us accuracy)
This commit is contained in:
Adrian Chadd 2012-11-23 05:52:22 +00:00
parent ddee921170
commit 84dd5933b5
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=243427

View File

@ -406,7 +406,11 @@ ath_tdma_update(struct ieee80211_node *ni,
sc->sc_stats.ast_tdma_timers++;
}
if (tsfdelta > 0) {
ath_hal_adjusttsf(ah, tsfdelta);
uint64_t tsf;
/* XXX should just teach ath_hal_adjusttsf() to do this */
tsf = ath_hal_gettsf64(ah);
ath_hal_settsf64(ah, tsf + tsfdelta);
sc->sc_stats.ast_tdma_tsf++;
}
ath_tdma_beacon_send(sc, vap); /* prepare response */