Skip to content

Commit 83f3ac2

Browse files
ColinIanKingMiriam-Rachel
authored andcommitted
wifi: iwlwifi: Fix incorrect logic on cmd_ver range checking
The current cmd_ver range checking on cmd_ver < 1 && cmd_ver > 3 can never be true because the logical operator && is being used, cmd_ver can never be less than 1 and also greater than 3. Fix this by using the logical || operator. Fixes: df6146a ("wifi: iwlwifi: Add a new version for mac config command") Signed-off-by: Colin Ian King <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Miri Korenblit <[email protected]>
1 parent 432a412 commit 83f3ac2

File tree

1 file changed

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

1 file changed

+1
-1
lines changed

drivers/net/wireless/intel/iwlwifi/mvm/mld-mac.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ static void iwl_mvm_mld_mac_ctxt_cmd_common(struct iwl_mvm *mvm,
3434
WIDE_ID(MAC_CONF_GROUP,
3535
MAC_CONFIG_CMD), 0);
3636

37-
if (WARN_ON(cmd_ver < 1 && cmd_ver > 3))
37+
if (WARN_ON(cmd_ver < 1 || cmd_ver > 3))
3838
return;
3939

4040
cmd->id_and_color = cpu_to_le32(mvmvif->id);

0 commit comments

Comments
 (0)