diff options
author | Felix Fietkau <nbd@openwrt.org> | 2014-06-11 16:18:04 +0530 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2014-06-19 15:49:19 -0400 |
commit | 748299f27b21c23ba963df4768abb2344fe6e9a7 (patch) | |
tree | 58ef92baf9db145fc2b1ed3f722d37b4280dd729 /drivers/net/wireless/ath/ath9k/main.c | |
parent | 9a9c4fbc3fcabc0d510600743204f890ebdbb141 (diff) |
ath9k: switch channel context for beaconing
Add a basic state machine for switch channel context
for beacon transmission.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/main.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/main.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index 9dfb8207701..2393af058af 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c @@ -1047,10 +1047,14 @@ void ath9k_calculate_summary_state(struct ath_softc *sc, ath9k_hw_setopmode(ah); + ctx->switch_after_beacon = false; if ((iter_data.nstations + iter_data.nadhocs + iter_data.nmeshes) > 0) ah->imask |= ATH9K_INT_TSFOOR; - else + else { ah->imask &= ~ATH9K_INT_TSFOOR; + if (iter_data.naps == 1 && iter_data.beacons) + ctx->switch_after_beacon = true; + } ah->imask &= ~ATH9K_INT_SWBA; if (ah->opmode == NL80211_IFTYPE_STATION) { @@ -1664,6 +1668,9 @@ void ath9k_p2p_ps_timer(void *priv) struct ath_node *an; u32 tsf; + ath9k_hw_gen_timer_stop(sc->sc_ah, sc->p2p_ps_timer); + ath_chanctx_event(sc, NULL, ATH_CHANCTX_EVENT_TSF_TIMER); + if (!avp || avp->chanctx != sc->cur_chan) return; |