Commit 73f23d91 authored by Shaul Triebitz's avatar Shaul Triebitz Committed by Luca Coelho
Browse files

iwlwifi: mvm: set properly station flags in STA_HE_CTXT_CMD



For ACK_ENABLED and 32BIT_BA_BITMAP flags check the station capabilities
rather than bss_conf.ack_enabled and bss_conf.multi_sta_back_32bit.
These fields are stations capabilities and should not be in bss_conf.
Also note that the bss_conf flags are set in station mode only.
In the next patch I will remove ack_enabled and multi_sta_back_32bit
from the bss_conf structure.

Signed-off-by: default avatarShaul Triebitz <shaul.triebitz@intel.com>
Signed-off-by: default avatarLuca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20200424182644.bc7230b74f93.I144f73cd6a797a7060429981fee62572861bc76b@changeid
parent a65a5824
Loading
Loading
Loading
Loading
+9 −5
Original line number Diff line number Diff line
@@ -2179,6 +2179,15 @@ static void iwl_mvm_cfg_he_sta(struct iwl_mvm *mvm,
			flags |= STA_CTXT_HE_PACKET_EXT;
		}
	}

	if (sta->he_cap.he_cap_elem.mac_cap_info[2] &
	    IEEE80211_HE_MAC_CAP2_32BIT_BA_BITMAP)
		flags |= STA_CTXT_HE_32BIT_BA_BITMAP;

	if (sta->he_cap.he_cap_elem.mac_cap_info[2] &
	    IEEE80211_HE_MAC_CAP2_ACK_EN)
		flags |= STA_CTXT_HE_ACK_ENABLED;

	rcu_read_unlock();

	/* Mark MU EDCA as enabled, unless none detected on some AC */
@@ -2203,11 +2212,6 @@ static void iwl_mvm_cfg_he_sta(struct iwl_mvm *mvm,
			cpu_to_le16(mu_edca->mu_edca_timer);
	}

	if (vif->bss_conf.multi_sta_back_32bit)
		flags |= STA_CTXT_HE_32BIT_BA_BITMAP;

	if (vif->bss_conf.ack_enabled)
		flags |= STA_CTXT_HE_ACK_ENABLED;

	if (vif->bss_conf.uora_exists) {
		flags |= STA_CTXT_HE_TRIG_RND_ALLOC;