From: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Date: Mon, 4 Jun 2012 10:58:41 +0000 (+0530)
Subject: ath: do not update cycle counters with sleep mode
X-Git-Tag: firefly_0821_release~3680^2~2381^2~559^2~21
X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=c9ae6ab4c7d7aa29f9607ac69daafbc241fc123e;p=firefly-linux-kernel-4.4.55.git

ath: do not update cycle counters with sleep mode

When the chip is waking up from sleep state, the cycle counters
might have incorrect readings. So it is better not to update those
readings with software counters.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
---

diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index d739c8e6a012..623b04f63fe4 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -101,6 +101,7 @@ void ath9k_ps_wakeup(struct ath_softc *sc)
 		spin_lock(&common->cc_lock);
 		ath_hw_cycle_counters_update(common);
 		memset(&common->cc_survey, 0, sizeof(common->cc_survey));
+		memset(&common->cc_ani, 0, sizeof(common->cc_ani));
 		spin_unlock(&common->cc_lock);
 	}