svn commit: r265113 - head/sys/contrib/dev/ath/ath_hal/ar9300
Adrian Chadd
adrian at FreeBSD.org
Wed Apr 30 02:03:47 UTC 2014
Author: adrian
Date: Wed Apr 30 02:03:47 2014
New Revision: 265113
URL: http://svnweb.freebsd.org/changeset/base/265113
Log:
Only track the power state variable if the power state is changed,
not if the self-generated frame state is changed.
Modified:
head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_power.c
Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_power.c
==============================================================================
--- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_power.c Wed Apr 30 02:03:13 2014 (r265112)
+++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_power.c Wed Apr 30 02:03:47 2014 (r265113)
@@ -669,7 +669,8 @@ ar9300_set_power_mode(struct ath_hal *ah
switch (mode) {
case HAL_PM_AWAKE:
- ah->ah_powerMode = mode;
+ if (set_chip)
+ 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,8 +700,10 @@ ar9300_set_power_mode(struct ath_hal *ah
}
#endif
ar9300_set_power_mode_sleep(ah, set_chip);
- ahp->ah_chip_full_sleep = AH_TRUE;
- ah->ah_powerMode = mode;
+ if (set_chip) {
+ ahp->ah_chip_full_sleep = AH_TRUE;
+ ah->ah_powerMode = mode;
+ }
break;
case HAL_PM_NETWORK_SLEEP:
#if ATH_SUPPORT_MCI
@@ -709,7 +712,9 @@ ar9300_set_power_mode(struct ath_hal *ah
}
#endif
ar9300_set_power_mode_network_sleep(ah, set_chip);
- ah->ah_powerMode = mode;
+ if (set_chip) {
+ ah->ah_powerMode = mode;
+ }
break;
default:
HALDEBUG(ah, HAL_DEBUG_POWER_MGMT,
More information about the svn-src-all
mailing list