Skip to content

Commit

Permalink
ath9k: move ath9k_hw_setpower() to main.c
Browse files Browse the repository at this point in the history
And we make it static.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Luis R. Rodriguez authored and John W. Linville committed Oct 7, 2009
1 parent 1adc93c commit 8c77a56
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 13 deletions.
12 changes: 0 additions & 12 deletions drivers/net/wireless/ath/ath9k/hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -2969,18 +2969,6 @@ bool ath9k_hw_setpower_nolock(struct ath_hw *ah, enum ath9k_power_mode mode)
return status;
}

bool ath9k_hw_setpower(struct ath_hw *ah, enum ath9k_power_mode mode)
{
unsigned long flags;
bool ret;

spin_lock_irqsave(&ah->ah_sc->sc_pm_lock, flags);
ret = ath9k_hw_setpower_nolock(ah, mode);
spin_unlock_irqrestore(&ah->ah_sc->sc_pm_lock, flags);

return ret;
}

/*
* Helper for ASPM support.
*
Expand Down
1 change: 0 additions & 1 deletion drivers/net/wireless/ath/ath9k/hw.h
Original file line number Diff line number Diff line change
Expand Up @@ -654,7 +654,6 @@ void ath9k_hw_set_sta_beacon_timers(struct ath_hw *ah,
const struct ath9k_beacon_state *bs);

bool ath9k_hw_setpower_nolock(struct ath_hw *ah, enum ath9k_power_mode mode);
bool ath9k_hw_setpower(struct ath_hw *ah, enum ath9k_power_mode mode);

void ath9k_hw_configpcipowersave(struct ath_hw *ah, int restore, int power_off);

Expand Down
12 changes: 12 additions & 0 deletions drivers/net/wireless/ath/ath9k/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,18 @@ static struct ath9k_channel *ath_get_curchannel(struct ath_softc *sc,
return channel;
}

static bool ath9k_hw_setpower(struct ath_hw *ah, enum ath9k_power_mode mode)
{
unsigned long flags;
bool ret;

spin_lock_irqsave(&ah->ah_sc->sc_pm_lock, flags);
ret = ath9k_hw_setpower_nolock(ah, mode);
spin_unlock_irqrestore(&ah->ah_sc->sc_pm_lock, flags);

return ret;
}

void ath9k_ps_wakeup(struct ath_softc *sc)
{
unsigned long flags;
Expand Down

0 comments on commit 8c77a56

Please sign in to comment.