Commit 4e6b69ec authored by Johannes Berg's avatar Johannes Berg Committed by Luca Coelho
Browse files

iwlwifi: mvm: fix ieee80211_get_he_iftype_cap() iftype



We should consider the P2P interface type, which isn't in
vif->type due to mac80211's special handling of that. Use
ieee80211_vif_type_p2p() to convert appropriately.

Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarLuca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20211017113927.8e992a3beee2.I4231ac8a7ae8f844e35a1ec221baf3e2b676e765@changeid


Signed-off-by: default avatarLuca Coelho <luciano.coelho@intel.com>
parent 595c230b
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -2022,7 +2022,8 @@ static void iwl_mvm_cfg_he_sta(struct iwl_mvm *mvm,
	}

	sband = mvm->hw->wiphy->bands[chanctx_conf->def.chan->band];
	own_he_cap = ieee80211_get_he_iftype_cap(sband, vif->type);
	own_he_cap = ieee80211_get_he_iftype_cap(sband,
						 ieee80211_vif_type_p2p(vif));

	sta = rcu_dereference(mvm->fw_id_to_mac_id[sta_ctxt_cmd.sta_id]);
	if (IS_ERR_OR_NULL(sta)) {