aboutsummaryrefslogtreecommitdiff
path: root/sys/contrib
diff options
context:
space:
mode:
authorAdrian Chadd <adrian@FreeBSD.org>2014-04-30 02:03:47 +0000
committerAdrian Chadd <adrian@FreeBSD.org>2014-04-30 02:03:47 +0000
commit91e198f6a23137a3664dc7c4dc4979e764397550 (patch)
treeaaec3606e92a9f0546d28bc1b53dc8174e99ea21 /sys/contrib
parentce3f9a89507fe1b0105dbb10c31ba0d2639d601c (diff)
downloadsrc-91e198f6a23137a3664dc7c4dc4979e764397550.tar.gz
src-91e198f6a23137a3664dc7c4dc4979e764397550.zip
Only track the power state variable if the power state is changed,
not if the self-generated frame state is changed.
Notes
Notes: svn path=/head/; revision=265113
Diffstat (limited to 'sys/contrib')
-rw-r--r--sys/contrib/dev/ath/ath_hal/ar9300/ar9300_power.c13
1 files changed, 9 insertions, 4 deletions
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 629c40f9b8b1..b842993c23f9 100644
--- a/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_power.c
+++ b/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_power.c
@@ -669,7 +669,8 @@ 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;
+ 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, 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;
+ 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, HAL_POWER_MODE mode, int set_chip)
}
#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,