Try to connect the AP using static IP if it's sec_mode is SAE 16/265116/1
authorNiraj Kumar Goit <niraj.g@samsung.com>
Mon, 11 Oct 2021 07:28:21 +0000 (12:58 +0530)
committerNiraj Kumar Goit <niraj.g@samsung.com>
Mon, 11 Oct 2021 07:28:21 +0000 (12:58 +0530)
Change-Id: I950cec931127a8e52f4f517ce6242ef0a197b810
Signed-off-by: Niraj Kumar Goit <niraj.g@samsung.com>
src/network_interface.c

index 02452b9e034baf85b9fcd0810446194355a72ce0..0edf192719a1f7c608e8c80b6ac464f287e238f2 100644 (file)
@@ -656,6 +656,22 @@ static int __net_wifi_modify_profile(network_info_s *network_info,
                        Error = _net_dbus_set_agent_passphrase_and_connect(network_info,
                                        security_info->authentication.psk.pskKey, ProfileName);
 
+                       if (NET_ERR_NONE != Error) {
+                               WIFI_LOG(WIFI_ERROR, "Failed to set agent field");
+
+                               __NETWORK_FUNC_EXIT__;
+                               return Error;
+                       }
+               }
+    /*
+     * Try to connect the AP using static IP if it's sec_mode is SAE
+     */
+       } else if (ex_security_info->sec_mode == WLAN_SEC_MODE_SAE) {
+               if (g_strcmp0(security_info->authentication.sae.saeKey,
+                               ex_security_info->authentication.sae.saeKey) != 0) {
+                       Error = _net_dbus_set_agent_passphrase_and_connect(network_info,
+                                       security_info->authentication.sae.saeKey, ProfileName);
+
                        if (NET_ERR_NONE != Error) {
                                WIFI_LOG(WIFI_ERROR, "Failed to set agent field");