svn commit: r263618 - head/sys/dev/ath/ath_hal/ar5212

Adrian Chadd adrian at FreeBSD.org
Sat Mar 22 03:36:08 UTC 2014


Author: adrian
Date: Sat Mar 22 03:36:07 2014
New Revision: 263618
URL: http://svnweb.freebsd.org/changeset/base/263618

Log:
  Also set the AR5212 HAL power mode tracking in the right spot.
  
  Tested:
  
  * D-Link DWL-G650 NIC (AR2413), STA mode

Modified:
  head/sys/dev/ath/ath_hal/ar5212/ar5212_power.c

Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212_power.c
==============================================================================
--- head/sys/dev/ath/ath_hal/ar5212/ar5212_power.c	Sat Mar 22 02:30:38 2014	(r263617)
+++ head/sys/dev/ath/ath_hal/ar5212/ar5212_power.c	Sat Mar 22 03:36:07 2014	(r263618)
@@ -134,20 +134,22 @@ ar5212SetPowerMode(struct ath_hal *ah, H
 		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;
 }
 


More information about the svn-src-head mailing list