wifi: iwlwifi: mvm: fix getting LDPC/STBC support
authorMukesh Sisodiya <mukesh.sisodiya@intel.com>
Mon, 12 Jun 2023 15:51:08 +0000 (18:51 +0300)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 14 Jun 2023 10:32:17 +0000 (12:32 +0200)
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: Mukesh Sisodiya <mukesh.sisodiya@intel.com>
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Link: https://lore.kernel.org/r/20230612184434.5a8856739b11.I6af4a55b22ed856f484ba77f87723dceec4904f2@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/intel/iwlwifi/mvm/tx.c

index 5fa6f98b8e55a91792558abe5d9194b41388adc7..ccd1e41604f3ca8fcd3d36a938bc1fe52ed6a9c8 100644 (file)
@@ -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;