mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-03 12:35:02 +00:00
* Only update ah_powerMode if we're setting the chip sleep state.
Some code will appear soon that is actually setting the chip powerstate separate from the self-generated frames power state. * Allow the AR5416 family chips to actually have the power state changed from the self generated state change. Tested (STA mode): * AR5210 * AR5211 * AR5412 * AR5413 * AR5416 * AR9285
This commit is contained in:
parent
457e64a02f
commit
ce3f9a8950
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=265112
@ -108,16 +108,19 @@ ar5210SetPowerMode(struct ath_hal *ah, HAL_POWER_MODE mode, int setChip)
|
||||
setChip ? "set chip " : "");
|
||||
switch (mode) {
|
||||
case HAL_PM_AWAKE:
|
||||
ah->ah_powerMode = mode;
|
||||
if (setChip)
|
||||
ah->ah_powerMode = mode;
|
||||
status = ar5210SetPowerModeAwake(ah, setChip);
|
||||
break;
|
||||
case HAL_PM_FULL_SLEEP:
|
||||
ar5210SetPowerModeSleep(ah, setChip);
|
||||
ah->ah_powerMode = mode;
|
||||
if (setChip)
|
||||
ah->ah_powerMode = mode;
|
||||
break;
|
||||
case HAL_PM_NETWORK_SLEEP:
|
||||
ar5210SetPowerModeAuto(ah, setChip);
|
||||
ah->ah_powerMode = mode;
|
||||
if (setChip)
|
||||
ah->ah_powerMode = mode;
|
||||
break;
|
||||
default:
|
||||
HALDEBUG(ah, HAL_DEBUG_ANY, "%s: unknown power mode %u\n",
|
||||
|
@ -110,16 +110,19 @@ ar5211SetPowerMode(struct ath_hal *ah, HAL_POWER_MODE mode, int setChip)
|
||||
setChip ? "set chip " : "");
|
||||
switch (mode) {
|
||||
case HAL_PM_AWAKE:
|
||||
ah->ah_powerMode = mode;
|
||||
if (setChip)
|
||||
ah->ah_powerMode = mode;
|
||||
status = ar5211SetPowerModeAwake(ah, setChip);
|
||||
break;
|
||||
case HAL_PM_FULL_SLEEP:
|
||||
ar5211SetPowerModeSleep(ah, setChip);
|
||||
ah->ah_powerMode = mode;
|
||||
if (setChip)
|
||||
ah->ah_powerMode = mode;
|
||||
break;
|
||||
case HAL_PM_NETWORK_SLEEP:
|
||||
ar5211SetPowerModeNetworkSleep(ah, setChip);
|
||||
ah->ah_powerMode = mode;
|
||||
if (setChip)
|
||||
ah->ah_powerMode = mode;
|
||||
break;
|
||||
default:
|
||||
HALDEBUG(ah, HAL_DEBUG_ANY, "%s: unknown power mode %u\n",
|
||||
|
@ -134,16 +134,19 @@ ar5212SetPowerMode(struct ath_hal *ah, HAL_POWER_MODE mode, int setChip)
|
||||
setChip ? "set chip " : "");
|
||||
switch (mode) {
|
||||
case HAL_PM_AWAKE:
|
||||
ah->ah_powerMode = mode;
|
||||
if (setChip)
|
||||
ah->ah_powerMode = mode;
|
||||
status = ar5212SetPowerModeAwake(ah, setChip);
|
||||
break;
|
||||
case HAL_PM_FULL_SLEEP:
|
||||
ar5212SetPowerModeSleep(ah, setChip);
|
||||
ah->ah_powerMode = mode;
|
||||
if (setChip)
|
||||
ah->ah_powerMode = mode;
|
||||
break;
|
||||
case HAL_PM_NETWORK_SLEEP:
|
||||
ar5212SetPowerModeNetworkSleep(ah, setChip);
|
||||
ah->ah_powerMode = mode;
|
||||
if (setChip)
|
||||
ah->ah_powerMode = mode;
|
||||
break;
|
||||
default:
|
||||
HALDEBUG(ah, HAL_DEBUG_ANY, "%s: unknown power mode %u\n",
|
||||
|
@ -133,23 +133,29 @@ ar5416SetPowerMode(struct ath_hal *ah, HAL_POWER_MODE mode, int setChip)
|
||||
};
|
||||
#endif
|
||||
int status = AH_TRUE;
|
||||
|
||||
#if 0
|
||||
if (!setChip)
|
||||
return AH_TRUE;
|
||||
#endif
|
||||
|
||||
HALDEBUG(ah, HAL_DEBUG_POWER, "%s: %s -> %s (%s)\n", __func__,
|
||||
modes[ah->ah_powerMode], modes[mode], setChip ? "set chip " : "");
|
||||
switch (mode) {
|
||||
case HAL_PM_AWAKE:
|
||||
ah->ah_powerMode = mode;
|
||||
if (setChip)
|
||||
ah->ah_powerMode = mode;
|
||||
status = ar5416SetPowerModeAwake(ah, setChip);
|
||||
break;
|
||||
case HAL_PM_FULL_SLEEP:
|
||||
ar5416SetPowerModeSleep(ah, setChip);
|
||||
ah->ah_powerMode = mode;
|
||||
if (setChip)
|
||||
ah->ah_powerMode = mode;
|
||||
break;
|
||||
case HAL_PM_NETWORK_SLEEP:
|
||||
ar5416SetPowerModeNetworkSleep(ah, setChip);
|
||||
ah->ah_powerMode = mode;
|
||||
if (setChip)
|
||||
ah->ah_powerMode = mode;
|
||||
break;
|
||||
default:
|
||||
HALDEBUG(ah, HAL_DEBUG_ANY, "%s: unknown power mode 0x%x\n",
|
||||
|
Loading…
Reference in New Issue
Block a user