From db23679569ccc7a292a49e685201f8fc0b631f0e Mon Sep 17 00:00:00 2001 From: Adrian Chadd Date: Thu, 24 Apr 2014 23:11:36 +0000 Subject: [PATCH] Fix the AR5211 power mode tracking stuff. Tested: * AR5211, STA mode --- sys/dev/ath/ath_hal/ar5211/ar5211_power.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/dev/ath/ath_hal/ar5211/ar5211_power.c b/sys/dev/ath/ath_hal/ar5211/ar5211_power.c index fa42f3719e3..0ed090215b5 100644 --- a/sys/dev/ath/ath_hal/ar5211/ar5211_power.c +++ b/sys/dev/ath/ath_hal/ar5211/ar5211_power.c @@ -110,21 +110,23 @@ ar5211SetPowerMode(struct ath_hal *ah, HAL_POWER_MODE mode, int setChip) setChip ? "set chip " : ""); switch (mode) { case HAL_PM_AWAKE: + ah->ah_powerMode = mode; status = ar5211SetPowerModeAwake(ah, setChip); break; case HAL_PM_FULL_SLEEP: ar5211SetPowerModeSleep(ah, setChip); + ah->ah_powerMode = mode; break; case HAL_PM_NETWORK_SLEEP: ar5211SetPowerModeNetworkSleep(ah, setChip); + ah->ah_powerMode = mode; break; default: HALDEBUG(ah, HAL_DEBUG_ANY, "%s: unknown power mode %u\n", __func__, mode); return AH_FALSE; } - ah->ah_powerMode = mode; - return status; + return status; } HAL_POWER_MODE