lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250411084954.GA24608@francesco-nb>
Date: Fri, 11 Apr 2025 10:49:54 +0200
From: Francesco Dolcini <francesco@...cini.it>
To: Sascha Hauer <s.hauer@...gutronix.de>
Cc: Brian Norris <briannorris@...omium.org>,
	Francesco Dolcini <francesco@...cini.it>,
	linux-wireless@...r.kernel.org, linux-kernel@...r.kernel.org,
	kernel@...gutronix.de
Subject: Re: [PATCH 3/4] wifi: mwifiex: drop asynchronous init waiting code

On Thu, Apr 10, 2025 at 12:28:45PM +0200, Sascha Hauer wrote:
> Historically all commands sent to the mwifiex driver have been
> asynchronous. The different commands sent during driver initialization
> have been queued at once and only the final command has been waited
> for being ready before finally starting the driver.
> 
> This has been changed in 7bff9c974e1a ("mwifiex: send firmware
> initialization commands synchronously").

> With this the initialization is finished once the last
> mwifiex_send_cmd_sync() (now mwifiex_send_cmd()) has returned.

Just for me, the rename/refactor happened in commit fa0ecbb9905d
("mwifiex: remove global variable cmd_wait_q_required"), in v3.14.


> This makes all the code used to wait for the last initialization
> command to be finished unnecessary, so it's removed in this patch.
> 
> Signed-off-by: Sascha Hauer <s.hauer@...gutronix.de>
> ---
>  drivers/net/wireless/marvell/mwifiex/cmdevt.c  | 16 ----------------
>  drivers/net/wireless/marvell/mwifiex/init.c    |  5 +++--
>  drivers/net/wireless/marvell/mwifiex/main.c    | 12 ++----------
>  drivers/net/wireless/marvell/mwifiex/main.h    |  6 ------
>  drivers/net/wireless/marvell/mwifiex/sta_cmd.c |  4 ----
>  drivers/net/wireless/marvell/mwifiex/util.c    | 18 ------------------
>  6 files changed, 5 insertions(+), 56 deletions(-)
> 
> diff --git a/drivers/net/wireless/marvell/mwifiex/cmdevt.c b/drivers/net/wireless/marvell/mwifiex/cmdevt.c
> index 5573e2ded72f2..c07857c49a713 100644
> --- a/drivers/net/wireless/marvell/mwifiex/cmdevt.c
> +++ b/drivers/net/wireless/marvell/mwifiex/cmdevt.c
> @@ -900,18 +900,6 @@ int mwifiex_process_cmdresp(struct mwifiex_adapter *adapter)
>  		ret = mwifiex_process_sta_cmdresp(priv, cmdresp_no, resp);
>  	}
>  
> -	/* Check init command response */
> -	if (adapter->hw_status == MWIFIEX_HW_STATUS_INITIALIZING) {

What about the code path from mwifiex_add_card()?

mwifiex_add_card()
 -> hw_status = MWIFIEX_HW_STATUS_INITIALIZING
 -> mwifiex_init_hw_fw(adapter, true))
   -> request_firmware_nowait(..., mwifiex_fw_dpc)

mwifiex_fw_dpc()
 ...
     -> mwifiex_init_fw()
       -> adapter->hw_status = MWIFIEX_HW_STATUS_READY  

mwifiex_fw_dpc() is called asynchronously, is everything as safe as
before, here?


Francesco


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ