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>
This commit is contained in:

committed by
Luca Coelho

parent
dad3340fd9
commit
09f1ee8cc1
@@ -1032,12 +1032,34 @@ int iwl_mvm_update_low_latency(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
|
||||
{
|
||||
struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
|
||||
int res;
|
||||
bool low_latency;
|
||||
|
||||
lockdep_assert_held(&mvm->mutex);
|
||||
|
||||
if (iwl_mvm_vif_low_latency(mvmvif) == prev)
|
||||
low_latency = iwl_mvm_vif_low_latency(mvmvif);
|
||||
|
||||
if (low_latency == prev)
|
||||
return 0;
|
||||
|
||||
if (fw_has_capa(&mvm->fw->ucode_capa,
|
||||
IWL_UCODE_TLV_CAPA_DYNAMIC_QUOTA)) {
|
||||
struct iwl_mac_low_latency_cmd cmd = {
|
||||
.mac_id = cpu_to_le32(mvmvif->id)
|
||||
};
|
||||
|
||||
if (low_latency) {
|
||||
/* currently we don't care about the direction */
|
||||
cmd.low_latency_rx = 1;
|
||||
cmd.low_latency_tx = 1;
|
||||
}
|
||||
res = iwl_mvm_send_cmd_pdu(mvm,
|
||||
iwl_cmd_id(LOW_LATENCY_CMD,
|
||||
MAC_CONF_GROUP, 0),
|
||||
0, sizeof(cmd), &cmd);
|
||||
if (res)
|
||||
IWL_ERR(mvm, "Failed to send low latency command\n");
|
||||
}
|
||||
|
||||
res = iwl_mvm_update_quotas(mvm, false, NULL);
|
||||
if (res)
|
||||
return res;
|
||||
|
Reference in New Issue
Block a user