2024-05-30 13:02:11

by Sascha Hauer

[permalink] [raw]
Subject: [PATCH] wifi: mwifiex: increase max_num_akm_suites

The maximum number of AKM suites will be set to two if not specified by
the driver. Set it to CFG80211_MAX_NUM_AKM_SUITES to let userspace
specify up to ten AKM suites in the akm_suites array.

Without only the first two AKM suites will be used, further ones are
ignored.

Signed-off-by: Sascha Hauer <[email protected]>
---

Current wpa_supplicant/hostapd only put a maximum of two into the
akm_suites array as well, a patch changing this can be found here:
http://lists.infradead.org/pipermail/hostap/2024-May/042720.html
---
drivers/net/wireless/marvell/mwifiex/cfg80211.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/drivers/net/wireless/marvell/mwifiex/cfg80211.c b/drivers/net/wireless/marvell/mwifiex/cfg80211.c
index b909a7665e9cc..908dfe01c30d7 100644
--- a/drivers/net/wireless/marvell/mwifiex/cfg80211.c
+++ b/drivers/net/wireless/marvell/mwifiex/cfg80211.c
@@ -4358,6 +4358,8 @@ int mwifiex_register_cfg80211(struct mwifiex_adapter *adapter)
BIT(NL80211_IFTYPE_P2P_GO) |
BIT(NL80211_IFTYPE_AP);

+ wiphy->max_num_akm_suites = CFG80211_MAX_NUM_AKM_SUITES;
+
if (ISSUPP_ADHOC_ENABLED(adapter->fw_cap_info))
wiphy->interface_modes |= BIT(NL80211_IFTYPE_ADHOC);

--
2.39.2



2024-06-06 12:25:55

by Kalle Valo

[permalink] [raw]
Subject: Re: [PATCH] wifi: mwifiex: increase max_num_akm_suites

Sascha Hauer <[email protected]> wrote:

> The maximum number of AKM suites will be set to two if not specified by
> the driver. Set it to CFG80211_MAX_NUM_AKM_SUITES to let userspace
> specify up to ten AKM suites in the akm_suites array.
>
> Without only the first two AKM suites will be used, further ones are
> ignored.
>
> Signed-off-by: Sascha Hauer <[email protected]>

I assume you that you have also tested this on a real device, right?

--
https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


2024-06-10 07:28:05

by Sascha Hauer

[permalink] [raw]
Subject: Re: [PATCH] wifi: mwifiex: increase max_num_akm_suites

On Thu, Jun 06, 2024 at 12:25:48PM +0000, Kalle Valo wrote:
> Sascha Hauer <[email protected]> wrote:
>
> > The maximum number of AKM suites will be set to two if not specified by
> > the driver. Set it to CFG80211_MAX_NUM_AKM_SUITES to let userspace
> > specify up to ten AKM suites in the akm_suites array.
> >
> > Without only the first two AKM suites will be used, further ones are
> > ignored.
> >
> > Signed-off-by: Sascha Hauer <[email protected]>
>
> I assume you that you have also tested this on a real device, right?

Sure. It was tested with a MAYA-W161-00B module from u-blox with a IW416
chipset.

BTW I haven't mentioned this, but It fixes the same problem as mentioned here:

https://lore.kernel.org/linux-kernel/[email protected]/T/

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 |

2024-06-11 13:14:23

by Marcel Ziswiler

[permalink] [raw]
Subject: Re: [PATCH] wifi: mwifiex: increase max_num_akm_suites

Hi Sascha

On Mon, 2024-06-10 at 09:27 +0200, Sascha Hauer wrote:
> On Thu, Jun 06, 2024 at 12:25:48PM +0000, Kalle Valo wrote:
> > Sascha Hauer <[email protected]> wrote:
> >
> > > The maximum number of AKM suites will be set to two if not specified by
> > > the driver. Set it to CFG80211_MAX_NUM_AKM_SUITES to let userspace
> > > specify up to ten AKM suites in the akm_suites array.
> > >
> > > Without only the first two AKM suites will be used, further ones are
> > > ignored.
> > >
> > > Signed-off-by: Sascha Hauer <[email protected]>
> >
> > I assume you that you have also tested this on a real device, right?
>
> Sure. It was tested with a MAYA-W161-00B module from u-blox with a IW416
> chipset.
>
> BTW I haven't mentioned this, but It fixes the same problem as mentioned here:
>
> https://lore.kernel.org/linux-kernel/[email protected]/T/

As we are also using the IW416 albeit from the MAYA-W160-00B module on our Verdin AM62, we were wondering about
the exact use case this patch helps solving. Could you reveal some more details around this? Thanks!

> Sascha

Cheers

Marcel

2024-06-12 13:04:34

by Sascha Hauer

[permalink] [raw]
Subject: Re: [PATCH] wifi: mwifiex: increase max_num_akm_suites

On Tue, Jun 11, 2024 at 01:12:26PM +0000, Marcel Ziswiler wrote:
> Hi Sascha
>
> On Mon, 2024-06-10 at 09:27 +0200, Sascha Hauer wrote:
> > On Thu, Jun 06, 2024 at 12:25:48PM +0000, Kalle Valo wrote:
> > > Sascha Hauer <[email protected]> wrote:
> > >
> > > > The maximum number of AKM suites will be set to two if not specified by
> > > > the driver. Set it to CFG80211_MAX_NUM_AKM_SUITES to let userspace
> > > > specify up to ten AKM suites in the akm_suites array.
> > > >
> > > > Without only the first two AKM suites will be used, further ones are
> > > > ignored.
> > > >
> > > > Signed-off-by: Sascha Hauer <[email protected]>
> > >
> > > I assume you that you have also tested this on a real device, right?
> >
> > Sure. It was tested with a MAYA-W161-00B module from u-blox with a IW416
> > chipset.
> >
> > BTW I haven't mentioned this, but It fixes the same problem as mentioned here:
> >
> > https://lore.kernel.org/linux-kernel/[email protected]/T/
>
> As we are also using the IW416 albeit from the MAYA-W160-00B module on our Verdin AM62, we were wondering about
> the exact use case this patch helps solving. Could you reveal some more details around this? Thanks!

You'll need this patch once wpa_supplicant specifies more than two akm
suites in the key_mgmt (in AP mode).

With the current mainline driver using NetworkManager to setup a hotspot
with:

nmcli device wifi hotspot con-name leica ssid mywifi band bg password hallo123

NetworkManager ends up setting the key_mgmt option to 'WPA-PSK WPA-PSK-SHA256'.
These are two entries and this works fine.

However, when the patches adding host mlme support are applied (see
https://lore.kernel.org/lkml/[email protected]/T/),
NetworkManager will set key_mgmt to 'WPA-PSK WPA-PSK-SHA256 SAE'. These
are three entries and thus exceed the current array size of two. The
effect is that SAE is ignored by the driver and SAE is not enabled in
the device.

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 |