diff options
author | Shaul Triebitz <shaul.triebitz@intel.com> | 2017-12-10 10:11:38 -0500 |
---|---|---|
committer | Luca Coelho <luciano.coelho@intel.com> | 2017-12-20 11:28:25 -0500 |
commit | 09f1ee8cc1fc59f6795550f378e57e204698ed65 (patch) | |
tree | 7033d73d5744311a94ffbb2ba19e71f626937b9b /drivers/net/wireless/intel/iwlwifi/mvm/utils.c | |
parent | dad3340fd988173aa79afb03941416c85f82ac0c (diff) |
iwlwifi: mvm: send the low latency command
Recently a new command was added to the firmware
for setting a MAC's low-latency mode. Use it.
Signed-off-by: Shaul Triebitz <shaul.triebitz@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.c | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/utils.c b/drivers/net/wireless/intel/iwlwifi/mvm/utils.c index b2e9a79d4186..2fead5eb63fe 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/utils.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/utils.c | |||
@@ -1032,12 +1032,34 @@ int iwl_mvm_update_low_latency(struct iwl_mvm *mvm, struct ieee80211_vif *vif, | |||
1032 | { | 1032 | { |
1033 | struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); | 1033 | struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); |
1034 | int res; | 1034 | int res; |
1035 | bool low_latency; | ||
1035 | 1036 | ||
1036 | lockdep_assert_held(&mvm->mutex); | 1037 | lockdep_assert_held(&mvm->mutex); |
1037 | 1038 | ||
1038 | if (iwl_mvm_vif_low_latency(mvmvif) == prev) | 1039 | low_latency = iwl_mvm_vif_low_latency(mvmvif); |
1040 | |||
1041 | if (low_latency == prev) | ||
1039 | return 0; | 1042 | return 0; |
1040 | 1043 | ||
1044 | if (fw_has_capa(&mvm->fw->ucode_capa, | ||
1045 | IWL_UCODE_TLV_CAPA_DYNAMIC_QUOTA)) { | ||
1046 | struct iwl_mac_low_latency_cmd cmd = { | ||
1047 | .mac_id = cpu_to_le32(mvmvif->id) | ||
1048 | }; | ||
1049 | |||
1050 | if (low_latency) { | ||
1051 | /* currently we don't care about the direction */ | ||
1052 | cmd.low_latency_rx = 1; | ||
1053 | cmd.low_latency_tx = 1; | ||
1054 | } | ||
1055 | res = iwl_mvm_send_cmd_pdu(mvm, | ||
1056 | iwl_cmd_id(LOW_LATENCY_CMD, | ||
1057 | MAC_CONF_GROUP, 0), | ||
1058 | 0, sizeof(cmd), &cmd); | ||
1059 | if (res) | ||
1060 | IWL_ERR(mvm, "Failed to send low latency command\n"); | ||
1061 | } | ||
1062 | |||
1041 | res = iwl_mvm_update_quotas(mvm, false, NULL); | 1063 | res = iwl_mvm_update_quotas(mvm, false, NULL); |
1042 | if (res) | 1064 | if (res) |
1043 | return res; | 1065 | return res; |