From e6f2713747a562c5e913230f57513a1290939ff1 Mon Sep 17 00:00:00 2001 From: Adrian Chadd Date: Sat, 29 Mar 2014 18:56:11 +0000 Subject: [PATCH] Fix ah_powerMode setting. Reported by: sbruno --- sys/contrib/dev/ath/ath_hal/ar9300/ar9300_power.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_power.c b/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_power.c index 7f4992cf2807..629c40f9b8b1 100644 --- a/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_power.c +++ b/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_power.c @@ -669,6 +669,7 @@ ar9300_set_power_mode(struct ath_hal *ah, HAL_POWER_MODE mode, int set_chip) switch (mode) { case HAL_PM_AWAKE: + ah->ah_powerMode = mode; status = ar9300_set_power_mode_awake(ah, set_chip); #if ATH_SUPPORT_MCI if (AH_PRIVATE(ah)->ah_caps.halMciSupport) { @@ -699,6 +700,7 @@ ar9300_set_power_mode(struct ath_hal *ah, HAL_POWER_MODE mode, int set_chip) #endif ar9300_set_power_mode_sleep(ah, set_chip); ahp->ah_chip_full_sleep = AH_TRUE; + ah->ah_powerMode = mode; break; case HAL_PM_NETWORK_SLEEP: #if ATH_SUPPORT_MCI @@ -707,13 +709,13 @@ ar9300_set_power_mode(struct ath_hal *ah, HAL_POWER_MODE mode, int set_chip) } #endif ar9300_set_power_mode_network_sleep(ah, set_chip); + ah->ah_powerMode = mode; break; default: HALDEBUG(ah, HAL_DEBUG_POWER_MGMT, "%s: unknown power mode %u\n", __func__, mode); return AH_FALSE; } - ah->ah_powerMode = status; return status; }