[PATCH] ath10k: Fix possible wrong rx_busy time reporting in QCA4019

Vasanthakumar Thiagarajan vthiagar at qti.qualcomm.com
Fri Jul 1 04:07:25 PDT 2016

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 at qti.qualcomm.com>
 drivers/net/wireless/ath/ath10k/hw.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath10k/hw.c b/drivers/net/wireless/ath/ath10k/hw.c
index bd86e7a..7462627 100644
--- a/drivers/net/wireless/ath/ath10k/hw.c
+++ b/drivers/net/wireless/ath/ath10k/hw.c
@@ -198,7 +198,8 @@ void ath10k_hw_fill_survey_time(struct ath10k *ar, struct survey_info *survey,
 			if (cc < cc_prev)
 				cc_fix = 0x7fffffff;
-			else
+			if (rcc < rcc_prev)
 				rcc_fix = 0x7fffffff;

More information about the ath10k mailing list