forked from Minki/linux
iwlwifi: mvm: always send power table command
The driver distinguishes between power management and device's power down enablement. Power management enablement depends both on driver's module power parameters and mac80211 decision. The device's power down depends only on driver's module power parameters. Change the driver to always send Power Table command to enable or disable both power management and device's power down. Signed-off-by: Alexander Bondar <alexander.bondar@intel.com> Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
7c1bf93fb2
commit
9a6130485e
@ -86,12 +86,16 @@ static void iwl_mvm_power_build_cmd(struct iwl_mvm *mvm,
|
||||
int keep_alive;
|
||||
bool radar_detect = false;
|
||||
|
||||
if ((!vif->bss_conf.ps) ||
|
||||
(iwlmvm_mod_params.power_scheme == IWL_POWER_SCHEME_CAM))
|
||||
if ((iwlmvm_mod_params.power_scheme == IWL_POWER_SCHEME_CAM) ||
|
||||
!iwlwifi_mod_params.power_save)
|
||||
return;
|
||||
|
||||
cmd->flags |= cpu_to_le16(POWER_FLAGS_POWER_MANAGEMENT_ENA_MSK |
|
||||
POWER_FLAGS_POWER_SAVE_ENA_MSK);
|
||||
cmd->flags |= cpu_to_le16(POWER_FLAGS_POWER_SAVE_ENA_MSK);
|
||||
|
||||
if (!vif->bss_conf.ps)
|
||||
return;
|
||||
|
||||
cmd->flags |= cpu_to_le16(POWER_FLAGS_POWER_MANAGEMENT_ENA_MSK);
|
||||
|
||||
dtimper = hw->conf.ps_dtim_period ?: 1;
|
||||
|
||||
@ -132,11 +136,6 @@ int iwl_mvm_power_update_mode(struct iwl_mvm *mvm, struct ieee80211_vif *vif)
|
||||
{
|
||||
struct iwl_powertable_cmd cmd = {};
|
||||
|
||||
if (!iwlwifi_mod_params.power_save) {
|
||||
IWL_DEBUG_POWER(mvm, "Power management is not allowed\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (vif->type != NL80211_IFTYPE_STATION || vif->p2p)
|
||||
return 0;
|
||||
|
||||
@ -165,14 +164,13 @@ int iwl_mvm_power_disable(struct iwl_mvm *mvm, struct ieee80211_vif *vif)
|
||||
{
|
||||
struct iwl_powertable_cmd cmd = {};
|
||||
|
||||
if (!iwlwifi_mod_params.power_save) {
|
||||
IWL_DEBUG_POWER(mvm, "Power management is not allowed\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (vif->type != NL80211_IFTYPE_STATION || vif->p2p)
|
||||
return 0;
|
||||
|
||||
if ((iwlmvm_mod_params.power_scheme != IWL_POWER_SCHEME_CAM) &&
|
||||
iwlwifi_mod_params.power_save)
|
||||
cmd.flags |= cpu_to_le16(POWER_FLAGS_POWER_SAVE_ENA_MSK);
|
||||
|
||||
IWL_DEBUG_POWER(mvm,
|
||||
"Sending power table command power level %d, flags = 0x%X\n",
|
||||
iwlmvm_mod_params.power_scheme, le16_to_cpu(cmd.flags));
|
||||
|
Loading…
Reference in New Issue
Block a user