aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/beacon.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/beacon.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/beacon.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath9k/beacon.c b/drivers/net/wireless/ath/ath9k/beacon.c
index 1a17732bb089..b5c16b3a37b9 100644
--- a/drivers/net/wireless/ath/ath9k/beacon.c
+++ b/drivers/net/wireless/ath/ath9k/beacon.c
@@ -291,6 +291,23 @@ void ath9k_set_tsfadjust(struct ath_softc *sc, struct ieee80211_vif *vif)
291 (unsigned long long)tsfadjust, avp->av_bslot); 291 (unsigned long long)tsfadjust, avp->av_bslot);
292} 292}
293 293
294bool ath9k_csa_is_finished(struct ath_softc *sc)
295{
296 struct ieee80211_vif *vif;
297
298 vif = sc->csa_vif;
299 if (!vif || !vif->csa_active)
300 return false;
301
302 if (!ieee80211_csa_is_complete(vif))
303 return false;
304
305 ieee80211_csa_finish(vif);
306
307 sc->csa_vif = NULL;
308 return true;
309}
310
294void ath9k_beacon_tasklet(unsigned long data) 311void ath9k_beacon_tasklet(unsigned long data)
295{ 312{
296 struct ath_softc *sc = (struct ath_softc *)data; 313 struct ath_softc *sc = (struct ath_softc *)data;
@@ -336,6 +353,10 @@ void ath9k_beacon_tasklet(unsigned long data)
336 return; 353 return;
337 } 354 }
338 355
356 /* EDMA devices check that in the tx completion function. */
357 if (!edma && ath9k_csa_is_finished(sc))
358 return;
359
339 slot = ath9k_beacon_choose_slot(sc); 360 slot = ath9k_beacon_choose_slot(sc);
340 vif = sc->beacon.bslot[slot]; 361 vif = sc->beacon.bslot[slot];
341 362