Commit 33acbe6a authored by Johannes Berg's avatar Johannes Berg
Browse files

wifi: iwlwifi: mvm: store WMM params per link



We have the data structure set up to store the parameters
per link, but weren't using them. Fix that and store them
in the right link.

Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarGregory Greenman <gregory.greenman@intel.com>
Link: https://lore.kernel.org/r/20230614123446.332c4949a1be.Icae03975d578b0cc82279911a1ea7cbc313046d6@changeid


Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent df6791e7
Loading
Loading
Loading
Loading
+9 −4
Original line number Diff line number Diff line
@@ -470,19 +470,24 @@ void iwl_mvm_set_fw_qos_params(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
			       struct iwl_ac_qos *ac, __le32 *qos_flags)
{
	struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
	struct iwl_mvm_vif_link_info *mvm_link =
		mvmvif->link[link_conf->link_id];
	int i;

	if (!mvm_link)
		return;

	for (i = 0; i < IEEE80211_NUM_ACS; i++) {
		u8 txf = iwl_mvm_mac_ac_to_tx_fifo(mvm, i);
		u8 ucode_ac = iwl_mvm_mac80211_ac_to_ucode_ac(i);

		ac[ucode_ac].cw_min =
			cpu_to_le16(mvmvif->deflink.queue_params[i].cw_min);
			cpu_to_le16(mvm_link->queue_params[i].cw_min);
		ac[ucode_ac].cw_max =
			cpu_to_le16(mvmvif->deflink.queue_params[i].cw_max);
			cpu_to_le16(mvm_link->queue_params[i].cw_max);
		ac[ucode_ac].edca_txop =
			cpu_to_le16(mvmvif->deflink.queue_params[i].txop * 32);
		ac[ucode_ac].aifsn = mvmvif->deflink.queue_params[i].aifs;
			cpu_to_le16(mvm_link->queue_params[i].txop * 32);
		ac[ucode_ac].aifsn = mvm_link->queue_params[i].aifs;
		ac[ucode_ac].fifos_mask = BIT(txf);
	}

+6 −2
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
/*
 * Copyright (C) 2022 Intel Corporation
 * Copyright (C) 2022-2023 Intel Corporation
 */
#include "mvm.h"

@@ -820,8 +820,12 @@ iwl_mvm_mld_mac_conf_tx(struct ieee80211_hw *hw,
{
	struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw);
	struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
	struct iwl_mvm_vif_link_info *mvm_link = mvmvif->link[link_id];

	mvmvif->deflink.queue_params[ac] = *params;
	if (!mvm_link)
		return -EINVAL;

	mvm_link->queue_params[ac] = *params;

	/* No need to update right away, we'll get BSS_CHANGED_QOS
	 * The exception is P2P_DEVICE interface which needs immediate update.