From patchwork Wed Jun 4 03:13:18 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 894175 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 39EAA86337 for ; Wed, 4 Jun 2025 03:13:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.10 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1749006821; cv=none; b=u1nJzfJyYUAbjQvA6vh18M2N9KghWuL8xFXuOTp1NXE9QdVJ7+iWYToSry2Z8X14Ll2gcTpXNi4XgqxMut+WFTajIubAutr3RxvkdPP/9n0ucoNMxBC3Rgli+lk7ro+EAn15Rs0ws8gyCOMWUXGU8DRG098ylHW+iQ6L43F85hg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1749006821; c=relaxed/simple; bh=xxpr9jgU8GPAbQ0BSl8egJF02glbNakBXw84GiAVdPs=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=rfRjIbx3hlWXThy1jDM/J11f9PJ5SXqOQqHgMvOhjUamfUWfnSZjJvchTZs/p72pJtxsl3BW3L5qp3CX3F+LC73NI7PC727fUPLXEJats0WauDYH8N8CELg1OV2ZRG/m/295UxgprP3G9wMXx95dnfWd+Sn1MfewWaKnDE2a/LQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=A97BS69F; arc=none smtp.client-ip=198.175.65.10 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="A97BS69F" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1749006819; x=1780542819; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=xxpr9jgU8GPAbQ0BSl8egJF02glbNakBXw84GiAVdPs=; b=A97BS69FjMS8bwEnKYK6dsdEBoLKzsZbjGRH9PHvCPyW+xa7sAf0Ks0j b9B/nHPfhty18doLGtNa7i9o+5J4ZnD59bbcZeuJZOQ3kPpeiORDuZECt aizSVBfczlBg78tDGn15k1w+T7V2bgXfNp7TlNcflWWQbGjNAR3CLC0Mb gakjH4Llpc27FY/tOUjocIN8t0lAQ77G0bS2bHDxTMezp45qtDGcM9Kxx dn0JNezP454mAAoBwzwfWQgX1Xk/8OfUKUrotZnM7g7bDuilC28/eEXK8 zl8Gfy8ZjYPEf0KG9sdtOJFSToCsLZOdzJ5TphMfo8ZCJMQZe3PsYt0n4 g==; X-CSE-ConnectionGUID: 83mvhxU/QSyo1vVAX9ZACA== X-CSE-MsgGUID: 8aLEbDfgQZ2USCpd9lfXJg== X-IronPort-AV: E=McAfee;i="6700,10204,11453"; a="68504616" X-IronPort-AV: E=Sophos;i="6.16,208,1744095600"; d="scan'208";a="68504616" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Jun 2025 20:13:38 -0700 X-CSE-ConnectionGUID: E915stqTQQe6jlc6fXNlhQ== X-CSE-MsgGUID: JH0iKT/cTYKJZJ0Nz5E2Cg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.16,208,1744095600"; d="scan'208";a="182227348" Received: from weis0040.iil.intel.com ([10.12.217.108]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Jun 2025 20:13:38 -0700 From: Miri Korenblit To: linux-wireless@vger.kernel.org Subject: [PATCH iwlwifi-fixes 1/4] wifi: iwlwifi: mvm: fix assert on suspend Date: Wed, 4 Jun 2025 06:13:18 +0300 Message-Id: <20250604031321.2277481-2-miriam.rachel.korenblit@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250604031321.2277481-1-miriam.rachel.korenblit@intel.com> References: <20250604031321.2277481-1-miriam.rachel.korenblit@intel.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Organization: Intel Israel (74) Limited After using DEFINE_RAW_FLEX, cmd is a pointer to iwl_rxq_sync_cmd, and not a variable containing both the command and notification. Adjust hcmd->data and hcmd->len assignment as well. Fixes: 7438843df8cf ("wifi: iwlwifi: mvm: Avoid -Wflex-array-member-not-at-end warning") Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c index 0f056a6641bd..956b491ae5a4 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c @@ -6360,8 +6360,8 @@ void iwl_mvm_sync_rx_queues_internal(struct iwl_mvm *mvm, (struct iwl_mvm_internal_rxq_notif *)cmd->payload; struct iwl_host_cmd hcmd = { .id = WIDE_ID(DATA_PATH_GROUP, TRIGGER_RX_QUEUES_NOTIF_CMD), - .data[0] = &cmd, - .len[0] = sizeof(cmd), + .data[0] = cmd, + .len[0] = __struct_size(cmd), .data[1] = data, .len[1] = size, .flags = CMD_SEND_IN_RFKILL | (sync ? 0 : CMD_ASYNC), From patchwork Wed Jun 4 03:13:19 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 894419 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 971292144C4 for ; Wed, 4 Jun 2025 03:13:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.10 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1749006822; cv=none; b=J0LYmw++CGLF/3aqB7E77YZe3QzFnk1kQRra6SUW2vTyNJeYmY9iDI89R8IjWqNCXV5HY+q+dmTWzptW4DTnjTBgWGMp48ib84WbOTgnrvWA+bWoh4gG+8UGVahrlbIDuZo8JrWD0UIL9pH+p+wkPiWpIqJ6E/1tXVc0bfQapNo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1749006822; c=relaxed/simple; bh=gUrpGzgF6sYmnUMOullqhTH8FhMNixpEFC6SnUiuSRk=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=I69K0qxEbnbKjhHBArUL4OLCNijtMrqYO28VFvH61jIkCzm6jBjWrc4F6Rw7A1MlS1qXlnuJjSIBslDcliv55m5nR9wMGeU0RQI15s8t88s+X2ypZ/5mJ33CUIW891BNhyvLM0ZrcHDteW2aaJO+xRwVtl1p/OKJao1fERpaTTA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=NJQgfpuZ; arc=none smtp.client-ip=198.175.65.10 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="NJQgfpuZ" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1749006820; x=1780542820; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=gUrpGzgF6sYmnUMOullqhTH8FhMNixpEFC6SnUiuSRk=; b=NJQgfpuZMlnBOYPqa8hcq6xCBKVx8wP78unAWTr+RkSEupZ2W3SA6Rsa Ix2tmVVnZoAQgWrYlub/ESQHSFjFD8aC2cgKv+lpmNADnfrXTxUSq/zEi dRzv///AE53F3Vxga/Y/lU0uFGEXD8oAk4+fNWlYzmaeEZA0EU4/Hw95+ z4x8bTJCQVPUFTAdlpMqLiW2cCu/lYswRqgAmD4pNF43bBbJQO8fnX4SY CC5z50xx7/CYpNwmbvbXeCDp+hr1TEWVAekf3M1gINXVTDYeMaHWR91yo /YfuHk188jOMpZfHnH2F/zpX/1q4Y/ikhGFYnWeN9ou0+d8ERLNkU5Ojm Q==; X-CSE-ConnectionGUID: BDUChX8jTD6V9W/RhqrsVQ== X-CSE-MsgGUID: EO0TU/OjRQutngyW7iX6Nw== X-IronPort-AV: E=McAfee;i="6700,10204,11453"; a="68504617" X-IronPort-AV: E=Sophos;i="6.16,208,1744095600"; d="scan'208";a="68504617" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Jun 2025 20:13:40 -0700 X-CSE-ConnectionGUID: olhW+Ea5TvmrzY1SkWbuAw== X-CSE-MsgGUID: pZ+vT5bfTLGjcJ6iG2HURA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.16,208,1744095600"; d="scan'208";a="182227365" Received: from weis0040.iil.intel.com ([10.12.217.108]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Jun 2025 20:13:39 -0700 From: Miri Korenblit To: linux-wireless@vger.kernel.org Cc: Johannes Berg Subject: [PATCH iwlwifi-fixes 2/4] wifi: iwlwifi: mld: avoid panic on init failure Date: Wed, 4 Jun 2025 06:13:19 +0300 Message-Id: <20250604061200.e0040e0a4b09.Iae469a0abe6bfa3c26d8a88c066bad75c2e8f121@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250604031321.2277481-1-miriam.rachel.korenblit@intel.com> References: <20250604031321.2277481-1-miriam.rachel.korenblit@intel.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Organization: Intel Israel (74) Limited In case of an error during init, in_hw_restart will be set, but it will never get cleared. Instead, we will retry to init again, and then we will act like we are in a restart when we are actually not. This causes (among others) to a NULL pointer dereference when canceling rx_omi::finished_work, that was not even initialized, because we thought that we are in hw_restart. Set in_hw_restart to true only if the fw is running, then we know that FW was loaded successfully and we are not going to the retry loop. Fixes: 7391b2a4f7db ("wifi: iwlwifi: rework firmware error handling") Reviewed-by: Johannes Berg Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/mld/mld.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mld/mld.c b/drivers/net/wireless/intel/iwlwifi/mld/mld.c index 8cdd960c5245..e8820e7cf8fa 100644 --- a/drivers/net/wireless/intel/iwlwifi/mld/mld.c +++ b/drivers/net/wireless/intel/iwlwifi/mld/mld.c @@ -653,7 +653,8 @@ iwl_mld_nic_error(struct iwl_op_mode *op_mode, * It might not actually be true that we'll restart, but the * setting doesn't matter if we're going to be unbound either. */ - if (type != IWL_ERR_TYPE_RESET_HS_TIMEOUT) + if (type != IWL_ERR_TYPE_RESET_HS_TIMEOUT && + mld->fw_status.running) mld->fw_status.in_hw_restart = true; } From patchwork Wed Jun 4 03:13:20 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 894174 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0849D2356DA for ; Wed, 4 Jun 2025 03:13:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.10 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1749006824; cv=none; b=AwCBW/mo1ZnpF6FE/6uutyotII9YQD5ntwKMdzoL4+le+t7QEnyUSeO9xu5avbMFh2gChUlZvkR0UhSy0loDuBkvZKg9YP9n2UA0i7VHfDhjVs5MYGMTkKU0AXhsykOysN4wFG78uDpPVNuWZuxLK9Akp4HWswYsWygnfGgeH1A= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1749006824; c=relaxed/simple; bh=dc/1ZDC3Evbx/JaoLTWNNxoPozMZJPgMN0ZKvLhOqyU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=VXRdYx6ZL9sPrtHpePbk7CwexPyZi2S7iBQphGixQS7OCLNlchLjaaYiG9VlPhUqqVvphLQnT3nrq5TGkCkDgehjjFsSOHPooWQisT0goku0+ugTqQ12ukrtb9cBc+xKhdwblu8ApOcl1Vr0BP/yaLqp/fGPmgaGlZMnIGMo2X8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=UP4iXNWv; arc=none smtp.client-ip=198.175.65.10 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="UP4iXNWv" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1749006822; x=1780542822; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=dc/1ZDC3Evbx/JaoLTWNNxoPozMZJPgMN0ZKvLhOqyU=; b=UP4iXNWv7U+OHl8qSF2hVRiBe7YbInosDwEikHAluyjSoDhVgerLvNsV uzh9EF/J6+Us6JNATsmryUTUm5quQBWtY+Ca+Heq2NAhwdjfxx1X1koYq k1MR19H9bGIBSCTp4w1w8GRayqTgaoZAGEf0XRs+ePPSHtXppWeooAwSZ GNjfihDDxVZFcsYle6O8GqE5iUUj97ISil9lkfnCGJNDVyUvrc1cd4VXF 59in0Ylx3y8A3B8FP3za2Dzvh2IesnPErVzVIY/SQ60NqRuFMYq+nUsCh jThMIL+QVl1s8X470aRwYTDzNd93+fyaW09xyGIQ5JWs2zCmFZdBifbOb g==; X-CSE-ConnectionGUID: Hge58aYqSqmXEp7OV3YHow== X-CSE-MsgGUID: cKJAluATQuejR7ujw02i7A== X-IronPort-AV: E=McAfee;i="6700,10204,11453"; a="68504619" X-IronPort-AV: E=Sophos;i="6.16,208,1744095600"; d="scan'208";a="68504619" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Jun 2025 20:13:41 -0700 X-CSE-ConnectionGUID: JBRhRy7qTPirmgvkrowEHw== X-CSE-MsgGUID: bMa/gPq2S0m5n0itIdFRYQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.16,208,1744095600"; d="scan'208";a="182227376" Received: from weis0040.iil.intel.com ([10.12.217.108]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Jun 2025 20:13:40 -0700 From: Miri Korenblit To: linux-wireless@vger.kernel.org Cc: Johannes Berg , Emmanuel Grumbach Subject: [PATCH iwlwifi-fixes 3/4] wifi: iwlwifi: pcie: fix non-MSIX handshake register Date: Wed, 4 Jun 2025 06:13:20 +0300 Message-Id: <20250604061200.87a849a55086.I2f8571aafa55aa3b936a30b938de9d260592a584@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250604031321.2277481-1-miriam.rachel.korenblit@intel.com> References: <20250604031321.2277481-1-miriam.rachel.korenblit@intel.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Organization: Intel Israel (74) Limited From: Johannes Berg When reading the interrupt status after a FW reset handshake timeout, read the actual value not the mask for the non-MSIX case. Fixes: ab606dea80c4 ("wifi: iwlwifi: pcie: add support for the reset handshake in MSI") Signed-off-by: Johannes Berg Reviewed-by: Emmanuel Grumbach Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c b/drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c index 38ad719161e6..c8f4f3a1d2eb 100644 --- a/drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c +++ b/drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c @@ -125,7 +125,7 @@ void iwl_trans_pcie_fw_reset_handshake(struct iwl_trans *trans) reset_done = inta_hw & MSIX_HW_INT_CAUSES_REG_RESET_DONE; } else { - inta_hw = iwl_read32(trans, CSR_INT_MASK); + inta_hw = iwl_read32(trans, CSR_INT); reset_done = inta_hw & CSR_INT_BIT_RESET_DONE; } From patchwork Wed Jun 4 03:13:21 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 894418 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 25FEA238C04 for ; Wed, 4 Jun 2025 03:13:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.10 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1749006824; cv=none; b=mOvfNR32jvO4w85spj+1Ns/xJdUVPmGoABvJTcB7LBoo3rMA0pDbBnLE0+8HGnLGvloJhSGAvfJcvUKQB2DGeDtWu60dCA/VYS4wttTDMnHKgIWwiimKZgBFDOy4EvD2lzbY0FeCirxE2ZsiOs1ubf/2rqVAL1ZYMk5neywxndE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1749006824; c=relaxed/simple; bh=0iG1Arvo65NrBfE7+zxgNQGPBpXlzaOoDGtpO54okoE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=rg10DhYNMypR6Aub7xAgETeBVM+XBz56cKVmd/TtRbQaOE0zFgw0Bi4LveX4Ln21l45ZKgOaVPYr0IGmicGs63caMBJd+V5SERDOrEkdyDWMUdI90PjzpFPi6JYHi5953XrFti18AzQe03XLcGnsGDU+8Md8qmkJyhRSlbi/dp8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=JQPYEpse; arc=none smtp.client-ip=198.175.65.10 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="JQPYEpse" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1749006823; x=1780542823; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=0iG1Arvo65NrBfE7+zxgNQGPBpXlzaOoDGtpO54okoE=; b=JQPYEpseGpROnTgAsFzmLvUd80DCQOGnABnHkxymluWNHvcNn/a65jXZ LK5wkX10RN3XVX9UtmUYEADRW5J9xPMaYp711gamot0M0eXe5QwY5x6SH Q9NHdG7gpS1pccFa00mFxN1D+O1iX/BDBl3b35RIecRlf9TJKfLZRNsxr euQlJ0BVIdLzNZeGkGYklYfPoeaJWW9PJ4h82m/8mMn4TjXx8XKoElWsa sfQHOr6Gwx69CdI5/7+oZET6ON3AgCku7XMVPODRSOmQ2Z7dJoZYKFQOv imA7N55RWk9e1aEmIzQeUwub8YK8A4oYvgP23xOmCRgzKGyGHQ4GqXdyA w==; X-CSE-ConnectionGUID: 5eB5kWfZRl+WeDH2V2/uEg== X-CSE-MsgGUID: twxMEZMRTY+nt36EeEjl4Q== X-IronPort-AV: E=McAfee;i="6700,10204,11453"; a="68504620" X-IronPort-AV: E=Sophos;i="6.16,208,1744095600"; d="scan'208";a="68504620" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Jun 2025 20:13:43 -0700 X-CSE-ConnectionGUID: VLE1e4+uSRKClAo7PgjT3Q== X-CSE-MsgGUID: HtwzcWTESDy9OBLSssoBng== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.16,208,1744095600"; d="scan'208";a="182227390" Received: from weis0040.iil.intel.com ([10.12.217.108]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Jun 2025 20:13:42 -0700 From: Miri Korenblit To: linux-wireless@vger.kernel.org Cc: Ilan Peer , Johannes Berg Subject: [PATCH iwlwifi-fixes 4/4] wifi: iwlwifi: mld: Move regulatory domain initialization Date: Wed, 4 Jun 2025 06:13:21 +0300 Message-Id: <20250604061200.f138a7382093.I2fd8b3e99be13c2687da483e2cb1311ffb4fbfce@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250604031321.2277481-1-miriam.rachel.korenblit@intel.com> References: <20250604031321.2277481-1-miriam.rachel.korenblit@intel.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Organization: Intel Israel (74) Limited From: Ilan Peer The regulatory domain information was initialized every time the FW was loaded and the device was restarted. This was unnecessary and useless as at this stage the wiphy channels information was not setup yet so while the regulatory domain was set to the wiphy, the channel information was not updated. In case that a specific MCC was configured during FW initialization then following updates with this MCC are ignored, and thus the wiphy channels information is left with information not matching the regulatory domain. This commit moves the regulatory domain initialization to after the operational firmware is started, i.e., after the wiphy channels were configured and the regulatory information is needed. Signed-off-by: Ilan Peer Reviewed-by: Johannes Berg Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/mld/fw.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mld/fw.c b/drivers/net/wireless/intel/iwlwifi/mld/fw.c index 73ed8d5cab43..9d2c087360e7 100644 --- a/drivers/net/wireless/intel/iwlwifi/mld/fw.c +++ b/drivers/net/wireless/intel/iwlwifi/mld/fw.c @@ -349,10 +349,6 @@ int iwl_mld_load_fw(struct iwl_mld *mld) if (ret) goto err; - ret = iwl_mld_init_mcc(mld); - if (ret) - goto err; - mld->fw_status.running = true; return 0; @@ -546,6 +542,10 @@ int iwl_mld_start_fw(struct iwl_mld *mld) if (ret) goto error; + ret = iwl_mld_init_mcc(mld); + if (ret) + goto error; + return 0; error: