From: benthecarman via B4 Relay <devnull+benthecarman1.gmail.com@kernel.org>
To: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Cc: Johannes Berg <johannes@sipsolutions.net>,
linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org,
benthecarman <benthecarman@live.com>
Subject: [PATCH 1/2] wifi: iwlwifi: mvm: Fix injected 5 GHz legacy rate
Date: Fri, 09 Oct 2026 21:42:22 -0500 [thread overview]
Message-ID: <20261009-next-v1-1-b370f5302d27@gmail.com> (raw)
In-Reply-To: <20261009-next-v1-0-b370f5302d27@gmail.com>
From: benthecarman <benthecarman@live.com>
iwl_mvm_get_inject_tx_rate() passes the legacy rate index from
mac80211 straight to iwl_mvm_convert_rate_idx(). That index points
into the band's own bitrate table, which outside 2.4 GHz starts at
6 Mbps (iwl_cfg80211_rates[RATES_52_OFFS]), while the driver's indices
start with the four CCK rates. A frame injected at 12 Mbps on 5 or
6 GHz, index 2, therefore goes out as 5.5 Mbps CCK, which no receiver
on those bands can decode.
The non-injected path, iwl_mvm_get_tx_rate(), already adds
IWL_FIRST_OFDM_RATE outside 2.4 GHz. Do the same for injection.
Seen on an AX211 injecting data frames at 12 Mbps on channel 44: the
TX response showed rate_n_flags 0x8002 (CCK) and the peer never ACKed.
With this change it shows 0x8102 (12 Mbps OFDM) and every unicast
frame is ACKed on the first attempt.
Fixes: b99c4607973a ("wifi: iwlwifi: mvm: refactor TX rate handling")
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: benthecarman <benthecarman@live.com>
---
drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c
index d3c2fe830..fb7e48aa3 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c
@@ -331,6 +331,14 @@ static u32 iwl_mvm_get_inject_tx_rate(struct iwl_mvm *mvm,
} else {
int rate_idx = info->control.rates[0].idx;
+ /*
+ * mac80211 indexes the band's bitrates, which start at
+ * 6 Mbps outside 2.4 GHz; remap to our rate indices as
+ * iwl_mvm_get_tx_rate() does.
+ */
+ if (info->band != NL80211_BAND_2GHZ)
+ rate_idx += IWL_FIRST_OFDM_RATE;
+
result = iwl_mvm_convert_rate_idx(mvm, info, rate_idx);
}
--
2.55.0
next prev parent reply other threads:[~2026-10-10 2:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-10 2:42 [PATCH 0/2] wifi: iwlwifi: fix legacy-rate injection outside 2.4 GHz benthecarman via B4 Relay
2026-10-10 2:42 ` benthecarman via B4 Relay [this message]
2026-10-10 2:42 ` [PATCH 2/2] wifi: iwlwifi: mld: Fix injected 5 GHz legacy rate benthecarman via B4 Relay
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261009-next-v1-1-b370f5302d27@gmail.com \
--to=devnull+benthecarman1.gmail.com@kernel.org \
--cc=benthecarman1@gmail.com \
--cc=benthecarman@live.com \
--cc=johannes@sipsolutions.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=miriam.rachel.korenblit@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®