Shuffle ah_powerMode to be in a sane spot for the given power operation.
This way the state changes from sleep->awake before the registers are poked and from awake->sleep after the registers are poked. This way spurious warnings aren't printed by my (to be committed) debugging code. Tested: * AR5416, STA
This commit is contained in:
parent
410302eb58
commit
bd369abaac
@ -140,20 +140,22 @@ ar5416SetPowerMode(struct ath_hal *ah, HAL_POWER_MODE mode, int setChip)
|
||||
modes[ah->ah_powerMode], modes[mode], setChip ? "set chip " : "");
|
||||
switch (mode) {
|
||||
case HAL_PM_AWAKE:
|
||||
ah->ah_powerMode = mode;
|
||||
status = ar5416SetPowerModeAwake(ah, setChip);
|
||||
break;
|
||||
case HAL_PM_FULL_SLEEP:
|
||||
ar5416SetPowerModeSleep(ah, setChip);
|
||||
ah->ah_powerMode = mode;
|
||||
break;
|
||||
case HAL_PM_NETWORK_SLEEP:
|
||||
ar5416SetPowerModeNetworkSleep(ah, setChip);
|
||||
ah->ah_powerMode = mode;
|
||||
break;
|
||||
default:
|
||||
HALDEBUG(ah, HAL_DEBUG_ANY, "%s: unknown power mode 0x%x\n",
|
||||
__func__, mode);
|
||||
return AH_FALSE;
|
||||
}
|
||||
ah->ah_powerMode = mode;
|
||||
return status;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user