]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
wifi: iwlwifi: mvm: fix driver-set TX rates on old devices
authorJohannes Berg <johannes.berg@intel.com>
Fri, 15 May 2026 12:14:57 +0000 (15:14 +0300)
committerMiri Korenblit <miriam.rachel.korenblit@intel.com>
Sat, 16 May 2026 20:31:25 +0000 (23:31 +0300)
commitfb84b5cbcaab3ca0f4e961d92a40ed7f3aac483b
tree7302472617bfda10792a18eb59b5a8a9f7049df5
parentd733ed481fd20a8e7bfe5119c4e77761ba3f87ee
wifi: iwlwifi: mvm: fix driver-set TX rates on old devices

On old devices such as 7265D, rates are still encoded in version 1
format, which doesn't use the CCK/OFDM rate index (0-3/0-7) but
rather their PLCP value (e.g. 10 for 1 Mbps CCK rate.)

While introducing v3 rates, I changed the driver from internally
handling v1 rates and converting to v2, to internally handling v3
and converting to v1 or v2 according to the firmware. I accordingly
changed the code in iwl_mvm_mac80211_idx_to_hwrate() to no longer
have different values for different APIs. This was correct.

However, I later reverted this part of the change, because it was
reported that I had broken beacon rates, causing a FW assert/crash.
This caused TX_CMD rates to be set incorrectly, potentially causing
a warning when reported back from the device as having been used.

Fix this (hopefully correctly now) by handling beacon rates in the
TX_CMD that's embedded in the beacon template command separately.
Restore iwl_mvm_mac80211_idx_to_hwrate() to return only the rate
index, not PLCP value, fixing the real TX_CMD.

Cc: stable@vger.kernel.org
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20260515151351.7407e293dff7.I4ea1a17f8fe99c933d3f3e30d077cf4246125c3e@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c
drivers/net/wireless/intel/iwlwifi/mvm/utils.c