@@ -310,7 +310,7 @@ static int iwl_mvm_load_ucode_wait_alive(struct iwl_mvm *mvm,
struct iwl_notification_wait alive_wait;
struct iwl_mvm_alive_data alive_data = {};
const struct fw_img *fw;
- int ret;
+ int i, ret;
enum iwl_ucode_type old_type = mvm->fwrt.cur_fw_img;
static const u16 alive_cmd[] = { MVM_ALIVE };
bool run_in_rfkill =
@@ -413,6 +413,16 @@ static int iwl_mvm_load_ucode_wait_alive(struct iwl_mvm *mvm,
mvm->queue_info[IWL_MVM_DQA_CMD_QUEUE].tid_bitmap =
BIT(IWL_MAX_TID_COUNT + 2);
+ /*
+ * Similarly prevent use of non-existing queues. The range
+ * is from 0 - (num_of_queues-1) or 0 - (IWL_MAX_HW_QUEUES-1)
+ * whichever is smaller. So we need to disable any queues
+ * from num_of_queues to IWL_MAX_HW_QUEUES.
+ */
+ for (i = mvm->trans->trans_cfg->base_params->num_of_queues;
+ i < IWL_MAX_HW_QUEUES; i++)
+ mvm->queue_info[i].tid_bitmap = BIT(IWL_MAX_TID_COUNT + 2);
+
set_bit(IWL_MVM_STATUS_FIRMWARE_RUNNING, &mvm->status);
#ifdef CONFIG_IWLWIFI_DEBUGFS
iwl_fw_set_dbg_rec_on(&mvm->fwrt);