All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: David Lin <yu-hao.lin@nxp.com>
Cc: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"briannorris@chromium.org" <briannorris@chromium.org>,
	"kvalo@kernel.org" <kvalo@kernel.org>,
	"francesco@dolcini.it" <francesco@dolcini.it>,
	Pete Hsieh <tsung-hsien.hsieh@nxp.com>,
	Francesco Dolcini <francesco.dolcini@toradex.com>
Subject: Re: [EXT] Re: [PATCH v10 2/2] wifi: mwifiex: add host mlme for AP mode
Date: Mon, 17 Jun 2024 08:29:45 +0200	[thread overview]
Message-ID: <Zm_X2ULdvDIHFWAl@pengutronix.de> (raw)
In-Reply-To: <PA4PR04MB9638EE40501500C0B58BACC5D1CD2@PA4PR04MB9638.eurprd04.prod.outlook.com>

On Mon, Jun 17, 2024 at 02:15:41AM +0000, David Lin wrote:
> > From: Sascha Hauer <s.hauer@pengutronix.de>
> > Sent: Friday, June 14, 2024 2:32 PM
> > To: David Lin <yu-hao.lin@nxp.com>
> > Cc: linux-wireless@vger.kernel.org; linux-kernel@vger.kernel.org;
> > briannorris@chromium.org; kvalo@kernel.org; francesco@dolcini.it; Pete
> > Hsieh <tsung-hsien.hsieh@nxp.com>; Francesco Dolcini
> > <francesco.dolcini@toradex.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@pengutronix.de>
> > > > Sent: Wednesday, June 12, 2024 9:12 PM
> > > > To: David Lin <yu-hao.lin@nxp.com>
> > > > Cc: linux-wireless@vger.kernel.org; linux-kernel@vger.kernel.org;
> > > > briannorris@chromium.org; kvalo@kernel.org; francesco@dolcini.it;
> > > > Pete Hsieh <tsung-hsien.hsieh@nxp.com>; Francesco Dolcini
> > > > <francesco.dolcini@toradex.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@nxp.com>
> > > > > Reviewed-by: Francesco Dolcini <francesco.dolcini@toradex.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.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

  reply	other threads:[~2024-06-17  6:29 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-18  6:06 [PATCH v10 0/2] wifi: mwifiex: add code to support host mlme David Lin
2024-04-18  6:06 ` [PATCH v10 1/2] wifi: mwifiex: add host mlme for client mode David Lin
2024-04-18  6:37   ` Francesco Dolcini
2024-04-18  8:24     ` [EXT] " David Lin
2024-05-23  0:53   ` Brian Norris
2024-05-24  9:46     ` [EXT] " David Lin
2024-05-24 17:02       ` Brian Norris
2024-05-24 22:00         ` David Lin
2024-05-24 22:54           ` Brian Norris
2024-05-25  0:50             ` David Lin
2024-05-25 11:24               ` David Lin
2024-06-14  2:18               ` David Lin
2024-06-20 17:53               ` Brian Norris
2024-06-21  4:36                 ` David Lin
2024-07-01  1:12                   ` David Lin
2024-07-01 20:47                     ` Brian Norris
2024-07-02 11:23                       ` David Lin
2024-07-02 18:21                         ` Brian Norris
2024-04-18  6:06 ` [PATCH v10 2/2] wifi: mwifiex: add host mlme for AP mode David Lin
2024-05-23  0:59   ` Brian Norris
2024-05-23  2:20     ` [EXT] " David Lin
2024-06-12 13:11   ` Sascha Hauer
2024-06-14  2:06     ` [EXT] " David Lin
2024-06-14  6:31       ` Sascha Hauer
2024-06-17  2:15         ` David Lin
2024-06-17  6:29           ` Sascha Hauer [this message]
2024-06-17  7:44             ` David Lin
2024-04-18  6:47 ` [PATCH v10 0/2] wifi: mwifiex: add code to support host mlme Marcel Holtmann
2024-04-18  9:08   ` [EXT] " David Lin
2024-04-18  9:15     ` [EXT] " Marcel Holtmann
2024-04-19  4:00       ` David Lin
2024-04-19 21:42         ` Brian Norris
2024-04-22  8:34           ` David Lin
2024-04-23  2:29             ` David Lin
2024-04-24  8:11               ` Marcel Holtmann
2024-04-25  2:40                 ` David Lin
2024-04-26  1:08                   ` Brian Norris
2024-05-02  8:34                     ` David Lin
2024-05-13  1:27                       ` David Lin
2024-05-23  0:50                         ` Brian Norris
2024-04-26  1:00               ` Brian Norris
2024-04-26  3:04                 ` David Lin
2024-04-25  2:09             ` David Lin

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=Zm_X2ULdvDIHFWAl@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=briannorris@chromium.org \
    --cc=francesco.dolcini@toradex.com \
    --cc=francesco@dolcini.it \
    --cc=kvalo@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=tsung-hsien.hsieh@nxp.com \
    --cc=yu-hao.lin@nxp.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.