From: Francesco Dolcini <francesco@dolcini.it>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Brian Norris <briannorris@chromium.org>,
Francesco Dolcini <francesco@dolcini.it>,
Kalle Valo <kvalo@kernel.org>,
linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] wifi: mwifiex: simplify WPA flags setting
Date: Tue, 16 Jul 2024 21:48:26 +0200 [thread overview]
Message-ID: <20240716194826.GA85916@francesco-nb> (raw)
In-Reply-To: <20240716-mwifiex-wpa-psk-sha256-v1-1-05ae70f37bb3@pengutronix.de>
Hello Sasha,
thanks for your patch.
On Tue, Jul 16, 2024 at 01:33:27PM +0200, Sascha Hauer wrote:
> The WPA flags setting only depends on the wpa_versions bitfield and not
> on the AKM suite, so move it out of the switch/case to simplify the code
> a bit. No functional change intended.
>
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Reviewed-by: Francesco Dolcini <francesco.dolcini@toradex.com>
> ---
> drivers/net/wireless/marvell/mwifiex/uap_cmd.c | 27 +++++++-------------------
> 1 file changed, 7 insertions(+), 20 deletions(-)
>
> diff --git a/drivers/net/wireless/marvell/mwifiex/uap_cmd.c b/drivers/net/wireless/marvell/mwifiex/uap_cmd.c
> index 491e366119096..8d0cd84d27698 100644
> --- a/drivers/net/wireless/marvell/mwifiex/uap_cmd.c
> +++ b/drivers/net/wireless/marvell/mwifiex/uap_cmd.c
> @@ -46,31 +46,18 @@ int mwifiex_set_secure_params(struct mwifiex_private *priv,
>
> bss_config->key_mgmt_operation |= KEY_MGMT_ON_HOST;
>
> + if (params->crypto.wpa_versions & NL80211_WPA_VERSION_1)
> + bss_config->protocol = PROTOCOL_WPA;
> + if (params->crypto.wpa_versions & NL80211_WPA_VERSION_2)
> + bss_config->protocol |= PROTOCOL_WPA2;
> +
I am wondering what happens if NL80211_WPA_VERSION_1 is not set, no idea
what's the content of bss_config->protocol ...
in any case this is not something that you introduced, but maybe worth
having a look?
Francesco
next prev parent reply other threads:[~2024-07-16 19:48 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-16 11:33 [PATCH 0/2] mwifiex: add support for WPA-PSK-SHA256 Sascha Hauer
2024-07-16 11:33 ` [PATCH 1/2] wifi: mwifiex: simplify WPA flags setting Sascha Hauer
2024-07-16 19:48 ` Francesco Dolcini [this message]
2024-07-17 6:26 ` Sascha Hauer
2024-07-17 8:07 ` Francesco Dolcini
2024-07-17 8:34 ` Sascha Hauer
2024-07-16 11:33 ` [PATCH 2/2] wifi: mwifiex: add support for WPA-PSK-SHA256 Sascha Hauer
2024-07-16 19:57 ` Francesco Dolcini
2024-07-17 6:12 ` Sascha Hauer
2024-07-17 8:10 ` Francesco Dolcini
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=20240716194826.GA85916@francesco-nb \
--to=francesco@dolcini.it \
--cc=briannorris@chromium.org \
--cc=kvalo@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=s.hauer@pengutronix.de \
/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;
as well as URLs for NNTP newsgroup(s).