RE: [PATCH 2/2] wifi: iwlwifi: mld: Fix injected 5 GHz legacy rate
From: Korenblit, Miriam Rachel
Date: Mon Oct 12 2026 - 06:18:35 EST
> -----Original Message-----
> From: benthecarman via B4 Relay
> <devnull+benthecarman1.gmail.com@xxxxxxxxxx>
> Sent: Saturday, October 10, 2026 5:42 AM
> To: Korenblit, Miriam Rachel <miriam.rachel.korenblit@xxxxxxxxx>
> Cc: Johannes Berg <johannes@xxxxxxxxxxxxxxxx>; linux-wireless@xxxxxxxxxxxxxxx;
> linux-kernel@xxxxxxxxxxxxxxx; benthecarman <benthecarman@xxxxxxxx>
> Subject: [PATCH 2/2] wifi: iwlwifi: mld: Fix injected 5 GHz legacy rate
>
> From: benthecarman <benthecarman@xxxxxxxx>
>
> iwl_mld_get_inject_tx_rate() hands the legacy rate index from mac80211 to
> iwl_mld_mac80211_rate_idx_to_fw(), which expects the driver's rate indices.
> Outside 2.4 GHz the mac80211 index points into a bitrate table that starts at 6
> Mbps, so a 12 Mbps injection on 5 or 6 GHz goes out as 5.5 Mbps CCK.
>
> Add IWL_FIRST_OFDM_RATE outside 2.4 GHz, as mvm does for frames that are
> not injected.
>
> Fixes: d1e879ec600f ("wifi: iwlwifi: add iwlmld sub-driver")
> Assisted-by: Claude:claude-opus-5-5
> Signed-off-by: benthecarman <benthecarman@xxxxxxxx>
Please use a proper readable user name.
> ---
> drivers/net/wireless/intel/iwlwifi/mld/tx.c | 11 ++++++++++-
> 1 file changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/wireless/intel/iwlwifi/mld/tx.c
> b/drivers/net/wireless/intel/iwlwifi/mld/tx.c
> index fc501ac0c..317573b5e 100644
> --- a/drivers/net/wireless/intel/iwlwifi/mld/tx.c
> +++ b/drivers/net/wireless/intel/iwlwifi/mld/tx.c
> @@ -599,7 +599,16 @@ static u32 iwl_mld_get_inject_tx_rate(struct iwl_mld
> *mld,
> if (u32_get_bits(info->flags, IEEE80211_TX_CTL_STBC))
> result |= RATE_MCS_STBC_MSK;
> } else {
> - result = iwl_mld_mac80211_rate_idx_to_fw(mld, info, rate-
> >idx);
> + int rate_idx = rate->idx;
> +
> + /*
> + * mac80211 indexes the band's bitrates, which start at
> + * 6 Mbps outside 2.4 GHz; remap to our rate indices.
> + */
> + if (info->band != NL80211_BAND_2GHZ)
> + rate_idx += IWL_FIRST_OFDM_RATE;
> +
> + result = iwl_mld_mac80211_rate_idx_to_fw(mld, info, rate_idx);
> }
>
> if (info->control.antennas)
>
> --
> 2.55.0
>