aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorRajkumar Manoharan <rmanohar@qca.qualcomm.com>2012-04-13 03:46:34 -0400
committerJohn W. Linville <linville@tuxdriver.com>2012-04-16 14:38:42 -0400
commitde5f8fc3a3fd4db14568332ffe39a117eaae5498 (patch)
tree4adc959cb6b7c8a8beea82cfb4f96d6f068f51a5 /drivers
parent3e5217e2e8cf42b332d2df5cee8dabd0e3f7c6e3 (diff)
ath9k: fix ibss beacon next tbtt
Sync-up ibss beacon timer with the beacon frame's timestamp. When the node acts as joiner, it has to sync with the received beacon timestamp instead of reading tsf from hw. As the hw tsf wont wont be update till bssid is configured. This patch programs hw tsf with the received beacon timestamp if beacon timers are yet to be configured. Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/ath/ath9k/beacon.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath9k/beacon.c b/drivers/net/wireless/ath/ath9k/beacon.c
index df5b6acd805f..1bf2f57b091c 100644
--- a/drivers/net/wireless/ath/ath9k/beacon.c
+++ b/drivers/net/wireless/ath/ath9k/beacon.c
@@ -653,6 +653,8 @@ static void ath_beacon_config_adhoc(struct ath_softc *sc,
653 u32 tsf, intval, nexttbtt; 653 u32 tsf, intval, nexttbtt;
654 654
655 ath9k_reset_beacon_status(sc); 655 ath9k_reset_beacon_status(sc);
656 if (!(sc->sc_flags & SC_OP_BEACONS))
657 ath9k_hw_settsf64(ah, sc->beacon.bc_tstamp);
656 658
657 intval = TU_TO_USEC(conf->beacon_interval); 659 intval = TU_TO_USEC(conf->beacon_interval);
658 tsf = roundup(ath9k_hw_gettsf32(ah) + TU_TO_USEC(FUDGE), intval); 660 tsf = roundup(ath9k_hw_gettsf32(ah) + TU_TO_USEC(FUDGE), intval);