summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/mvm/power.c
diff options
context:
space:
mode:
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>2014-01-26 16:54:05 +0200
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>2014-02-03 22:43:54 +0200
commitdcefeec05be5821a82f9ee66f6fcb9849d3f7568 (patch)
tree8c5b0ef69cb7baa7e58ea32b9138947949969ec6 /drivers/net/wireless/iwlwifi/mvm/power.c
parentd623d24a77b266caf46aa3652baadb646576e89a (diff)
downloadlinux-dcefeec05be5821a82f9ee66f6fcb9849d3f7568.tar.gz
linux-dcefeec05be5821a82f9ee66f6fcb9849d3f7568.tar.bz2
linux-dcefeec05be5821a82f9ee66f6fcb9849d3f7568.zip
iwlwifi: mvm: don't look at power commmand to decide if power is enabled
Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/mvm/power.c')
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/power.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/power.c b/drivers/net/wireless/iwlwifi/mvm/power.c
index f9ddd798ccd5..20bc37648faf 100644
--- a/drivers/net/wireless/iwlwifi/mvm/power.c
+++ b/drivers/net/wireless/iwlwifi/mvm/power.c
@@ -423,6 +423,7 @@ static int iwl_mvm_power_mac_update_mode(struct iwl_mvm *mvm,
int ret;
bool ba_enable;
struct iwl_mac_power_cmd cmd = {};
+ struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
if (vif->type != NL80211_IFTYPE_STATION)
return 0;
@@ -439,8 +440,9 @@ static int iwl_mvm_power_mac_update_mode(struct iwl_mvm *mvm,
if (ret)
return ret;
- ba_enable = !!(cmd.flags &
- cpu_to_le16(POWER_FLAGS_POWER_MANAGEMENT_ENA_MSK));
+ ba_enable = !(iwlmvm_mod_params.power_scheme == IWL_POWER_SCHEME_CAM ||
+ mvm->ps_prevented || mvm->bound_vif_cnt > 1 ||
+ !vif->bss_conf.ps || iwl_mvm_vif_low_latency(mvmvif));
return iwl_mvm_update_beacon_abort(mvm, vif, ba_enable);
}