From: Luis R. Rodriguez Date: Tue, 7 Dec 2010 23:13:23 +0000 (-0800) Subject: ath9k_hw: warn if we cannot change the power to the chip X-Git-Tag: v2.6.38-rc1~476^2~169^2^2~3 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=69f4aab1157d2a386e7ea4de77cc253629d1b4f2;hp=-c;p=karo-tx-linux.git ath9k_hw: warn if we cannot change the power to the chip Suspend requires the device to be in fullsleep otherwise upon resume the device becomes unresponsive. We need to ensure that when we want the device to go to sleep it yields to the request, otherwise we'll have a useless devices upon resume. Warn when changing the power fails as we need to look into these issues. Cc: Paul Stewart Cc: Amod Bodas Signed-off-by: Luis R. Rodriguez Signed-off-by: John W. Linville --- 69f4aab1157d2a386e7ea4de77cc253629d1b4f2 diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c index 9f4398c88c85..516227fa668e 100644 --- a/drivers/net/wireless/ath/ath9k/hw.c +++ b/drivers/net/wireless/ath/ath9k/hw.c @@ -1608,6 +1608,13 @@ bool ath9k_hw_setpower(struct ath_hw *ah, enum ath9k_power_mode mode) } ah->power_mode = mode; + /* + * XXX: If this warning never comes up after a while then + * simply keep the ATH_DBG_WARN_ON_ONCE() but make + * ath9k_hw_setpower() return type void. + */ + ATH_DBG_WARN_ON_ONCE(!status); + return status; } EXPORT_SYMBOL(ath9k_hw_setpower);