iwlwifi: mvm: stop using DEVICE_POWER_FLAGS_CAM_MSK
The firmware has always treated these two bits to mean that powersave is enabled when POWER_SAVE_ENA is set and CAM is clear; it doesn't use them in any non-combined way. Therefore, it's pointless to send it two bits, and the API should be cleaned up. Prepare the driver by removing the CAM bit and using only POWER_SAVE_ENA to indicate whether PS is enabled or not. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
This commit is contained in:
parent
5c1156efeb
commit
ceef91c894
@ -192,16 +192,10 @@ struct iwl_powertable_cmd {
|
|||||||
/**
|
/**
|
||||||
* enum iwl_device_power_flags - masks for device power command flags
|
* enum iwl_device_power_flags - masks for device power command flags
|
||||||
* @DEVIC_POWER_FLAGS_POWER_SAVE_ENA_MSK: '1' Allow to save power by turning off
|
* @DEVIC_POWER_FLAGS_POWER_SAVE_ENA_MSK: '1' Allow to save power by turning off
|
||||||
* receiver and transmitter. '0' - does not allow. This flag should be
|
* receiver and transmitter. '0' - does not allow.
|
||||||
* always set to '1' unless one need to disable actual power down for debug
|
|
||||||
* purposes.
|
|
||||||
* @DEVICE_POWER_FLAGS_CAM_MSK: '1' CAM (Continuous Active Mode) is set, meaning
|
|
||||||
* that power management is disabled. '0' Power management is enabled, one
|
|
||||||
* of power schemes is applied.
|
|
||||||
*/
|
*/
|
||||||
enum iwl_device_power_flags {
|
enum iwl_device_power_flags {
|
||||||
DEVICE_POWER_FLAGS_POWER_SAVE_ENA_MSK = BIT(0),
|
DEVICE_POWER_FLAGS_POWER_SAVE_ENA_MSK = BIT(0),
|
||||||
DEVICE_POWER_FLAGS_CAM_MSK = BIT(13),
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -471,14 +471,14 @@ static int iwl_mvm_power_send_cmd(struct iwl_mvm *mvm,
|
|||||||
int iwl_mvm_power_update_device(struct iwl_mvm *mvm)
|
int iwl_mvm_power_update_device(struct iwl_mvm *mvm)
|
||||||
{
|
{
|
||||||
struct iwl_device_power_cmd cmd = {
|
struct iwl_device_power_cmd cmd = {
|
||||||
.flags = cpu_to_le16(DEVICE_POWER_FLAGS_POWER_SAVE_ENA_MSK),
|
.flags = 0,
|
||||||
};
|
};
|
||||||
|
|
||||||
if (iwlmvm_mod_params.power_scheme == IWL_POWER_SCHEME_CAM)
|
if (iwlmvm_mod_params.power_scheme == IWL_POWER_SCHEME_CAM)
|
||||||
mvm->ps_disabled = true;
|
mvm->ps_disabled = true;
|
||||||
|
|
||||||
if (mvm->ps_disabled)
|
if (!mvm->ps_disabled)
|
||||||
cmd.flags |= cpu_to_le16(DEVICE_POWER_FLAGS_CAM_MSK);
|
cmd.flags |= cpu_to_le16(DEVICE_POWER_FLAGS_POWER_SAVE_ENA_MSK);
|
||||||
|
|
||||||
#ifdef CONFIG_IWLWIFI_DEBUGFS
|
#ifdef CONFIG_IWLWIFI_DEBUGFS
|
||||||
if ((mvm->cur_ucode == IWL_UCODE_WOWLAN) ? mvm->disable_power_off_d3 :
|
if ((mvm->cur_ucode == IWL_UCODE_WOWLAN) ? mvm->disable_power_off_d3 :
|
||||||
|
Loading…
Reference in New Issue
Block a user