ath9k: check old power mode before clearing cycle counters
authorFelix Fietkau <nbd@openwrt.org>
Wed, 3 Nov 2010 00:36:51 +0000 (01:36 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 8 Nov 2010 21:53:47 +0000 (16:53 -0500)
commitfbb078fcd2fa83646ad9504d8e4c54a67b8729ae
tree3273b3cfdd9d45d63448fbbde1a4df08201ae700
parent3cc25e510dfc36dc62ee0aa87344b36ed7c1742a
ath9k: check old power mode before clearing cycle counters

ath9k_ps_wakeup() clears the cycle counters after waking up the
hardware using ath9k_hw_setpower, however if power save is disabled,
then the counters will contain useful data, which then gets discarded.
Fix this by checking the old power mode before discarding any data.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/main.c