aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/ath/ath9k/main.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index 7c3a98b1957d..dd54fa727a61 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -329,6 +329,12 @@ static void ath_ani_calibrate(unsigned long data)
329 if (sc->sc_flags & SC_OP_SCANNING) 329 if (sc->sc_flags & SC_OP_SCANNING)
330 goto set_timer; 330 goto set_timer;
331 331
332 /* Only calibrate if awake */
333 if (sc->sc_ah->power_mode != ATH9K_PM_AWAKE)
334 goto set_timer;
335
336 ath9k_ps_wakeup(sc);
337
332 /* Long calibration runs independently of short calibration. */ 338 /* Long calibration runs independently of short calibration. */
333 if ((timestamp - sc->ani.longcal_timer) >= ATH_LONG_CALINTERVAL) { 339 if ((timestamp - sc->ani.longcal_timer) >= ATH_LONG_CALINTERVAL) {
334 longcal = true; 340 longcal = true;
@@ -380,6 +386,8 @@ static void ath_ani_calibrate(unsigned long data)
380 } 386 }
381 } 387 }
382 388
389 ath9k_ps_restore(sc);
390
383set_timer: 391set_timer:
384 /* 392 /*
385 * Set timer interval based on previous results. 393 * Set timer interval based on previous results.