aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuis R. Rodriguez <lrodriguez@atheros.com>2009-09-09 23:54:36 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-10-07 16:39:24 -0400
commit1adc93c832726c9de4a43445c008a7f17549390b (patch)
tree0ca880249f5f0290b2f5aac099591daa6bde29e6
parenta91d75aec19d8d23c7c543dd4bc0e394e1d46867 (diff)
ath9k: avoid usage of ath9k_hw_setpower() on hw.c
ath9k_hw_setpower() is a core driver helper with locking protection. Locking protection should be left to the driver core, not the hw code. Hardware code no longer contends for locking when it needs to wake up the chip or put it to sleep. Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/ath/ath9k/hw.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
index 82c91e5883d9..910726203ec7 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -919,7 +919,7 @@ int ath9k_hw_init(struct ath_hw *ah)
919 return -EIO; 919 return -EIO;
920 } 920 }
921 921
922 if (!ath9k_hw_setpower(ah, ATH9K_PM_AWAKE)) { 922 if (!ath9k_hw_setpower_nolock(ah, ATH9K_PM_AWAKE)) {
923 DPRINTF(ah, ATH_DBG_FATAL, "Couldn't wakeup chip\n"); 923 DPRINTF(ah, ATH_DBG_FATAL, "Couldn't wakeup chip\n");
924 return -EIO; 924 return -EIO;
925 } 925 }
@@ -1234,7 +1234,7 @@ void ath9k_hw_detach(struct ath_hw *ah)
1234 ath9k_hw_ani_disable(ah); 1234 ath9k_hw_ani_disable(ah);
1235 1235
1236 ath9k_hw_rf_free(ah); 1236 ath9k_hw_rf_free(ah);
1237 ath9k_hw_setpower(ah, ATH9K_PM_FULL_SLEEP); 1237 ath9k_hw_setpower_nolock(ah, ATH9K_PM_FULL_SLEEP);
1238 kfree(ah); 1238 kfree(ah);
1239 ah = NULL; 1239 ah = NULL;
1240} 1240}
@@ -1800,7 +1800,7 @@ static bool ath9k_hw_chip_reset(struct ath_hw *ah,
1800 } else if (!ath9k_hw_set_reset_reg(ah, ATH9K_RESET_WARM)) 1800 } else if (!ath9k_hw_set_reset_reg(ah, ATH9K_RESET_WARM))
1801 return false; 1801 return false;
1802 1802
1803 if (!ath9k_hw_setpower(ah, ATH9K_PM_AWAKE)) 1803 if (!ath9k_hw_setpower_nolock(ah, ATH9K_PM_AWAKE))
1804 return false; 1804 return false;
1805 1805
1806 ah->chip_fullsleep = false; 1806 ah->chip_fullsleep = false;
@@ -2355,7 +2355,7 @@ int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan,
2355 ah->txchainmask = sc->tx_chainmask; 2355 ah->txchainmask = sc->tx_chainmask;
2356 ah->rxchainmask = sc->rx_chainmask; 2356 ah->rxchainmask = sc->rx_chainmask;
2357 2357
2358 if (!ath9k_hw_setpower(ah, ATH9K_PM_AWAKE)) 2358 if (!ath9k_hw_setpower_nolock(ah, ATH9K_PM_AWAKE))
2359 return -EIO; 2359 return -EIO;
2360 2360
2361 if (curchan && !ah->chip_fullsleep) 2361 if (curchan && !ah->chip_fullsleep)
@@ -3998,7 +3998,7 @@ bool ath9k_hw_phy_disable(struct ath_hw *ah)
3998 3998
3999bool ath9k_hw_disable(struct ath_hw *ah) 3999bool ath9k_hw_disable(struct ath_hw *ah)
4000{ 4000{
4001 if (!ath9k_hw_setpower(ah, ATH9K_PM_AWAKE)) 4001 if (!ath9k_hw_setpower_nolock(ah, ATH9K_PM_AWAKE))
4002 return false; 4002 return false;
4003 4003
4004 return ath9k_hw_set_reset_reg(ah, ATH9K_RESET_COLD); 4004 return ath9k_hw_set_reset_reg(ah, ATH9K_RESET_COLD);