@@ -605,6 +605,32 @@ static int wpas_add_and_config_network(struct wpa_supplicant *wpa_s,
605
605
goto out ;
606
606
}
607
607
}
608
+ } else if (params -> security == WIFI_SECURITY_TYPE_WPA_AUTO_PERSONAL ) {
609
+ if (!wpa_cli_cmd_v ("set_network %d psk \"%s\"" , resp .network_id ,
610
+ psk_null_terminated )) {
611
+ goto out ;
612
+ }
613
+
614
+ if (params -> sae_password ) {
615
+ if (!wpa_cli_cmd_v ("set_network %d sae_password \"%s\"" ,
616
+ resp .network_id , sae_null_terminated )) {
617
+ goto out ;
618
+ }
619
+ } else {
620
+ if (!wpa_cli_cmd_v ("set_network %d sae_password \"%s\"" ,
621
+ resp .network_id , psk_null_terminated )) {
622
+ goto out ;
623
+ }
624
+ }
625
+
626
+ if (!wpa_cli_cmd_v ("set sae_pwe 2" )) {
627
+ goto out ;
628
+ }
629
+
630
+ if (!wpa_cli_cmd_v ("set_network %d key_mgmt WPA-PSK SAE" ,
631
+ resp .network_id )) {
632
+ goto out ;
633
+ }
608
634
#ifdef CONFIG_WIFI_NM_WPA_SUPPLICANT_CRYPTO_ENTERPRISE
609
635
} else if (params -> security == WIFI_SECURITY_TYPE_EAP_TLS ) {
610
636
if (!wpa_cli_cmd_v ("set_network %d key_mgmt WPA-EAP" ,
@@ -1494,7 +1520,32 @@ int hapd_config_network(struct hostapd_iface *iface,
1494
1520
if (!hostapd_cli_cmd_v ("set sae_pwe 2" )) {
1495
1521
goto out ;
1496
1522
}
1497
- iface -> bss [0 ]-> conf -> sae_pwe = 2 ;
1523
+ } else if (params -> security == WIFI_SECURITY_TYPE_WPA_AUTO_PERSONAL ) {
1524
+ if (!hostapd_cli_cmd_v ("set wpa 2" )) {
1525
+ goto out ;
1526
+ }
1527
+
1528
+ if (!hostapd_cli_cmd_v ("set wpa_key_mgmt WPA-PSK SAE" )) {
1529
+ goto out ;
1530
+ }
1531
+
1532
+ if (!hostapd_cli_cmd_v ("set wpa_passphrase \"%s\"" , params -> psk )) {
1533
+ goto out ;
1534
+ }
1535
+
1536
+ if (!hostapd_cli_cmd_v ("set sae_password \"%s\"" ,
1537
+ params -> sae_password ? params -> sae_password
1538
+ : params -> psk )) {
1539
+ goto out ;
1540
+ }
1541
+
1542
+ if (!hostapd_cli_cmd_v ("set rsn_pairwise CCMP" )) {
1543
+ goto out ;
1544
+ }
1545
+
1546
+ if (!hostapd_cli_cmd_v ("set sae_pwe 2" )) {
1547
+ goto out ;
1548
+ }
1498
1549
} else if (params -> security == WIFI_SECURITY_TYPE_DPP ) {
1499
1550
if (!hostapd_cli_cmd_v ("set wpa 2" )) {
1500
1551
goto out ;
0 commit comments