aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath
diff options
context:
space:
mode:
authorLuis R. Rodriguez <lrodriguez@atheros.com>2009-09-10 00:02:34 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-10-07 16:39:24 -0400
commit8c77a5694cd31eb2291948dd1bfe700a199be8e7 (patch)
tree8190c50891fc29dcc8c28999fe86277301968e42 /drivers/net/wireless/ath
parent1adc93c832726c9de4a43445c008a7f17549390b (diff)
ath9k: move ath9k_hw_setpower() to main.c
And we make it static. Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath')
-rw-r--r--drivers/net/wireless/ath/ath9k/hw.c12
-rw-r--r--drivers/net/wireless/ath/ath9k/hw.h1
-rw-r--r--drivers/net/wireless/ath/ath9k/main.c12
3 files changed, 12 insertions, 13 deletions
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
index 910726203ec7..e71fe24cd3d8 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -2969,18 +2969,6 @@ bool ath9k_hw_setpower_nolock(struct ath_hw *ah, enum ath9k_power_mode mode)
2969 return status; 2969 return status;
2970} 2970}
2971 2971
2972bool ath9k_hw_setpower(struct ath_hw *ah, enum ath9k_power_mode mode)
2973{
2974 unsigned long flags;
2975 bool ret;
2976
2977 spin_lock_irqsave(&ah->ah_sc->sc_pm_lock, flags);
2978 ret = ath9k_hw_setpower_nolock(ah, mode);
2979 spin_unlock_irqrestore(&ah->ah_sc->sc_pm_lock, flags);
2980
2981 return ret;
2982}
2983
2984/* 2972/*
2985 * Helper for ASPM support. 2973 * Helper for ASPM support.
2986 * 2974 *
diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h
index 01a127b01724..05e4f8bc566b 100644
--- a/drivers/net/wireless/ath/ath9k/hw.h
+++ b/drivers/net/wireless/ath/ath9k/hw.h
@@ -654,7 +654,6 @@ void ath9k_hw_set_sta_beacon_timers(struct ath_hw *ah,
654 const struct ath9k_beacon_state *bs); 654 const struct ath9k_beacon_state *bs);
655 655
656bool ath9k_hw_setpower_nolock(struct ath_hw *ah, enum ath9k_power_mode mode); 656bool ath9k_hw_setpower_nolock(struct ath_hw *ah, enum ath9k_power_mode mode);
657bool ath9k_hw_setpower(struct ath_hw *ah, enum ath9k_power_mode mode);
658 657
659void ath9k_hw_configpcipowersave(struct ath_hw *ah, int restore, int power_off); 658void ath9k_hw_configpcipowersave(struct ath_hw *ah, int restore, int power_off);
660 659
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index 9f9ac5b52acb..d0637a65f9a9 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -243,6 +243,18 @@ static struct ath9k_channel *ath_get_curchannel(struct ath_softc *sc,
243 return channel; 243 return channel;
244} 244}
245 245
246static bool ath9k_hw_setpower(struct ath_hw *ah, enum ath9k_power_mode mode)
247{
248 unsigned long flags;
249 bool ret;
250
251 spin_lock_irqsave(&ah->ah_sc->sc_pm_lock, flags);
252 ret = ath9k_hw_setpower_nolock(ah, mode);
253 spin_unlock_irqrestore(&ah->ah_sc->sc_pm_lock, flags);
254
255 return ret;
256}
257
246void ath9k_ps_wakeup(struct ath_softc *sc) 258void ath9k_ps_wakeup(struct ath_softc *sc)
247{ 259{
248 unsigned long flags; 260 unsigned long flags;