aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath10k/hw.c
diff options
context:
space:
mode:
authorVasanthakumar Thiagarajan <vthiagar@qti.qualcomm.com>2016-07-01 07:07:25 -0400
committerKalle Valo <kvalo@qca.qualcomm.com>2016-07-08 10:06:01 -0400
commitc11e99396d0f77b5a6adc25f7c7bd84750194724 (patch)
treeff75cacdbbce98b1dcfe29d7a9f3a9e2a2751d20 /drivers/net/wireless/ath/ath10k/hw.c
parent7860eb7537a0a308664da34e71d302cbb5130626 (diff)
ath10k: fix possible wrong rx_busy time reporting in QCA4019
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>
Diffstat (limited to 'drivers/net/wireless/ath/ath10k/hw.c')
-rw-r--r--drivers/net/wireless/ath/ath10k/hw.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath10k/hw.c b/drivers/net/wireless/ath/ath10k/hw.c
index f1e0695556b9..f903d468dbe6 100644
--- a/drivers/net/wireless/ath/ath10k/hw.c
+++ b/drivers/net/wireless/ath/ath10k/hw.c
@@ -204,7 +204,8 @@ void ath10k_hw_fill_survey_time(struct ath10k *ar, struct survey_info *survey,
204 case ATH10K_HW_CC_WRAP_SHIFTED_EACH: 204 case ATH10K_HW_CC_WRAP_SHIFTED_EACH:
205 if (cc < cc_prev) 205 if (cc < cc_prev)
206 cc_fix = 0x7fffffff; 206 cc_fix = 0x7fffffff;
207 else 207
208 if (rcc < rcc_prev)
208 rcc_fix = 0x7fffffff; 209 rcc_fix = 0x7fffffff;
209 break; 210 break;
210 case ATH10K_HW_CC_WRAP_DISABLED: 211 case ATH10K_HW_CC_WRAP_DISABLED: