1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-07-04 22:24:32 +03:00

ath9k: add a better fix for beacon timer reliability

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28211 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
nbd 2011-09-11 11:16:20 +00:00
parent c06524225b
commit 271fb1006a

View File

@ -1,11 +1,10 @@
--- a/drivers/net/wireless/ath/ath9k/beacon.c
+++ b/drivers/net/wireless/ath/ath9k/beacon.c
@@ -505,7 +505,7 @@ static void ath_beacon_config_ap(struct
/* NB: the beacon interval is kept internally in TU's */
intval = TU_TO_USEC(conf->beacon_interval);
intval /= ATH_BCBUF; /* for staggered beacons */
- nexttbtt = intval;
+ nexttbtt = roundup(ath9k_hw_gettsf32(ah) + TU_TO_USEC(FUDGE), intval);
@@ -517,6 +517,7 @@ static void ath_beacon_config_ap(struct
/* Set the computed AP beacon timers */
/*
* In AP mode we enable the beacon timers and SWBA interrupts to
ath9k_hw_disable_interrupts(ah);
+ sc->sc_flags |= SC_OP_TSF_RESET;
ath9k_beacon_init(sc, nexttbtt, intval);
sc->beacon.bmisscnt = 0;
ath9k_hw_set_interrupts(ah, ah->imask);