From: Emmanuel Grumbach he_type_bits holds the HE type field of a v1 rate, which sits in bits 23:22, but it was compared against RATE_MCS_HE_TYPE_SU and RATE_MCS_HE_TYPE_EXT_SU, which are the v2/v3 values living in bits 24:23. Because of that, the GI bit was incorrect. Use the v1 constants to fix this. Assisted-by: LLM Fixes: 973f02c932b0 ("iwlwifi: fix iwl_legacy_rate_to_fw_idx") Signed-off-by: Emmanuel Grumbach Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/mvm/utils.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/utils.c b/drivers/net/wireless/intel/iwlwifi/mvm/utils.c index b2f34d1f2c48..df2677615cff 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/utils.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/utils.c @@ -1272,8 +1272,8 @@ u32 iwl_mvm_v3_rate_from_fw(__le32 rate, u8 rate_ver) u32 he_gi_ltf = (rate_v1 & RATE_MCS_HE_GI_LTF_MSK_V1) >> RATE_MCS_HE_GI_LTF_POS; - if ((he_type_bits == RATE_MCS_HE_TYPE_SU || - he_type_bits == RATE_MCS_HE_TYPE_EXT_SU) && + if ((he_type_bits == RATE_MCS_HE_TYPE_SU_V1 || + he_type_bits == RATE_MCS_HE_TYPE_EXT_SU_V1) && he_gi_ltf == RATE_MCS_HE_SU_4_LTF) /* the new rate have an additional bit to * represent the value 4 rather then using SGI -- 2.34.1