]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitca58550d509950d16f21341642999d2447be072a
tree3273b3cfdd9d45d63448fbbde1a4df08201ae700
parent4451008cc49bf20823b9c2c6d8c1780e58e7b023
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