From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 895C030D3FF for ; Sun, 12 Jul 2026 22:19:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.43 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783894776; cv=none; b=WpCbnD4y0gnphA2HHuY9aEJGILRhalcPApifwOi9elzIDZVjTfoyQqUILohLF7rqcj3yLsLl1+JANIlAzbX8bMhpL1AIplzHCZVK2jfE8Stqbp5EaGUHq8GLOQ/lLGhTITJlTpUnPFU8+5hdQnLmmkjYvo0DKQ7+mrtVYpFgRQQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783894776; c=relaxed/simple; bh=SD0SnRUYnNBM4DfHrzLQZfj97JaPRR/4PEuUdonb4Eg=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=rcwKQh1bXg5Am6DTXgDfc2UZgow3YuuUu+oOCOFv3hIPtiVnvdu6W+WIRRTIQh73aEfVU7MMpLNOVdN01jW+Oh424L4mthQniMlaEFcsRc6uJn1Mj6mScY8Jqob4igES5NonQoGRx6phuN0MvDfMmAYvJtJvD6WtPXlBhE2EWpc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=JA3yXLJ6; arc=none smtp.client-ip=209.85.128.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="JA3yXLJ6" Received: by mail-wm1-f43.google.com with SMTP id 5b1f17b1804b1-4938d5f86f3so18677115e9.1 for ; Sun, 12 Jul 2026 15:19:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1783894773; x=1784499573; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=U0JMbC9mAGQuyluxV6HwchVzP8XmhulJGLA0wpvxvJ8=; b=JA3yXLJ6M7BoJb1Mbk1i8NROXSKk72ltN2/BSfZ1W6tJ34JByV70DJUPt6lwlyThC3 hl2BBghsDgS/9/RrQ2610h8nL1hbtJmuusyhiXmkbsqAMGMih6Q4yQYKiz/Dnw1FK6Nc Ft2dKYznwMe3vqi4R5qPBm8mq/EcTG6Zj4nS9PQF+/jS7DrrLuVflHSupA+Fck+Gx//S vgjrL3mt5lCzfkrjTxu9RryUwhclcbkhOxu961PAbxqKDCdPORoeg33EjhDFoSuPlgen AwFHI70nRkmPOG05GHcaJQJSCovR+ti42Xc+S9ckC3PKxKhjn3rmPmqqybXvLAbuTm1D Qd7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783894773; x=1784499573; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=U0JMbC9mAGQuyluxV6HwchVzP8XmhulJGLA0wpvxvJ8=; b=qq5VZpgs30joPiyClKMZu7pqnZXb+TintFhm7+Z2wJ+xTuWi2SfJ1FuYzWQZ35ZVud ulIfmYUWRmQ0ThfAYS3eh7gkVf0J6P4kyFQs8onsc6PI4rPyBisZK074TfBPeFHfXooP 4cpOtt39lAF3xn8tQsq7PPFiUmaMK8fn0jVtIbOmyM1MOyQAthClpvQB5GM4BDiN/Esk UqY3fGpaPtQfhDv26xuNql11397hhsmfK2d2LEYLjaJ8/za9rkH6w3HVpoXFqez/xUDk 2VYOLbiXKvN3djSkF6FvBBWUDn2/SLwVtCjLO/YW098gIlFUyv3knQ9kSscZL07qxcjC HBMQ== X-Forwarded-Encrypted: i=1; AHgh+RphUZjAy+D8ow+6v4LFGsMNpuuUQZpVeMra7qlYqIs+pIWFtaofeXtB1i0qoUCNqLVWayCOJKWHN5QN2/o=@vger.kernel.org X-Gm-Message-State: AOJu0Yz8Vwrq5j+Q3lylRByiiwMvaJuDlWmxj715giC2vCy1gQgOdcI8 FyPqinGBZY0DE44wus8CDdRAgs/99JOplrLPcvVoQgTlP9OEhgezgNEE X-Gm-Gg: AfdE7clWRnLc9ANIkj11dJLKhNyp7kpNDpg/JWlIOJZZE0qCLJuaN1Ji7qW3fw+tUi7 csWv8FaA0QCl7LHpoS6iiL/6Xv3bbo6Eo7T4YaloDlhEcQTCGSqIUbf4b0lWeY2DddH7zIsJzLj pQufl3+LgdbK5u7ImngK4gHZU9Tj10VsYr5DRNMcELkQ9sgJuzA9UiDgfnasZPBk79ULFMlhZBz IyFt7vocCG0fFhiIXGBaHm/jiD2P7Cje7PYqVesty9FGQvMHQh6Li1CWXju39K1Qr2Ewia9dP6R nmpn7zuno1IRXy2CYTYgLv8QRzE46UV/8ZW0wJvrCI4P4w4MRLcpdYdkCLjP2OjVmqxF+73O8yT 9WPIMC54n1saG7pMZgNl93TpsOQM2Y/s08lUIHrC2VKN5zNrrlXQ2/ilU5JaPoQ3tMcRMpunCEm rdWWaAcYg34ojMNgNx6yEEkgoN5Pt2GEpnjJie63mMqrtgR9vmGJ5TcQca7Chs/iH6KIIQOBHpv iQP+cWB1kOIZMrNAQ== X-Received: by 2002:a7b:cc8a:0:b0:492:2fc8:21f2 with SMTP id 5b1f17b1804b1-493f2a969a8mr96658505e9.8.1783894772850; Sun, 12 Jul 2026 15:19:32 -0700 (PDT) Received: from localhost.localdomain ([176.222.15.234]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-47aa039af67sm89829211f8f.17.2026.07.12.15.19.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Jul 2026 15:19:32 -0700 (PDT) From: Georgi Valkov To: briannorris@chromium.org Cc: francesco@dolcini.it, s.kerkmann@pengutronix.de, johannes.berg@intel.com, kees@kernel.org, linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, gvalkov@gmail.com Subject: [PATCH] wifi: mwifiex: fix freeze for 60 seconds caused by request_firmware Date: Mon, 13 Jul 2026 01:17:09 +0300 Message-ID: <20260712221709.7099-1-gvalkov@gmail.com> X-Mailer: git-send-email 2.55.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Fix regression in rgpower table loading, caused by using request_firmware(): when the requested firmware does not exist, e.g. nxp/rgpower_WW.bin does not exist on OpenWRT builds for WRT3200ACM, request_firmware() falls back to firmware_fallback_sysfs(), which expects the firmware to be provided by user space using SYSFS. No such utility is provided in this configuration, so the entire system locks up for 60 seconds, until the request times out. During this time, no other log messages are observed, and the device does not respond to commands over UART. The request_firmware() call is performed in the following context: current->comm kworker/1:2 in_task 1 irqs_disabled 0 in_atomic 0 Fixed by using request_firmware_direct(). This prevents fallback to SYSFS, and avoids delay. The rgpower table is optional. The driver falls back to the device tree power table if the firmware is not present. The error code is printed for debugging and returned to the caller, which only cares for success or failure, so there are no side effects. Fixes: 7b6f16a25806 ("wifi: mwifiex: add rgpower table loading support") Signed-off-by: Georgi Valkov --- drivers/net/wireless/marvell/mwifiex/sta_ioctl.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/net/wireless/marvell/mwifiex/sta_ioctl.c b/drivers/net/wireless/marvell/mwifiex/sta_ioctl.c index a6550548d3b4..9460d5352b23 100644 --- a/drivers/net/wireless/marvell/mwifiex/sta_ioctl.c +++ b/drivers/net/wireless/marvell/mwifiex/sta_ioctl.c @@ -196,6 +196,7 @@ static int mwifiex_request_rgpower_table(struct mwifiex_private *priv) struct mwifiex_adapter *adapter = priv->adapter; char rgpower_table_name[30]; char country_code[3]; + int ret; strscpy(country_code, domain_info->country_code, sizeof(country_code)); @@ -214,16 +215,17 @@ static int mwifiex_request_rgpower_table(struct mwifiex_private *priv) adapter->rgpower_data = NULL; } - if ((request_firmware(&adapter->rgpower_data, rgpower_table_name, - adapter->dev))) { + ret = request_firmware_direct(&adapter->rgpower_data, rgpower_table_name, + adapter->dev); + + if (ret) { mwifiex_dbg( adapter, INFO, - "info: %s: failed to request regulatory power table\n", - __func__); - return -EIO; + "info: %s: failed to request regulatory power table: %d\n", + __func__, ret); } - return 0; + return ret; } static int mwifiex_dnld_rgpower_table(struct mwifiex_private *priv) -- 2.55.0