diff mbox series

[2/2] wifi: mwifiex: add support for WPA-PSK-SHA256

Message ID 20240716-mwifiex-wpa-psk-sha256-v1-2-05ae70f37bb3@pengutronix.de
State Superseded
Headers show
Series mwifiex: add support for WPA-PSK-SHA256 | expand

Commit Message

Sascha Hauer July 16, 2024, 11:33 a.m. UTC
This adds support for the WPA-PSK AKM suite with SHA256 as hashing
method (WPA-PSK-SHA256). Tested with a wpa_supplicant provided AP
using key_mgmt=WPA-PSK-SHA256.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 drivers/net/wireless/marvell/mwifiex/fw.h      | 1 +
 drivers/net/wireless/marvell/mwifiex/uap_cmd.c | 3 +++
 2 files changed, 4 insertions(+)

Comments

Francesco Dolcini July 17, 2024, 8:10 a.m. UTC | #1
On Wed, Jul 17, 2024 at 08:12:16AM +0200, Sascha Hauer wrote:
> On Tue, Jul 16, 2024 at 09:57:31PM +0200, Francesco Dolcini wrote:
> > Hello Sascha,
> > 
> > On Tue, Jul 16, 2024 at 01:33:28PM +0200, Sascha Hauer wrote:
> > > This adds support for the WPA-PSK AKM suite with SHA256 as hashing
> > > method (WPA-PSK-SHA256). Tested with a wpa_supplicant provided AP
> > > using key_mgmt=WPA-PSK-SHA256.
> > 
> > Do you have any more details on which chip/firmware you tested?
> > The change looks good, I am just wondering if there are reasons this
> > might create issue on some specific chip/firmware combination.
> 
> I have a IW416 with firmware 16.92.21.p119. The change itself is derived
> from the downstream driver. The downstream driver also sets the
> KEY_MGMT_PSK_SHA256 bit unconditionally for all chip/firmware
> combinations so I think this change should be ok.

Fine for me

Reviewed-by: Francesco Dolcini <francesco.dolcini@toradex.com>

Francesco
diff mbox series

Patch

diff --git a/drivers/net/wireless/marvell/mwifiex/fw.h b/drivers/net/wireless/marvell/mwifiex/fw.h
index 3adc447b715f6..1c76754b616ff 100644
--- a/drivers/net/wireless/marvell/mwifiex/fw.h
+++ b/drivers/net/wireless/marvell/mwifiex/fw.h
@@ -415,6 +415,7 @@  enum MWIFIEX_802_11_PRIVACY_FILTER {
 #define KEY_MGMT_NONE               0x04
 #define KEY_MGMT_PSK                0x02
 #define KEY_MGMT_EAP                0x01
+#define KEY_MGMT_PSK_SHA256         0x100
 #define CIPHER_TKIP                 0x04
 #define CIPHER_AES_CCMP             0x08
 #define VALID_CIPHER_BITMAP         0x0c
diff --git a/drivers/net/wireless/marvell/mwifiex/uap_cmd.c b/drivers/net/wireless/marvell/mwifiex/uap_cmd.c
index 8d0cd84d27698..c07aec67aa0fe 100644
--- a/drivers/net/wireless/marvell/mwifiex/uap_cmd.c
+++ b/drivers/net/wireless/marvell/mwifiex/uap_cmd.c
@@ -59,6 +59,9 @@  int mwifiex_set_secure_params(struct mwifiex_private *priv,
 		case WLAN_AKM_SUITE_PSK:
 			bss_config->key_mgmt = KEY_MGMT_PSK;
 			break;
+		case WLAN_AKM_SUITE_PSK_SHA256:
+			bss_config->key_mgmt = KEY_MGMT_PSK_SHA256;
+			break;
 		default:
 			break;
 		}