[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
<PA4PR04MB9638B7F0F4E49F79057C15FBD1CD2@PA4PR04MB9638.eurprd04.prod.outlook.com>
Date: Mon, 17 Jun 2024 07:44:03 +0000
From: David Lin <yu-hao.lin@....com>
To: Sascha Hauer <s.hauer@...gutronix.de>
CC: "linux-wireless@...r.kernel.org" <linux-wireless@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"briannorris@...omium.org" <briannorris@...omium.org>, "kvalo@...nel.org"
<kvalo@...nel.org>, "francesco@...cini.it" <francesco@...cini.it>, Pete Hsieh
<tsung-hsien.hsieh@....com>, Francesco Dolcini
<francesco.dolcini@...adex.com>
Subject: RE: [EXT] Re: [PATCH v10 2/2] wifi: mwifiex: add host mlme for AP
mode
> From: Sascha Hauer <s.hauer@...gutronix.de>
> Sent: Monday, June 17, 2024 2:30 PM
> To: David Lin <yu-hao.lin@....com>
> Cc: linux-wireless@...r.kernel.org; linux-kernel@...r.kernel.org;
> briannorris@...omium.org; kvalo@...nel.org; francesco@...cini.it; Pete
> Hsieh <tsung-hsien.hsieh@....com>; Francesco Dolcini
> <francesco.dolcini@...adex.com>
> Subject: Re: [EXT] Re: [PATCH v10 2/2] wifi: mwifiex: add host mlme for AP
> mode
>
> Caution: This is an external email. Please take care when clicking links or
> opening attachments. When in doubt, report the message using the 'Report
> this email' button
>
>
> On Mon, Jun 17, 2024 at 02:15:41AM +0000, David Lin wrote:
> > > From: Sascha Hauer <s.hauer@...gutronix.de>
> > > Sent: Friday, June 14, 2024 2:32 PM
> > > To: David Lin <yu-hao.lin@....com>
> > > Cc: linux-wireless@...r.kernel.org; linux-kernel@...r.kernel.org;
> > > briannorris@...omium.org; kvalo@...nel.org; francesco@...cini.it;
> > > Pete Hsieh <tsung-hsien.hsieh@....com>; Francesco Dolcini
> > > <francesco.dolcini@...adex.com>
> > > Subject: Re: [EXT] Re: [PATCH v10 2/2] wifi: mwifiex: add host mlme
> > > for AP mode
> > >
> > > Caution: This is an external email. Please take care when clicking
> > > links or opening attachments. When in doubt, report the message
> > > using the 'Report this email' button
> > >
> > >
> > > On Fri, Jun 14, 2024 at 02:06:45AM +0000, David Lin wrote:
> > > > > From: Sascha Hauer <s.hauer@...gutronix.de>
> > > > > Sent: Wednesday, June 12, 2024 9:12 PM
> > > > > To: David Lin <yu-hao.lin@....com>
> > > > > Cc: linux-wireless@...r.kernel.org;
> > > > > linux-kernel@...r.kernel.org; briannorris@...omium.org;
> > > > > kvalo@...nel.org; francesco@...cini.it; Pete Hsieh
> > > > > <tsung-hsien.hsieh@....com>; Francesco Dolcini
> > > > > <francesco.dolcini@...adex.com>
> > > > > Subject: [EXT] Re: [PATCH v10 2/2] wifi: mwifiex: add host mlme
> > > > > for AP mode
> > > > >
> > > > > Caution: This is an external email. Please take care when
> > > > > clicking links or opening attachments. When in doubt, report the
> > > > > message using the 'Report this email' button
> > > > >
> > > > >
> > > > > Hi David,
> > > > >
> > > > > On Thu, Apr 18, 2024 at 02:06:26PM +0800, David Lin wrote:
> > > > > > Add host based MLME to enable WPA3 functionalities in AP mode.
> > > > > > This feature required a firmware with the corresponding V2 Key
> > > > > > API support. The feature (WPA3) is currently enabled and
> > > > > > verified only on IW416. Also, verified no regression with
> > > > > > change when host MLME is disabled.
> > > > > >
> > > > > > Signed-off-by: David Lin <yu-hao.lin@....com>
> > > > > > Reviewed-by: Francesco Dolcini <francesco.dolcini@...adex.com>
> > > > > > ---
> > > > > >
> > > > >
> > > > > > diff --git a/drivers/net/wireless/marvell/mwifiex/uap_cmd.c
> > > > > > b/drivers/net/wireless/marvell/mwifiex/uap_cmd.c
> > > > > > index 491e36611909..073c665183b3 100644
> > > > > > --- a/drivers/net/wireless/marvell/mwifiex/uap_cmd.c
> > > > > > +++ b/drivers/net/wireless/marvell/mwifiex/uap_cmd.c
> > > > > > @@ -72,6 +72,10 @@ int mwifiex_set_secure_params(struct
> > > > > mwifiex_private *priv,
> > > > > > bss_config->key_mgmt =
> > > > > KEY_MGMT_PSK;
> > > > > > }
> > > > > > break;
> > > > > > + case WLAN_AKM_SUITE_SAE:
> > > > > > + bss_config->protocol = PROTOCOL_WPA2;
> > > > > > + bss_config->key_mgmt =
> KEY_MGMT_SAE;
> > > > > > + break;
> > > > >
> > > > > Shouldn't this be |= PROTOCOL_WPA2 and |= KEY_MGMT_SAE?
> > > > > Clearing the other flags when SAE is enabled looks wrong to me.
> > > > >
> > > > > Sascha
> > > > >
> > > >
> > > > These fields are used for the configuration of FW, this is the correct
> setting.
> > >
> > > This is done in a loop iterating over the different AKM suites, with
> > > your patch this looks like this:
> > >
> > > for (i = 0; i < params->crypto.n_akm_suites; i++) {
> > > switch (params->crypto.akm_suites[i]) {
> > > case WLAN_AKM_SUITE_8021X:
> > > if (params->crypto.wpa_versions &
> > > NL80211_WPA_VERSION_1) {
> > > bss_config->protocol =
> PROTOCOL_WPA;
> > > bss_config->key_mgmt =
> KEY_MGMT_EAP;
> > > }
> > > if (params->crypto.wpa_versions &
> > > NL80211_WPA_VERSION_2) {
> > > bss_config->protocol |=
> > > PROTOCOL_WPA2;
> > > bss_config->key_mgmt =
> KEY_MGMT_EAP;
> > > }
> > > break;
> > > case WLAN_AKM_SUITE_PSK:
> > > if (params->crypto.wpa_versions &
> > > NL80211_WPA_VERSION_1) {
> > > bss_config->protocol =
> PROTOCOL_WPA;
> > > bss_config->key_mgmt =
> KEY_MGMT_PSK;
> > > }
> > > if (params->crypto.wpa_versions &
> > > NL80211_WPA_VERSION_2) {
> > > bss_config->protocol |=
> > > PROTOCOL_WPA2;
> > > bss_config->key_mgmt =
> KEY_MGMT_PSK;
> > > }
> > > break;
> > > case WLAN_AKM_SUITE_SAE:
> > > bss_config->protocol = PROTOCOL_WPA2;
> > > bss_config->key_mgmt = KEY_MGMT_SAE;
> > > break;
> > >
> > > default:
> > > break;
> > > }
> > > }
> > >
> > > It looks wrong to overwrite bss_config->protocol and
> > > bss_config->key_mgmt in each iteration of this loop. If that would
> > > be correct, you wouldn't need a loop at all, but could instead configure
> based on the last AKM suite entry.
> > >
> > > In my understanding the bits in bss_config->key_mgmt should be ored
> > > together depending on the possible AKM suites which is also what the
> > > downstream driver does.
> > >
> >
> > For the configuration of FW, ored only happens for the same AKM suite.
>
> Sorry, I don't understand this. Could you elaborate what you mean here?
>
> Sascha
>
> --
> Pengutronix e.K. |
> |
> Steuerwalder Str. 21 |
> http://www.pen/
> gutronix.de%2F&data=05%7C02%7Cyu-hao.lin%40nxp.com%7Cc852ce81dd734
> 2c25e0408dc8e96ebb2%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%
> 7C638542026048434949%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAw
> MDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&
> sdata=6Y%2FM9gFWYhf0UfClFTBwwsuMwrasEimaHKzJ2y2bHjQ%3D&reserved
> =0 |
> 31137 Hildesheim, Germany | Phone:
> +49-5121-206917-0 |
> Amtsgericht Hildesheim, HRA 2686 | Fax:
> +49-5121-206917-5555 |
Firmware can only support one of WLAN_AKM_SUITE_8021X, WLAN_AKM_SUITE_PSK, or WLAN_AKM_SUITE_SAE.
For WLAN_AKM_SUITE_8021X and WLAN_AKM_SUITE_PSK, the protocol can be WPA, WPA2 or both.
David
Powered by blists - more mailing lists