From 5dbb2d8a1f81216f9cd922b5e182077f18c5127b Mon Sep 17 00:00:00 2001 From: Nishant Chaprana Date: Tue, 11 May 2021 18:55:57 +0530 Subject: [PATCH] Add support of WPA3 AP connection Change-Id: I9ef706257b5d2cc579073d59b1965f43d5978b51 Signed-off-by: Nishant Chaprana --- common/common_pswd_popup.c | 3 ++- common/common_utils.c | 1 + packaging/wifi-efl-ug.spec | 2 +- ui-gadget/viewer_manager.c | 4 ++++ ui-gadget/wifi_viewer_list.c | 3 +++ wifi-syspopup/view-main.c | 3 +++ 6 files changed, 14 insertions(+), 2 deletions(-) diff --git a/common/common_pswd_popup.c b/common/common_pswd_popup.c index c44b968..e69e46d 100644 --- a/common/common_pswd_popup.c +++ b/common/common_pswd_popup.c @@ -67,7 +67,8 @@ static void __popup_entry_changed_cb(void* data, Evas_Object* obj, void* event_i elm_entry_input_panel_return_key_disabled_set(obj, EINA_TRUE); } - } else if (pswd_popup_data->sec_type == WIFI_MANAGER_SECURITY_TYPE_WPA2_PSK || + } else if (pswd_popup_data->sec_type == WIFI_MANAGER_SECURITY_TYPE_SAE || + pswd_popup_data->sec_type == WIFI_MANAGER_SECURITY_TYPE_WPA2_PSK || pswd_popup_data->sec_type == WIFI_MANAGER_SECURITY_TYPE_WPA_PSK) { if (passwd_length > 7) { elm_object_disabled_set(btn_ok, EINA_FALSE); diff --git a/common/common_utils.c b/common/common_utils.c index cf6f79e..9c0cdf2 100644 --- a/common/common_utils.c +++ b/common/common_utils.c @@ -204,6 +204,7 @@ char *common_utils_get_ap_security_type_info_txt(const char *pkg_name, case WIFI_MANAGER_SECURITY_TYPE_WEP: /** WEP */ case WIFI_MANAGER_SECURITY_TYPE_WPA_PSK: /** WPA-PSK */ case WIFI_MANAGER_SECURITY_TYPE_WPA2_PSK: /** WPA2-PSK */ + case WIFI_MANAGER_SECURITY_TYPE_SAE: /** WPA3 (SAE) */ if (TRUE == device_info->wps_mode) { status_txt = g_strdup_printf("%s (%s)", sc(pkg_name, I18N_TYPE_Secured), sc(pkg_name, I18N_TYPE_WPS_Available)); diff --git a/packaging/wifi-efl-ug.spec b/packaging/wifi-efl-ug.spec index 0b659cc..2e1f50d 100644 --- a/packaging/wifi-efl-ug.spec +++ b/packaging/wifi-efl-ug.spec @@ -1,6 +1,6 @@ Name: wifi-efl-ug Summary: Wi-Fi UI Gadget for TIZEN -Version: 1.1.4 +Version: 1.1.5 Release: 1 Group: App/Network License: Flora-1.1 diff --git a/ui-gadget/viewer_manager.c b/ui-gadget/viewer_manager.c index 3562d6b..96036f4 100644 --- a/ui-gadget/viewer_manager.c +++ b/ui-gadget/viewer_manager.c @@ -95,6 +95,7 @@ static wifi_emulator_sample_s wifi_samples[] = { {"uready", WIFI_MANAGER_SECURITY_TYPE_EAP, 1}, {"setup", WIFI_MANAGER_SECURITY_TYPE_NONE, 0}, {"Tizen", WIFI_MANAGER_SECURITY_TYPE_WPA2_PSK, 1}, + {"wpa3-AP", WIFI_MANAGER_SECURITY_TYPE_SAE, 1}, }; static int wifi_sample_count = sizeof(wifi_samples) / sizeof(wifi_samples[0]); @@ -2073,6 +2074,7 @@ static void hidden_ap_connect_ok_cb(void *data, case WIFI_MANAGER_SECURITY_TYPE_WEP: case WIFI_MANAGER_SECURITY_TYPE_WPA_PSK: case WIFI_MANAGER_SECURITY_TYPE_WPA2_PSK: + case WIFI_MANAGER_SECURITY_TYPE_SAE: szPassword = passwd_popup_get_txt(ug_app_state->passpopup); wifi_manager_ap_set_security_type(ap, hidden_ap_data->sec_mode); @@ -2123,6 +2125,7 @@ static void hidden_ap_connect_cancel_cb(void *data, Evas_Object *obj, case WIFI_MANAGER_SECURITY_TYPE_WEP: case WIFI_MANAGER_SECURITY_TYPE_WPA_PSK: case WIFI_MANAGER_SECURITY_TYPE_WPA2_PSK: + case WIFI_MANAGER_SECURITY_TYPE_SAE: INFO_LOG(UG_NAME_NORMAL, "Hidden AP Secured"); passwd_popup_free(ug_app_state->passpopup); @@ -2309,6 +2312,7 @@ void viewer_manager_specific_scan_response_hlr( case WIFI_MANAGER_SECURITY_TYPE_WEP: case WIFI_MANAGER_SECURITY_TYPE_WPA_PSK: case WIFI_MANAGER_SECURITY_TYPE_WPA2_PSK: + case WIFI_MANAGER_SECURITY_TYPE_SAE: SECURE_INFO_LOG(UG_NAME_NORMAL, "Secured(%d) %s found", sec_mode, ssid); diff --git a/ui-gadget/wifi_viewer_list.c b/ui-gadget/wifi_viewer_list.c index 03b4fa5..7c9b661 100644 --- a/ui-gadget/wifi_viewer_list.c +++ b/ui-gadget/wifi_viewer_list.c @@ -438,6 +438,7 @@ static void __passwd_popup_ok_cb(void *data, Evas_Object *obj, void *event_info) case WIFI_MANAGER_SECURITY_TYPE_WPA_PSK: case WIFI_MANAGER_SECURITY_TYPE_WPA2_PSK: + case WIFI_MANAGER_SECURITY_TYPE_SAE: if (password_len < 8 || password_len > 64) { common_utils_send_message_to_net_popup( "Network connection popup", @@ -655,6 +656,7 @@ void viewer_list_wifi_reconnect(wifi_device_info_t *device_info) case WIFI_MANAGER_SECURITY_TYPE_WEP: case WIFI_MANAGER_SECURITY_TYPE_WPA_PSK: case WIFI_MANAGER_SECURITY_TYPE_WPA2_PSK: + case WIFI_MANAGER_SECURITY_TYPE_SAE: memset(&popup_info, 0, sizeof(pswd_popup_create_req_data_t)); device_info_temp = view_list_item_device_info_create(device_info->ap); @@ -742,6 +744,7 @@ void viewer_list_wifi_connect(wifi_device_info_t *device_info) case WIFI_MANAGER_SECURITY_TYPE_WEP: case WIFI_MANAGER_SECURITY_TYPE_WPA_PSK: case WIFI_MANAGER_SECURITY_TYPE_WPA2_PSK: + case WIFI_MANAGER_SECURITY_TYPE_SAE: memset(&popup_info, 0, sizeof(pswd_popup_create_req_data_t)); dev_info_temp = view_list_item_device_info_create(device_info->ap); diff --git a/wifi-syspopup/view-main.c b/wifi-syspopup/view-main.c index aaba6db..7559eea 100644 --- a/wifi-syspopup/view-main.c +++ b/wifi-syspopup/view-main.c @@ -107,6 +107,7 @@ static void __popup_ok_cb(void *data, Evas_Object *obj, void *event_info) case WIFI_MANAGER_SECURITY_TYPE_WPA_PSK: case WIFI_MANAGER_SECURITY_TYPE_WPA2_PSK: + case WIFI_MANAGER_SECURITY_TYPE_SAE: if (password_len < 8 || password_len > 64) { common_utils_send_message_to_net_popup( "Network connection popup", @@ -311,6 +312,7 @@ void view_main_wifi_reconnect(devpkr_gl_data_t *gdata) case WIFI_MANAGER_SECURITY_TYPE_WEP: case WIFI_MANAGER_SECURITY_TYPE_WPA_PSK: case WIFI_MANAGER_SECURITY_TYPE_WPA2_PSK: + case WIFI_MANAGER_SECURITY_TYPE_SAE: memset(&popup_info, 0, sizeof(pswd_popup_create_req_data_t)); popup_info.title = gdata->dev_info->ssid; @@ -379,6 +381,7 @@ void view_main_wifi_connect(devpkr_gl_data_t *gdata) case WIFI_MANAGER_SECURITY_TYPE_WEP: case WIFI_MANAGER_SECURITY_TYPE_WPA_PSK: case WIFI_MANAGER_SECURITY_TYPE_WPA2_PSK: + case WIFI_MANAGER_SECURITY_TYPE_SAE: memset(&popup_info, 0, sizeof(pswd_popup_create_req_data_t)); popup_info.title = gdata->dev_info->ssid; -- 2.7.4