diff options
author | adrian <adrian@FreeBSD.org> | 2011-09-28 03:03:23 +0000 |
---|---|---|
committer | adrian <adrian@FreeBSD.org> | 2011-09-28 03:03:23 +0000 |
commit | 24bffc47a9dd1c8ffcd7f3b45404f56e432a7900 (patch) | |
tree | f9dac838ebfc87e5b3297fec171772b03c5d9cec | |
parent | 29cd3e0c88614293ccc59f7466127a42ad99f894 (diff) | |
download | FreeBSD-src-24bffc47a9dd1c8ffcd7f3b45404f56e432a7900.zip FreeBSD-src-24bffc47a9dd1c8ffcd7f3b45404f56e432a7900.tar.gz |
The AR5212 setup path (also used by the AR5416 code) configures a
local variable with a beacon interval of 100 TU. This never gets modified
if the beacon interval configuration changes.
This may have been correct in earlier times, but with the advent of
staggered beacons (which default to 1 / ATH_BCBUF beacon interval, so
25 TU here) this value is incorrect.
It is used to configure the default CABQ readytime. So here, the cabq
was being configured to be much greater than the target beacon timer
(TBTT.)
The driver should be configuring a cabq readytime value rather then
leaving it to the HAL to choose sensible defaults. This should be
done in the future - I'm simply trying to ensure sensible defaults
are chosen.
-rw-r--r-- | sys/dev/ath/ath_hal/ar5212/ar5212_beacon.c | 2 | ||||
-rw-r--r-- | sys/dev/ath/ath_hal/ar5416/ar5416_beacon.c | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/sys/dev/ath/ath_hal/ar5212/ar5212_beacon.c b/sys/dev/ath/ath_hal/ar5212/ar5212_beacon.c index 1b4b342..a411d31 100644 --- a/sys/dev/ath/ath_hal/ar5212/ar5212_beacon.c +++ b/sys/dev/ath/ath_hal/ar5212/ar5212_beacon.c @@ -44,6 +44,7 @@ ar5212GetNextTBTT(struct ath_hal *ah) void ar5212SetBeaconTimers(struct ath_hal *ah, const HAL_BEACON_TIMERS *bt) { + struct ath_hal_5212 *ahp = AH5212(ah); OS_REG_WRITE(ah, AR_TIMER0, bt->bt_nexttbtt); OS_REG_WRITE(ah, AR_TIMER1, bt->bt_nextdba); @@ -65,6 +66,7 @@ ar5212SetBeaconTimers(struct ath_hal *ah, const HAL_BEACON_TIMERS *bt) OS_REG_WRITE(ah, AR_BEACON, AR_BEACON_RESET_TSF); } OS_REG_WRITE(ah, AR_BEACON, bt->bt_intval); + ahp->ah_beaconInterval = (bt->bt_intval & HAL_BEACON_PERIOD); } /* diff --git a/sys/dev/ath/ath_hal/ar5416/ar5416_beacon.c b/sys/dev/ath/ath_hal/ar5416/ar5416_beacon.c index 8b61e14..e2bf6c7 100644 --- a/sys/dev/ath/ath_hal/ar5416/ar5416_beacon.c +++ b/sys/dev/ath/ath_hal/ar5416/ar5416_beacon.c @@ -46,6 +46,7 @@ void ar5416SetBeaconTimers(struct ath_hal *ah, const HAL_BEACON_TIMERS *bt) { uint32_t bperiod; + struct ath_hal_5212 *ahp = AH5212(ah); OS_REG_WRITE(ah, AR_NEXT_TBTT, TU_TO_USEC(bt->bt_nexttbtt)); OS_REG_WRITE(ah, AR_NEXT_DBA, ONE_EIGHTH_TU_TO_USEC(bt->bt_nextdba)); @@ -53,6 +54,7 @@ ar5416SetBeaconTimers(struct ath_hal *ah, const HAL_BEACON_TIMERS *bt) OS_REG_WRITE(ah, AR_NEXT_NDP, TU_TO_USEC(bt->bt_nextatim)); bperiod = TU_TO_USEC(bt->bt_intval & HAL_BEACON_PERIOD); + ahp->ah_beaconInterval = bt->bt_intval & HAL_BEACON_PERIOD; OS_REG_WRITE(ah, AR5416_BEACON_PERIOD, bperiod); OS_REG_WRITE(ah, AR_DBA_PERIOD, bperiod); OS_REG_WRITE(ah, AR_SWBA_PERIOD, bperiod); |