diff options
author | Johannes Berg <johannes.berg@intel.com> | 2015-09-04 05:27:25 -0400 |
---|---|---|
committer | Luca Coelho <luciano.coelho@intel.com> | 2015-10-05 07:33:28 -0400 |
commit | ceef91c89480dd18bb3ac51e91280a233d0ca41f (patch) | |
tree | 74686590f19d6d905efd1098459358c42751ee73 | |
parent | 5c1156efebc6b76b4a7daec844c19d2ce1d7bb03 (diff) |
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>
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/fw-api-power.h | 8 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/power.c | 6 |
2 files changed, 4 insertions, 10 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/fw-api-power.h b/drivers/net/wireless/iwlwifi/mvm/fw-api-power.h index 7005fa4be74a..c8f3e2536cbb 100644 --- a/drivers/net/wireless/iwlwifi/mvm/fw-api-power.h +++ b/drivers/net/wireless/iwlwifi/mvm/fw-api-power.h | |||
@@ -192,16 +192,10 @@ struct iwl_powertable_cmd { | |||
192 | /** | 192 | /** |
193 | * enum iwl_device_power_flags - masks for device power command flags | 193 | * enum iwl_device_power_flags - masks for device power command flags |
194 | * @DEVIC_POWER_FLAGS_POWER_SAVE_ENA_MSK: '1' Allow to save power by turning off | 194 | * @DEVIC_POWER_FLAGS_POWER_SAVE_ENA_MSK: '1' Allow to save power by turning off |
195 | * receiver and transmitter. '0' - does not allow. This flag should be | 195 | * receiver and transmitter. '0' - does not allow. |
196 | * always set to '1' unless one need to disable actual power down for debug | ||
197 | * purposes. | ||
198 | * @DEVICE_POWER_FLAGS_CAM_MSK: '1' CAM (Continuous Active Mode) is set, meaning | ||
199 | * that power management is disabled. '0' Power management is enabled, one | ||
200 | * of power schemes is applied. | ||
201 | */ | 196 | */ |
202 | enum iwl_device_power_flags { | 197 | enum iwl_device_power_flags { |
203 | DEVICE_POWER_FLAGS_POWER_SAVE_ENA_MSK = BIT(0), | 198 | DEVICE_POWER_FLAGS_POWER_SAVE_ENA_MSK = BIT(0), |
204 | DEVICE_POWER_FLAGS_CAM_MSK = BIT(13), | ||
205 | }; | 199 | }; |
206 | 200 | ||
207 | /** | 201 | /** |
diff --git a/drivers/net/wireless/iwlwifi/mvm/power.c b/drivers/net/wireless/iwlwifi/mvm/power.c index 21a858dfcc26..723b537341c4 100644 --- a/drivers/net/wireless/iwlwifi/mvm/power.c +++ b/drivers/net/wireless/iwlwifi/mvm/power.c | |||
@@ -471,14 +471,14 @@ static int iwl_mvm_power_send_cmd(struct iwl_mvm *mvm, | |||
471 | int iwl_mvm_power_update_device(struct iwl_mvm *mvm) | 471 | int iwl_mvm_power_update_device(struct iwl_mvm *mvm) |
472 | { | 472 | { |
473 | struct iwl_device_power_cmd cmd = { | 473 | struct iwl_device_power_cmd cmd = { |
474 | .flags = cpu_to_le16(DEVICE_POWER_FLAGS_POWER_SAVE_ENA_MSK), | 474 | .flags = 0, |
475 | }; | 475 | }; |
476 | 476 | ||
477 | if (iwlmvm_mod_params.power_scheme == IWL_POWER_SCHEME_CAM) | 477 | if (iwlmvm_mod_params.power_scheme == IWL_POWER_SCHEME_CAM) |
478 | mvm->ps_disabled = true; | 478 | mvm->ps_disabled = true; |
479 | 479 | ||
480 | if (mvm->ps_disabled) | 480 | if (!mvm->ps_disabled) |
481 | cmd.flags |= cpu_to_le16(DEVICE_POWER_FLAGS_CAM_MSK); | 481 | cmd.flags |= cpu_to_le16(DEVICE_POWER_FLAGS_POWER_SAVE_ENA_MSK); |
482 | 482 | ||
483 | #ifdef CONFIG_IWLWIFI_DEBUGFS | 483 | #ifdef CONFIG_IWLWIFI_DEBUGFS |
484 | if ((mvm->cur_ucode == IWL_UCODE_WOWLAN) ? mvm->disable_power_off_d3 : | 484 | if ((mvm->cur_ucode == IWL_UCODE_WOWLAN) ? mvm->disable_power_off_d3 : |