Skip to content

Commit f95c878

Browse files
morihisa-momonanashif
authored andcommitted
wifi: airoc: FIX Security modes of SoftAP
Updated security modes verification in ap_enable. SoftAP supports following modes: - No security (WHD\_SECURITY\_OPEN) - WPA2-PSK security (WHD_SECURITY_WPA2_AES_PSK) - WPA3-SAE security (WHD_SECURITY_WPA3_SAE) Signed-off-by: Morihisa Momona <[email protected]>
1 parent 6b21699 commit f95c878

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

drivers/wifi/infineon/airoc_wifi.c

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -620,10 +620,18 @@ static int airoc_mgmt_ap_enable(const struct device *dev, struct wifi_connect_re
620620
params->channel);
621621
}
622622

623-
if (params->psk_length == 0) {
623+
switch (params->security) {
624+
case WIFI_SECURITY_TYPE_NONE:
624625
security = WHD_SECURITY_OPEN;
625-
} else {
626+
break;
627+
case WIFI_SECURITY_TYPE_PSK:
626628
security = WHD_SECURITY_WPA2_AES_PSK;
629+
break;
630+
case WIFI_SECURITY_TYPE_SAE:
631+
security = WHD_SECURITY_WPA3_SAE;
632+
break;
633+
default:
634+
goto error;
627635
}
628636

629637
if (whd_wifi_init_ap(airoc_ap_if, &ssid, security, (const uint8_t *)params->psk,

0 commit comments

Comments
 (0)