diff mbox series

[for,v5.17,1/8] iwlwifi: mvm: fix condition which checks the version of rate_n_flags

Message ID iwlwifi.20220128142706.a264ac51d106.I228ba1317cdcbfef931c09d280d701fcad9048d2@changeid (mailing list archive)
State Accepted
Commit be8287c9b8326d767429c8371bbc78b33f6efe13
Delegated to: Kalle Valo
Headers show
Series iwlwifi: fixes intended for v5.17 2022-01-28 | expand

Commit Message

Luca Coelho Jan. 28, 2022, 12:30 p.m. UTC
From: Miri Korenblit <miriam.rachel.korenblit@intel.com>

We're checking the FW version of TX_CMD in order to decide whether to
convert rate_n_flags from the old format to the new one.  If the API
is smaller or equal to 6 we should convert it.  Currently we're
converting if the API version is greater than 6. Fix it.

Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Fixes: dc52fac37c87 ("iwlwifi: mvm: Support new TX_RSP and COMPRESSED_BA_RES versions")
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
 drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Kalle Valo Feb. 3, 2022, 8:25 a.m. UTC | #1
Luca Coelho <luca@coelho.fi> wrote:

> From: Miri Korenblit <miriam.rachel.korenblit@intel.com>
> 
> We're checking the FW version of TX_CMD in order to decide whether to
> convert rate_n_flags from the old format to the new one.  If the API
> is smaller or equal to 6 we should convert it.  Currently we're
> converting if the API version is greater than 6. Fix it.
> 
> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
> Fixes: dc52fac37c87 ("iwlwifi: mvm: Support new TX_RSP and COMPRESSED_BA_RES versions")
> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>

8 patches applied to wireless.git, thanks.

be8287c9b832 iwlwifi: mvm: fix condition which checks the version of rate_n_flags
973f02c932b0 iwlwifi: fix iwl_legacy_rate_to_fw_idx
e9848aed1477 iwlwifi: pcie: fix locking when "HW not ready"
4c29c1e27a1e iwlwifi: pcie: gen2: fix locking when "HW not ready"
e1849784de9b iwlwifi: mei: fix the pskb_may_pull check in ipv4
44bf7c4667ef iwlwifi: mei: retry mapping the shared area
7cf800f46e07 iwlwifi: mvm: don't feed the hardware RFKILL into iwlmei
30de48b436a0 iwlwifi: mei: report RFKILL upon register when needed
diff mbox series

Patch

diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c
index 6fa2c12f7955..9213f8518f10 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c
@@ -1427,7 +1427,7 @@  static void iwl_mvm_hwrate_to_tx_status(const struct iwl_fw *fw,
 	struct ieee80211_tx_rate *r = &info->status.rates[0];
 
 	if (iwl_fw_lookup_notif_ver(fw, LONG_GROUP,
-				    TX_CMD, 0) > 6)
+				    TX_CMD, 0) <= 6)
 		rate_n_flags = iwl_new_rate_from_v1(rate_n_flags);
 
 	info->status.antenna =