aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/intel/iwlwifi/mvm/utils.c
diff options
context:
space:
mode:
authorSara Sharon <sara.sharon@intel.com>2017-12-27 05:16:33 -0500
committerLuca Coelho <luciano.coelho@intel.com>2018-03-28 15:43:40 -0400
commit9b137866f9a2699698cfffb0b7729331a419d617 (patch)
tree235ad00028f48f18fc688a75d021d22457b5b23f /drivers/net/wireless/intel/iwlwifi/mvm/utils.c
parent8f27036a0e380c6ede67a8d2a132327fcb760ace (diff)
iwlwifi: mvm: save low latency causes in an enum
Currently we have a boolean variable for each cause. This costs space, and requires to check each separately when determining low latency. Since we have another cause incoming, convert it to an enum. While at it, move the retrieval of the prev value and the assignment of the new value to be inside iwl_mvm_update_low_latency and save the need for each caller to do it separately. Signed-off-by: Sara Sharon <sara.sharon@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/mvm/utils.c')
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mvm/utils.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/utils.c b/drivers/net/wireless/intel/iwlwifi/mvm/utils.c
index 70f8b8eb6117..bebcfb44c8c2 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/utils.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/utils.c
@@ -1034,14 +1034,18 @@ bool iwl_mvm_rx_diversity_allowed(struct iwl_mvm *mvm)
1034} 1034}
1035 1035
1036int iwl_mvm_update_low_latency(struct iwl_mvm *mvm, struct ieee80211_vif *vif, 1036int iwl_mvm_update_low_latency(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
1037 bool prev) 1037 bool low_latency,
1038 enum iwl_mvm_low_latency_cause cause)
1038{ 1039{
1039 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); 1040 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
1040 int res; 1041 int res;
1041 bool low_latency; 1042 bool prev;
1042 1043
1043 lockdep_assert_held(&mvm->mutex); 1044 lockdep_assert_held(&mvm->mutex);
1044 1045
1046 prev = iwl_mvm_vif_low_latency(mvmvif);
1047 iwl_mvm_vif_set_low_latency(mvmvif, low_latency, cause);
1048
1045 low_latency = iwl_mvm_vif_low_latency(mvmvif); 1049 low_latency = iwl_mvm_vif_low_latency(mvmvif);
1046 1050
1047 if (low_latency == prev) 1051 if (low_latency == prev)