]> www.infradead.org Git - linux.git/commit
wifi: mwifiex: fix key_mgmt setting
authorSascha Hauer <s.hauer@pengutronix.de>
Mon, 5 Aug 2024 06:39:14 +0000 (08:39 +0200)
committerKalle Valo <kvalo@kernel.org>
Sat, 10 Aug 2024 07:35:28 +0000 (10:35 +0300)
commit36aa649915439aa924fb45aec3a6a9acea04a501
treef599ae83a2af54cbe580b1bc6738636288640d11
parenteb84567e7208491cd6733cc867d849ab07dabd67
wifi: mwifiex: fix key_mgmt setting

bss_config->key_mgmt specifies the AKM suites that are usable in
hardware. This variable is set to specific values while iterating
over the advertised AKM suites. This means the final value of the
variable depends on the order of the entries in the AKM suites
array. Instead of setting the variable, just set the relevant bits
in the key_mgmt bit field to make us independent of the order of
entries.
This behaviour is derived from the downstream driver that does the
same.
Also, set bss_config->key_mgmt to zero explicitly right before the
loop. bss_config has been zero allocated by the caller already, but
do so again to save the reader from following the code path.

Reviewed-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Acked-by: Brian Norris <briannorris@chromium.org>
Link: https://lore.kernel.org/r/20240723-mwifiex-wpa-psk-sha256-v3-2-025168a91da1@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://patch.msgid.link/20240805-mwifiex-wpa-psk-sha256-v4-2-e1eee80508e6@pengutronix.de
drivers/net/wireless/marvell/mwifiex/uap_cmd.c