Commit cda2e9d7 authored by Mukesh Sisodiya's avatar Mukesh Sisodiya Committed by Johannes Berg
Browse files

wifi: iwlwifi: mvm: fix getting LDPC/STBC support



Use flags field from struct ieee80211_tx_info in order to get
LDPC/STBC support. The rate parameter, used originally, is 16
bits only and does not have details of LDPC/STBC support.

Signed-off-by: default avatarMukesh Sisodiya <mukesh.sisodiya@intel.com>
Signed-off-by: default avatarGregory Greenman <gregory.greenman@intel.com>
Link: https://lore.kernel.org/r/20230612184434.5a8856739b11.I6af4a55b22ed856f484ba77f87723dceec4904f2@changeid


Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent ea05ef3f
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -343,9 +343,9 @@ static u32 iwl_mvm_get_inject_tx_rate(struct iwl_mvm *mvm,
			result |= RATE_MCS_SGI_MSK_V1;
		if (rate->flags & IEEE80211_TX_RC_40_MHZ_WIDTH)
			result |= u32_encode_bits(1, RATE_MCS_CHAN_WIDTH_MSK_V1);
		if (rate->flags & IEEE80211_TX_CTL_LDPC)
		if (info->flags & IEEE80211_TX_CTL_LDPC)
			result |= RATE_MCS_LDPC_MSK_V1;
		if (u32_get_bits(rate->flags, IEEE80211_TX_CTL_STBC))
		if (u32_get_bits(info->flags, IEEE80211_TX_CTL_STBC))
			result |= RATE_MCS_STBC_MSK;
	} else {
		return 0;