]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
iwlwifi: mvm: disable powersave in low-latency
authorJohannes Berg <johannes.berg@intel.com>
Wed, 13 Nov 2013 16:16:19 +0000 (17:16 +0100)
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Mon, 3 Feb 2014 20:23:34 +0000 (22:23 +0200)
While an interface is in low-latency mode, for now powersave
should be disabled for it, so take low-latency into account
in the powersave code and force powersave recalculation when
low-latency mode changes.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
drivers/net/wireless/iwlwifi/mvm/power.c
drivers/net/wireless/iwlwifi/mvm/utils.c

index d9eab3b7bb9f871a37b818e5a63e1320a12d7189..436c7e0ae6b1276a38eb307d2cdfb3f118643e8d 100644 (file)
@@ -312,7 +312,8 @@ static void iwl_mvm_power_build_cmd(struct iwl_mvm *mvm,
            mvmvif->dbgfs_pm.disable_power_off)
                cmd->flags &= cpu_to_le16(~POWER_FLAGS_POWER_SAVE_ENA_MSK);
 #endif
-       if (!vif->bss_conf.ps || mvmvif->pm_prevented)
+       if (!vif->bss_conf.ps || mvmvif->pm_prevented ||
+           iwl_mvm_vif_low_latency(mvmvif))
                return;
 
        cmd->flags |= cpu_to_le16(POWER_FLAGS_POWER_MANAGEMENT_ENA_MSK);
index e2cc876d93889bd6c53264e5e2143413a5bb9803..790da1bea25ed5dfa46ecd0732929baf3ef146c4 100644 (file)
@@ -541,10 +541,14 @@ int iwl_mvm_update_low_latency(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
                               bool value)
 {
        struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
+       int res;
 
        lockdep_assert_held(&mvm->mutex);
 
        mvmvif->low_latency = value;
 
-       return iwl_mvm_update_quotas(mvm, NULL);
+       res = iwl_mvm_update_quotas(mvm, NULL);
+       if (res)
+               return res;
+       return iwl_mvm_power_update_mode(mvm, vif);
 }