aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/main.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/main.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index 74c2dc8a8b8a..360c6f5e843a 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -399,6 +399,7 @@ void ath_ani_calibrate(unsigned long data)
399 bool aniflag = false; 399 bool aniflag = false;
400 unsigned int timestamp = jiffies_to_msecs(jiffies); 400 unsigned int timestamp = jiffies_to_msecs(jiffies);
401 u32 cal_interval, short_cal_interval, long_cal_interval; 401 u32 cal_interval, short_cal_interval, long_cal_interval;
402 unsigned long flags;
402 403
403 if (ah->caldata && ah->caldata->nfcal_interference) 404 if (ah->caldata && ah->caldata->nfcal_interference)
404 long_cal_interval = ATH_LONG_CALINTERVAL_INT; 405 long_cal_interval = ATH_LONG_CALINTERVAL_INT;
@@ -449,8 +450,11 @@ void ath_ani_calibrate(unsigned long data)
449 /* Skip all processing if there's nothing to do. */ 450 /* Skip all processing if there's nothing to do. */
450 if (longcal || shortcal || aniflag) { 451 if (longcal || shortcal || aniflag) {
451 /* Call ANI routine if necessary */ 452 /* Call ANI routine if necessary */
452 if (aniflag) 453 if (aniflag) {
454 spin_lock_irqsave(&common->cc_lock, flags);
453 ath9k_hw_ani_monitor(ah, ah->curchan); 455 ath9k_hw_ani_monitor(ah, ah->curchan);
456 spin_unlock_irqrestore(&common->cc_lock, flags);
457 }
454 458
455 /* Perform calibration if necessary */ 459 /* Perform calibration if necessary */
456 if (longcal || shortcal) { 460 if (longcal || shortcal) {
@@ -635,6 +639,7 @@ irqreturn_t ath_isr(int irq, void *dev)
635 639
636 struct ath_softc *sc = dev; 640 struct ath_softc *sc = dev;
637 struct ath_hw *ah = sc->sc_ah; 641 struct ath_hw *ah = sc->sc_ah;
642 struct ath_common *common = ath9k_hw_common(ah);
638 enum ath9k_int status; 643 enum ath9k_int status;
639 bool sched = false; 644 bool sched = false;
640 645
@@ -684,7 +689,12 @@ irqreturn_t ath_isr(int irq, void *dev)
684 689
685 if ((ah->caps.hw_caps & ATH9K_HW_CAP_EDMA) && 690 if ((ah->caps.hw_caps & ATH9K_HW_CAP_EDMA) &&
686 (status & ATH9K_INT_BB_WATCHDOG)) { 691 (status & ATH9K_INT_BB_WATCHDOG)) {
692
693 spin_lock(&common->cc_lock);
694 ath_hw_cycle_counters_update(common);
687 ar9003_hw_bb_watchdog_dbg_info(ah); 695 ar9003_hw_bb_watchdog_dbg_info(ah);
696 spin_unlock(&common->cc_lock);
697
688 goto chip_reset; 698 goto chip_reset;
689 } 699 }
690 700