From f857fb4fa3e67cccee8c2d3aaf4a8048b193465f Mon Sep 17 00:00:00 2001 From: Adrian Chadd Date: Sat, 22 Mar 2014 03:36:07 +0000 Subject: [PATCH] Also set the AR5212 HAL power mode tracking in the right spot. Tested: * D-Link DWL-G650 NIC (AR2413), STA mode --- sys/dev/ath/ath_hal/ar5212/ar5212_power.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/dev/ath/ath_hal/ar5212/ar5212_power.c b/sys/dev/ath/ath_hal/ar5212/ar5212_power.c index f1c1f3660be..55563289591 100644 --- a/sys/dev/ath/ath_hal/ar5212/ar5212_power.c +++ b/sys/dev/ath/ath_hal/ar5212/ar5212_power.c @@ -134,20 +134,22 @@ ar5212SetPowerMode(struct ath_hal *ah, HAL_POWER_MODE mode, int setChip) setChip ? "set chip " : ""); switch (mode) { case HAL_PM_AWAKE: + ah->ah_powerMode = mode; status = ar5212SetPowerModeAwake(ah, setChip); break; case HAL_PM_FULL_SLEEP: ar5212SetPowerModeSleep(ah, setChip); + ah->ah_powerMode = mode; break; case HAL_PM_NETWORK_SLEEP: ar5212SetPowerModeNetworkSleep(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; }