From: Stefan Kerkmann <s.kerkmann@pengutronix.de>
To: Georgi Valkov <gvalkov@gmail.com>, briannorris@chromium.org
Cc: francesco@dolcini.it, johannes.berg@intel.com, kees@kernel.org,
linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] wifi: mwifiex: fix freeze for 60 seconds caused by request_firmware
Date: Tue, 28 Jul 2026 09:08:28 +0200 [thread overview]
Message-ID: <ae47a0de-e53e-4d61-849c-dbf8c646eff7@pengutronix.de> (raw)
In-Reply-To: <20260712221709.7099-1-gvalkov@gmail.com>
Hi Georgi,
thank you for the fix!
On 7/13/26 00:17, Georgi Valkov wrote:
> 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 <gvalkov@gmail.com>
Reviewed-by: Stefan Kerkmann <s.kerkmann@pengutronix.de>
> ---
> 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)
--
Pengutronix e.K. | Stefan Kerkmann |
Steuerwalder Str. 21 | https://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-128 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-9 |
prev parent reply other threads:[~2026-07-28 7:08 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-12 22:17 Georgi Valkov
2026-07-15 14:52 ` Francesco Dolcini
2026-07-16 8:26 ` George Valkov
2026-07-16 8:59 ` Francesco Dolcini
2026-07-16 18:01 ` George Valkov
2026-07-27 12:15 ` George Valkov
2026-07-27 22:19 ` Sasha Levin
2026-07-28 7:08 ` Stefan Kerkmann [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ae47a0de-e53e-4d61-849c-dbf8c646eff7@pengutronix.de \
--to=s.kerkmann@pengutronix.de \
--cc=briannorris@chromium.org \
--cc=francesco@dolcini.it \
--cc=gvalkov@gmail.com \
--cc=johannes.berg@intel.com \
--cc=kees@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®