|
@@ -2728,7 +2728,8 @@ static bool ath9k_hw_set_power_awake(struct ath_hw *ah, int setChip)
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
-bool ath9k_hw_setpower(struct ath_hw *ah, enum ath9k_power_mode mode)
|
|
|
+static bool ath9k_hw_setpower_nolock(struct ath_hw *ah,
|
|
|
+ enum ath9k_power_mode mode)
|
|
|
{
|
|
|
int status = true, setChip = true;
|
|
|
static const char *modes[] = {
|
|
@@ -2762,6 +2763,18 @@ bool ath9k_hw_setpower(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.
|
|
|
*
|