History

Merge tag 'iwlwifi-fixes-2025-07-15' of https://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next

Miri Korenblit says: ==================== iwlwifi-fixes - missing unlock in error path - Avoid FW assert on bad command values - fix kernel panic due to incorrect index calculation ====================

Johannes Berg committed 1 year ago

Commit bbc19fe2 parents 444020f 46345ed5 files · +15 −9Browse files

Unified · Split

5 files
  1. drivers/net/wireless/intel/iwlwifi/fw/api/nvm-reg.h +3 −2
  2. drivers/net/wireless/intel/iwlwifi/fw/regulatory.c +1 −0
  3. drivers/net/wireless/intel/iwlwifi/mld/regulatory.c +3 −1
  4. drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c +4 −2
  5. drivers/net/wireless/intel/iwlwifi/pcie/tx.c +4 −4
drivers/net/wireless/intel/iwlwifi/fw/api/nvm-reg.h+3−2
@@ -1,6 +1,6 @@
11 /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
22 /*
3− * Copyright (C) 2012-2014, 2018-2024 Intel Corporation
3+ * Copyright (C) 2012-2014, 2018-2025 Intel Corporation
44 * Copyright (C) 2013-2015 Intel Mobile Communications GmbH
55 * Copyright (C) 2016-2017 Intel Deutschland GmbH
66 */
@@ -754,7 +754,7 @@ struct iwl_lari_config_change_cmd_v10 { · 747 unmodified lines
754754 * according to the BIOS definitions.
755755 * For LARI cmd version 11 - bits 0:4 are supported.
756756 * For LARI cmd version 12 - bits 0:6 are supported and bits 7:31 are
757− * reserved. No need to mask out the reserved bits.
757+ * reserved.
758758 * @force_disable_channels_bitmap: Bitmap of disabled bands/channels.
759759 * Each bit represents a set of channels in a specific band that should be
760760 * disabled
@@ -787,6 +787,7 @@ struct iwl_lari_config_change_cmd { · 26 unmodified lines
787787 /* Activate UNII-1 (5.2GHz) for World Wide */
788788 #define ACTIVATE_5G2_IN_WW_MASK BIT(4)
789789 #define CHAN_STATE_ACTIVE_BITMAP_CMD_V11 0x1F
790+#define CHAN_STATE_ACTIVE_BITMAP_CMD_V12 0x7F
790791
791792 /**
792793 * struct iwl_pnvm_init_complete_ntfy - PNVM initialization complete
drivers/net/wireless/intel/iwlwifi/fw/regulatory.c+1−0
@@ -614,6 +614,7 @@ int iwl_fill_lari_config(struct iwl_fw_runtime *fwrt, · 613 unmodified lines
614614
615615 ret = iwl_bios_get_dsm(fwrt, DSM_FUNC_ACTIVATE_CHANNEL, &value);
616616 if (!ret) {
617+ value &= CHAN_STATE_ACTIVE_BITMAP_CMD_V12;
617618 if (cmd_ver < 8)
618619 value &= ~ACTIVATE_5G2_IN_WW_MASK;
619620
drivers/net/wireless/intel/iwlwifi/mld/regulatory.c+3−1
@@ -251,8 +251,10 @@ void iwl_mld_configure_lari(struct iwl_mld *mld) · 250 unmodified lines
251251 cpu_to_le32(value &= DSM_UNII4_ALLOW_BITMAP);
252252
253253 ret = iwl_bios_get_dsm(fwrt, DSM_FUNC_ACTIVATE_CHANNEL, &value);
254− if (!ret)
254+ if (!ret) {
255+ value &= CHAN_STATE_ACTIVE_BITMAP_CMD_V12;
255256 cmd.chan_state_active_bitmap = cpu_to_le32(value);
257+ }
256258
257259 ret = iwl_bios_get_dsm(fwrt, DSM_FUNC_ENABLE_6E, &value);
258260 if (!ret)
drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c+4−2
@@ -546,8 +546,10 @@ again: · 545 unmodified lines
546546 }
547547
548548 if (WARN_ON(trans->do_top_reset &&
549− trans->mac_cfg->device_family < IWL_DEVICE_FAMILY_SC))
550− return -EINVAL;
549+ trans->mac_cfg->device_family < IWL_DEVICE_FAMILY_SC)) {
550+ ret = -EINVAL;
551+ goto out;
552+ }
551553
552554 /* we need to wait later - set state */
553555 if (trans->do_top_reset)
drivers/net/wireless/intel/iwlwifi/pcie/tx.c+4−4
@@ -2101,10 +2101,10 @@ static void iwl_txq_gen1_update_byte_cnt_tbl(struct iwl_trans *trans, · 2100 unmodified lines
21012101
21022102 bc_ent = cpu_to_le16(len | (sta_id << 12));
21032103
2104− scd_bc_tbl[txq_id * BC_TABLE_SIZE + write_ptr].tfd_offset = bc_ent;
2104+ scd_bc_tbl[txq_id * TFD_QUEUE_BC_SIZE + write_ptr].tfd_offset = bc_ent;
21052105
21062106 if (write_ptr < TFD_QUEUE_SIZE_BC_DUP)
2107− scd_bc_tbl[txq_id * BC_TABLE_SIZE + TFD_QUEUE_SIZE_MAX + write_ptr].tfd_offset =
2107+ scd_bc_tbl[txq_id * TFD_QUEUE_BC_SIZE + TFD_QUEUE_SIZE_MAX + write_ptr].tfd_offset =
21082108 bc_ent;
21092109 }
21102110
@@ -2328,10 +2328,10 @@ static void iwl_txq_gen1_inval_byte_cnt_tbl(struct iwl_trans *trans, · 217 unmodified lines
23282328
23292329 bc_ent = cpu_to_le16(1 | (sta_id << 12));
23302330
2331− scd_bc_tbl[txq_id * BC_TABLE_SIZE + read_ptr].tfd_offset = bc_ent;
2331+ scd_bc_tbl[txq_id * TFD_QUEUE_BC_SIZE + read_ptr].tfd_offset = bc_ent;
23322332
23332333 if (read_ptr < TFD_QUEUE_SIZE_BC_DUP)
2334− scd_bc_tbl[txq_id * BC_TABLE_SIZE + TFD_QUEUE_SIZE_MAX + read_ptr].tfd_offset =
2334+ scd_bc_tbl[txq_id * TFD_QUEUE_BC_SIZE + TFD_QUEUE_SIZE_MAX + read_ptr].tfd_offset =
23352335 bc_ent;
23362336 }
23372337

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t