]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ath10k: fix possible wrong rx_busy time reporting in QCA4019
authorVasanthakumar Thiagarajan <vthiagar@qti.qualcomm.com>
Fri, 1 Jul 2016 11:07:25 +0000 (16:37 +0530)
committerKalle Valo <kvalo@qca.qualcomm.com>
Fri, 8 Jul 2016 14:06:01 +0000 (17:06 +0300)
As hw cycle counters in QCA4019 wraparound independantly in QCA4019
it is possible cycle counter and rx clear counter would wraparound
at the same time. Current logic assumes only one of the counters
would wraparound at anytime. Fix this by moving 'else' part to
another 'if'.

Fixes: 8e100354a98 ("ath10k: fix cycle counter wraparound handling for QCA4019")
Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qti.qualcomm.com>
Reviewed-by: Julian Calaby <julian.calaby@gmail.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/ath10k/hw.c

index f1e0695556b913f271dfa3258f127bc5140b65d5..f903d468dbe61b89e0cffb6bb45791d0b131dfde 100644 (file)
@@ -204,7 +204,8 @@ void ath10k_hw_fill_survey_time(struct ath10k *ar, struct survey_info *survey,
                case ATH10K_HW_CC_WRAP_SHIFTED_EACH:
                        if (cc < cc_prev)
                                cc_fix = 0x7fffffff;
-                       else
+
+                       if (rcc < rcc_prev)
                                rcc_fix = 0x7fffffff;
                        break;
                case ATH10K_HW_CC_WRAP_DISABLED: