summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoradrian <adrian@FreeBSD.org>2011-08-24 14:11:00 +0000
committeradrian <adrian@FreeBSD.org>2011-08-24 14:11:00 +0000
commita3d2844ed5203016f1e0148e2a87c759bbf01954 (patch)
treef4dc7c00937a8a22365a953ee542623acd2b5cc8
parenta35c504aa845d82867d4802e80d9dd905ea8bd54 (diff)
downloadFreeBSD-src-a3d2844ed5203016f1e0148e2a87c759bbf01954.zip
FreeBSD-src-a3d2844ed5203016f1e0148e2a87c759bbf01954.tar.gz
Fix a missing initialisation of bt_flags when setting up the TDMA beacon.
The AR5212 HAL didn't check this field; timers are enabled a different way. The AR5416 HAL however did, and since this field was uninitialised, it had whatever was on the stack at the time. This lead to "unpredictable" behaviour. This allows TDMA to work on the AR5416 and later chipsets. Thanks to: paradyse@gmail.com Approved by: re (kib, blanket)
-rw-r--r--sys/dev/ath/if_ath.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/dev/ath/if_ath.c b/sys/dev/ath/if_ath.c
index 0fcb815..a717323 100644
--- a/sys/dev/ath/if_ath.c
+++ b/sys/dev/ath/if_ath.c
@@ -5485,6 +5485,8 @@ ath_tdma_settimers(struct ath_softc *sc, u_int32_t nexttbtt, u_int32_t bintval)
bt.bt_nextdba = (nexttbtt<<3) - sc->sc_tdmadbaprep;
bt.bt_nextswba = (nexttbtt<<3) - sc->sc_tdmaswbaprep;
bt.bt_nextatim = nexttbtt+1;
+ /* Enables TBTT, DBA, SWBA timers by default */
+ bt.bt_flags = 0;
ath_hal_beaconsettimers(ah, &bt);
}
OpenPOWER on IntegriCloud