diff options
author | Sujith <Sujith.Manoharan@atheros.com> | 2009-03-03 10:16:56 +0530 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-03-05 14:39:42 -0500 |
commit | b238e90e99fe51aed14d20eae8a6a1c04ce4ca30 (patch) | |
tree | b9cd8add0647c0ce98959710d682191300a71a9b /drivers/net/wireless/ath9k/beacon.c | |
parent | 5379c8a26686e12058e23322615df68f9123bccd (diff) |
ath9k: Handle TSF properly for AP mode
The TSF has to be reset only once, upon bringing
the interface up in AP mode. For any beacon reconfigure calls
after that, resetting the TSF results in incorrect beacon generation.
The only exception is a change in the beacon interval,
which is indicated to the driver by mac80211 through
IEEE80211_CONF_CHANGE_BEACON_INTERVAL, handle this properly.
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath9k/beacon.c')
-rw-r--r-- | drivers/net/wireless/ath9k/beacon.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath9k/beacon.c b/drivers/net/wireless/ath9k/beacon.c index 74916431f57..d1365726d2f 100644 --- a/drivers/net/wireless/ath9k/beacon.c +++ b/drivers/net/wireless/ath9k/beacon.c @@ -510,6 +510,11 @@ static void ath_beacon_config_ap(struct ath_softc *sc, { u32 nexttbtt, intval; + /* Configure the timers only when the TSF has to be reset */ + + if (!(sc->sc_flags & SC_OP_TSF_RESET)) + return; + /* NB: the beacon interval is kept internally in TU's */ intval = conf->beacon_interval & ATH9K_BEACON_PERIOD; intval /= ATH_BCBUF; /* for staggered beacons */ @@ -530,6 +535,11 @@ static void ath_beacon_config_ap(struct ath_softc *sc, ath9k_hw_beaconinit(sc->sc_ah, nexttbtt, intval); sc->beacon.bmisscnt = 0; ath9k_hw_set_interrupts(sc->sc_ah, sc->imask); + + /* Clear the reset TSF flag, so that subsequent beacon updation + will not reset the HW TSF. */ + + sc->sc_flags &= ~SC_OP_TSF_RESET; } /* |