ath: do not update cycle counters with sleep mode
authorRajkumar Manoharan <rmanohar@qca.qualcomm.com>
Mon, 4 Jun 2012 10:58:41 +0000 (16:28 +0530)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 6 Jun 2012 19:20:29 +0000 (15:20 -0400)
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>
drivers/net/wireless/ath/ath9k/main.c

index d739c8e6a01211f706ce9e0c008849cb51f923ab..623b04f63fe4d83514cd30f4ba41cb66d07c787a 100644 (file)
@@ -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);
        }