ath9k: add a few calibration related fixes
[openwrt/staging/yousong.git] / package / kernel / mac80211 / patches / 330-ath9k-restart-hardware-after-noise-floor-calibration.patch
index 3b8370dfee3e1c374453c54566d1cddce6aa03a5..6a27be76bd836aa435c98911456b673574dcbaf0 100644 (file)
@@ -164,7 +164,7 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
        void (*set_txdesc)(struct ath_hw *ah, void *ds,
 --- a/drivers/net/wireless/ath/ath9k/link.c
 +++ b/drivers/net/wireless/ath/ath9k/link.c
-@@ -371,9 +371,14 @@ void ath_ani_calibrate(unsigned long dat
+@@ -371,9 +371,15 @@ void ath_ani_calibrate(unsigned long dat
  
        /* Perform calibration if necessary */
        if (longcal || shortcal) {
@@ -174,6 +174,7 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
 +              int ret = ath9k_hw_calibrate(ah, ah->curchan, ah->rxchainmask,
 +                                           longcal);
 +              if (ret < 0) {
++                      common->ani.caldone = 0;
 +                      ath9k_queue_reset(sc, RESET_TYPE_CALIBRATION);
 +                      return;
 +              }