Commit a899b678 authored by Felix Fietkau's avatar Felix Fietkau Committed by John W. Linville

ath9k: Update channel switch timer

TSF time might have been updated by the incoming beacon,
need update the channel switch timer to reflect the change.
Signed-off-by: default avatarFelix Fietkau <nbd@openwrt.org>
Signed-off-by: default avatarRajkumar Manoharan <rmanohar@qti.qualcomm.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent ec70abe1
...@@ -589,6 +589,17 @@ void ath_chanctx_event(struct ath_softc *sc, struct ieee80211_vif *vif, ...@@ -589,6 +589,17 @@ void ath_chanctx_event(struct ath_softc *sc, struct ieee80211_vif *vif,
ath_chanctx_adjust_tbtt_delta(sc); ath_chanctx_adjust_tbtt_delta(sc);
sc->sched.beacon_pending = false; sc->sched.beacon_pending = false;
sc->sched.beacon_miss = 0; sc->sched.beacon_miss = 0;
/* TSF time might have been updated by the incoming beacon,
* need update the channel switch timer to reflect the change.
*/
tsf_time = sc->sched.switch_start_time;
tsf_time -= (u32) sc->cur_chan->tsf_val +
ath9k_hw_get_tsf_offset(&sc->cur_chan->tsf_ts, NULL);
tsf_time += ath9k_hw_gettsf32(ah);
ath9k_hw_gen_timer_start(ah, sc->p2p_ps_timer,
tsf_time, 1000000);
break; break;
case ATH_CHANCTX_EVENT_ASSOC: case ATH_CHANCTX_EVENT_ASSOC:
if (sc->sched.state != ATH_CHANCTX_STATE_FORCE_ACTIVE || if (sc->sched.state != ATH_CHANCTX_STATE_FORCE_ACTIVE ||
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment