diff options
author | Sujith Manoharan <Sujith.Manoharan@atheros.com> | 2010-12-20 08:02:42 +0530 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-12-22 15:43:25 -0500 |
commit | 97dcec5715a381362c88d1542e52c63147764d3c (patch) | |
tree | eddbe362c36a42441d9ebd8794be5cb6975fbfed /drivers/net/wireless/ath/ath9k/hw.c | |
parent | 3cfeb0c33f5cbcc6dde371392877ef3101b8f805 (diff) | |
download | lwn-97dcec5715a381362c88d1542e52c63147764d3c.tar.gz lwn-97dcec5715a381362c88d1542e52c63147764d3c.zip |
ath9k_htc: Fix warning on device removal
The commit "ath9k_hw: warn if we cannot change the power to the chip"
introduced a new warning to indicate chip powerup failures, but this
is not required for devices that have been removed. Handle USB device
removal properly by checking for unplugged status.
For PCI devices, this warning will still be seen when the card is pulled
out, not sure how to check for card removal.
Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/hw.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/hw.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c index 4b51ed47fe69..fde978665e07 100644 --- a/drivers/net/wireless/ath/ath9k/hw.c +++ b/drivers/net/wireless/ath/ath9k/hw.c @@ -1615,7 +1615,9 @@ bool ath9k_hw_setpower(struct ath_hw *ah, enum ath9k_power_mode mode) * simply keep the ATH_DBG_WARN_ON_ONCE() but make * ath9k_hw_setpower() return type void. */ - ATH_DBG_WARN_ON_ONCE(!status); + + if (!(ah->ah_flags & AH_UNPLUGGED)) + ATH_DBG_WARN_ON_ONCE(!status); return status; } |