Skip to content

Commit 788e4c7

Browse files
egrumbachjmberg-intel
authored andcommitted
wifi: iwlwifi: mvm: fix a crash on 7265
Since IWL_FW_CMD_VER_UNKNOWN = 99, then my change to consider cmd_ver >= 7 instead of cmd_ver = 7 included also firmwares that don't advertise the command version at all. This made us send a command with a bad size and because of that, the firmware hit a BAD_COMMAND immediately after handling the REDUCE_TX_POWER_CMD command. Fixes: 8f892e2 ("wifi: iwlwifi: mvm: support iwl_dev_tx_power_cmd_v8") Signed-off-by: Emmanuel Grumbach <[email protected]> Reviewed-by: Johannes Berg <[email protected]> Signed-off-by: Miri Korenblit <[email protected]> Link: https://msgid.link/20240512072733.eb20ff5050d3.Ie4fc6f5496cd296fd6ff20d15e98676f28a3cccd@changeid Signed-off-by: Johannes Berg <[email protected]>
1 parent 98b7017 commit 788e4c7

File tree

1 file changed

+2
-2
lines changed
  • drivers/net/wireless/intel/iwlwifi/mvm

1 file changed

+2
-2
lines changed

drivers/net/wireless/intel/iwlwifi/mvm/fw.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -895,8 +895,8 @@ int iwl_mvm_sar_select_profile(struct iwl_mvm *mvm, int prof_a, int prof_b)
895895
int ret;
896896
u16 len = 0;
897897
u32 n_subbands;
898-
u8 cmd_ver = iwl_fw_lookup_cmd_ver(mvm->fw, cmd_id,
899-
IWL_FW_CMD_VER_UNKNOWN);
898+
u8 cmd_ver = iwl_fw_lookup_cmd_ver(mvm->fw, cmd_id, 3);
899+
900900
if (cmd_ver >= 7) {
901901
len = sizeof(cmd.v7);
902902
n_subbands = IWL_NUM_SUB_BANDS_V2;

0 commit comments

Comments
 (0)