Add multi interfaces function 76/242476/3
authorhyunuk.tak <hyunuk.tak@samsung.com>
Thu, 27 Aug 2020 06:30:46 +0000 (15:30 +0900)
committerJaehyun Kim <jeik01.kim@samsung.com>
Fri, 28 Aug 2020 11:28:50 +0000 (20:28 +0900)
Change-Id: Ifed28d38defb34ab11a0b48a3cc5cc78332a11c1
Signed-off-by: hyunuk.tak <hyunuk.tak@samsung.com>
21 files changed:
include/network_dbus.h
include/network_info.h [new file with mode: 0755]
include/network_interface.h
include/network_internal.h
include/network_signal.h
include/network_wlan.h
include/wifi-manager-extension.h
include/wifi_internal.h
packaging/capi-network-wifi-manager.spec
src/network_dbus.c
src/network_interface.c
src/network_internal.c
src/network_signal.c
src/wifi_ap.c
src/wifi_config.c
src/wifi_dpp.c [changed mode: 0644->0755]
src/wifi_internal.c
src/wifi_manager.c
src/wifi_tdls.c
tool/wifi_mgr_public_config.c
tool/wifi_mgr_tool.c

index e73ec39..64ea13e 100755 (executable)
@@ -82,103 +82,140 @@ typedef struct {
        gboolean is_hidden;
 } net_wifi_connect_service_info_t;
 
-int _net_dbus_open_connection(const char* profile_name);
-int _net_dbus_close_connection(const char* profile_name);
-int _net_dbus_scan_request(void);
-int _net_dbus_get_scan_state(int *state);
-int _net_dbus_set_bgscan_mode(net_wifi_background_scan_mode_e mode);
-int _net_dbus_set_agent_passphrase_and_connect(
+int _net_dbus_open_connection(network_info_s *network_info,
+               const char* profile_name);
+int _net_dbus_close_connection(network_info_s *network_info,
+               const char* profile_name);
+int _net_dbus_scan_request(network_info_s *network_info);
+int _net_dbus_get_scan_state(network_info_s *network_info, int *state);
+int _net_dbus_set_bgscan_mode(network_info_s *network_info,
+               net_wifi_background_scan_mode_e mode);
+int _net_dbus_set_agent_passphrase_and_connect(network_info_s *network_info,
                const char *passphrase, const char *profilename);
-int _net_dbus_get_wps_generated_pin(char **wps_pin);
-int _net_dbus_set_agent_wps_pbc_and_connect(const char *profilename);
-int _net_dbus_set_agent_wps_pin_and_connect(
+int _net_dbus_get_wps_generated_pin(network_info_s *network_info, char **wps_pin);
+int _net_dbus_set_agent_wps_pbc_and_connect(network_info_s *network_info,
+               const char *profilename);
+int _net_dbus_set_agent_wps_pin_and_connect(network_info_s *network_info,
                const char *wps_pin, const char *profilename);
-int _net_dbus_get_tech_status(net_tech_info_s* tech_status);
-int _net_dbus_connect_service(const net_wifi_connect_service_info_t* wifi_connection_info);
-int _net_dbus_get_preferred_ipv6_address(const char *profilename, char **address);
-int _net_dbus_set_profile_ipv4(net_profile_info_s* prof_info, char* profile_name);
-int _net_dbus_set_profile_ipv6(net_profile_info_s* prof_info, char* profile_name);
-int _net_dbus_set_profile_dns(net_profile_info_s* prof_info, char* profile_name);
-int _net_dbus_set_proxy(net_profile_info_s* prof_info, char* profile_name);
-int _net_dbus_get_technology_state(network_tech_state_info_s* tech_state);
-GVariant *_net_invoke_dbus_method(const char *dest, const char *path,
-               const char *interface_name, const char *method,
-               GVariant *params, int *dbus_error);
-int _net_invoke_dbus_method_nonblock(const char *dest, const char *path,
+int _net_dbus_get_tech_status(network_info_s *network_info,
+               net_tech_info_s *tech_status);
+int _net_dbus_connect_service(network_info_s *network_info,
+               const net_wifi_connect_service_info_t *wifi_connection_info);
+int _net_dbus_get_preferred_ipv6_address(network_info_s *network_info,
+               const char *profilename, char **address);
+int _net_dbus_set_profile_ipv4(network_info_s *network_info,
+               net_profile_info_s *prof_info, char *profile_name);
+int _net_dbus_set_profile_ipv6(network_info_s *network_info,
+               net_profile_info_s *prof_info, char *profile_name);
+int _net_dbus_set_profile_dns(network_info_s *network_info,
+               net_profile_info_s *prof_info, char *profile_name);
+int _net_dbus_set_proxy(network_info_s *network_info,
+               net_profile_info_s *prof_info, char *profile_name);
+int _net_dbus_get_technology_state(network_info_s *network_info,
+               network_tech_state_info_s *tech_state);
+GVariant *_net_invoke_dbus_method(network_info_s *network_info,
+               const char *dest, const char *path, const char *interface_name,
+               const char *method, GVariant *params, int *dbus_error);
+int _net_invoke_dbus_method_nonblock(network_info_s *network_info,
+               const char *dest, const char *path,
                const char *interface_name, const char *method,
                GVariant *params, int timeout,
                GAsyncReadyCallback notify_func);
-int _net_dbus_load_wifi_driver(gboolean wifi_picker_test);
-int _net_dbus_remove_wifi_driver(void);
-int _net_dbus_specific_scan_request(const char *ssid);
-int _net_dbus_bssid_scan_request(void);
-int _net_dbus_netlink_scan_request(GSList *nl_scan_list, const char *vsie);
-int _net_dbus_get_passpoint(int *enabled);
-int _net_dbus_set_passpoint(int enable);
-int _net_dbus_multi_scan_request(GSList *multi_scan_list);
-int _net_dbus_get_max_scan_ssids(int *max_scan_ssids);
-
-int _net_dbus_cancel_wps(void);
-int _net_dbus_open_connection_without_ssid();
-int _net_dbus_open_pin_connection_without_ssid(const char *pin);
-
-int _net_dbus_tdls_disconnect(const char* peer_mac_addr);
-int _net_dbus_tdls_connected_peer(char** peer_mac_addr);
-int _net_dbus_tdls_connect(const char *peer_mac_addr);
-int _net_dbus_tdls_discover(const char *peer_mac_addr);
-int _net_dbus_tdls_enable_channel_switch(const char* peer_mac_addr, int freq);
-int _net_dbus_tdls_disable_channel_switch(const char* peer_mac_addr);
-
-int _net_dbus_config_get_id_list(GSList **list);
-int _net_dbus_config_set_field(const gchar *config_id, const gchar *key, const gchar *value);
-int _net_dbus_config_get_passphrase(const gchar *config_id, gchar **passphrase);
-int _net_dbus_config_save_configurations(const gchar *config_id, const gchar *name,
+int _net_dbus_load_wifi_driver(network_info_s *network_info, gboolean wifi_picker_test);
+int _net_dbus_remove_wifi_driver(network_info_s *network_info);
+int _net_dbus_specific_scan_request(network_info_s *network_info, const char *ssid);
+int _net_dbus_bssid_scan_request(network_info_s *network_info);
+int _net_dbus_netlink_scan_request(network_info_s *network_info,
+               GSList *nl_scan_list, const char *vsie);
+int _net_dbus_get_passpoint(network_info_s *network_info, int *enabled);
+int _net_dbus_set_passpoint(network_info_s *network_info, int enable);
+int _net_dbus_multi_scan_request(network_info_s *network_info,
+               GSList *multi_scan_list);
+int _net_dbus_get_max_scan_ssids(network_info_s *network_info, int *max_scan_ssids);
+
+int _net_dbus_cancel_wps(network_info_s *network_info);
+int _net_dbus_open_connection_without_ssid(network_info_s *network_info);
+int _net_dbus_open_pin_connection_without_ssid(network_info_s *network_info,
+               const char *pin);
+
+int _net_dbus_tdls_disconnect(network_info_s *network_info, const char* peer_mac_addr);
+int _net_dbus_tdls_connected_peer(network_info_s *network_info, char** peer_mac_addr);
+int _net_dbus_tdls_connect(network_info_s *network_info, const char *peer_mac_addr);
+int _net_dbus_tdls_discover(network_info_s *network_info, const char *peer_mac_addr);
+int _net_dbus_tdls_enable_channel_switch(network_info_s *network_info,
+               const char* peer_mac_addr, int freq);
+int _net_dbus_tdls_disable_channel_switch(network_info_s *network_info,
+               const char* peer_mac_addr);
+
+int _net_dbus_config_get_id_list(network_info_s *network_info, GSList **list);
+int _net_dbus_config_set_field(network_info_s *network_info,
+               const gchar *config_id, const gchar *key, const gchar *value);
+int _net_dbus_config_get_passphrase(network_info_s *network_info,
+               const gchar *config_id, gchar **passphrase);
+int _net_dbus_config_save_configurations(network_info_s *network_info,
+               const gchar *config_id, const gchar *name,
                const gchar *ssid, const gchar *passphrase, const gchar *proxy_address,
                net_ip_info_config_s *ip_info, gboolean is_hidden, gboolean is_created);
-int _net_dbus_config_save_eap_configurations(const gchar *config_id,
-               const gchar *name, const gchar *ssid, const gchar *passphrase,
+int _net_dbus_config_save_eap_configurations(network_info_s *network_info,
+               const gchar *config_id, const gchar *name, const gchar *ssid, const gchar *passphrase,
                const gchar *proxy_address, net_eap_config_s *eap_config, gboolean is_hidden, gboolean is_created);
-int _net_dbus_config_remove_configurations(const gchar *config_id);
-int _net_dbus_config_load_configurations(const gchar *config_id, gchar **name,
-               gchar **passphrase, net_wifi_security_type_e *security_type, gchar **proxy_address,
+int _net_dbus_config_remove_configurations(network_info_s *network_info,
+               const gchar *config_id);
+int _net_dbus_config_load_configurations(network_info_s *network_info,
+               const gchar *config_id, gchar **name, gchar **passphrase,
+               net_wifi_security_type_e *security_type, gchar **proxy_address,
                gboolean *is_hidden, net_ip_info_config_s **ip_info, void *last_error);
-int _net_dbus_config_load_eap_configurations(const gchar *config_id,
-               gchar **name, net_wifi_security_type_e *security_type, gchar **proxy_address,
-               gboolean *is_hidden, net_eap_config_s **eap_config, void *last_error);
-
-int _net_dbus_device_policy_get_wifi(int *state);
-int _net_dbus_device_policy_get_wifi_profile(int *state);
-int _net_dbus_resume_bgscan(void);
-int _net_dbus_pause_bgscan(void);
-int _net_dbus_get_autoscanmode(unsigned int *autoscanmode);
-int _net_dbus_get_autoscan(gboolean *autoscan);
-
-
-int _net_dbus_add_vsie(unsigned int frame_id, const char *vsie_str);
-int _net_dbus_get_vsie(unsigned int frame_id, char **vsie_str);
-int _net_dbus_remove_vsie(unsigned int frame_id, const char *vsie_str);
-int _net_dbus_flush_bss(void);
-int _net_dbus_set_bssid(char *bssid);
-int _net_dbus_get_auto_connect_mode(int *connect_mode);
-int _net_dbus_set_auto_connect_mode(int connect_mode);
-int _net_dbus_wifi_set_autoconnect(const char *profile_name, gboolean autoconnect);
-int _net_dbus_wifi_get_autoconnect(const char *profile_name, gboolean *autoconnect);
-int _net_dbus_get_5ghz_support(gboolean *supported);
-int _net_dbus_set_ip_conflict_period(unsigned int initial_time);
-
-int _net_dbus_dpp_enter_peer_uri(guint32 peer_id, guint32 own_id, const char *uri);
-int _net_dbus_dpp_generate_uri(guint32 peer_id, guint32 own_id, gboolean is_initiator, const char *key);
-
-int _net_dbus_dpp_start_configurator_initiator(const gchar *group_id, const gchar *ssid,
+int _net_dbus_config_load_eap_configurations(network_info_s *network_info,
+               const gchar *config_id, gchar **name, net_wifi_security_type_e *security_type,
+               gchar **proxy_address, gboolean *is_hidden, net_eap_config_s **eap_config, void *last_error);
+
+int _net_dbus_device_policy_get_wifi(network_info_s *network_info, int *state);
+int _net_dbus_device_policy_get_wifi_profile(network_info_s *network_info,
+               int *state);
+int _net_dbus_resume_bgscan(network_info_s *network_info);
+int _net_dbus_pause_bgscan(network_info_s *network_info);
+int _net_dbus_get_autoscanmode(network_info_s *network_info,
+               unsigned int *autoscanmode);
+int _net_dbus_get_autoscan(network_info_s *network_info, gboolean *autoscan);
+
+int _net_dbus_add_vsie(network_info_s *network_info,
+               unsigned int frame_id, const char *vsie_str);
+int _net_dbus_get_vsie(network_info_s *network_info,
+               unsigned int frame_id, char **vsie_str);
+int _net_dbus_remove_vsie(network_info_s *network_info,
+               unsigned int frame_id, const char *vsie_str);
+int _net_dbus_flush_bss(network_info_s *network_info);
+int _net_dbus_set_bssid(network_info_s *network_info, char *bssid);
+int _net_dbus_get_auto_connect_mode(network_info_s *network_info,
+               int *connect_mode);
+int _net_dbus_set_auto_connect_mode(network_info_s *network_info,
+               int connect_mode);
+int _net_dbus_wifi_set_autoconnect(network_info_s *network_info,
+               const char *profile_name, gboolean autoconnect);
+int _net_dbus_wifi_get_autoconnect(network_info_s *network_info,
+               const char *profile_name, gboolean *autoconnect);
+int _net_dbus_get_5ghz_support(network_info_s *network_info, gboolean *supported);
+int _net_dbus_set_ip_conflict_period(network_info_s *network_info, unsigned int initial_time);
+
+int _net_dbus_dpp_enter_peer_uri(network_info_s *network_info,
+               guint32 peer_id, guint32 own_id, const char *uri);
+int _net_dbus_dpp_generate_uri(network_info_s *network_info,
+               guint32 peer_id, guint32 own_id, gboolean is_initiator, const char *key);
+
+int _net_dbus_dpp_start_configurator_initiator(network_info_s *network_info,
+               const gchar *group_id, const gchar *ssid,
                const gchar *peer_uri, guint32 peer_id, const gchar *net_role,
                const gchar *akm, const gchar *configurator_key, const gchar *pass);
-int _net_dbus_dpp_start_enrollee_initiator(const gchar *peer_uri, guint32 peer_id);
-int _net_dbus_dpp_start_configurator_responder(const gchar *group_id,
-               const gchar *ssid, const gchar *net_role, const gchar *akm,
+int _net_dbus_dpp_start_enrollee_initiator(network_info_s *network_info,
+               const gchar *peer_uri, guint32 peer_id);
+int _net_dbus_dpp_start_configurator_responder(network_info_s *network_info,
+               const gchar *group_id, const gchar *ssid, const gchar *net_role, const gchar *akm,
                const gchar *auth_key, const gchar *configurator_key, const gchar *pass);
-int _net_dbus_dpp_start_enrollee_responder(const gchar *auth_key);
+int _net_dbus_dpp_start_enrollee_responder(network_info_s *network_info,
+               const gchar *auth_key);
 
-int _net_dbus_dpp_stop(guint32 peer_id, guint32 own_id, gboolean is_initiator);
+int _net_dbus_dpp_stop(network_info_s *network_info,
+               guint32 peer_id, guint32 own_id, gboolean is_initiator);
 
 
 #ifdef __cplusplus
diff --git a/include/network_info.h b/include/network_info.h
new file mode 100755 (executable)
index 0000000..3e44192
--- /dev/null
@@ -0,0 +1,172 @@
+/*
+ * Copyright (c) 2012-2013 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __NETWORK_INFO_H__
+#define __NETWORK_INFO_H__
+
+#include <gio/gio.h>
+
+#include "network_error.h"
+#include "network_wlan.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define NET_TECH_LENGTH_MAX 64
+
+typedef enum {
+       NET_EVENT_OPEN_RSP,
+       NET_EVENT_CLOSE_RSP,
+       NET_EVENT_OPEN_IND,
+       NET_EVENT_CLOSE_IND,
+       NET_EVENT_NET_STATE_IND,
+       NET_EVENT_WIFI_SCAN_RSP,
+       NET_EVENT_WIFI_SCAN_IND,
+       NET_EVENT_WIFI_SCAN_CHANGED,
+       NET_EVENT_WIFI_MAC_ID_IND, /** This is deprecated Event and maintained only for compatibility */
+       NET_EVENT_WIFI_POWER_RSP,
+       NET_EVENT_WIFI_POWER_IND,
+       NET_EVENT_WIFI_SPECIFIC_SCAN_RSP,
+       NET_EVENT_WIFI_SPECIFIC_SCAN_IND,
+       NET_EVENT_WIFI_MULTI_SCAN_RSP,
+       NET_EVENT_WIFI_MULTI_SCAN_IND,
+       NET_EVENT_WIFI_WPS_RSP,
+       NET_EVENT_WIFI_SCANNING_IND,
+       NET_EVENT_WIFI_BSSID_SCAN_IND,
+       NET_EVENT_WIFI_NETLINK_SCAN_IND,
+       NET_EVENT_WIFI_IP_CONFLICT_IND,
+       NET_EVENT_WIFI_TDLS_DISCOVERED_IND,
+       NET_EVENT_WIFI_TDLS_CONNECTED_IND,
+       NET_EVENT_WIFI_TDLS_DISCONNECTED_IND,
+       NET_EVENT_WIFI_FORGET_AP_IND,
+       NET_EVENT_WIFI_RSSI_CHANGED,
+       NET_EVENT_WIFI_RSSI_LEVEL_CHANGED,
+       NET_EVENT_WIFI_MODULE_STATE_CHANGED,
+       NET_EVENT_WIFI_DPP_URI_GENERATED,
+       NET_EVENT_WIFI_DPP_BOOTSTRAPPED,
+       NET_EVENT_WIFI_DPP_AWAITING,
+       NET_EVENT_WIFI_DPP_AUTHENTICATING,
+       NET_EVENT_WIFI_DPP_AUTH_SUCCESS,
+       NET_EVENT_WIFI_DPP_AUTH_FAILED,
+       NET_EVENT_WIFI_DPP_NOT_COMPATIBLE,
+       NET_EVENT_WIFI_DPP_CONF_FAILED,
+       NET_EVENT_WIFI_DPP_SCAN_PEER_QR,
+       NET_EVENT_WIFI_DPP_NETWORK_ID,
+       NET_EVENT_WIFI_DPP_CONF_SENT,
+       NET_EVENT_WIFI_DPP_CONF_RECEIVED,
+       NET_EVENT_WIFI_DPP_FAILED,
+       NET_EVENT_WIFI_DPP_REMOVED,
+       NET_EVENT_WIFI_DPP_EVENT_IND, /* TODO: Make this in detail */
+} net_event_e;
+
+typedef struct {
+       net_event_e     Event;                                                          /** CM Asynchronous event */
+       char ProfileName[NET_PROFILE_NAME_LEN_MAX+1];   /** Profile Identifier corresponding to the event */
+       net_err_e Error;                                                                /** Event Status */
+       int Datalength;                                                                 /** Event data length */
+       void *Data;                                                                     /** Event data: Depending on the event, Event Data will be
+                                                                                                               type-casted to the appropriate event info data structure */
+} net_event_info_s;
+
+typedef void (*net_event_cb)(const net_event_info_s *net_event, void *user_data);
+
+typedef enum {
+       NET_STATE_TYPE_UNKNOWN  = 0x00, /** Not defined */
+       NET_STATE_TYPE_IDLE,                    /** Idle state */
+       NET_STATE_TYPE_FAILURE,                 /** Failure state */
+       NET_STATE_TYPE_ASSOCIATION,             /** Association state */
+       NET_STATE_TYPE_CONFIGURATION,   /** Configuration state */
+       NET_STATE_TYPE_READY,                   /** Ready state */
+       NET_STATE_TYPE_ONLINE,                  /** Online state */
+       NET_STATE_TYPE_DISCONNECT,              /** Login state */
+} net_state_type_e;
+
+typedef enum {
+       WIFI_UNKNOWN            = 0x00, /** Unknown state */
+       WIFI_OFF                = 0x01, /** Wi-Fi is Off */
+       WIFI_ON                 = 0x02, /** Wi-Fi is On(idle/failure) */
+       WIFI_ASSOCIATION        = 0x03, /** Trying association */
+       WIFI_CONFIGURATION      = 0x04, /** Trying configuration */
+       WIFI_CONNECTED          = 0x05, /** Wi-Fi is connected */
+       WIFI_DISCONNECTING      = 0x06, /** Trying to disconnect */
+} net_wifi_state_e;
+
+typedef enum {
+       NETWORK_REQUEST_TYPE_SCAN = 0x00,
+       NETWORK_REQUEST_TYPE_OPEN_CONNECTION,
+       NETWORK_REQUEST_TYPE_CLOSE_CONNECTION,
+       NETWORK_REQUEST_TYPE_WIFI_POWER,
+       NETWORK_REQUEST_TYPE_ENROLL_WPS,
+       NETWORK_REQUEST_TYPE_SPECIFIC_SCAN,
+       NETWORK_REQUEST_TYPE_BSSID_SCAN,
+       NETWORK_REQUEST_TYPE_NETLINK_SCAN,
+       NETWORK_REQUEST_TYPE_IP_CONFLICT,
+       NETWORK_REQUEST_TYPE_MULTI_SCAN,
+       NETWORK_REQUEST_TYPE_SET_DEFAULT,
+       NETWORK_REQUEST_TYPE_RESET_DEFAULT,
+       NETWORK_REQUEST_TYPE_TDLS_DISCOVERY,
+       NETWORK_REQUEST_TYPE_FORGET_AP,
+       NETWORK_REQUEST_TYPE_MAX
+} network_async_request_type_e;
+
+typedef struct {
+       int flag;
+       char ProfileName[NET_PROFILE_NAME_LEN_MAX + 1];
+       char ssid[NET_WLAN_ESSID_LEN + 1];
+       GSList *multi_scan_list;
+       int multi_scan_type;
+} network_request_table_s;
+
+typedef struct {
+       GDBusConnection *connection;
+       GCancellable *cancellable;
+
+       guint subscribe_id_connman_state;
+       guint subscribe_id_connman_error;
+       guint subscribe_id_connman_scandone;
+       guint subscribe_id_connman_scanstarted;
+       guint subscribe_id_netconfig_wifi;
+       guint subscribe_id_netconfig;
+
+       char interface_name[NET_WLAN_IF_NAME_LEN];
+       char mac_address[WIFI_MAC_ADDR_LEN + 1];
+       net_state_type_e service_state;
+       net_wifi_state_e wifi_state;
+       gboolean scan_pending;
+       int net_service_error;
+       network_request_table_s request_table[NETWORK_REQUEST_TYPE_MAX];
+
+       void *wifi_handle;
+       net_event_cb event_callback;
+       void *user_data;
+} network_info_s;
+
+typedef struct {
+       char technology[NET_TECH_LENGTH_MAX];
+       char AvailableTechnology;
+       char EnabledTechnology;
+       char ConnectedTechnology;
+       char DefaultTechnology;
+       unsigned char Connected;
+       unsigned char Powered;
+} network_tech_state_info_s;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __NETWORK_INFO_H__ */
index 1d82be2..dcfe2c3 100755 (executable)
@@ -18,6 +18,8 @@
 #define __NETWORK_INTERFACE_H__
 
 #include <glib.h>
+
+#include "network_info.h"
 #include "network_wlan.h"
 #include "network_error.h"
 
@@ -48,48 +50,6 @@ extern "C" {
        } while (0)
 
 typedef enum {
-       NET_EVENT_OPEN_RSP,
-       NET_EVENT_CLOSE_RSP,
-       NET_EVENT_OPEN_IND,
-       NET_EVENT_CLOSE_IND,
-       NET_EVENT_NET_STATE_IND,
-       NET_EVENT_WIFI_SCAN_RSP,
-       NET_EVENT_WIFI_SCAN_IND,
-       NET_EVENT_WIFI_SCAN_CHANGED,
-       NET_EVENT_WIFI_MAC_ID_IND, /** This is deprecated Event and maintained only for compatibility */
-       NET_EVENT_WIFI_POWER_RSP,
-       NET_EVENT_WIFI_POWER_IND,
-       NET_EVENT_WIFI_SPECIFIC_SCAN_RSP,
-       NET_EVENT_WIFI_SPECIFIC_SCAN_IND,
-       NET_EVENT_WIFI_MULTI_SCAN_RSP,
-       NET_EVENT_WIFI_MULTI_SCAN_IND,
-       NET_EVENT_WIFI_WPS_RSP,
-       NET_EVENT_WIFI_SCANNING_IND,
-       NET_EVENT_WIFI_BSSID_SCAN_IND,
-       NET_EVENT_WIFI_NETLINK_SCAN_IND,
-       NET_EVENT_WIFI_IP_CONFLICT_IND,
-       NET_EVENT_WIFI_TDLS_DISCOVERED_IND,
-       NET_EVENT_WIFI_TDLS_CONNECTED_IND,
-       NET_EVENT_WIFI_TDLS_DISCONNECTED_IND,
-       NET_EVENT_WIFI_FORGET_AP_IND,
-       NET_EVENT_WIFI_DPP_URI_GENERATED,
-       NET_EVENT_WIFI_DPP_BOOTSTRAPPED,
-       NET_EVENT_WIFI_DPP_AWAITING,
-       NET_EVENT_WIFI_DPP_AUTHENTICATING,
-       NET_EVENT_WIFI_DPP_AUTH_SUCCESS,
-       NET_EVENT_WIFI_DPP_AUTH_FAILED,
-       NET_EVENT_WIFI_DPP_NOT_COMPATIBLE,
-       NET_EVENT_WIFI_DPP_CONF_FAILED,
-       NET_EVENT_WIFI_DPP_SCAN_PEER_QR,
-       NET_EVENT_WIFI_DPP_NETWORK_ID,
-       NET_EVENT_WIFI_DPP_CONF_SENT,
-       NET_EVENT_WIFI_DPP_CONF_RECEIVED,
-       NET_EVENT_WIFI_DPP_FAILED,
-       NET_EVENT_WIFI_DPP_REMOVED,
-       NET_EVENT_WIFI_DPP_EVENT_IND, /* TODO: Make this in detail */
-} net_event_e;
-
-typedef enum {
        WIFI_TECH_UNKNOWN               = 0x00,
        WIFI_TECH_OFF                   = 0x01,
        WIFI_TECH_WPS_ONLY              = 0x02,
@@ -99,16 +59,6 @@ typedef enum {
 } wifi_tech_state_e;
 
 typedef enum {
-       WIFI_UNKNOWN            = 0x00, /** Unknown state */
-       WIFI_OFF                = 0x01, /** Wi-Fi is Off */
-       WIFI_ON                 = 0x02, /** Wi-Fi is On(idle/failure) */
-       WIFI_ASSOCIATION        = 0x03, /** Trying association */
-       WIFI_CONFIGURATION      = 0x04, /** Trying configuration */
-       WIFI_CONNECTED          = 0x05, /** Wi-Fi is connected */
-       WIFI_DISCONNECTING      = 0x06, /** Trying to disconnect */
-} net_wifi_state_e;
-
-typedef enum {
        WIFI_BGSCAN_MODE_EXPONENTIAL = 0x00,    /** scan cycle : 4, 8, 16, ...128s */
        WIFI_BGSCAN_MODE_PERIODIC,                              /** scan cycle : 10s */
 } net_wifi_background_scan_mode_e;
@@ -147,17 +97,6 @@ typedef enum {
 } net_wifi_security_type_e;
 
 typedef enum {
-       NET_STATE_TYPE_UNKNOWN  = 0x00, /** Not defined */
-       NET_STATE_TYPE_IDLE,                    /** Idle state */
-       NET_STATE_TYPE_FAILURE,                 /** Failure state */
-       NET_STATE_TYPE_ASSOCIATION,             /** Association state */
-       NET_STATE_TYPE_CONFIGURATION,   /** Configuration state */
-       NET_STATE_TYPE_READY,                   /** Ready state */
-       NET_STATE_TYPE_ONLINE,                  /** Online state */
-       NET_STATE_TYPE_DISCONNECT,              /** Login state */
-} net_state_type_e;
-
-typedef enum {
        NET_STATE_ERROR_NONE                    = 0x00,
        NET_STATE_ERROR_OUT_OF_RANGE    = 0x01,
        NET_STATE_ERROR_PIN_MISSING             = 0x02,
@@ -183,10 +122,10 @@ typedef struct {
 } net_profile_bssid_list_s;
 
 typedef struct {
-       char ProfileName[NET_PROFILE_NAME_LEN_MAX+1];   /** Profile name */
+       char ProfileName[NET_PROFILE_NAME_LEN_MAX + 1]; /** Profile name */
        net_state_type_e ProfileState;                                  /** Service state */
-       char essid[NET_WLAN_ESSID_LEN+1];                               /** ESSID */
-       char bssid[WIFI_MAC_ADDR_LEN+1];                                /** Basic service set identification */
+       char essid[NET_WLAN_ESSID_LEN + 1];                             /** ESSID */
+       char bssid[WIFI_MAC_ADDR_LEN + 1];                              /** Basic service set identification */
        unsigned char Strength;                                                 /**  Strength : between 0 and 100 */
        unsigned int frequency;                                                 /** Frequency band(MHz) */
        int max_rate;                                                           /** Maximum speed of the line(Mbps) */
@@ -201,18 +140,25 @@ typedef struct {
        net_error_state_type_e          ProfileErrorState;      /** Service error state */
        char                                            Favourite;                      /** Favourite flag */
        int disconnect_reason;                                                  /** Supplicant Disconnect Reason Code */
-       unsigned char raw_ssid[NET_WLAN_RAW_SSID_LEN+1];/** Raw SSID bytes */
+       unsigned char raw_ssid[NET_WLAN_RAW_SSID_LEN + 1]; /** Raw SSID bytes */
        int raw_ssid_len;                                                               /** Raw SSID length */
        GSList *vsie_list;                      /** List of Vendor Specific Information Element of AP*/
        int assoc_status_code;                                                  /** Supplicant WiFi Association Status Code */
        char country_code[NET_WLAN_COUNTRY_CODE_LEN];                           /** Country code received from AP */
-       char operation_mode[NET_MAX_PROTOCOL_LEN+1];                            /** WI-FI Network Protocol Type (802.11a/b/g/n/ac/ax) */
+       char operation_mode[NET_MAX_PROTOCOL_LEN + 1];                          /** WI-FI Network Protocol Type (802.11a/b/g/n/ac/ax) */
        unsigned int connection_mode;                                   /** Connection mode (IEEE 802.11b/g/n/a/ac) */
        GSList *bssid_list;                     /** List if BSSID, strength and frequency of AP **/
        gboolean ap_hidden_status;              /** Hidden Status of connected AP */
+
+       network_info_s *network_info;
 } net_profile_info_s;
 
 typedef struct {
+       char name[NET_WLAN_IF_NAME_LEN];
+       net_wifi_state_e state;
+} net_wifi_interface_info_s;
+
+typedef struct {
        net_wifi_wps_type_e type;                               /** PBC / PIN */
        char pin[NET_WLAN_MAX_WPSPIN_LEN + 1];  /** Optional. This pin is needed when the user input PIN code */
 } net_wifi_wps_info_s;
@@ -220,7 +166,7 @@ typedef struct {
 typedef struct {
        char essid[NET_WLAN_ESSID_LEN + 1];             /** Basic feature */
        unsigned char raw_ssid[NET_WLAN_RAW_SSID_LEN + 1];      /** Raw SSID bytes */
-       int raw_ssid_len;                               /** Raw SSID length */
+       int raw_ssid_len;                                               /** Raw SSID length */
        wlan_connection_mode_type_e wlan_mode;  /** Infrastructure / ad-hoc / auto mode */
        wlan_security_info_s security_info;             /** Security mode and authentication info */
        gboolean is_hidden;                                             /** Hidden network */
@@ -257,15 +203,6 @@ typedef struct {
 } net_netlink_scan_bss_info_s;
 
 typedef struct {
-       net_event_e     Event;                                                          /** CM Asynchronous event */
-       char ProfileName[NET_PROFILE_NAME_LEN_MAX+1];   /** Profile Identifier corresponding to the event */
-       net_err_e Error;                                                                /** Event Status */
-       int Datalength;                                                                 /** Event data length */
-       void * Data;                                                                    /** Event data: Depending on the event, Event Data will be
-                                                                                                               type-casted to the appropriate event info data structure */
-} net_event_info_s;
-
-typedef struct {
        char powered;           /** powered state */
        char connected;         /** connected state */
 } net_tech_info_s;
@@ -294,113 +231,147 @@ typedef struct {
 } net_ip_info_config_s;
 
 typedef struct {
+       char ifname[NET_WLAN_IF_NAME_LEN];
+       int rssi_level;
+} net_rssi_info_s;
+
+typedef struct {
+       char ifname[NET_WLAN_IF_NAME_LEN];
+       int status_uevent;
+} net_module_info_s;
+
+typedef struct {
        guint32 peer_id;
        guint32 own_id;
        char own_uri[MAX_DPP_URI_LEN];
 } net_dpp_event_info_s;
 
-typedef void (*net_event_cb)(const net_event_info_s* net_event, void* user_data);
-
-int net_register_client_ext(net_event_cb event_cb, void *user_data);
-int net_deregister_client_ext(void);
+int net_register_client_ext(network_info_s **network_info,
+               const char *interface_name, net_event_cb event_cb, void *user_data);
+void net_deregister_client_ext(network_info_s *network_info);
 
-gboolean net_check_ref_count(void);
-void net_set_cs_tid(int tid);
+void net_set_cs_tid(network_info_s *network_info, int tid);
 void net_unset_cs_tid(int tid);
 
-int net_open_connection(const char *profile_name);
-int net_close_connection(const char *profile_name);
-
-int net_get_technology_properties(net_tech_info_s *tech_info);
-
-int net_get_profile_info(const char *profile_name, net_profile_info_s *prof_info);
-int net_get_profile_list(GSList **profile_list);
-
-int net_modify_profile(const char *profile_name, net_profile_info_s *prof_info);
-int net_delete_profile(const char *profile_name);
-int net_delete_profile_async(const char *profile_name);
-void net_forget_ap_finshed(net_err_e Error);
-
-int net_init_profile_info(net_profile_info_s *ProfInfo);
-int net_specific_scan_wifi(const char *ssid);
-int net_get_wps_generated_pin(char **wps_pin);
-int net_bssid_scan_wifi(int activated);
-int net_netlink_scan_wifi(GSList *nl_scan_list, const char *vsie);
-int net_wifi_get_passpoint(int *enable);
-int net_wifi_set_passpoint(int enable);
-int net_wifi_get_scan_state(int *scan_state);
-int net_multi_scan_wifi(GSList *specific_scan_list, gboolean multi_scan_type[]);
-int net_wifi_get_max_scan_ssids(int *max_scan_ssids);
-
-int net_wifi_add_vsie(unsigned int frame_id, const char *vsie_str);
-int net_wifi_get_vsie(unsigned int frame_id, char **vsie_str);
-int net_wifi_remove_vsie(unsigned int frame_id, const char *vsie_str);
-int net_wifi_flush_bss(void);
-int net_wifi_set_bssid(char *bssid);
-int net_wifi_get_auto_connect_mode(int *connect_mode);
-int net_wifi_set_auto_connect_mode(int connect_mode);
-int net_wifi_set_ap_auto_connect(const char *profile_name, gboolean autoconnect);
-int net_wifi_get_ap_auto_connect(const char *profile_name, gboolean *autoconnect);
-
-int net_wifi_cancel_wps(void);
-
-int net_open_connection_with_wifi_info(const net_wifi_connection_info_s *wifi_info);
-int net_scan_wifi(void);
-int net_wifi_power_on(gboolean wifi_picker_test);
-int net_wifi_power_off(void);
-int net_wifi_enroll_wps(const char *profile_name, net_wifi_wps_info_s *wps_info);
-int net_check_get_privilege(void);
-int net_check_profile_privilege(void);
-
-int net_wifi_enroll_wps_without_ssid(net_wifi_wps_info_s *wps_info);
-
-int net_wifi_tdls_disconnect(const char* peer_mac_addr);
-int net_wifi_tdls_connected_peer(char** peer_mac_addr);
-int net_wifi_tdls_connect(const char* peer_mac_addr);
-int net_wifi_tdls_discover(const char* peer_mac_addr);
-int net_wifi_tdls_enable_channel_switch(const char* peer_mac_addr, int freq);
-int net_wifi_tdls_disbale_channel_switch(const char* peer_mac_addr);
-
-int net_get_device_policy_wifi(void);
-int net_get_device_policy_wifi_profile(void);
-int net_wifi_set_autoscan(gboolean autoscan);
-int net_wifi_set_background_scan_mode(net_wifi_background_scan_mode_e scan_mode);
-int net_wifi_get_autoscan(gboolean *autoscan);
-int net_wifi_get_autoscanmode(unsigned int *autoscanmode);
-int net_foreach_ipv6_address(GSList **ipv6_address_list);
-int net_get_preferred_ipv6_address(const char *profilename, char **address);
+int net_open_connection(network_info_s *network_info, const char *profile_name);
+int net_close_connection(network_info_s *network_info, const char *profile_name);
+
+int net_get_technology_properties(network_info_s *network_info, net_tech_info_s *tech_info);
+
+int net_get_interface_list(network_info_s *network_info, GSList **interface_list);
+
+int net_get_profile_info(network_info_s *network_info,
+               const char *profile_name, net_profile_info_s *prof_info);
+int net_get_profile_list(network_info_s *network_info, GSList **profile_list);
+
+int net_modify_profile(network_info_s *network_info,
+               const char *profile_name, net_profile_info_s *prof_info);
+int net_delete_profile(network_info_s *network_info, const char *profile_name);
+int net_delete_profile_async(network_info_s *network_info, const char *profile_name);
+void net_forget_ap_finished(network_info_s *network_info, net_err_e Error);
+
+int net_init_profile_info(network_info_s *network_info, net_profile_info_s *ProfInfo);
+int net_specific_scan_wifi(network_info_s *network_info, const char *ssid);
+int net_get_wps_generated_pin(network_info_s *network_info, char **wps_pin);
+int net_bssid_scan_wifi(network_info_s *network_info, int activated);
+int net_netlink_scan_wifi(network_info_s *network_info,
+               GSList *nl_scan_list, const char *vsie);
+int net_wifi_get_passpoint(network_info_s *network_info, int *enable);
+int net_wifi_set_passpoint(network_info_s *network_info, int enable);
+int net_wifi_get_scan_state(network_info_s *network_info, int *scan_state);
+int net_multi_scan_wifi(network_info_s *network_info,
+               GSList *specific_scan_list, gboolean multi_scan_type[]);
+int net_wifi_get_max_scan_ssids(network_info_s *network_info, int *max_scan_ssids);
+
+int net_wifi_add_vsie(network_info_s *network_info, unsigned int frame_id, const char *vsie_str);
+int net_wifi_get_vsie(network_info_s *network_info, unsigned int frame_id, char **vsie_str);
+int net_wifi_remove_vsie(network_info_s *network_info, unsigned int frame_id, const char *vsie_str);
+int net_wifi_flush_bss(network_info_s *network_info);
+int net_wifi_set_bssid(network_info_s *network_info, char *bssid);
+int net_wifi_get_auto_connect_mode(network_info_s *network_info, int *connect_mode);
+int net_wifi_set_auto_connect_mode(network_info_s *network_info, int connect_mode);
+int net_wifi_set_ap_auto_connect(network_info_s *network_info,
+               const char *profile_name, gboolean autoconnect);
+int net_wifi_get_ap_auto_connect(network_info_s *network_info,
+               const char *profile_name, gboolean *autoconnect);
+
+int net_wifi_cancel_wps(network_info_s *network_info);
+
+int net_open_connection_with_wifi_info(network_info_s *network_info,
+               const net_wifi_connection_info_s *wifi_info);
+int net_scan_wifi(network_info_s *network_info);
+int net_wifi_power_on(network_info_s *network_info, gboolean wifi_picker_test);
+int net_wifi_power_off(network_info_s *network_info);
+int net_wifi_enroll_wps(network_info_s *network_info,
+               const char *profile_name, net_wifi_wps_info_s *wps_info);
+int net_check_get_privilege(network_info_s *network_info);
+int net_check_profile_privilege(network_info_s *network_info);
+
+int net_wifi_enroll_wps_without_ssid(network_info_s *network_info,
+               net_wifi_wps_info_s *wps_info);
+
+int net_wifi_tdls_disconnect(network_info_s *network_info, const char* peer_mac_addr);
+int net_wifi_tdls_connected_peer(network_info_s *network_info, char** peer_mac_addr);
+int net_wifi_tdls_connect(network_info_s *network_info, const char* peer_mac_addr);
+int net_wifi_tdls_discover(network_info_s *network_info, const char* peer_mac_addr);
+int net_wifi_tdls_enable_channel_switch(network_info_s *network_info,
+               const char* peer_mac_addr, int freq);
+int net_wifi_tdls_disbale_channel_switch(network_info_s *network_info,
+               const char* peer_mac_addr);
+
+int net_get_device_policy_wifi(network_info_s *network_info);
+int net_get_device_policy_wifi_profile(network_info_s *network_info);
+int net_wifi_set_autoscan(network_info_s *network_info, gboolean autoscan);
+int net_wifi_set_background_scan_mode(network_info_s *network_info,
+               net_wifi_background_scan_mode_e scan_mode);
+int net_wifi_get_autoscan(network_info_s *network_info, gboolean *autoscan);
+int net_wifi_get_autoscanmode(network_info_s *network_info, unsigned int *autoscanmode);
+int net_wifi_get_module_state(network_info_s *network_info, int *module_state);
 
-int net_config_get_id_list(GSList **list);
-int net_config_set_field(const gchar *config_id, const gchar *key, const gchar *value);
-int net_config_get_passphrase(const gchar *config_id, gchar **passphrase);
-int net_config_save_configurations(const gchar *config_id,
-               const gchar *name, const gchar *ssid, const gchar *passphrase,
+int net_foreach_ipv6_address(GSList **ipv6_address_list);
+int net_get_preferred_ipv6_address(network_info_s *network_info,
+               const char *profilename, char **address);
+
+int net_config_get_id_list(network_info_s *network_info, GSList **list);
+int net_config_set_field(network_info_s *network_info,
+               const gchar *config_id, const gchar *key, const gchar *value);
+int net_config_get_passphrase(network_info_s *network_info,
+               const gchar *config_id, gchar **passphrase);
+int net_config_save_configurations(network_info_s *network_info,
+               const gchar *config_id, const gchar *name, const gchar *ssid, const gchar *passphrase,
                const gchar *proxy_address, net_ip_info_config_s *ip_info,
                gboolean is_hidden, gboolean is_created);
-int net_config_save_eap_configurations(const gchar *config_id,
-               const gchar *name, const gchar *ssid, const gchar *passphrase,
+int net_config_save_eap_configurations(network_info_s *network_info,
+               const gchar *config_id, const gchar *name, const gchar *ssid, const gchar *passphrase,
                const gchar *proxy_address, void *eap_config, gboolean is_hidden, gboolean is_created);
-int net_config_remove_configurations(const gchar *config_id);
-int net_config_load_configurations(const gchar *config_id, gchar **name,
+int net_config_remove_configurations(network_info_s *network_info,
+               const gchar *config_id);
+int net_config_load_configurations(network_info_s *network_info,
+               const gchar *config_id, gchar **name,
                gchar **passphrase, void *security_type, gchar **proxy_address, gboolean *is_hidden,
                net_ip_info_config_s **ip_info, void *last_error);
-int net_config_load_eap_configurations(const gchar *config_id,
-               gchar **name, void *security_type, gchar **proxy_address,
+int net_config_load_eap_configurations(network_info_s *network_info,
+               const gchar *config_id, gchar **name, void *security_type, gchar **proxy_address,
                gboolean *is_hidden, void **eap_config, void *last_error);
-int net_set_ip_conflict_detect_mode(gboolean detect);
-int net_ip_conflict_detect_is_enabled(gboolean *state);
-int net_wifi_set_ip_conflict_period(unsigned int initial_time);
-int net_wifi_get_ip_conflict_state(unsigned int *state);
-int net_wifi_get_ip_conflict_period(unsigned int* initial_time);
-wifi_tech_state_e wifi_state_get_technology_state(void);
-int net_get_service_state();
-int net_wifi_get_5ghz_support(gboolean *supported);
-
-int net_dpp_enter_peer_uri(guint32 peer_id, guint32 own_id, const char *uri);
-int net_dpp_generate_own_uri(guint32 peer_id, guint32 own_id, gboolean is_initiator, const char *key);
-int net_dpp_start(void *dpp_data, const char *auth_key,
+int net_set_ip_conflict_detect_mode(network_info_s *network_info, gboolean detect);
+int net_ip_conflict_detect_is_enabled(network_info_s *network_info, gboolean *state);
+int net_wifi_set_ip_conflict_period(network_info_s *network_info,
+               unsigned int initial_time);
+int net_wifi_get_ip_conflict_state(network_info_s *network_info, unsigned int *state);
+int net_wifi_get_ip_conflict_period(network_info_s *network_info,
+               unsigned int* initial_time);
+wifi_tech_state_e net_get_technology_state(network_info_s *network_info);
+int net_get_service_state(network_info_s *network_info);
+int net_wifi_get_5ghz_support(network_info_s *network_info, gboolean *supported);
+
+int net_dpp_enter_peer_uri(network_info_s *network_info,
+               guint32 peer_id, guint32 own_id, const char *uri);
+int net_dpp_generate_own_uri(network_info_s *network_info,
+               guint32 peer_id, guint32 own_id, gboolean is_initiator, const char *key);
+int net_dpp_start(void *dpp_handle, const char *auth_key,
                const char *configurator_key, const char *pass);
-int net_dpp_stop(guint32 peer_id, guint32 own_id, gboolean is_initiator);
+int net_dpp_stop(network_info_s *network_info,
+               guint32 peer_id, guint32 own_id, gboolean is_initiator);
 /**
  * \}
  */
index 9a81e97..f015bdd 100755 (executable)
@@ -23,6 +23,7 @@
 #include <gio/gio.h>
 #include <glib-object.h>
 
+#include "network_info.h"
 #include "network_interface.h"
 
 #ifdef __cplusplus
@@ -35,8 +36,6 @@ extern "C" {
 /** Maximum Profile Count */
 #define NET_PROFILE_LIST_MAX 512
 
-#define NET_TECH_LENGTH_MAX 64
-
 #define CONNMAN_MAX_BUFLEN 512
 
 #define CONNMAN_STATE_STRLEN 16
@@ -55,6 +54,7 @@ extern "C" {
 #define CONNMAN_MANAGER_PATH                   "/"
 #define CONNMAN_PATH                                   "/net/connman"
 #define CONNMAN_TECHNOLOGY_PATH                        "/net/connman/technology"
+#define CONNMAN_WIFI_TECHNOLOGY_PATH   "/net/connman/technology/wifi"
 
 #define NETCONFIG_SERVICE                              "net.netconfig"
 #define NETCONFIG_NETWORK_INTERFACE            NETCONFIG_SERVICE ".network"
@@ -102,6 +102,10 @@ extern "C" {
 #define NETCONFIG_SIGNAL_WIFI_CONNECT_FAIL     "WiFiConnectFail"
 #define NETCONFIG_SIGNAL_WPS_FAIL_EVENT                "WpsFailEvent"
 #define NETCONFIG_SIGNAL_IP_CONFLICT_EVENT     "IpConflictEvent"
+#define NETCONFIG_SIGNAL_RSSI_CHANGED       "RssiChanged"
+#define NETCONFIG_SIGNAL_RSSI_LEVEL_CHANGED "RssiLevelChanged"
+#define NETCONFIG_SIGNAL_MODULE_STATE_CHANGED "ModuleStateChanged"
+
 #define NETCONFIG_SIGNAL_DPP_URI_GENERATED "DppUriGenerated"
 #define NETCONFIG_SIGNAL_DPP_BOOTSTRAPPED "DppBootstrapped"
 #define NETCONFIG_SIGNAL_DPP_AWAITING "DppAwaiting"
@@ -126,75 +130,26 @@ extern "C" {
 #define __NETWORK_CAPI_FUNC_EXIT__             WIFI_LOG(WIFI_INFO, "Quit");
 
 typedef enum {
-       NETWORK_REQUEST_TYPE_SCAN = 0x00,
-       NETWORK_REQUEST_TYPE_OPEN_CONNECTION,
-       NETWORK_REQUEST_TYPE_CLOSE_CONNECTION,
-       NETWORK_REQUEST_TYPE_WIFI_POWER,
-       NETWORK_REQUEST_TYPE_ENROLL_WPS,
-       NETWORK_REQUEST_TYPE_SPECIFIC_SCAN,
-       NETWORK_REQUEST_TYPE_BSSID_SCAN,
-       NETWORK_REQUEST_TYPE_NETLINK_SCAN,
-       NETWORK_REQUEST_TYPE_IP_CONFLICT,
-       NETWORK_REQUEST_TYPE_MULTI_SCAN,
-       NETWORK_REQUEST_TYPE_SET_DEFAULT,
-       NETWORK_REQUEST_TYPE_RESET_DEFAULT,
-       NETWORK_REQUEST_TYPE_TDLS_DISCOVERY,
-       NETWORK_REQUEST_TYPE_FORGET_AP,
-       NETWORK_REQUEST_TYPE_MAX
-} network_async_request_type_e;
-
-typedef enum {
        NETWORK_SCAN_TYPE_FULL_CHANNEL = 0x00,
        NETWORK_SCAN_TYPE_SPECIFIC_SCAN,
        NETWORK_SCAN_TYPE_MULTI_SCAN,
        NETWORK_SCAN_TYPE_BSSID_SCAN,
 } network_scan_type_e;
 
-typedef struct {
-       int flag;
-       char ProfileName[NET_PROFILE_NAME_LEN_MAX+1];
-       char ssid[NET_WLAN_ESSID_LEN+1];
-       GSList *multi_scan_list;
-       int multi_scan_type;
-} network_request_table_s;
-
-typedef struct {
-       net_wifi_state_e wifi_state;
-       net_event_cb ClientEventCb_wifi;
-       void* user_data_wifi;
-       int ref_count;
-       guint handler_id;
-} network_info_s;
-
-typedef struct {
-       char technology[NET_TECH_LENGTH_MAX];
-       char AvailableTechnology;
-       char EnabledTechnology;
-       char ConnectedTechnology;
-       char DefaultTechnology;
-       unsigned char Connected;
-       unsigned char Powered;
-} network_tech_state_info_s;
-
-int _net_get_tech_state(GVariant *iter, network_tech_state_info_s* tech_state);
+int _net_get_tech_state(network_info_s *network_info,
+               GVariant *iter, network_tech_state_info_s* tech_state);
 char* _net_print_error(net_err_e error);
-int _net_open_connection_with_wifi_info(const net_wifi_connection_info_s* wifi_info);
+int _net_open_connection_with_wifi_info(network_info_s *network_info,
+               const net_wifi_connection_info_s* wifi_info);
 int _net_check_profile_name(const char* ProfileName);
-int _net_get_profile_list(GSList **profile_list);
-void _net_client_callback(net_event_info_s *event_data);
-net_wifi_state_e _net_get_wifi_state(net_err_e *net_error);
-void _net_clear_request_table(void);
-
-guint _net_client_callback_add(GSourceFunc func, gpointer user_data);
-void _net_client_callback_cleanup(void);
-
-gboolean _net_dbus_is_pending_call_used(void);
-void _net_dbus_pending_call_ref(void);
-void _net_dbus_pending_call_unref(void);
-int _net_dbus_create_gdbus_call(void);
-int _net_dbus_close_gdbus_call(void);
-GDBusConnection *_net_dbus_get_gdbus_conn(void);
-GCancellable *_net_dbus_get_gdbus_cancellable(void);
+gboolean _net_check_service_mac_addr(network_info_s *network_info, const char* service);
+int _net_get_interface_list(network_info_s *network_info, GSList **interface_list);
+int _net_get_profile_list(network_info_s *network_info, GSList **profile_list);
+net_err_e _net_get_wifi_state(network_info_s *network_info);
+void _net_clear_request_table(network_info_s *network_info);
+
+int _net_dbus_create_gdbus_call(network_info_s *network_info);
+void _net_dbus_close_gdbus_call(network_info_s *network_info);
 
 #ifdef __cplusplus
 }
index bdad7ce..0110d0f 100755 (executable)
 extern "C" {
 #endif
 
-#define CONNMAN_WIFI_SERVICE_PROFILE_PREFIX \
-                               CONNMAN_PATH "/service/wifi_"
+#define CONNMAN_WIFI_SERVICE_PROFILE_PREFIX CONNMAN_PATH "/service/wifi_"
 
-int _net_deregister_signal(void);
-int _net_register_signal(void);
-int _net_init_service_state(void);
+int _net_register_signal(network_info_s *network_info);
+void _net_deregister_signal(network_info_s *network_info);
 
-void _net_set_cs_tid(int tid);
+int _net_init_service_state(network_info_s *network_info);
+
+void _net_set_cs_tid(network_info_s *network_info, int tid);
 void _net_unset_cs_tid(int tid);
-net_state_type_e _net_get_service_state();
 
 #ifdef __cplusplus
 }
index 7310a9e..faf936c 100755 (executable)
@@ -25,6 +25,9 @@
 extern "C" {
 #endif /* __cplusplus */
 
+/** Length of interface name */
+#define NET_WLAN_IF_NAME_LEN                                   32
+
 /** Length of raw SSID */
 #define NET_WLAN_RAW_SSID_LEN                                  32
 
index d02216d..b0883d9 100755 (executable)
@@ -73,6 +73,102 @@ typedef void *wifi_manager_netlink_scan_h;
 */
 
 /**
+ * @brief Called for each found available interface.
+ * @since_tizen 6.0
+ * @param[in]  ifname       The interface name
+ * @param[in]  user_data    The user data passed from the request function
+ * @return  @c true to continue with the next iteration of the loop, \n
+ *     otherwise @c false to break out of the loop
+ * @pre  wifi_manager_foreach_available_interface() will invoke this callback.
+ * @see  wifi_manager_foreach_available_interface()
+ */
+typedef bool(*wifi_manager_interface_cb)(char *ifname, void *user_data);
+
+/**
+ * @brief Initializes Wi-Fi with interface name.
+ * @since_tizen 6.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/network.get
+ * @remarks You must release @a wifi using wifi_manager_deinitialize().
+ * @param[out] wifi        The Wi-Fi handle
+ * @param[in]  ifname      The interface name
+ * @return @c 0 on success, otherwise negative error value
+ * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
+ * @retval #WIFI_MANAGER_ERROR_ALREADY_INITIALIZED  Already initialized
+ * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
+ * @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION    Invalid operation
+ * @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED     Operation failed
+ * @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED    Permission Denied
+ * @retval #WIFI_MANAGER_ERROR_OUT_OF_MEMORY        Out of memory
+ * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
+ */
+int wifi_manager_initialize_with_interface_name(wifi_manager_h *wifi,
+               const char *ifname);
+
+/**
+ * @brief Gets a list of available interfaces.
+ * @since_tizen 6.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/network.get
+ * @param[in] wifi            The Wi-Fi handle
+ * @param[in] callback        The callback to be called
+ * @param[in] user_data       The user data passed to the callback function
+ * @return 0 on success, otherwise negative error value
+ * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
+ * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
+ * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
+ * @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED     Operation failed
+ * @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED    Permission Denied
+ * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
+ * @post This function invokes wifi_manager_found_ap_cb().
+ */
+int wifi_manager_foreach_available_interface(wifi_manager_h wifi,
+               wifi_manager_interface_cb callback, void *user_data);
+
+/**
+ * @brief Gets the result of the scan in all interfaces.
+ * @since_tizen 6.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/network.get
+ * @param[in] wifi            The Wi-Fi handle
+ * @param[in] callback        The callback to be called
+ * @param[in] user_data       The user data passed to the callback function
+ * @return 0 on success, otherwise negative error value
+ * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
+ * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
+ * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
+ * @retval #WIFI_MANAGER_ERROR_OPERATION_FAILED     Operation failed
+ * @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED    Permission Denied
+ * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
+ * @post This function invokes wifi_manager_found_ap_cb().
+ */
+int wifi_manager_foreach_found_ap_in_all_interfaces(wifi_manager_h wifi,
+               wifi_manager_found_ap_cb callback, void *user_data);
+
+/**
+ * @brief Gets configurations of an access point in all interfaces.
+ * @since_tizen 6.0
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/network.profile
+ *
+ * @param[in] wifi              The Wi-Fi handle
+ * @param[in] callback          The callback to be called
+ * @param[in] user_data         The user data passed to the callback function
+ *
+ * @return 0 on success, otherwise negative error value
+ * @retval #WIFI_MANAGER_ERROR_NONE                 Successful
+ * @retval #WIFI_MANAGER_ERROR_NOT_INITIALIZED      Not initialized
+ * @retval #WIFI_MANAGER_ERROR_INVALID_OPERATION    Invalid operation
+ * @retval #WIFI_MANAGER_ERROR_INVALID_PARAMETER    Invalid parameter
+ * @retval #WIFI_MANAGER_ERROR_PERMISSION_DENIED    Permission denied
+ * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
+ * @pre This function needs wifi_manager_initialize() before use.
+ * @post This function invokes wifi_manager_config_list_cb().
+ */
+int wifi_manager_config_foreach_configuration_in_all_interfaces(wifi_manager_h wifi,
+                       wifi_manager_config_list_cb callback, void *user_data);
+
+/**
  * @brief Enables or disables auto-scanning
  * @details If auto-scanning is disabled, then background scan and wps scan don't work.
  * By default, the auto-scanning is enabled automatically until disabling auto-scanning.
@@ -358,7 +454,8 @@ int wifi_manager_foreach_found_netlink_scan_ap(wifi_manager_h wifi,
  * @retval #WIFI_MANAGER_ERROR_NOT_SUPPORTED        Not supported
  * @post This function invokes wifi_manager_netlink_scan_finished_cb().
  */
-int wifi_manager_netlink_scan(wifi_manager_h wifi, wifi_manager_netlink_scan_h netlink_scan,
+int wifi_manager_netlink_scan(wifi_manager_h wifi,
+               wifi_manager_netlink_scan_h netlink_scan,
                wifi_manager_netlink_scan_finished_cb callback, void *user_data);
 
 /**
index bc3a326..1f78016 100755 (executable)
@@ -24,6 +24,9 @@
 
 #include "wifi-manager.h"
 #include "wifi-manager-extension.h"
+
+#include "network_info.h"
+#include "network_internal.h"
 #include "network_interface.h"
 
 #ifdef __cplusplus
@@ -110,28 +113,6 @@ typedef enum {
                }\
        } while(0)
 
-typedef enum {
-       WIFI_DEVICE_STATE_CB,
-       WIFI_BG_SCAN_CB,
-       WIFI_SCAN_REQUEST_CB,
-       WIFI_SCAN_CHANGED_CB,
-       WIFI_SPECIFIC_SCAN_CB,
-       WIFI_BSSID_SCAN_CB,
-       WIFI_NETLINK_SCAN_CB,
-       WIFI_IP_CONFLICT_CB,
-       WIFI_MULTI_SCAN_CB,
-       WIFI_MANAGER_CONNECTION_STATE_CB,
-       WIFI_ACTIVATED_CB,
-       WIFI_DEACTIVATED_CB,
-       WIFI_CONNECTED_CB,
-       WIFI_DISCONNECTED_CB,
-       WIFI_MANAGER_RSSI_LEVEL_CHANGED_CB,
-       WIFI_MANAGER_TDLS_STATE_CHANGED_CB,
-       WIFI_MANAGER_TDLS_DISCOVERED_CB,
-       WIFI_MANAGER_FORGET_AP_CB,
-       WIFI_MANAGER_DPP_EVENT_CB,
-} wifi_manager_handle_cb_e;
-
 typedef void *wifi_manager_dpp_h;
 
 typedef enum {
@@ -225,35 +206,6 @@ typedef struct {
 } wifi_config_ip_info_s;
 
 typedef struct {
-       gchar *name;
-       gchar *passphrase;
-       wifi_manager_security_type_e security_type;
-       gboolean is_created;
-       gboolean is_saved;
-
-       gboolean is_hidden;
-       gchar *proxy_address;
-       wifi_manager_address_family_e address_family;
-       wifi_eap_config_s *eap_config;
-       wifi_config_ip_info_s *ip_info;
-       wifi_manager_error_e last_error;
-} wifi_config_s;
-
-typedef struct {
-       gchar *group_id;
-       gchar *ssid;
-       gchar *peer_uri;
-       guint32 peer_id;
-       gchar *own_uri;
-       guint32 own_id;
-       gboolean is_initiator;
-       wifi_manager_dpp_role_e role;
-       wifi_manager_dpp_network_role_e net_role;
-       wifi_manager_dpp_akm_e akm;
-       wifi_manager_dpp_state_e state;
-} wifi_dpp_s;
-
-typedef struct {
        wifi_manager_device_state_changed_cb device_state_cb;
        void *device_state_user_data;
        wifi_manager_scan_finished_cb bg_scan_cb;
@@ -262,6 +214,7 @@ typedef struct {
        void *scan_request_user_data;
        wifi_manager_scan_state_changed_cb scan_changed_cb;
        void *scan_changed_user_data;
+       char specific_scan_essid[NET_WLAN_ESSID_LEN + 1];
        wifi_manager_scan_finished_cb specific_scan_cb;
        void *specific_scan_user_data;
        wifi_manager_bssid_scan_finished_cb bssid_scan_cb;
@@ -295,8 +248,53 @@ typedef struct {
        wifi_manager_dpp_event_cb dpp_event_cb;
        void *dpp_event_user_data;
 
+       network_info_s *network_info;
+       char interface_name[NET_WLAN_IF_NAME_LEN];
+       bool is_disconnect_wps_pbc;
+       bool is_disconnect_wps_pin;
+
+       GSList *ap_handle_list;
+       GSList *config_handle_list;
+
+       GSList *interface_iterator;
+       GSList *profile_iterator;
+       GSList *specific_profile_iterator;
+       GSList *bss_profile_iterator;
+       GSList *config_iterator;
 } wifi_manager_handle_s;
 
+typedef struct {
+       gchar *name;
+       gchar *passphrase;
+       wifi_manager_security_type_e security_type;
+       gboolean is_created;
+       gboolean is_saved;
+
+       gboolean is_hidden;
+       gchar *proxy_address;
+       wifi_manager_address_family_e address_family;
+       wifi_eap_config_s *eap_config;
+       wifi_config_ip_info_s *ip_info;
+       wifi_manager_error_e last_error;
+
+       wifi_manager_handle_s *wifi_handle;
+} wifi_config_s;
+
+typedef struct {
+       gchar *group_id;
+       gchar *ssid;
+       gchar *peer_uri;
+       guint32 peer_id;
+       gchar *own_uri;
+       guint32 own_id;
+       gboolean is_initiator;
+       wifi_manager_dpp_role_e role;
+       wifi_manager_dpp_network_role_e net_role;
+       wifi_manager_dpp_akm_e akm;
+       wifi_manager_dpp_state_e state;
+
+       network_info_s *network_info;
+} wifi_dpp_s;
 
 typedef struct {
        int type;
@@ -309,44 +307,54 @@ typedef struct {
 } wifi_netlink_scan_s;
 
 /* WIFI Manager */
-int _wifi_init(void);
-bool _wifi_deinit(void);
-void _wifi_set_cs_tid(int tid);
+int _wifi_init(wifi_manager_h wifi, const char *ifname);
+void _wifi_deinit(wifi_manager_h wifi);
+void _wifi_set_cs_tid(wifi_manager_h wifi, int tid);
 void _wifi_unset_cs_tid(int tid);
 
 int _wifi_create_handle(wifi_manager_h *wifi);
-int _wifi_add_to_handle_list(wifi_manager_h* wifi);
+void _wifi_add_to_handle_list(wifi_manager_h *wifi);
 void _wifi_remove_from_handle_list(wifi_manager_h wifi);
+int _wifi_length_from_handle_list(void);
 bool _wifi_find_from_handle_list(wifi_manager_h wifi);
-int _wifi_get_count_from_handle_list(void);
-int _wifi_get_callback_count_from_handle_list(wifi_manager_handle_cb_e e);
+void _wifi_clear_profile_list(void);
 
 int _wifi_activate(wifi_manager_h wifi, wifi_manager_activated_cb callback,
                gboolean wifi_picker_test, void *user_data);
 int _wifi_deactivate(wifi_manager_h wifi, wifi_manager_deactivated_cb callback, void *user_data);
 
-bool _wifi_check_ap_validity(wifi_manager_ap_h ap_h);
-void _wifi_add_to_ap_list(wifi_manager_ap_h ap_h);
-void _wifi_remove_from_ap_list(wifi_manager_ap_h ap_h);
+bool _wifi_check_ap_validity(net_profile_info_s *ap_info);
+void _wifi_add_to_ap_list(net_profile_info_s *ap_info);
+void _wifi_remove_from_ap_list(net_profile_info_s *ap_info);
 bool _wifi_check_profile_name_validity(const char *profile_name);
 bool _wifi_check_essid_validity(const char *essid);
 
-int _wifi_get_wifi_device_state(wifi_manager_device_state_e *device_state);
-int _wifi_get_wifi_state(wifi_manager_connection_state_e* connection_state);
-int _wifi_get_intf_name(char** name);
+int _wifi_get_mac_address(wifi_manager_h wifi, char **mac_address);
+int _wifi_get_wifi_device_state(wifi_manager_h wifi, wifi_manager_device_state_e *device_state);
+int _wifi_get_wifi_state(wifi_manager_h wifi, wifi_manager_connection_state_e *connection_state);
+void _wifi_get_intf_name(wifi_manager_h wifi, char **name);
 int _wifi_scan_request(wifi_manager_h wifi,
                wifi_manager_scan_finished_cb callback, void *user_data);
 int _wifi_scan_specific_ap(wifi_manager_h wifi, const char *essid,
                wifi_manager_scan_finished_cb callback, void *user_data);
-int _wifi_get_scan_state(wifi_manager_scan_state_e *scan_state);
+int _wifi_get_scan_state(wifi_manager_h wifi, wifi_manager_scan_state_e *scan_state);
 int _wifi_get_hidden_aps(wifi_manager_h wifi, const char* essid,
                wifi_manager_security_type_e sec_type, const char *passphrase,
                wifi_manager_connected_cb callback, void* user_data);
-int _wifi_get_connected_profile(wifi_manager_ap_h *ap);
-int _wifi_foreach_found_ap(wifi_manager_found_ap_cb callback, void *user_data);
-int _wifi_foreach_found_specific_ap(wifi_manager_found_ap_cb callback, void *user_data);
-int _wifi_foreach_found_bssid_ap(wifi_manager_found_ap_cb callback, void *user_data);
-int _wifi_foreach_found_netlink_scan_ap(wifi_manager_found_ap_cb callback, void *user_data);
+int _wifi_get_connected_profile(wifi_manager_h wifi, wifi_manager_ap_h *ap);
+
+int _wifi_foreach_available_interface(wifi_manager_h wifi,
+               wifi_manager_interface_cb callback, void *user_data);
+int _wifi_foreach_found_ap(wifi_manager_h wifi,
+               wifi_manager_found_ap_cb callback, void *user_data);
+int _wifi_foreach_found_ap_in_all_interfaces(wifi_manager_h wifi,
+               wifi_manager_found_ap_cb callback, void *user_data);
+int _wifi_foreach_found_specific_ap(wifi_manager_h wifi,
+               wifi_manager_found_ap_cb callback, void *user_data);
+int _wifi_foreach_found_bssid_ap(wifi_manager_h wifi,
+               wifi_manager_found_ap_cb callback, void *user_data);
+int _wifi_foreach_found_netlink_scan_ap(wifi_manager_h wifi,
+               wifi_manager_found_ap_cb callback, void *user_data);
 
 int _wifi_open_profile(wifi_manager_h wifi, wifi_manager_ap_h ap_h,
                wifi_manager_connected_cb callback, void *user_data);
@@ -356,21 +364,18 @@ int _wifi_connect_with_wps_pbc(wifi_manager_h wifi, wifi_manager_ap_h ap,
                wifi_manager_connected_cb callback, void *user_data);
 int _wifi_connect_with_wps_pin(wifi_manager_h wifi, wifi_manager_ap_h ap,
                const char *pin, wifi_manager_connected_cb callback, void *user_data);
-int _wifi_forget_ap(wifi_manager_ap_h ap);
+int _wifi_forget_ap(wifi_manager_h wifi, wifi_manager_ap_h ap);
 int _wifi_forget_ap_async(wifi_manager_h wifi, wifi_manager_ap_h ap,
-                         wifi_manager_forget_ap_finished_cb callback,
-                         void* user_data);
+               wifi_manager_forget_ap_finished_cb callback, void* user_data);
 int __ap_convert_netmask_to_prefix_len(const char *netmask);
 
-void _wifi_rssi_level_changed_cb(keynode_t *node, void *user_data);
-
-int _wifi_update_ap_info(net_profile_info_s *ap_info);
+int _wifi_update_ap_info(wifi_manager_h wifi, net_profile_info_s *ap_info);
 wifi_manager_connection_state_e _wifi_convert_to_ap_state(net_state_type_e state);
 int _wifi_connect_with_wps_pbc_without_ssid(wifi_manager_h wifi,
                wifi_manager_connected_cb callback, void *user_data);
 int _wifi_connect_with_wps_pin_without_ssid(wifi_manager_h wifi,
                const char *pin, wifi_manager_connected_cb callback, void* user_data);
-int _wifi_cancel_wps(void);
+int _wifi_cancel_wps(wifi_manager_h wifi);
 int _wifi_bssid_scan_request(wifi_manager_h wifi,
                wifi_manager_bssid_scan_finished_cb callback, void *user_data);
 
@@ -399,63 +404,66 @@ int _wifi_specific_scan_set_freq(wifi_manager_specific_scan_h specific_scan,
 int _wifi_start_multi_scan(wifi_manager_h wifi,
                wifi_manager_specific_scan_h specific_scan,
                wifi_manager_scan_finished_cb callback, void *user_data);
-int _wifi_get_max_scan_ssids(int *max_scan_ssids);
+int _wifi_get_max_scan_ssids(wifi_manager_h wifi, int *max_scan_ssids);
 
 /* WIFI Configuration */
-bool _wifi_check_config_validity(wifi_manager_config_h config_h);
-void _wifi_add_to_config_list(wifi_manager_config_h config_h);
-void _wifi_remove_from_config_list(wifi_manager_config_h config_h);
+bool _wifi_check_config_validity(wifi_config_s *config);
+void _wifi_add_to_config_list(wifi_config_s *config);
+void _wifi_remove_from_config_list(wifi_config_s *config);
 gchar * _wifi_config_get_config_id(const gchar *name, wifi_manager_security_type_e security_type);
-int _wifi_config_get_config_id_list(GSList **list);
+int _wifi_config_get_config_id_list(wifi_manager_h wifi, GSList **list);
 
-int _wifi_save_configuration(const gchar *name, const gchar *passphrase,
+int _wifi_save_configuration(wifi_manager_h wifi,
+               const gchar *name, const gchar *passphrase,
                wifi_manager_security_type_e security_type, const gchar *proxy_address,
                wifi_config_ip_info_s *ip_info, gboolean is_hidden, gboolean is_created);
-int _wifi_load_configurations(void);
-int _wifi_foreach_configuration(wifi_manager_config_list_cb callback, void *user_data);
-int _wifi_remove_configuration(const gchar *config_id);
-int _wifi_configuration_set_field(const gchar *config_id, const gchar *key, const gchar *value);
-int _wifi_configuration_get_passphrase(const gchar *config_id, gchar **passphrase);
-int _wifi_save_eap_configurations(const gchar *name, const gchar *passphrase,
+int _wifi_load_configurations(wifi_manager_h wifi);
+int _wifi_foreach_configuration(wifi_manager_h wifi,
+               wifi_manager_config_list_cb callback, void *user_data);
+int _wifi_remove_configuration(wifi_manager_h wifi, const gchar *config_id);
+int _wifi_configuration_set_field(wifi_manager_h wifi, const gchar *config_id, const gchar *key, const gchar *value);
+int _wifi_configuration_get_passphrase(wifi_manager_h wifi, const gchar *config_id, gchar **passphrase);
+int _wifi_save_eap_configurations(wifi_manager_h wifi,
+               const gchar *name, const gchar *passphrase,
                wifi_manager_security_type_e security_type, const gchar *proxy_address,
                wifi_eap_config_s *eap_config, gboolean is_hidden, gboolean is_created);
 gchar *_wifi_eap_type_to_string(wifi_manager_eap_type_e eap_type);
 gchar *_wifi_eap_auth_type_to_string(wifi_manager_eap_auth_type_e eap_auth_type);
-int _wifi_set_autoscan(bool autoscan);
-int _wifi_set_background_scan_mode(wifi_manager_autoscan_mode_e mode);
-int _wifi_get_autoscan(bool *autoscan);
-int _wifi_get_autoscanmode(wifi_manager_autoscan_mode_e *autoscanmode);
-int _wifi_get_passpoint(int *passpoint);
-int _wifi_set_passpoint(int passpoint);
-int _wifi_get_module_state(wifi_manager_module_state_e *state);
-void _wifi_module_state_changed_cb(keynode_t *node, void *user_data);
-
-int _wifi_add_vsie(wifi_manager_h wifi,
-               wifi_manager_vsie_frames_e frame_id, const char *vsie_str);
-int _wifi_get_vsie(wifi_manager_h wifi,
-               wifi_manager_vsie_frames_e frame_id, char **vsie_str);
-int _wifi_remove_vsie(wifi_manager_h wifi,
-               wifi_manager_vsie_frames_e frame_id, const char *vsie_str);
-
-int _wifi_flush_bss(void);
-int _wifi_set_bssid(char *bssid);
-int _wifi_get_auto_connect(int *connect_mode);
-int _wifi_set_auto_connect(int connect_mode);
+int _wifi_set_autoscan(wifi_manager_h wifi, bool autoscan);
+int _wifi_set_background_scan_mode(wifi_manager_h wifi,
+               wifi_manager_autoscan_mode_e mode);
+int _wifi_get_autoscan(wifi_manager_h wifi, bool *autoscan);
+int _wifi_get_autoscanmode(wifi_manager_h wifi, wifi_manager_autoscan_mode_e *autoscanmode);
+int _wifi_get_passpoint(wifi_manager_h wifi, int *passpoint);
+int _wifi_set_passpoint(wifi_manager_h wifi, int passpoint);
+int _wifi_get_module_state(wifi_manager_h wifi, wifi_manager_module_state_e *state);
+
+int _wifi_add_vsie(wifi_manager_h wifi, wifi_manager_vsie_frames_e frame_id, const char *vsie_str);
+int _wifi_get_vsie(wifi_manager_h wifi, wifi_manager_vsie_frames_e frame_id, char **vsie_str);
+int _wifi_remove_vsie(wifi_manager_h wifi, wifi_manager_vsie_frames_e frame_id, const char *vsie_str);
+
+int _wifi_flush_bss(wifi_manager_h wifi);
+int _wifi_set_bssid(wifi_manager_h wifi, char *bssid);
+int _wifi_get_auto_connect(wifi_manager_h wifi, int *connect_mode);
+int _wifi_set_auto_connect(wifi_manager_h wifi, int connect_mode);
 int _wifi_set_ap_auto_connect(wifi_manager_ap_h ap_h, bool autoconnect);
 int _wifi_get_ap_auto_connect(wifi_manager_ap_h ap_h, bool *autoconnect);
-int _wifi_ip_conflict_detect_enable_set(bool detect);
-int _wifi_ip_conflict_detect_is_enabled(bool *state);
-int _wifi_set_ip_conflict_period(unsigned int initial_time);
-int _wifi_get_ip_conflict_state(wifi_manager_ip_conflict_state_e *state);
-int _wifi_get_ip_conflict_period(unsigned int* initial_time);
-int _wifi_get_wps_generated_pin(char **wps_pin);
-int _wifi_get_connection_mode(wifi_manager_connection_mode_e *mode);
+int _wifi_ip_conflict_detect_enable_set(wifi_manager_h wifi, bool detect);
+int _wifi_ip_conflict_detect_is_enabled(wifi_manager_h wifi, bool *state);
+int _wifi_set_ip_conflict_period(wifi_manager_h wifi, unsigned int initial_time);
+int _wifi_get_ip_conflict_state(wifi_manager_h wifi, wifi_manager_ip_conflict_state_e *state);
+int _wifi_get_ip_conflict_period(wifi_manager_h wifi, unsigned int* initial_time);
+int _wifi_get_wps_generated_pin(wifi_manager_h wifi, char **wps_pin);
+int _wifi_get_connection_mode(wifi_manager_h wifi, wifi_manager_connection_mode_e *mode);
 
 void __clear_profile_list(GSList **iterator);
 
+gpointer _wifi_copy_vsie_list(gconstpointer data, gpointer user_data);
+gpointer _wifi_copy_bssid_list(gconstpointer data, gpointer user_data);
+
 /* WIFI Privilege Check */
-int _wifi_check_get_privilege();
-int _wifi_check_profile_privilege();
+int _wifi_check_get_privilege(wifi_manager_h wifi);
+int _wifi_check_profile_privilege(wifi_manager_h wifi);
 
 /* WIFI Feature Check */
 bool __check_feature_supported(const char *key, wifi_supported_feature_e feature);
@@ -483,8 +491,8 @@ typedef enum {
 } wifi_service_state_e;
 
 extern tizen_profile_t _get_tizen_profile();
-int _wifi_get_service_state();
-int _wifi_get_5ghz_support(bool *supported);
+int _wifi_get_service_state(wifi_manager_handle_s *wifi_handle);
+int _wifi_get_5ghz_support(wifi_manager_h wifi, bool *supported);
 
 /* WIFI DPP */
 
index 7775d4b..ad0de9d 100755 (executable)
@@ -1,6 +1,6 @@
 Name:          capi-network-wifi-manager
 Summary:       Network Wi-Fi library in TIZEN C API
-Version:       1.1.53
+Version:       1.2.0
 Release:       1
 Group:         System/Network
 License:       Apache-2.0
index 00e6769..8cab961 100755 (executable)
 #define WIFI_SECURITY_OWE                      "owe"
 #define WIFI_SECURITY_DPP                      "dpp"
 
-extern __thread network_info_s NetworkInfo;
-extern __thread network_request_table_s request_table[NETWORK_REQUEST_TYPE_MAX];
-__thread gboolean scan_pending = FALSE;
-
 //LCOV_EXCL_START
 static int __net_error_string_to_enum(const char *error)
 {
@@ -263,16 +259,16 @@ static void __net_open_connection_reply(GObject *source_object, GAsyncResult *re
 {
        __NETWORK_FUNC_ENTER__;
 
-       net_event_info_s event_data = { 0, };
-       net_profile_info_s prof_info;
-       network_request_table_s *open_info =
-                       &request_table[NETWORK_REQUEST_TYPE_OPEN_CONNECTION];
-       network_request_table_s *wps_info =
-                       &request_table[NETWORK_REQUEST_TYPE_ENROLL_WPS];
        GDBusConnection *conn = NULL;
        GError *error = NULL;
        net_err_e Error = NET_ERR_NONE;
        GVariant *reply;
+       net_event_info_s *event_data = NULL;
+       net_profile_info_s prof_info;
+       network_info_s *network_info = (network_info_s *)user_data;
+       network_request_table_s *request_table = network_info->request_table;
+       network_request_table_s *open_info = &request_table[NETWORK_REQUEST_TYPE_OPEN_CONNECTION];
+       network_request_table_s *wps_info = &request_table[NETWORK_REQUEST_TYPE_ENROLL_WPS];
 
        WIFI_LOG(WIFI_INFO, "__net_open_connection_reply() called");
 
@@ -287,72 +283,80 @@ static void __net_open_connection_reply(GObject *source_object, GAsyncResult *re
        if (reply)
                g_variant_unref(reply);
 
-       if (Error == NET_ERR_NONE)
-               goto done;
+       if (Error == NET_ERR_NONE) {
+               __NETWORK_FUNC_EXIT__;
+               return;
+       }
 
        WIFI_LOG(WIFI_ERROR, "Connection open failed[%d]", Error);
 
+       event_data = g_try_malloc0(sizeof(net_event_info_s));
+       if (event_data == NULL) {
+               __NETWORK_FUNC_EXIT__;
+               return;
+       }
+
        if (open_info->flag == TRUE) {
-               g_strlcpy(event_data.ProfileName, open_info->ProfileName,
+               g_strlcpy(event_data->ProfileName, open_info->ProfileName,
                                NET_PROFILE_NAME_LEN_MAX + 1);
                memset(open_info, 0, sizeof(network_request_table_s));
 
-               event_data.Error = Error;
+               event_data->Error = Error;
 
                if (Error == NET_ERR_ACTIVE_CONNECTION_EXISTS) {
-                       Error = net_get_profile_info(event_data.ProfileName, &prof_info);
-
+                       Error = net_get_profile_info(network_info, event_data->ProfileName, &prof_info);
                        if (Error != NET_ERR_NONE) {
                                WIFI_LOG(WIFI_ERROR, "Fail to get profile info[%s]",
                                                _net_print_error(Error));
 
-                               event_data.Datalength = 0;
-                               event_data.Data = NULL;
+                               event_data->Datalength = 0;
+                               event_data->Data = NULL;
                        } else {
-                               event_data.Datalength = sizeof(net_profile_info_s);
-                               event_data.Data = &prof_info;
+                               event_data->Datalength = sizeof(net_profile_info_s);
+                               event_data->Data = &prof_info;
                        }
                }
 
-               event_data.Event = NET_EVENT_OPEN_RSP;
+               event_data->Event = NET_EVENT_OPEN_RSP;
                WIFI_LOG(WIFI_INFO, "Sending NET_EVENT_OPEN_RSP Error[%s]",
-                               _net_print_error(event_data.Error));
+                               _net_print_error(event_data->Error));
+
        } else if (wps_info->flag == TRUE) {
-               g_strlcpy(event_data.ProfileName, wps_info->ProfileName,
+               g_strlcpy(event_data->ProfileName, wps_info->ProfileName,
                                NET_PROFILE_NAME_LEN_MAX + 1);
                memset(wps_info, 0, sizeof(network_request_table_s));
 
-               event_data.Error = Error;
+               event_data->Error = Error;
 
                if (Error == NET_ERR_ACTIVE_CONNECTION_EXISTS) {
-                       Error = net_get_profile_info(event_data.ProfileName, &prof_info);
+                       Error = net_get_profile_info(network_info, event_data->ProfileName, &prof_info);
                        if (Error != NET_ERR_NONE) {
                                WIFI_LOG(WIFI_ERROR, "Fail to get profile info[%s]",
                                                _net_print_error(Error));
 
-                               event_data.Datalength = 0;
-                               event_data.Data = NULL;
+                               event_data->Datalength = 0;
+                               event_data->Data = NULL;
                        } else {
-                               event_data.Datalength = sizeof(net_profile_info_s);
-                               event_data.Data = &prof_info;
+                               event_data->Datalength = sizeof(net_profile_info_s);
+                               event_data->Data = &prof_info;
                        }
                }
 
-               event_data.Event = NET_EVENT_WIFI_WPS_RSP;
+               event_data->Event = NET_EVENT_WIFI_WPS_RSP;
 
                WIFI_LOG(WIFI_INFO, "Sending NET_EVENT_WIFI_WPS_RSP Error[%s]",
-                               _net_print_error(event_data.Error));
-       } else {
-               _net_dbus_pending_call_unref();
+                               _net_print_error(event_data->Error));
 
+       } else {
+               g_free(event_data);
                __NETWORK_FUNC_EXIT__;
                return;
        }
 
-done:
-       _net_dbus_pending_call_unref();
+       if (network_info->event_callback)
+               network_info->event_callback(event_data, network_info->user_data);
 
-       _net_client_callback(&event_data);
+       g_free(event_data);
 
        __NETWORK_FUNC_EXIT__;
 }
@@ -362,18 +366,26 @@ static void __net_scan_reply(GObject *source_object, GAsyncResult *res, gpointer
        __NETWORK_FUNC_ENTER__;
 
        GVariant *reply;
-       net_event_info_s event_data = { 0, };
-       network_request_table_s *bssid_scan_info =
-                       &request_table[NETWORK_REQUEST_TYPE_BSSID_SCAN];
-
        GDBusConnection *conn = NULL;
        GError *error = NULL;
        net_err_e Error = NET_ERR_NONE;
+       net_event_info_s *event_data;
+
+       network_info_s *network_info = (network_info_s *)user_data;
+       network_request_table_s *request_table = network_info->request_table;
+       network_request_table_s *bssid_scan_info = &request_table[NETWORK_REQUEST_TYPE_BSSID_SCAN];
+
+       event_data = g_try_malloc0(sizeof(net_event_info_s));
+       if (event_data == NULL) {
+               __NETWORK_FUNC_EXIT__;
+               return;
+       }
 
        conn = G_DBUS_CONNECTION(source_object);
        reply = g_dbus_connection_call_finish(conn, res, &error);
+
        if (error != NULL) {
-               WIFI_LOG(WIFI_ERROR, "Scan failed. Error [%s]\n",
+               WIFI_LOG(WIFI_ERROR, "Scan failed. Error [%s]",
                                error->message);
                Error = __net_error_string_to_enum(error->message);
                g_error_free(error);
@@ -388,54 +400,57 @@ static void __net_scan_reply(GObject *source_object, GAsyncResult *res, gpointer
                                0, sizeof(network_request_table_s));
 
 
-               event_data.Event = NET_EVENT_WIFI_BSSID_SCAN_IND;
+               event_data->Event = NET_EVENT_WIFI_BSSID_SCAN_IND;
                WIFI_LOG(WIFI_INFO, "Sending NET_EVENT_WIFI_BSSID_SCAN_IND[%s]",
-                               _net_print_error(event_data.Error));
-               event_data.Error = NET_ERR_NONE;
-               event_data.Datalength = 0;
-               event_data.Data = NULL;
+                               _net_print_error(event_data->Error));
+               event_data->Error = NET_ERR_NONE;
+               event_data->Datalength = 0;
+               event_data->Data = NULL;
+
+               if (network_info->event_callback)
+                       network_info->event_callback(event_data, network_info->user_data);
 
-               _net_client_callback(&event_data);
+               g_free(event_data);
 
        } else if (Error == NET_ERR_IN_PROGRESS) {
                /* should retry scan after receiving scan result */
                if (request_table[NETWORK_REQUEST_TYPE_SCAN].flag == TRUE) {
-                       WIFI_LOG(WIFI_INFO, "Full channel Scan pending\n");
-                       scan_pending = TRUE;
+                       WIFI_LOG(WIFI_INFO, "Full channel Scan pending");
+                       network_info->scan_pending = TRUE;
                } else if (bssid_scan_info->flag == TRUE) {
-                       WIFI_LOG(WIFI_INFO, "BSSID Scan pending\n");
-                       scan_pending = TRUE;
+                       WIFI_LOG(WIFI_INFO, "BSSID Scan pending");
+                       network_info->scan_pending = TRUE;
                }
        } else if (Error != NET_ERR_NONE) {
-               WIFI_LOG(WIFI_ERROR, "Scan failed. Error [%d]\n", Error);
+               WIFI_LOG(WIFI_ERROR, "Scan failed. Error [%d]", Error);
 
                if (request_table[NETWORK_REQUEST_TYPE_SCAN].flag == TRUE) {
                        memset(&request_table[NETWORK_REQUEST_TYPE_SCAN],
                                        0, sizeof(network_request_table_s));
 
-                       event_data.Event = NET_EVENT_WIFI_SCAN_RSP;
+                       event_data->Event = NET_EVENT_WIFI_SCAN_RSP;
                } else if (bssid_scan_info->flag == TRUE) {
                        memset(&request_table[NETWORK_REQUEST_TYPE_BSSID_SCAN],
                                        0, sizeof(network_request_table_s));
 
-                       event_data.Event = NET_EVENT_WIFI_BSSID_SCAN_IND;
+                       event_data->Event = NET_EVENT_WIFI_BSSID_SCAN_IND;
                }
 
-               if (event_data.Event) {
-                       event_data.Datalength = 0;
-                       event_data.Data = NULL;
-                       event_data.Error = Error;
+               if (event_data->Event) {
+                       event_data->Datalength = 0;
+                       event_data->Data = NULL;
+                       event_data->Error = Error;
+
+                       if (network_info->event_callback)
+                               network_info->event_callback(event_data, network_info->user_data);
 
-                       _net_dbus_pending_call_unref();
-                       _net_client_callback(&event_data);
+                       g_free(event_data);
 
                        __NETWORK_FUNC_EXIT__;
                        return;
                }
        } else
-               WIFI_LOG(WIFI_INFO, "Scan Request success\n");
-
-       _net_dbus_pending_call_unref();
+               WIFI_LOG(WIFI_INFO, "Scan Request success");
 
        __NETWORK_FUNC_EXIT__;
 }
@@ -444,16 +459,23 @@ static void __net_close_connection_reply(GObject *source_object, GAsyncResult *r
 {
        __NETWORK_FUNC_ENTER__;
 
-       WIFI_LOG(WIFI_INFO, "__net_close_connection_reply() called");
-
+       GDBusConnection *conn = NULL;
+       GError *error = NULL;
+       net_err_e Error = NET_ERR_NONE;
        GVariant *reply;
-       net_event_info_s event_data = { 0, };
+       net_event_info_s *event_data = NULL;
+       network_info_s *network_info = (network_info_s *)user_data;
+       network_request_table_s *request_table = network_info->request_table;
        network_request_table_s *close_info =
                        &request_table[NETWORK_REQUEST_TYPE_CLOSE_CONNECTION];
 
-       GDBusConnection *conn = NULL;
-       GError *error = NULL;
-       net_err_e Error = NET_ERR_NONE;
+       WIFI_LOG(WIFI_INFO, "__net_close_connection_reply() called");
+
+       event_data = g_try_malloc0(sizeof(net_event_info_s));
+       if (event_data == NULL) {
+               __NETWORK_FUNC_EXIT__;
+               return;
+       }
 
        conn = G_DBUS_CONNECTION(source_object);
        reply = g_dbus_connection_call_finish(conn, res, &error);
@@ -471,28 +493,27 @@ static void __net_close_connection_reply(GObject *source_object, GAsyncResult *r
        WIFI_LOG(WIFI_ERROR, "Connection close failed[%d]", Error);
 
        if (close_info->flag == TRUE) {
-               g_strlcpy(event_data.ProfileName, close_info->ProfileName,
+               g_strlcpy(event_data->ProfileName, close_info->ProfileName,
                                NET_PROFILE_NAME_LEN_MAX + 1);
                memset(close_info, 0, sizeof(network_request_table_s));
 
-               event_data.Error = Error;
-               event_data.Datalength = 0;
-               event_data.Data = NULL;
-               event_data.Event = NET_EVENT_CLOSE_RSP;
+               event_data->Error = Error;
+               event_data->Datalength = 0;
+               event_data->Data = NULL;
+               event_data->Event = NET_EVENT_CLOSE_RSP;
 
                WIFI_LOG(WIFI_INFO, "Sending NET_EVENT_CLOSE_RSP Error[%s]",
-                               _net_print_error(event_data.Error));
+                               _net_print_error(event_data->Error));
        } else {
-               _net_dbus_pending_call_unref();
-
                __NETWORK_FUNC_EXIT__;
                return;
        }
 
 done:
-       _net_dbus_pending_call_unref();
+       if (network_info->event_callback)
+               network_info->event_callback(event_data, network_info->user_data);
 
-       _net_client_callback(&event_data);
+       g_free(event_data);
 
        __NETWORK_FUNC_EXIT__;
 }
@@ -504,11 +525,19 @@ static void __net_wifi_power_reply(GObject *source_object, GAsyncResult *res, gp
        GDBusConnection *conn = NULL;
        GError *error = NULL;
        net_err_e Error = NET_ERR_NONE;
-       net_event_info_s event_data = { 0, };
+       net_event_info_s *event_data = NULL;
        GVariant *reply;
+       network_info_s *network_info = (network_info_s *)user_data;
+       network_request_table_s *request_table = network_info->request_table;
 
        WIFI_LOG(WIFI_INFO, "__net_wifi_power_reply() called");
 
+       event_data = g_try_malloc0(sizeof(net_event_info_s));
+       if (event_data == NULL) {
+               __NETWORK_FUNC_EXIT__;
+               return;
+       }
+
        conn = G_DBUS_CONNECTION(source_object);
        reply = g_dbus_connection_call_finish(conn, res, &error);
        if (error != NULL) {
@@ -520,35 +549,33 @@ static void __net_wifi_power_reply(GObject *source_object, GAsyncResult *res, gp
                g_variant_unref(reply);
 
        if (Error != NET_ERR_NONE) {
-               WIFI_LOG(WIFI_ERROR,
-                               "Wi-Fi power operation failed. Error [%d]", Error);
+               WIFI_LOG(WIFI_ERROR, "Wi-Fi power operation failed. Error [%d]", Error);
 
                if (Error != NET_ERR_WIFI_DRIVER_LOAD_INPROGRESS) {
                        if (request_table[NETWORK_REQUEST_TYPE_WIFI_POWER].flag == TRUE) {
                                memset(&request_table[NETWORK_REQUEST_TYPE_WIFI_POWER],
                                                0, sizeof(network_request_table_s));
 
-                               event_data.Event = NET_EVENT_WIFI_POWER_RSP;
+                               event_data->Event = NET_EVENT_WIFI_POWER_RSP;
 
                                WIFI_LOG(WIFI_INFO,
                                                "Sending NET_EVENT_WIFI_POWER_RSP Wi-Fi: %d Error = %d",
-                                               NetworkInfo.wifi_state, Error);
+                                               network_info->wifi_state, Error);
 
-                               event_data.Datalength = sizeof(net_wifi_state_e);
-                               event_data.Data = &(NetworkInfo.wifi_state);
-                               event_data.Error = Error;
+                               event_data->Datalength = sizeof(net_wifi_state_e);
+                               event_data->Data = &(network_info->wifi_state);
+                               event_data->Error = Error;
                        }
                }
        } else {
-               _net_dbus_pending_call_unref();
-
                __NETWORK_FUNC_EXIT__;
                return;
        }
 
-       _net_dbus_pending_call_unref();
+       if (network_info->event_callback)
+               network_info->event_callback(event_data, network_info->user_data);
 
-       _net_client_callback(&event_data);
+       g_free(event_data);
 
        __NETWORK_FUNC_EXIT__;
 }
@@ -559,9 +586,17 @@ static void __net_bssid_scan_wifi_reply(GObject *source_object, GAsyncResult *re
 
        GDBusConnection *conn = NULL;
        GError *error = NULL;
-       net_err_e Error = NET_ERR_NONE;
-       net_event_info_s event_data = { 0, };
        GVariant *reply;
+       net_err_e Error = NET_ERR_NONE;
+       net_event_info_s *event_data = NULL;
+       network_info_s *network_info = (network_info_s *)user_data;
+       network_request_table_s *request_table = network_info->request_table;
+
+       event_data = g_try_malloc0(sizeof(net_event_info_s));
+       if (event_data == NULL) {
+               __NETWORK_FUNC_EXIT__;
+               return;
+       }
 
        conn = G_DBUS_CONNECTION(source_object);
        reply = g_dbus_connection_call_finish(conn, res, &error);
@@ -580,23 +615,22 @@ static void __net_bssid_scan_wifi_reply(GObject *source_object, GAsyncResult *re
                        memset(&request_table[NETWORK_REQUEST_TYPE_BSSID_SCAN],
                                        0, sizeof(network_request_table_s));
 
-                       event_data.Event = NET_EVENT_WIFI_BSSID_SCAN_IND;
-                       event_data.Datalength = 0;
-                       event_data.Data = NULL;
-                       event_data.Error = Error;
-
-                       _net_dbus_pending_call_unref();
+                       event_data->Event = NET_EVENT_WIFI_BSSID_SCAN_IND;
+                       event_data->Datalength = 0;
+                       event_data->Data = NULL;
+                       event_data->Error = Error;
 
-                       _net_client_callback(&event_data);
+                       if (network_info->event_callback)
+                               network_info->event_callback(event_data, network_info->user_data);
 
+                       g_free(event_data);
                        __NETWORK_FUNC_EXIT__;
                        return;
                }
        } else
                WIFI_LOG(WIFI_INFO, "bssid scan succeed");
 
-       _net_dbus_pending_call_unref();
-
+       g_free(event_data);
        __NETWORK_FUNC_EXIT__;
 }
 
@@ -606,9 +640,17 @@ static void __net_netlink_scan_wifi_reply(GObject *source_object, GAsyncResult *
 
        GDBusConnection *conn = NULL;
        GError *error = NULL;
-       net_err_e Error = NET_ERR_NONE;
-       net_event_info_s event_data = { 0, };
        GVariant *reply;
+       net_err_e Error = NET_ERR_NONE;
+       net_event_info_s *event_data = NULL;
+       network_info_s *network_info = (network_info_s *)user_data;
+       network_request_table_s *request_table = network_info->request_table;
+
+       event_data = g_try_malloc0(sizeof(net_event_info_s));
+       if (event_data == NULL) {
+               __NETWORK_FUNC_EXIT__;
+               return;
+       }
 
        conn = G_DBUS_CONNECTION(source_object);
        reply = g_dbus_connection_call_finish(conn, res, &error);
@@ -626,15 +668,16 @@ static void __net_netlink_scan_wifi_reply(GObject *source_object, GAsyncResult *
                if (request_table[NETWORK_REQUEST_TYPE_NETLINK_SCAN].flag == TRUE) {
                        memset(&request_table[NETWORK_REQUEST_TYPE_NETLINK_SCAN],
                                        0, sizeof(network_request_table_s));
-                       event_data.Event = NET_EVENT_WIFI_NETLINK_SCAN_IND;
+                       event_data->Event = NET_EVENT_WIFI_NETLINK_SCAN_IND;
 
-                       event_data.Datalength = 0;
-                       event_data.Data = NULL;
-                       event_data.Error = Error;
+                       event_data->Datalength = 0;
+                       event_data->Data = NULL;
+                       event_data->Error = Error;
 
-                       _net_dbus_pending_call_unref();
+                       if (network_info->event_callback)
+                               network_info->event_callback(event_data, network_info->user_data);
 
-                       _net_client_callback(&event_data);
+                       g_free(event_data);
 
                        __NETWORK_FUNC_EXIT__;
                        return;
@@ -642,8 +685,7 @@ static void __net_netlink_scan_wifi_reply(GObject *source_object, GAsyncResult *
        } else
                WIFI_LOG(WIFI_INFO, "netlink scan succeed");
 
-       _net_dbus_pending_call_unref();
-
+       g_free(event_data);
        __NETWORK_FUNC_EXIT__;
 }
 
@@ -671,8 +713,6 @@ static void __net_set_passpoint_reply(GObject *source_object, GAsyncResult *res,
        else
                WIFI_LOG(WIFI_INFO, "set passpoint succeeded");
 
-       _net_dbus_pending_call_unref();
-
        __NETWORK_FUNC_EXIT__;
 }
 
@@ -726,7 +766,7 @@ static char *__net_make_group_name(unsigned char *raw_ssid,
        return buf;
 }
 
-static int __net_dbus_set_agent_field_and_connect(
+static int __net_dbus_set_agent_field_and_connect(network_info_s *network_info,
                const char *key, const char *value, const char *profilename)
 {
        __NETWORK_FUNC_ENTER__;
@@ -738,12 +778,11 @@ static int __net_dbus_set_agent_field_and_connect(
        builder = g_variant_builder_new(G_VARIANT_TYPE("a{sv}"));
        g_variant_builder_add(builder, "{sv}", key, g_variant_new_string(value));
 
-       params = g_variant_new("(o@a{sv})",
-                       profilename, g_variant_builder_end(builder));
+       params = g_variant_new("(o@a{sv})", profilename, g_variant_builder_end(builder));
        g_variant_builder_unref(builder);
 
-       Error = _net_invoke_dbus_method_nonblock(NETCONFIG_SERVICE,
-                       NETCONFIG_WIFI_PATH,
+       Error = _net_invoke_dbus_method_nonblock(network_info,
+                       NETCONFIG_SERVICE, NETCONFIG_WIFI_PATH,
                        CONNMAN_AGENT_INTERFACE, "SetField", params,
                        DBUS_REPLY_TIMEOUT, __net_open_connection_reply);
 
@@ -752,25 +791,37 @@ static int __net_dbus_set_agent_field_and_connect(
 }
 //LCOV_EXCL_STOP
 
-GVariant *_net_invoke_dbus_method(const char *dest, const char *path,
-               const char *interface_name, const char *method,
-               GVariant *params, int *dbus_error)
+GVariant *_net_invoke_dbus_method(network_info_s *network_info,
+               const char *dest, const char *path, const char *interface_name,
+               const char *method, GVariant *params, int *dbus_error)
 {
        __NETWORK_FUNC_ENTER__;
 
        GError *error = NULL;
        GVariant *reply = NULL;
        *dbus_error = NET_ERR_NONE;
-       GDBusConnection *connection;
-
-       connection = _net_dbus_get_gdbus_conn();
-       if (connection == NULL) {
-               WIFI_LOG(WIFI_ERROR, "GDBusconnection is NULL"); //LCOV_EXCL_LINE
-               *dbus_error = NET_ERR_APP_NOT_REGISTERED; //LCOV_EXCL_LINE
-               return reply; //LCOV_EXCL_LINE
+       GDBusConnection *connection = NULL;
+       gboolean created = FALSE;
+
+       if (network_info == NULL || network_info->connection == NULL) {
+               connection = g_bus_get_sync(G_BUS_TYPE_SYSTEM, NULL, &error);
+               if (connection == NULL) {
+                       /* LCOV_EXCL_START */
+                       if (error != NULL) {
+                               WIFI_LOG(WIFI_ERROR,
+                                               "Failed to connect to the D-BUS daemon [%s]", error->message);
+                               g_error_free(error);
+                       }
+                       /* LCOV_EXCL_STOP */
+                       return NULL;
+               }
+               created = TRUE;
+       } else {
+               connection = network_info->connection;
+               created = FALSE;
        }
 
-       reply = g_dbus_connection_call_sync(connection,
+       reply = g_dbus_connection_call_sync(network_info->connection,
                        dest,
                        path,
                        interface_name,
@@ -779,7 +830,7 @@ GVariant *_net_invoke_dbus_method(const char *dest, const char *path,
                        NULL,
                        G_DBUS_CALL_FLAGS_NONE,
                        DBUS_REPLY_TIMEOUT_SYNC,
-                       _net_dbus_get_gdbus_cancellable(),
+                       network_info->cancellable,
                        &error);
        if (reply == NULL) {
                if (error != NULL) {
@@ -798,26 +849,22 @@ GVariant *_net_invoke_dbus_method(const char *dest, const char *path,
                return NULL;
        }
 
+       if (created)
+               g_object_unref(connection);
+
        __NETWORK_FUNC_EXIT__;
        return reply;
 }
 
-int _net_invoke_dbus_method_nonblock(const char *dest, const char *path,
+int _net_invoke_dbus_method_nonblock(network_info_s *network_info,
+               const char *dest, const char *path,
                const char *interface_name, const char *method,
                GVariant *params, int timeout,
                GAsyncReadyCallback notify_func)
 {
        __NETWORK_FUNC_ENTER__;
 
-       GDBusConnection *connection;
-
-       connection = _net_dbus_get_gdbus_conn();
-       if (connection == NULL) {
-               WIFI_LOG(WIFI_ERROR, "GDBusconnection is NULL"); //LCOV_EXCL_LINE
-               return NET_ERR_APP_NOT_REGISTERED; //LCOV_EXCL_LINE
-       }
-
-       g_dbus_connection_call(connection,
+       g_dbus_connection_call(network_info->connection,
                               dest,
                               path,
                               interface_name,
@@ -826,25 +873,24 @@ int _net_invoke_dbus_method_nonblock(const char *dest, const char *path,
                               NULL,
                               G_DBUS_CALL_FLAGS_NONE,
                               timeout,
-                              _net_dbus_get_gdbus_cancellable(),
+                              network_info->cancellable,
                               (GAsyncReadyCallback) notify_func,
-                              NULL);
-
-       if (notify_func != NULL)
-               _net_dbus_pending_call_ref();
+                              network_info);
 
        __NETWORK_FUNC_EXIT__;
        return NET_ERR_NONE;
 }
 
-int _net_dbus_open_connection(const char* profile_name)
+int _net_dbus_open_connection(network_info_s *network_info,
+               const char* profile_name)
 {
        __NETWORK_FUNC_ENTER__;
 
        net_err_e Error = NET_ERR_NONE;
 
        /* use DBus signal than reply pending because of performance reason */
-       Error = _net_invoke_dbus_method_nonblock(CONNMAN_SERVICE, profile_name,
+       Error = _net_invoke_dbus_method_nonblock(network_info,
+                       CONNMAN_SERVICE, profile_name,
                        CONNMAN_SERVICE_INTERFACE, "Connect", NULL,
                        DBUS_REPLY_TIMEOUT, __net_open_connection_reply);
 
@@ -852,14 +898,16 @@ int _net_dbus_open_connection(const char* profile_name)
        return Error;
 }
 
-int _net_dbus_close_connection(const char* profile_name)
+int _net_dbus_close_connection(network_info_s *network_info,
+               const char* profile_name)
 {
        __NETWORK_FUNC_ENTER__;
 
        net_err_e Error = NET_ERR_NONE;
 
        /* use DBus signal than reply pending because of performance reason */
-       Error = _net_invoke_dbus_method_nonblock(CONNMAN_SERVICE, profile_name,
+       Error = _net_invoke_dbus_method_nonblock(network_info,
+                       CONNMAN_SERVICE, profile_name,
                        CONNMAN_SERVICE_INTERFACE, "Disconnect", NULL,
                        DBUS_REPLY_TIMEOUT, __net_close_connection_reply);
 
@@ -867,16 +915,19 @@ int _net_dbus_close_connection(const char* profile_name)
        return Error;
 }
 
-int _net_dbus_scan_request(void)
+int _net_dbus_scan_request(network_info_s *network_info)
 {
        __NETWORK_FUNC_ENTER__;
 
        net_err_e Error = NET_ERR_NONE;
+       GVariant *params = NULL;
+
+       params = g_variant_new("(s)", network_info->interface_name);
 
        /* use DBus signal than reply pending because of performance reason */
-       Error = _net_invoke_dbus_method_nonblock(CONNMAN_SERVICE,
-                       CONNMAN_WIFI_TECHNOLOGY_PREFIX,
-                       CONNMAN_TECHNOLOGY_INTERFACE, "Scan", NULL,
+       Error = _net_invoke_dbus_method_nonblock(network_info,
+                       CONNMAN_SERVICE, CONNMAN_WIFI_TECHNOLOGY_PREFIX,
+                       CONNMAN_TECHNOLOGY_INTERFACE, "ScanDevice", params,
                        DBUS_REPLY_TIMEOUT, __net_scan_reply);
 
        if (Error == NET_ERR_IN_PROGRESS)
@@ -886,7 +937,7 @@ int _net_dbus_scan_request(void)
        return Error;
 }
 
-int _net_dbus_get_scan_state(int *scanstate)
+int _net_dbus_get_scan_state(network_info_s *network_info, int *scanstate)
 {
        __NETWORK_FUNC_ENTER__;
 
@@ -895,14 +946,15 @@ int _net_dbus_get_scan_state(int *scanstate)
        GVariant *value = NULL;
        GVariantIter *iter;
        gchar *key;
+       GVariant *params = NULL;
        const char *method = "GetScanState";
 
-       message = _net_invoke_dbus_method(
+       message = _net_invoke_dbus_method(network_info,
                        CONNMAN_SERVICE, CONNMAN_WIFI_TECHNOLOGY_PREFIX,
-                       CONNMAN_TECHNOLOGY_INTERFACE, method, NULL, &Error);
+                       CONNMAN_TECHNOLOGY_INTERFACE, method, params, &Error);
 
        if (message == NULL) {
-               WIFI_LOG(WIFI_ERROR, "Failed to get scan state\n"); //LCOV_EXCL_LINE
+               WIFI_LOG(WIFI_ERROR, "Failed to get scan state"); //LCOV_EXCL_LINE
                __NETWORK_FUNC_EXIT__;
                return Error;
        }
@@ -910,7 +962,7 @@ int _net_dbus_get_scan_state(int *scanstate)
        g_variant_get(message, "(a{sv})", &iter);
        while (g_variant_iter_loop(iter, "{sv}", &key, &value)) {
                if (g_variant_is_of_type(value, G_VARIANT_TYPE_BOOLEAN)) {
-                       if (g_strcmp0(key, "Scanstate") == 0)
+                       if (g_strcmp0(key, network_info->interface_name) == 0)
                                *scanstate = g_variant_get_boolean(value);
                }
        }
@@ -918,14 +970,15 @@ int _net_dbus_get_scan_state(int *scanstate)
        g_variant_iter_free(iter);
        g_variant_unref(message);
 
-       WIFI_LOG(WIFI_INFO, "scan state: %d\n", *scanstate);
+       WIFI_LOG(WIFI_INFO, "scan state: %d", *scanstate);
 
        __NETWORK_FUNC_EXIT__;
        return Error;
 }
 
 //LCOV_EXCL_START
-int _net_dbus_set_bgscan_mode(net_wifi_background_scan_mode_e mode)
+int _net_dbus_set_bgscan_mode(network_info_s *network_info,
+               net_wifi_background_scan_mode_e mode)
 {
        __NETWORK_FUNC_ENTER__;
 
@@ -933,10 +986,12 @@ int _net_dbus_set_bgscan_mode(net_wifi_background_scan_mode_e mode)
        GVariant *message = NULL;
        GVariant *params;
 
-       params = g_variant_new("(u)", mode);
+       params = g_variant_new("(su)", network_info->interface_name, mode);
 
-       message = _net_invoke_dbus_method(NETCONFIG_SERVICE, NETCONFIG_WIFI_PATH,
-                       NETCONFIG_WIFI_INTERFACE, "SetBgscan", params, &Error);
+       message = _net_invoke_dbus_method(network_info,
+                       NETCONFIG_SERVICE, NETCONFIG_WIFI_PATH,
+                       NETCONFIG_WIFI_INTERFACE, "SetBgscan",
+                       params, &Error);
 
        if (Error != NET_ERR_NONE)
                WIFI_LOG(WIFI_ERROR, "_net_invoke_dbus_method failed"); //LCOV_EXCL_LINE
@@ -948,7 +1003,7 @@ int _net_dbus_set_bgscan_mode(net_wifi_background_scan_mode_e mode)
        return Error;
 }
 
-int _net_dbus_set_ip_conflict_period(unsigned int initial_time)
+int _net_dbus_set_ip_conflict_period(network_info_s *network_info, unsigned int initial_time)
 {
        __NETWORK_FUNC_ENTER__;
 
@@ -956,10 +1011,12 @@ int _net_dbus_set_ip_conflict_period(unsigned int initial_time)
        GVariant *message = NULL;
        GVariant *params;
 
-       params = g_variant_new("(u)", initial_time);
+       params = g_variant_new("(su)", network_info->interface_name, initial_time);
 
-       message = _net_invoke_dbus_method(NETCONFIG_SERVICE, NETCONFIG_WIFI_PATH,
-                       NETCONFIG_WIFI_INTERFACE, "SetIpConflictPeriod", params, &Error);
+       message = _net_invoke_dbus_method(network_info,
+                       NETCONFIG_SERVICE, NETCONFIG_WIFI_PATH,
+                       NETCONFIG_WIFI_INTERFACE, "SetIpConflictPeriod",
+                       params, &Error);
 
        if (Error != NET_ERR_NONE)
                WIFI_LOG(WIFI_ERROR, "_net_invoke_dbus_method failed"); //LCOV_EXCL_LINE
@@ -972,7 +1029,8 @@ int _net_dbus_set_ip_conflict_period(unsigned int initial_time)
 }
 //LCOV_EXCL_STOP
 
-int _net_dbus_get_technology_state(network_tech_state_info_s *tech_state)
+int _net_dbus_get_technology_state(network_info_s *network_info,
+               network_tech_state_info_s *tech_state)
 {
        __NETWORK_FUNC_ENTER__;
 
@@ -985,15 +1043,16 @@ int _net_dbus_get_technology_state(network_tech_state_info_s *tech_state)
                return NET_ERR_INVALID_PARAM; //LCOV_EXCL_LINE
        }
 
-       message = _net_invoke_dbus_method(CONNMAN_SERVICE,
-                       CONNMAN_MANAGER_PATH, CONNMAN_MANAGER_INTERFACE,
-                       "GetTechnologies", NULL, &Error);
+       message = _net_invoke_dbus_method(network_info,
+                       CONNMAN_SERVICE, CONNMAN_MANAGER_PATH,
+                       CONNMAN_MANAGER_INTERFACE, "GetTechnologies",
+                       NULL, &Error);
        if (message == NULL) {
                WIFI_LOG(WIFI_ERROR, "Failed to get technology info"); //LCOV_EXCL_LINE
                goto done; //LCOV_EXCL_LINE
        }
 
-       Error = _net_get_tech_state(message, tech_state);
+       Error = _net_get_tech_state(network_info, message, tech_state);
 
        g_variant_unref(message);
 
@@ -1002,7 +1061,8 @@ done:
        return Error;
 }
 
-int _net_dbus_get_tech_status(net_tech_info_s *tech_status)
+int _net_dbus_get_tech_status(network_info_s *network_info,
+               net_tech_info_s *tech_status)
 {
        __NETWORK_FUNC_ENTER__;
 
@@ -1011,7 +1071,7 @@ int _net_dbus_get_tech_status(net_tech_info_s *tech_status)
 
        g_strlcpy(tech_state.technology, "wifi", NET_TECH_LENGTH_MAX);
 
-       Error = _net_dbus_get_technology_state(&tech_state);
+       Error = _net_dbus_get_technology_state(network_info, &tech_state);
        if (Error != NET_ERR_NONE) {
                WIFI_LOG(WIFI_ERROR, //LCOV_EXCL_LINE
                        "_net_dbus_get_technology_state() failed. Error [%s]",
@@ -1035,7 +1095,7 @@ done:
 }
 
 //LCOV_EXCL_START
-int _net_dbus_set_eap_config_fields_and_connect(
+static int _net_dbus_set_eap_config_fields_and_connect(network_info_s *network_info,
                const net_wifi_connect_service_info_t *wifi_info,
                const char *profilename)
 {
@@ -1096,12 +1156,11 @@ int _net_dbus_set_eap_config_fields_and_connect(
                                CONNMAN_CONFIG_FIELD_PVT_KEY_PASSPHRASE,
                                wifi_info->private_key_password);
 
-       params = g_variant_new("(o@a{ss})",
-                       profilename, g_variant_builder_end(builder));
+       params = g_variant_new("(o@a{ss})", profilename, g_variant_builder_end(builder));
        g_variant_builder_unref(builder);
 
-       Error = _net_invoke_dbus_method_nonblock(NETCONFIG_SERVICE,
-                       NETCONFIG_WIFI_PATH,
+       Error = _net_invoke_dbus_method_nonblock(network_info,
+                       NETCONFIG_SERVICE, NETCONFIG_WIFI_PATH,
                        NETCONFIG_WIFI_INTERFACE, "CreateEapConfig", params,
                        DBUS_REPLY_TIMEOUT, __net_open_connection_reply);
 
@@ -1110,7 +1169,7 @@ int _net_dbus_set_eap_config_fields_and_connect(
 }
 //LCOV_EXCL_STOP
 
-int _net_dbus_set_agent_passphrase_and_connect(
+int _net_dbus_set_agent_passphrase_and_connect(network_info_s *network_info,
                const char *passphrase, const char *profilename)
 {
        __NETWORK_FUNC_ENTER__;
@@ -1122,10 +1181,8 @@ int _net_dbus_set_agent_passphrase_and_connect(
                return NET_ERR_INVALID_PARAM; //LCOV_EXCL_LINE
        }
 
-       Error = __net_dbus_set_agent_field_and_connect(
-                       NETCONFIG_AGENT_FIELD_PASSPHRASE,
-                       passphrase,
-                       profilename);
+       Error = __net_dbus_set_agent_field_and_connect(network_info,
+                       NETCONFIG_AGENT_FIELD_PASSPHRASE, passphrase, profilename);
        if (NET_ERR_NONE != Error) {
                WIFI_LOG(WIFI_ERROR, "Configuration failed(%d)", Error); //LCOV_EXCL_LINE
                return Error; //LCOV_EXCL_LINE
@@ -1136,12 +1193,14 @@ int _net_dbus_set_agent_passphrase_and_connect(
 }
 
 //LCOV_EXCL_START
-int _net_dbus_set_agent_fields_and_connect(const char *ssid,
-               const char *passphrase, const char *profilename)
+static int _net_dbus_set_agent_fields_and_connect(network_info_s *network_info,
+               const char *ssid, const char *passphrase, const char *profilename)
 {
        __NETWORK_FUNC_ENTER__;
 
        net_err_e Error = NET_ERR_NONE;
+       GVariant *params = NULL;
+       GVariantBuilder *builder;
 
        /* If OPEN network, passphrase can be NULL */
        if (NULL == ssid || strlen(ssid) <= 0 || NULL == profilename) {
@@ -1149,9 +1208,6 @@ int _net_dbus_set_agent_fields_and_connect(const char *ssid,
                return NET_ERR_INVALID_PARAM; //LCOV_EXCL_LINE
        }
 
-       GVariant *params = NULL;
-       GVariantBuilder *builder;
-
        builder = g_variant_builder_new(G_VARIANT_TYPE("a{sv}"));
        g_variant_builder_add(builder, "{sv}", NETCONFIG_AGENT_FIELD_SSID,
                        g_variant_new_fixed_array(G_VARIANT_TYPE_BYTE, ssid,
@@ -1161,12 +1217,11 @@ int _net_dbus_set_agent_fields_and_connect(const char *ssid,
                g_variant_builder_add(builder, "{sv}", NETCONFIG_AGENT_FIELD_PASSPHRASE,
                                g_variant_new_string(passphrase));
 
-       params = g_variant_new("(o@a{sv})",
-                       profilename, g_variant_builder_end(builder));
+       params = g_variant_new("(o@a{sv})", profilename, g_variant_builder_end(builder));
        g_variant_builder_unref(builder);
 
-       Error = _net_invoke_dbus_method_nonblock(NETCONFIG_SERVICE,
-                       NETCONFIG_WIFI_PATH,
+       Error = _net_invoke_dbus_method_nonblock(network_info,
+                       NETCONFIG_SERVICE, NETCONFIG_WIFI_PATH,
                        CONNMAN_AGENT_INTERFACE, "SetField", params,
                        DBUS_REPLY_TIMEOUT, __net_open_connection_reply);
        if (NET_ERR_NONE != Error) {
@@ -1178,7 +1233,7 @@ int _net_dbus_set_agent_fields_and_connect(const char *ssid,
        return Error;
 }
 
-int _net_dbus_get_wps_generated_pin(char **wps_pin)
+int _net_dbus_get_wps_generated_pin(network_info_s *network_info, char **wps_pin)
 {
        __NETWORK_FUNC_ENTER__;
        net_err_e error = NET_ERR_NONE;
@@ -1187,17 +1242,22 @@ int _net_dbus_get_wps_generated_pin(char **wps_pin)
        const gchar *value = NULL;
        const gchar *path = NULL;
 
-       params = g_variant_new("(s)", "wlan0");
-       reply = _net_invoke_dbus_method(SUPPLICANT_SERVICE, SUPPLICANT_PATH,
-                       SUPPLICANT_INTERFACE, "GetInterface", params, &error);
+       params = g_variant_new("(s)", network_info->interface_name);
+
+       reply = _net_invoke_dbus_method(network_info,
+                       SUPPLICANT_SERVICE, SUPPLICANT_PATH,
+                       SUPPLICANT_INTERFACE, "GetInterface",
+                       params, &error);
        if (reply == NULL) {
                WIFI_LOG(WIFI_ERROR, "Failed to get Wi-Fi interface");
                return error;
        }
        g_variant_get(reply, "(&o)", &path);
 
-       reply = _net_invoke_dbus_method(SUPPLICANT_SERVICE, path,
-                       SUPPLICANT_INTERFACE ".Interface.WPS", "GeneratePin", NULL, &error);
+       reply = _net_invoke_dbus_method(network_info,
+                       SUPPLICANT_SERVICE, path,
+                       SUPPLICANT_INTERFACE ".Interface.WPS",
+                       "GeneratePin", NULL, &error);
        if (reply == NULL) {
                WIFI_LOG(WIFI_ERROR, "Failed to get wps pin");
                return error;
@@ -1210,16 +1270,15 @@ int _net_dbus_get_wps_generated_pin(char **wps_pin)
        return error;
 }
 
-int _net_dbus_set_agent_wps_pbc_and_connect(const char *profilename)
+int _net_dbus_set_agent_wps_pbc_and_connect(network_info_s *network_info,
+               const char *profilename)
 {
        __NETWORK_FUNC_ENTER__;
 
        net_err_e Error = NET_ERR_NONE;
 
-       Error = __net_dbus_set_agent_field_and_connect(
-                       NETCONFIG_AGENT_FIELD_WPS_PBC,
-                       "enable",
-                       profilename);
+       Error = __net_dbus_set_agent_field_and_connect(network_info,
+                       NETCONFIG_AGENT_FIELD_WPS_PBC, "enable", profilename);
        if (NET_ERR_NONE != Error) {
                WIFI_LOG(WIFI_ERROR, "PBC configuration failed(%d)", Error);
                return Error;
@@ -1229,7 +1288,7 @@ int _net_dbus_set_agent_wps_pbc_and_connect(const char *profilename)
        return Error;
 }
 
-int _net_dbus_set_agent_wps_pin_and_connect(
+int _net_dbus_set_agent_wps_pin_and_connect(network_info_s *network_info,
                const char *wps_pin, const char *profilename)
 {
        __NETWORK_FUNC_ENTER__;
@@ -1241,10 +1300,8 @@ int _net_dbus_set_agent_wps_pin_and_connect(
                return NET_ERR_INVALID_PARAM;
        }
 
-       Error = __net_dbus_set_agent_field_and_connect(
-                       NETCONFIG_AGENT_FIELD_WPS_PIN,
-                       wps_pin,
-                       profilename);
+       Error = __net_dbus_set_agent_field_and_connect(network_info,
+                       NETCONFIG_AGENT_FIELD_WPS_PIN, wps_pin, profilename);
        if (NET_ERR_NONE != Error) {
                WIFI_LOG(WIFI_ERROR, "PIN configuration failed(%d)", Error);
                return Error;
@@ -1255,7 +1312,8 @@ int _net_dbus_set_agent_wps_pin_and_connect(
 }
 //LCOV_EXCL_STOP
 
-int _net_dbus_connect_service(const net_wifi_connect_service_info_t *wifi_connection_info)
+int _net_dbus_connect_service(network_info_s *network_info,
+               const net_wifi_connect_service_info_t *wifi_connection_info)
 {
        __NETWORK_FUNC_ENTER__;
 
@@ -1267,17 +1325,17 @@ int _net_dbus_connect_service(const net_wifi_connect_service_info_t *wifi_connec
 
        /* Get group name with prefix 'ssid' in hex */
        grp_name = __net_make_group_name(wifi_connection_info->is_hidden == TRUE ?
-                       NULL : wifi_connection_info->raw_ssid,
-                       wifi_connection_info->raw_ssid_len,
-                       wifi_connection_info->mode,
-                       wifi_connection_info->security);
+                               NULL : wifi_connection_info->raw_ssid,
+                               wifi_connection_info->raw_ssid_len,
+                               wifi_connection_info->mode,
+                               wifi_connection_info->security);
        if (NULL == grp_name) {
                WIFI_LOG(WIFI_ERROR, "Failed to make a group name"); //LCOV_EXCL_LINE
                __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
                return NET_ERR_UNKNOWN; //LCOV_EXCL_LINE
        }
 
-       Error = _net_get_profile_list(&profile_list);
+       Error = _net_get_profile_list(network_info, &profile_list);
        if (NET_ERR_NONE != Error) {
                WIFI_LOG(WIFI_ERROR, //LCOV_EXCL_LINE
                                "_net_get_profile_list fail. Error [%s]",
@@ -1318,20 +1376,20 @@ int _net_dbus_connect_service(const net_wifi_connect_service_info_t *wifi_connec
                                wifi_connection_info->security);
 
                WIFI_LOG(WIFI_INFO, "Hidden target name %s", target_name);
-               g_strlcpy(request_table[NETWORK_REQUEST_TYPE_OPEN_CONNECTION].ProfileName,
+               g_strlcpy(network_info->request_table[NETWORK_REQUEST_TYPE_OPEN_CONNECTION].ProfileName,
                                  target_name, NET_PROFILE_NAME_LEN_MAX+1);
 
                g_free(target_name);
                //LCOV_EXCL_STOP
        } else {
-               g_strlcpy(request_table[NETWORK_REQUEST_TYPE_OPEN_CONNECTION].ProfileName,
+               g_strlcpy(network_info->request_table[NETWORK_REQUEST_TYPE_OPEN_CONNECTION].ProfileName,
                                prof_info->ProfileName, NET_PROFILE_NAME_LEN_MAX+1);
        }
 
        //LCOV_EXCL_START
        if (g_strcmp0(wifi_connection_info->security, "ieee8021x") == 0) {
                /* Create the EAP config file */
-               Error = _net_dbus_set_eap_config_fields_and_connect(
+               Error = _net_dbus_set_eap_config_fields_and_connect(network_info,
                                wifi_connection_info, prof_info->ProfileName);
                if (NET_ERR_NONE != Error) {
                        WIFI_LOG(WIFI_ERROR, "Fail to create eap_config");
@@ -1339,13 +1397,13 @@ int _net_dbus_connect_service(const net_wifi_connect_service_info_t *wifi_connec
                        goto error;
                }
        } else if (wifi_connection_info->is_hidden == TRUE) {
-               Error = _net_dbus_set_agent_fields_and_connect(
+               Error = _net_dbus_set_agent_fields_and_connect(network_info,
                                wifi_connection_info->ssid,
                                wifi_connection_info->passphrase,
                                prof_info->ProfileName);
        } else if (g_strcmp0(wifi_connection_info->security, "none") != 0 &&
                        g_strcmp0(wifi_connection_info->security, "owe") != 0) {
-               Error = _net_dbus_set_agent_passphrase_and_connect(
+               Error = _net_dbus_set_agent_passphrase_and_connect(network_info,
                                wifi_connection_info->passphrase, prof_info->ProfileName);
                if (NET_ERR_NONE != Error) {
                        WIFI_LOG(WIFI_ERROR, "Fail to set agent_passphrase");
@@ -1353,7 +1411,7 @@ int _net_dbus_connect_service(const net_wifi_connect_service_info_t *wifi_connec
                        goto error;
                }
        } else {
-               Error = _net_dbus_open_connection(prof_info->ProfileName);
+               Error = _net_dbus_open_connection(network_info, prof_info->ProfileName);
        //LCOV_EXCL_STOP
        }
 
@@ -1363,7 +1421,7 @@ error:
                                "Failed to request open connection, Error [%s]",
                                _net_print_error(Error));
 
-               memset(&request_table[NETWORK_REQUEST_TYPE_OPEN_CONNECTION], //LCOV_EXCL_LINE
+               memset(&(network_info->request_table[NETWORK_REQUEST_TYPE_OPEN_CONNECTION]), //LCOV_EXCL_LINE
                                0, sizeof(network_request_table_s));
        }
 
@@ -1376,7 +1434,8 @@ error:
 }
 
 //LCOV_EXCL_START
-int _net_dbus_get_preferred_ipv6_address(const char *profilename, char **address)
+int _net_dbus_get_preferred_ipv6_address(network_info_s *network_info,
+               const char *profilename, char **address)
 {
        __NETWORK_FUNC_ENTER__;
 
@@ -1385,23 +1444,25 @@ int _net_dbus_get_preferred_ipv6_address(const char *profilename, char **address
        GVariant *params = NULL;
 
        if (address == NULL) {
-               WIFI_LOG(WIFI_ERROR, "Invalid Parameter\n");
+               WIFI_LOG(WIFI_ERROR, "Invalid Parameter");
                __NETWORK_FUNC_EXIT__;
                return NET_ERR_INVALID_PARAM;
        }
 
        params = g_variant_new("(s)", profilename);
-       message = _net_invoke_dbus_method(NETCONFIG_SERVICE, NETCONFIG_NETWORK_PATH,
-                       NETCONFIG_NETWORK_INTERFACE, "PreferredIpv6Address", params, &Error);
+       message = _net_invoke_dbus_method(network_info,
+                       NETCONFIG_SERVICE, NETCONFIG_NETWORK_PATH,
+                       NETCONFIG_NETWORK_INTERFACE, "PreferredIpv6Address",
+                       params, &Error);
        if (message == NULL) {
-               WIFI_LOG(WIFI_ERROR, "Failed to get preferred IPv6 address\n");
+               WIFI_LOG(WIFI_ERROR, "Failed to get preferred IPv6 address");
                __NETWORK_FUNC_EXIT__;
                return Error;
        }
 
        g_variant_get(message, "(s)", address);
 
-       WIFI_LOG(WIFI_INFO, "Preferred IPv6 Address [%s]\n", *address);
+       WIFI_LOG(WIFI_INFO, "Preferred IPv6 Address [%s]", *address);
 
        g_variant_unref(message);
 
@@ -1409,7 +1470,8 @@ int _net_dbus_get_preferred_ipv6_address(const char *profilename, char **address
        return Error;
 }
 
-int _net_dbus_set_profile_ipv4(net_profile_info_s* prof_info, char* profile_name)
+int _net_dbus_set_profile_ipv4(network_info_s *network_info,
+               net_profile_info_s *prof_info, char *profile_name)
 {
        __NETWORK_FUNC_ENTER__;
 
@@ -1499,9 +1561,10 @@ int _net_dbus_set_profile_ipv4(net_profile_info_s* prof_info, char* profile_name
                        prop_ipv4_configuration, g_variant_builder_end(builder));
        g_variant_builder_unref(builder);
 
-       message = _net_invoke_dbus_method(CONNMAN_SERVICE, profile_name,
-                       CONNMAN_SERVICE_INTERFACE, "SetProperty", params,
-                       &Error);
+       message = _net_invoke_dbus_method(network_info,
+                       CONNMAN_SERVICE, profile_name,
+                       CONNMAN_SERVICE_INTERFACE, "SetProperty",
+                       params, &Error);
        if (message == NULL) {
                WIFI_LOG(WIFI_ERROR, "Failed to set IPv4 Property"); //LCOV_EXCL_LINE
                __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
@@ -1509,13 +1572,14 @@ int _net_dbus_set_profile_ipv4(net_profile_info_s* prof_info, char* profile_name
        }
 
        g_variant_unref(message);
-       WIFI_LOG(WIFI_INFO, "Successfully configured IPv4.Configuration\n");
+       WIFI_LOG(WIFI_INFO, "Successfully configured IPv4.Configuration");
 
        __NETWORK_FUNC_EXIT__;
        return Error;
 }
 
-int _net_dbus_set_profile_ipv6(net_profile_info_s* prof_info, char* profile_name)
+int _net_dbus_set_profile_ipv6(network_info_s *network_info,
+               net_profile_info_s* prof_info, char* profile_name)
 {
        __NETWORK_FUNC_ENTER__;
 
@@ -1543,7 +1607,7 @@ int _net_dbus_set_profile_ipv6(net_profile_info_s* prof_info, char* profile_name
        net_dev_info_s *profile_net_info  = NULL;
 
        if ((prof_info == NULL) || (profile_name == NULL) || (strlen(profile_name) == 0)) {
-               WIFI_LOG(WIFI_ERROR,  "Error!!! Invalid argument\n");
+               WIFI_LOG(WIFI_ERROR,  "Error!!! Invalid argument");
                __NETWORK_FUNC_EXIT__;
                return NET_ERR_INVALID_PARAM;
        }
@@ -1556,8 +1620,8 @@ int _net_dbus_set_profile_ipv6(net_profile_info_s* prof_info, char* profile_name
                        INET6_ADDRSTRLEN);
        prefix_length = profile_net_info->PrefixLen6;
 
-       WIFI_LOG(WIFI_INFO, "ipaddress : %s, prefix_len : %d, gateway :"
-                       " %s\n", ip6_ptr, prefix_length, gw6_ptr);
+       WIFI_LOG(WIFI_INFO, "ipaddress : %s, prefix_len : %d, gateway : %s",
+                               ip6_ptr, prefix_length, gw6_ptr);
 
        builder = g_variant_builder_new(G_VARIANT_TYPE("a{sv}"));
 
@@ -1572,7 +1636,7 @@ int _net_dbus_set_profile_ipv6(net_profile_info_s* prof_info, char* profile_name
                g_variant_builder_add(builder, "{sv}", prop_method,
                                g_variant_new_string(off_method));
 
-               WIFI_LOG(WIFI_INFO, "DBus Message 2/2: %s %s\n",
+               WIFI_LOG(WIFI_INFO, "DBus Message 2/2: %s %s",
                                prop_method, off_method);
        } else if (profile_net_info->IpConfigType6 == NET_IP_CONFIG_TYPE_STATIC) {
 
@@ -1592,12 +1656,12 @@ int _net_dbus_set_profile_ipv6(net_profile_info_s* prof_info, char* profile_name
                        g_variant_builder_add(builder, "{sv}", prop_gateway,
                                        g_variant_new_string(gw6_ptr));
                }
-               WIFI_LOG(WIFI_INFO, "DBus Message 2/2: %s %s %s %s %s %d"
-                               " %s %s\n", prop_method, manual_method,
+               WIFI_LOG(WIFI_INFO, "DBus Message 2/2: %s %s %s %s %s %d %s %s",
+                               prop_method, manual_method,
                                prop_address, ipaddr6, prop_prefixlen,
                                prefix_length, prop_gateway, gwaddr6);
        } else {
-               WIFI_LOG(WIFI_ERROR, "Invalid argument\n");
+               WIFI_LOG(WIFI_ERROR, "Invalid argument");
                g_variant_builder_unref(builder);
                __NETWORK_FUNC_EXIT__;
                return NET_ERR_INVALID_PARAM;
@@ -1607,9 +1671,10 @@ int _net_dbus_set_profile_ipv6(net_profile_info_s* prof_info, char* profile_name
                        g_variant_builder_end(builder));
        g_variant_builder_unref(builder);
 
-       message = _net_invoke_dbus_method(CONNMAN_SERVICE, profile_name,
-                       CONNMAN_SERVICE_INTERFACE, "SetProperty", params,
-                       &Error);
+       message = _net_invoke_dbus_method(network_info,
+                       CONNMAN_SERVICE, profile_name,
+                       CONNMAN_SERVICE_INTERFACE, "SetProperty",
+                       params, &Error);
        if (message == NULL) {
                WIFI_LOG(WIFI_ERROR, "Failed to set IPv6 Property");
                __NETWORK_FUNC_EXIT__;
@@ -1617,13 +1682,14 @@ int _net_dbus_set_profile_ipv6(net_profile_info_s* prof_info, char* profile_name
        }
 
        g_variant_unref(message);
-       WIFI_LOG(WIFI_INFO, "Successfully configured IPv6.Configuration\n");
+       WIFI_LOG(WIFI_INFO, "Successfully configured IPv6.Configuration");
 
        __NETWORK_FUNC_EXIT__;
        return Error;
 }
 
-int _net_dbus_set_profile_dns(net_profile_info_s* prof_info, char* profile_name)
+int _net_dbus_set_profile_dns(network_info_s *network_info,
+               net_profile_info_s* prof_info, char* profile_name)
 {
        __NETWORK_FUNC_ENTER__;
 
@@ -1655,7 +1721,7 @@ int _net_dbus_set_profile_dns(net_profile_info_s* prof_info, char* profile_name)
        profile_net_info = &(prof_info->net_info);
 
        if (profile_net_info->DnsCount > NET_DNS_ADDR_MAX) {
-               WIFI_LOG(WIFI_ERROR, "Invalid parameter\n");
+               WIFI_LOG(WIFI_ERROR, "Invalid parameter");
                __NETWORK_FUNC_EXIT__;
                return NET_ERR_INVALID_PARAM;
        }
@@ -1693,7 +1759,7 @@ int _net_dbus_set_profile_dns(net_profile_info_s* prof_info, char* profile_name)
                        profile_net_info->DnsConfigType6 == NET_DNS_CONFIG_TYPE_DYNAMIC) {
                builder = g_variant_builder_new(G_VARIANT_TYPE("as"));
 
-               WIFI_LOG(WIFI_INFO, "IPv4 DnsConfigType: %d\n", profile_net_info->DnsConfigType);
+               WIFI_LOG(WIFI_INFO, "IPv4 DnsConfigType: %d", profile_net_info->DnsConfigType);
                if (profile_net_info->DnsConfigType ==
                                NET_DNS_CONFIG_TYPE_STATIC ||
                                profile_net_info->DnsConfigType6 ==
@@ -1704,7 +1770,7 @@ int _net_dbus_set_profile_dns(net_profile_info_s* prof_info, char* profile_name)
                        g_variant_builder_add(builder, "s",
                                        dhcp_method);
 
-               WIFI_LOG(WIFI_INFO, "IPv6 DnsConfigType: %d\n", profile_net_info->DnsConfigType6);
+               WIFI_LOG(WIFI_INFO, "IPv6 DnsConfigType: %d", profile_net_info->DnsConfigType6);
                if (profile_net_info->DnsConfigType6 ==
                                NET_DNS_CONFIG_TYPE_STATIC)
                        g_variant_builder_add(builder, "s",
@@ -1723,7 +1789,7 @@ int _net_dbus_set_profile_dns(net_profile_info_s* prof_info, char* profile_name)
                                g_variant_builder_add(builder, "s",
                                                dns_address[i]);
                        }
-                       WIFI_LOG(WIFI_INFO, "IPv4 DNS Address added in g_variant: %s\n", dns_address[i]);
+                       WIFI_LOG(WIFI_INFO, "IPv4 DNS Address added in g_variant: %s", dns_address[i]);
                }
 
                for (i = 0; i < profile_net_info->DnsCount6; i++) {
@@ -1735,28 +1801,30 @@ int _net_dbus_set_profile_dns(net_profile_info_s* prof_info, char* profile_name)
                                g_variant_builder_add(builder, "s",
                                                ipv6_dns_address[i]);
                        }
-                       WIFI_LOG(WIFI_INFO, "IPv6 DNS Address added in g_variant: %s\n", ipv6_dns_address[i]);
+                       WIFI_LOG(WIFI_INFO, "IPv6 DNS Address added in g_variant: %s", ipv6_dns_address[i]);
                }
 
                params = g_variant_new("(sv)", prop_nameserver_configuration, g_variant_builder_end(builder));
                g_variant_builder_unref(builder);
        }
 
-       message = _net_invoke_dbus_method(CONNMAN_SERVICE, profile_name,
-                       CONNMAN_SERVICE_INTERFACE, "SetProperty", params,
-                       &Error);
+       message = _net_invoke_dbus_method(network_info,
+                       CONNMAN_SERVICE, profile_name,
+                       CONNMAN_SERVICE_INTERFACE, "SetProperty",
+                       params, &Error);
        if (message == NULL) {
                __NETWORK_FUNC_EXIT__;
                return Error;
        }
-       WIFI_LOG(WIFI_INFO, "Successfully configured Nameservers.Configuration\n");
+       WIFI_LOG(WIFI_INFO, "Successfully configured Nameservers.Configuration");
        g_variant_unref(message);
 
        __NETWORK_FUNC_EXIT__;
        return Error;
 }
 
-int _net_dbus_set_proxy(net_profile_info_s* prof_info, char* profile_name)
+int _net_dbus_set_proxy(network_info_s *network_info,
+               net_profile_info_s* prof_info, char* profile_name)
 {
        __NETWORK_FUNC_ENTER__;
 
@@ -1825,50 +1893,56 @@ int _net_dbus_set_proxy(net_profile_info_s* prof_info, char* profile_name)
        params = g_variant_new("(sv)", prop_proxy_configuration, g_variant_builder_end(builder));
        g_variant_builder_unref(builder);
 
-       message = _net_invoke_dbus_method(CONNMAN_SERVICE, profile_name,
-                       CONNMAN_SERVICE_INTERFACE, "SetProperty", params,
-                       &Error);
+       message = _net_invoke_dbus_method(network_info,
+                       CONNMAN_SERVICE, profile_name,
+                       CONNMAN_SERVICE_INTERFACE, "SetProperty",
+                       params, &Error);
        if (message == NULL) {
                WIFI_LOG(WIFI_ERROR, "Failed to set Proxy Configuration");
                __NETWORK_FUNC_EXIT__;
                return Error;
        }
-       WIFI_LOG(WIFI_INFO, "Successfully configured Proxy.Configuration\n");
+       WIFI_LOG(WIFI_INFO, "Successfully configured Proxy.Configuration");
        g_variant_unref(message);
 
        __NETWORK_FUNC_EXIT__;
        return Error;
 }
 
-int _net_dbus_load_wifi_driver(gboolean wifi_picker_test)
+int _net_dbus_load_wifi_driver(network_info_s *network_info, gboolean wifi_picker_test)
 {
        __NETWORK_FUNC_ENTER__;
 
        net_err_e Error = NET_ERR_NONE;
        GVariant *params;
 
-       params = g_variant_new("(b)", wifi_picker_test);
+       params = g_variant_new("(sb)", network_info->interface_name, wifi_picker_test);
 
        /* use DBus signal than reply pending because of performance reason */
-       Error = _net_invoke_dbus_method_nonblock(NETCONFIG_SERVICE,
-                       NETCONFIG_WIFI_PATH, NETCONFIG_WIFI_INTERFACE,
-                       "LoadDriver", params, DBUS_REPLY_TIMEOUT,
+       Error = _net_invoke_dbus_method_nonblock(network_info,
+                       NETCONFIG_SERVICE, NETCONFIG_WIFI_PATH,
+                       NETCONFIG_WIFI_INTERFACE, "LoadDriver",
+                       params, DBUS_REPLY_TIMEOUT,
                        __net_wifi_power_reply);
 
        __NETWORK_FUNC_EXIT__;
        return Error;
 }
 
-int _net_dbus_remove_wifi_driver(void)
+int _net_dbus_remove_wifi_driver(network_info_s *network_info)
 {
        __NETWORK_FUNC_ENTER__;
 
        net_err_e Error = NET_ERR_NONE;
+       GVariant *params = NULL;
+
+       params = g_variant_new("(s)", network_info->interface_name);
 
        /* use DBus signal than reply pending because of performance reason */
-       Error = _net_invoke_dbus_method_nonblock(NETCONFIG_SERVICE,
-                       NETCONFIG_WIFI_PATH, NETCONFIG_WIFI_INTERFACE,
-                       "RemoveDriver", NULL, DBUS_REPLY_TIMEOUT,
+       Error = _net_invoke_dbus_method_nonblock(network_info,
+                       NETCONFIG_SERVICE, NETCONFIG_WIFI_PATH,
+                       NETCONFIG_WIFI_INTERFACE, "RemoveDriver",
+                       params, DBUS_REPLY_TIMEOUT,
                        __net_wifi_power_reply);
 
        __NETWORK_FUNC_EXIT__;
@@ -1883,13 +1957,21 @@ static void __net_specific_scan_request_reply(GObject *source_object, GAsyncResu
        GDBusConnection *conn = NULL;
        GError *error = NULL;
        net_err_e Error = NET_ERR_NONE;
-       net_event_info_s event_data = { 0, };
+       net_event_info_s *event_data = NULL;
        GVariant *reply;
+       network_info_s *network_info = (network_info_s *)user_data;
+       network_request_table_s *request_table = network_info->request_table;
+
+       event_data = g_try_malloc0(sizeof(net_event_info_s));
+       if (event_data == NULL) {
+               __NETWORK_FUNC_EXIT__;
+               return;
+       }
 
        conn = G_DBUS_CONNECTION(source_object);
        reply = g_dbus_connection_call_finish(conn, res, &error);
        if (error != NULL) {
-               WIFI_LOG(WIFI_ERROR, "Scan failed. Error [%s]\n",
+               WIFI_LOG(WIFI_ERROR, "Scan failed. Error [%s]",
                                error->message);
                Error = __net_error_string_to_enum(error->message);
                g_error_free(error);
@@ -1901,54 +1983,55 @@ static void __net_specific_scan_request_reply(GObject *source_object, GAsyncResu
        if (Error == NET_ERR_IN_PROGRESS) {
                /* should retry scan after receiving scan result */
                if (request_table[NETWORK_REQUEST_TYPE_SPECIFIC_SCAN].flag == TRUE) {
-                       WIFI_LOG(WIFI_INFO, "Specific Scan pending\n");
-                       scan_pending = TRUE;
+                       WIFI_LOG(WIFI_INFO, "Specific Scan pending");
+                       network_info->scan_pending = TRUE;
                }
        } else if (Error != NET_ERR_NONE) {
-               WIFI_LOG(WIFI_ERROR, "Specific Scan failed. Error [%d]\n", Error);
+               WIFI_LOG(WIFI_ERROR, "Specific Scan failed. Error [%d]", Error);
 
                if (request_table[NETWORK_REQUEST_TYPE_SPECIFIC_SCAN].flag == TRUE) {
                        memset(&request_table[NETWORK_REQUEST_TYPE_SPECIFIC_SCAN],
                                        0, sizeof(network_request_table_s));
 
-                       event_data.Event = NET_EVENT_WIFI_SPECIFIC_SCAN_RSP;
-                       event_data.Datalength = 0;
-                       event_data.Data = NULL;
-                       event_data.Error = Error;
+                       event_data->Event = NET_EVENT_WIFI_SPECIFIC_SCAN_RSP;
+                       event_data->Datalength = 0;
+                       event_data->Data = NULL;
+                       event_data->Error = Error;
+
+                       if (network_info->event_callback)
+                               network_info->event_callback(event_data, network_info->user_data);
 
-                       _net_dbus_pending_call_unref();
-                       _net_client_callback(&event_data);
+                       g_free(event_data);
 
                        __NETWORK_FUNC_EXIT__;
                        return;
                }
 
        } else
-               WIFI_LOG(WIFI_INFO, "Specific Scan Request success\n");
-
-       _net_dbus_pending_call_unref();
+               WIFI_LOG(WIFI_INFO, "Specific Scan Request success");
 
        __NETWORK_FUNC_EXIT__;
 }
 
-int _net_dbus_specific_scan_request(const char *ssid)
+int _net_dbus_specific_scan_request(network_info_s *network_info, const char *ssid)
 {
        __NETWORK_FUNC_ENTER__;
-       WIFI_LOG(WIFI_ERROR, "specific scan ssid : %s", ssid);
-
        GVariant *params = NULL;
        GVariantBuilder *builder;
        net_err_e Error = NET_ERR_NONE;
 
+       WIFI_LOG(WIFI_ERROR, "specific scan ssid : %s", ssid);
+
        builder = g_variant_builder_new(G_VARIANT_TYPE("a{sv}"));
        g_variant_builder_add(builder, "{sv}", "SSID", g_variant_new_string(ssid));
 
-       params = g_variant_new("(@a{sv})", g_variant_builder_end(builder));
+       params = g_variant_new("(s@a{sv})", network_info->interface_name,
+                               g_variant_builder_end(builder));
        g_variant_builder_unref(builder);
 
        /* use DBus signal than reply pending because of performance reason */
-       Error = _net_invoke_dbus_method_nonblock(CONNMAN_SERVICE,
-                       CONNMAN_WIFI_TECHNOLOGY_PREFIX,
+       Error = _net_invoke_dbus_method_nonblock(network_info,
+                       CONNMAN_SERVICE, CONNMAN_WIFI_TECHNOLOGY_PREFIX,
                        CONNMAN_TECHNOLOGY_INTERFACE, "SpecificScan", params,
                        DBUS_REPLY_TIMEOUT, __net_specific_scan_request_reply);
 
@@ -1959,21 +2042,26 @@ int _net_dbus_specific_scan_request(const char *ssid)
        return Error;
 }
 
-int _net_dbus_bssid_scan_request(void)
+int _net_dbus_bssid_scan_request(network_info_s *network_info)
 {
        __NETWORK_FUNC_ENTER__;
        net_err_e Error = NET_ERR_NONE;
+       GVariant *params = NULL;
+
+       params = g_variant_new("(s)", network_info->interface_name);
 
-       Error = _net_invoke_dbus_method_nonblock(NETCONFIG_SERVICE,
-                       NETCONFIG_WIFI_PATH, NETCONFIG_WIFI_INTERFACE,
-                       "RequestBssidScan", NULL, 6 * DBUS_REPLY_TIMEOUT,
+       Error = _net_invoke_dbus_method_nonblock(network_info,
+                       NETCONFIG_SERVICE, NETCONFIG_WIFI_PATH,
+                       NETCONFIG_WIFI_INTERFACE, "RequestBssidScan",
+                       params, 6 * DBUS_REPLY_TIMEOUT,
                        __net_bssid_scan_wifi_reply);
 
        __NETWORK_FUNC_EXIT__;
        return Error;
 }
 
-int _net_dbus_netlink_scan_request(GSList *nl_scan_list, const char *vsie)
+int _net_dbus_netlink_scan_request(network_info_s *network_info,
+               GSList *nl_scan_list, const char *vsie)
 {
        __NETWORK_FUNC_ENTER__;
        net_err_e Error = NET_ERR_NONE;
@@ -1999,28 +2087,33 @@ int _net_dbus_netlink_scan_request(GSList *nl_scan_list, const char *vsie)
                g_variant_builder_add(builder, "{sv}", "VSIE", g_variant_new_string(vsie));
        }
 
-       params = g_variant_new("(@a{sv})", g_variant_builder_end(builder));
+       params = g_variant_new("(s@a{sv})", network_info->interface_name, g_variant_builder_end(builder));
        g_variant_builder_unref(builder);
 
-       Error = _net_invoke_dbus_method_nonblock(NETCONFIG_SERVICE,
-                       NETCONFIG_WIFI_PATH, NETCONFIG_WIFI_INTERFACE,
-                       "NetlinkScan", params, 6 * DBUS_REPLY_TIMEOUT,
+       Error = _net_invoke_dbus_method_nonblock(network_info,
+                       NETCONFIG_SERVICE, NETCONFIG_WIFI_PATH,
+                       NETCONFIG_WIFI_INTERFACE, "NetlinkScan",
+                       params, 6 * DBUS_REPLY_TIMEOUT,
                        __net_netlink_scan_wifi_reply);
 
        __NETWORK_FUNC_EXIT__;
        return Error;
 }
 
-int _net_dbus_get_passpoint(int *enabled)
+int _net_dbus_get_passpoint(network_info_s *network_info, int *enabled)
 {
        __NETWORK_FUNC_ENTER__;
 
+       GVariant *params = NULL;
        GVariant *message = NULL;
        net_err_e Error = NET_ERR_NONE;
 
-       message = _net_invoke_dbus_method(NETCONFIG_SERVICE,
-                       NETCONFIG_WIFI_PATH, NETCONFIG_WIFI_INTERFACE,
-                       "GetPasspoint", NULL, &Error);
+       params = g_variant_new("(s)", network_info->interface_name);
+
+       message = _net_invoke_dbus_method(network_info,
+                       NETCONFIG_SERVICE, NETCONFIG_WIFI_PATH,
+                       NETCONFIG_WIFI_INTERFACE, "GetPasspoint",
+                       params, &Error);
        if (message == NULL) {
                WIFI_LOG(WIFI_ERROR, "Failed to Get Passpoint");
                __NETWORK_FUNC_EXIT__;
@@ -2040,25 +2133,27 @@ int _net_dbus_get_passpoint(int *enabled)
        return Error;
 }
 
-int _net_dbus_set_passpoint(int enable)
+int _net_dbus_set_passpoint(network_info_s *network_info, int enable)
 {
        __NETWORK_FUNC_ENTER__;
 
        GVariant *params;
        net_err_e Error = NET_ERR_NONE;
 
-       params = g_variant_new("(i)", enable);
+       params = g_variant_new("(si)", network_info->interface_name, enable);
 
-       Error = _net_invoke_dbus_method_nonblock(NETCONFIG_SERVICE,
-                       NETCONFIG_WIFI_PATH, NETCONFIG_WIFI_INTERFACE,
-                       "SetPasspoint", params, 6 * DBUS_REPLY_TIMEOUT,
+       Error = _net_invoke_dbus_method_nonblock(network_info,
+                       NETCONFIG_SERVICE, NETCONFIG_WIFI_PATH,
+                       NETCONFIG_WIFI_INTERFACE, "SetPasspoint",
+                       params, 6 * DBUS_REPLY_TIMEOUT,
                        __net_set_passpoint_reply);
 
        __NETWORK_FUNC_EXIT__;
        return Error;
 }
 
-int _net_dbus_add_vsie(unsigned int frame_id, const char *vsie_str)
+int _net_dbus_add_vsie(network_info_s *network_info,
+               unsigned int frame_id, const char *vsie_str)
 {
        __NETWORK_FUNC_ENTER__;
 
@@ -2066,11 +2161,12 @@ int _net_dbus_add_vsie(unsigned int frame_id, const char *vsie_str)
        GVariant *params = NULL;
        net_err_e Error = NET_ERR_NONE;
 
-       params = g_variant_new("(is)", frame_id, vsie_str);
+       params = g_variant_new("(sis)", network_info->interface_name, frame_id, vsie_str);
 
-       message = _net_invoke_dbus_method(NETCONFIG_SERVICE, NETCONFIG_WIFI_PATH,
-                       NETCONFIG_WIFI_INTERFACE, "AddVsie", params,
-                       &Error);
+       message = _net_invoke_dbus_method(network_info,
+                       NETCONFIG_SERVICE, NETCONFIG_WIFI_PATH,
+                       NETCONFIG_WIFI_INTERFACE, "AddVsie",
+                       params, &Error);
 
        if (message == NULL) {
                WIFI_LOG(WIFI_ERROR, "Failed to add vsie");
@@ -2079,13 +2175,14 @@ int _net_dbus_add_vsie(unsigned int frame_id, const char *vsie_str)
        }
 
        g_variant_unref(message);
-       WIFI_LOG(WIFI_INFO, "Successfully Added VSIE\n");
+       WIFI_LOG(WIFI_INFO, "Successfully Added VSIE");
 
        __NETWORK_FUNC_EXIT__;
        return Error;
 }
 
-int _net_dbus_get_vsie(unsigned int frame_id, char **vsie_str)
+int _net_dbus_get_vsie(network_info_s *network_info,
+               unsigned int frame_id, char **vsie_str)
 {
        __NETWORK_FUNC_ENTER__;
 
@@ -2094,11 +2191,12 @@ int _net_dbus_get_vsie(unsigned int frame_id, char **vsie_str)
        const char *val = NULL;
        net_err_e Error = NET_ERR_NONE;
 
-       params = g_variant_new("(i)", frame_id);
+       params = g_variant_new("(si)", network_info->interface_name, frame_id);
 
-       message = _net_invoke_dbus_method(NETCONFIG_SERVICE, NETCONFIG_WIFI_PATH,
-                       NETCONFIG_WIFI_INTERFACE, "GetVsie", params,
-                       &Error);
+       message = _net_invoke_dbus_method(network_info,
+                       NETCONFIG_SERVICE, NETCONFIG_WIFI_PATH,
+                       NETCONFIG_WIFI_INTERFACE, "GetVsie",
+                       params, &Error);
 
        if (message == NULL) {
                WIFI_LOG(WIFI_ERROR, "Failed to get vsie");
@@ -2119,7 +2217,8 @@ int _net_dbus_get_vsie(unsigned int frame_id, char **vsie_str)
        return Error;
 }
 
-int _net_dbus_remove_vsie(unsigned int frame_id, const char *vsie_str)
+int _net_dbus_remove_vsie(network_info_s *network_info,
+               unsigned int frame_id, const char *vsie_str)
 {
        __NETWORK_FUNC_ENTER__;
 
@@ -2127,11 +2226,12 @@ int _net_dbus_remove_vsie(unsigned int frame_id, const char *vsie_str)
        GVariant *params = NULL;
        net_err_e Error = NET_ERR_NONE;
 
-       params = g_variant_new("(is)", frame_id, vsie_str);
+       params = g_variant_new("(sis)", network_info->interface_name, frame_id, vsie_str);
 
-       message = _net_invoke_dbus_method(NETCONFIG_SERVICE, NETCONFIG_WIFI_PATH,
-                       NETCONFIG_WIFI_INTERFACE, "RemoveVsie", params,
-                       &Error);
+       message = _net_invoke_dbus_method(network_info,
+                       NETCONFIG_SERVICE, NETCONFIG_WIFI_PATH,
+                       NETCONFIG_WIFI_INTERFACE, "RemoveVsie",
+                       params, &Error);
 
        if (message == NULL) {
                WIFI_LOG(WIFI_ERROR, "Failed to remove vsie");
@@ -2140,21 +2240,26 @@ int _net_dbus_remove_vsie(unsigned int frame_id, const char *vsie_str)
        }
 
        g_variant_unref(message);
-       WIFI_LOG(WIFI_INFO, "Successfully Added VSIE\n");
+       WIFI_LOG(WIFI_INFO, "Successfully Added VSIE");
 
        __NETWORK_FUNC_EXIT__;
        return Error;
 }
 
-int _net_dbus_flush_bss(void)
+int _net_dbus_flush_bss(network_info_s *network_info)
 {
        __NETWORK_FUNC_ENTER__;
 
        net_err_e Error = NET_ERR_NONE;
+       GVariant *params = NULL;
        GVariant *message = NULL;
 
-       message = _net_invoke_dbus_method(NETCONFIG_SERVICE, NETCONFIG_WIFI_PATH,
-                       NETCONFIG_WIFI_INTERFACE, "FlushBss", NULL, &Error);
+       params = g_variant_new("(s)", network_info->interface_name);
+
+       message = _net_invoke_dbus_method(network_info,
+                       NETCONFIG_SERVICE, NETCONFIG_WIFI_PATH,
+                       NETCONFIG_WIFI_INTERFACE, "FlushBss",
+                       params, &Error);
 
        if (message == NULL) {
                WIFI_LOG(WIFI_ERROR, "Failed to flush bss");
@@ -2163,13 +2268,13 @@ int _net_dbus_flush_bss(void)
        }
 
        g_variant_unref(message);
-       WIFI_LOG(WIFI_INFO, "Successfully flush bss\n");
+       WIFI_LOG(WIFI_INFO, "Successfully flush bss");
 
        __NETWORK_FUNC_EXIT__;
        return Error;
 }
 
-int _net_dbus_set_bssid(char *bssid)
+int _net_dbus_set_bssid(network_info_s *network_info, char *bssid)
 {
        __NETWORK_FUNC_ENTER__;
 
@@ -2182,10 +2287,11 @@ int _net_dbus_set_bssid(char *bssid)
 
        WIFI_LOG(WIFI_INFO, "SetBSSID [%s]", bssid);
 
-       params = g_variant_new("(sv)", prop_key, g_variant_new_string(bssid));
+       params = g_variant_new("(ssv)", network_info->interface_name,
+                               prop_key, g_variant_new_string(bssid));
 
-       message = _net_invoke_dbus_method(CONNMAN_SERVICE,
-                       CONNMAN_WIFI_TECHNOLOGY_PREFIX,
+       message = _net_invoke_dbus_method(network_info,
+                       CONNMAN_SERVICE, CONNMAN_WIFI_TECHNOLOGY_PREFIX,
                        CONNMAN_TECHNOLOGY_INTERFACE,
                        method, params, &Error);
 
@@ -2201,7 +2307,7 @@ int _net_dbus_set_bssid(char *bssid)
        return Error;
 }
 
-int _net_dbus_get_5ghz_support(gboolean *supported)
+int _net_dbus_get_5ghz_support(network_info_s *network_info, gboolean *supported)
 {
        __NETWORK_FUNC_ENTER__;
 
@@ -2212,9 +2318,10 @@ int _net_dbus_get_5ghz_support(gboolean *supported)
        gchar *key = NULL;
        gboolean is_5ghz_supported = FALSE;
 
-       message = _net_invoke_dbus_method(
+       message = _net_invoke_dbus_method(network_info,
                        CONNMAN_SERVICE, CONNMAN_WIFI_TECHNOLOGY_PREFIX,
-                       CONNMAN_TECHNOLOGY_INTERFACE, "Get5GhzSupported", NULL, &Error);
+                       CONNMAN_TECHNOLOGY_INTERFACE, "Get5GhzSupported",
+                       NULL, &Error);
        if (message == NULL) {
                WIFI_LOG(WIFI_ERROR, "Failed to get technology properties");
 
@@ -2244,7 +2351,8 @@ int _net_dbus_get_5ghz_support(gboolean *supported)
        return Error;
 }
 
-int _net_dbus_get_auto_connect_mode(int *connect_mode)
+int _net_dbus_get_auto_connect_mode(network_info_s *network_info,
+               int *connect_mode)
 {
        __NETWORK_FUNC_ENTER__;
 
@@ -2255,9 +2363,10 @@ int _net_dbus_get_auto_connect_mode(int *connect_mode)
        gchar *key = NULL;
        gboolean status = TRUE;
 
-       message = _net_invoke_dbus_method(
+       message = _net_invoke_dbus_method(network_info,
                        CONNMAN_SERVICE, CONNMAN_MANAGER_PATH,
-                       CONNMAN_MANAGER_INTERFACE, "GetProperties", NULL, &Error);
+                       CONNMAN_MANAGER_INTERFACE, "GetProperties",
+                       NULL, &Error);
        if (message == NULL) {
                WIFI_LOG(WIFI_ERROR, "Failed to get service properties");
 
@@ -2288,7 +2397,7 @@ int _net_dbus_get_auto_connect_mode(int *connect_mode)
 }
 
 
-int _net_dbus_set_auto_connect_mode(int connect_mode)
+int _net_dbus_set_auto_connect_mode(network_info_s *network_info, int connect_mode)
 {
        __NETWORK_FUNC_ENTER__;
 
@@ -2305,9 +2414,10 @@ int _net_dbus_set_auto_connect_mode(int connect_mode)
        params = g_variant_new("(sv)", key, (connect_mode == 1) ?
                g_variant_new_boolean(value_enable) : g_variant_new_boolean(value_disable));
 
-       message = _net_invoke_dbus_method(CONNMAN_SERVICE,
-                       CONNMAN_MANAGER_PATH, CONNMAN_MANAGER_INTERFACE,
-                       "SetProperty", params, &Error);
+       message = _net_invoke_dbus_method(network_info,
+                       CONNMAN_SERVICE, CONNMAN_MANAGER_PATH,
+                       CONNMAN_MANAGER_INTERFACE, "SetProperty",
+                       params, &Error);
        if (message == NULL) {
                WIFI_LOG(WIFI_ERROR, "Failed to Set AutoConnect");
                __NETWORK_FUNC_EXIT__;
@@ -2320,7 +2430,8 @@ int _net_dbus_set_auto_connect_mode(int connect_mode)
        return Error;
 }
 
-int _net_dbus_wifi_set_autoconnect(const char *profile_name, gboolean autoconnect)
+int _net_dbus_wifi_set_autoconnect(network_info_s *network_info,
+               const char *profile_name, gboolean autoconnect)
 {
        __NETWORK_FUNC_ENTER__;
 
@@ -2333,9 +2444,10 @@ int _net_dbus_wifi_set_autoconnect(const char *profile_name, gboolean autoconnec
 
        params = g_variant_new("(sv)", "AutoConnect", g_variant_new_boolean(autoconnect));
 
-       message = _net_invoke_dbus_method(CONNMAN_SERVICE,
-                       profile_name, CONNMAN_SERVICE_INTERFACE,
-                       "SetProperty", params, &Error);
+       message = _net_invoke_dbus_method(network_info,
+                       CONNMAN_SERVICE, profile_name,
+                       CONNMAN_SERVICE_INTERFACE, "SetProperty",
+                       params, &Error);
        if (message == NULL) {
                WIFI_LOG(WIFI_ERROR, "Failed to Set AutoConnect");
                __NETWORK_FUNC_EXIT__;
@@ -2348,7 +2460,8 @@ int _net_dbus_wifi_set_autoconnect(const char *profile_name, gboolean autoconnec
        return Error;
 }
 
-int _net_dbus_wifi_get_autoconnect(const char *profile_name, gboolean *autoconnect)
+int _net_dbus_wifi_get_autoconnect(network_info_s *network_info,
+               const char *profile_name, gboolean *autoconnect)
 {
        __NETWORK_FUNC_ENTER__;
 
@@ -2358,9 +2471,10 @@ int _net_dbus_wifi_get_autoconnect(const char *profile_name, gboolean *autoconne
        GVariantIter *iter = NULL;
        gchar *key = NULL;
 
-       message = _net_invoke_dbus_method(CONNMAN_SERVICE,
-                       profile_name, CONNMAN_SERVICE_INTERFACE,
-                       "GetProperties", NULL, &Error);
+       message = _net_invoke_dbus_method(network_info,
+                       CONNMAN_SERVICE, profile_name,
+                       CONNMAN_SERVICE_INTERFACE, "GetProperties",
+                       NULL, &Error);
        if (message == NULL) {
                WIFI_LOG(WIFI_ERROR, "Failed to get service properties");
                __NETWORK_FUNC_EXIT__;
@@ -2392,7 +2506,7 @@ static void __net_wps_cancel_reply(GObject *source_object,
 {
        __NETWORK_FUNC_ENTER__;
 
-       WIFI_LOG(WIFI_INFO, "__net_wps_cancel_wifi_reply() called\n");
+       WIFI_LOG(WIFI_INFO, "__net_wps_cancel_wifi_reply() called");
 
        GDBusConnection *conn = NULL;
        GVariant *dbus_result = NULL;
@@ -2402,28 +2516,30 @@ static void __net_wps_cancel_reply(GObject *source_object,
        dbus_result = g_dbus_connection_call_finish(conn, res, &error);
 
        if (error != NULL) {
-               WIFI_LOG(WIFI_ERROR, "error msg - [%s]\n", error->message);
+               WIFI_LOG(WIFI_ERROR, "error msg - [%s]", error->message);
                g_error_free(error);
        }
 
        if (dbus_result)
                g_variant_unref(dbus_result);
 
-       _net_dbus_pending_call_unref();
-
        __NETWORK_FUNC_EXIT__;
 }
 
 
-int _net_dbus_cancel_wps(void)
+int _net_dbus_cancel_wps(network_info_s *network_info)
 {
        __NETWORK_FUNC_ENTER__;
 
+       GVariant *params = NULL;
        net_err_e Error = NET_ERR_NONE;
 
-       Error = _net_invoke_dbus_method_nonblock(NETCONFIG_SERVICE,
-                       NETCONFIG_WIFI_PATH, NETCONFIG_WIFI_INTERFACE,
-                       "RequestWpsCancel", NULL, DBUS_REPLY_TIMEOUT,
+       params = g_variant_new("(s)", network_info->interface_name);
+
+       Error = _net_invoke_dbus_method_nonblock(network_info,
+                       NETCONFIG_SERVICE, NETCONFIG_WIFI_PATH,
+                       NETCONFIG_WIFI_INTERFACE, "RequestWpsCancel",
+                       params, DBUS_REPLY_TIMEOUT,
                        __net_wps_cancel_reply);
 
        __NETWORK_FUNC_EXIT__;
@@ -2436,84 +2552,91 @@ static void __net_wps_connect_wifi_reply(GObject *source_object,
 {
        __NETWORK_FUNC_ENTER__;
 
-       int callback_flag = FALSE;
        GDBusConnection *conn = NULL;
        GError *error = NULL;
        GVariant *dbus_result = NULL;
-       net_event_info_s event_data;
+       net_event_info_s *event_data = NULL;
        net_err_e Error = NET_ERR_NONE;
-       network_request_table_s *wps_info =
-                       &request_table[NETWORK_REQUEST_TYPE_ENROLL_WPS];
-       memset(&event_data, 0, sizeof(event_data));
+       network_info_s *network_info = (network_info_s *)user_data;
+       network_request_table_s *request_table = network_info->request_table;
+       network_request_table_s *wps_info = &request_table[NETWORK_REQUEST_TYPE_ENROLL_WPS];
+
+       event_data = g_try_malloc0(sizeof(net_event_info_s));
+       if (event_data == NULL) {
+               __NETWORK_FUNC_EXIT__;
+               return;
+       }
 
        conn = G_DBUS_CONNECTION(source_object);
        dbus_result = g_dbus_connection_call_finish(conn, res, &error);
 
        if (error != NULL) {
-               WIFI_LOG(WIFI_INFO, "error msg - [%s]\n", error->message);
+               WIFI_LOG(WIFI_INFO, "error msg - [%s]", error->message);
                Error = __net_error_string_to_enum(error->message);
                g_error_free(error);
        } else
-               WIFI_LOG(WIFI_INFO, "error msg is NULL\n");
+               WIFI_LOG(WIFI_INFO, "error msg is NULL");
 
        if (dbus_result)
                g_variant_unref(dbus_result);
 
-       if (Error == NET_ERR_NONE)
-               goto done;
+       if (Error == NET_ERR_NONE) {
+               __NETWORK_FUNC_EXIT__;
+               return;
+       }
 
-       WIFI_LOG(WIFI_ERROR, "Connection open failed. Error [%d]\n", Error);
+       WIFI_LOG(WIFI_ERROR, "Connection open failed. Error [%d]", Error);
 
        memset(wps_info, 0, sizeof(network_request_table_s));
 
-       event_data.Error = Error;
-       event_data.Event = NET_EVENT_WIFI_WPS_RSP;
-
-       WIFI_LOG(WIFI_INFO, "Sending NET_EVENT_WIFI_WPS_RSP Error = %s\n",
-                       _net_print_error(event_data.Error));
+       event_data->Error = Error;
+       event_data->Event = NET_EVENT_WIFI_WPS_RSP;
 
-       callback_flag = TRUE;
+       WIFI_LOG(WIFI_INFO, "Sending NET_EVENT_WIFI_WPS_RSP Error = %s",
+                       _net_print_error(event_data->Error));
 
-done:
-       _net_dbus_pending_call_unref();
+       if (network_info->event_callback)
+               network_info->event_callback(event_data, network_info->user_data);
 
-       if (callback_flag)
-               _net_client_callback(&event_data);
+       g_free(event_data);
 
        __NETWORK_FUNC_EXIT__;
 }
 
-int _net_dbus_open_connection_without_ssid()
+int _net_dbus_open_connection_without_ssid(network_info_s *network_info)
 {
        __NETWORK_FUNC_ENTER__;
 
        net_err_e Error = NET_ERR_NONE;
        GVariant *params = NULL;
 
-       params = g_variant_new("(s)", "PBC");
-       WIFI_LOG(WIFI_ERROR, "Invoke wps connection without ssid");
+       params = g_variant_new("(ss)", network_info->interface_name, "PBC");
+       WIFI_LOG(WIFI_INFO, "Invoke wps connection without ssid");
 
-       Error = _net_invoke_dbus_method_nonblock(NETCONFIG_SERVICE,
-                       NETCONFIG_WIFI_PATH, NETCONFIG_WIFI_INTERFACE,
-                       "RequestWpsConnect", params, DBUS_REPLY_TIMEOUT,
+       Error = _net_invoke_dbus_method_nonblock(network_info,
+                       NETCONFIG_SERVICE, NETCONFIG_WIFI_PATH,
+                       NETCONFIG_WIFI_INTERFACE, "RequestWpsConnect",
+                       params, DBUS_REPLY_TIMEOUT,
                        __net_wps_connect_wifi_reply);
 
        __NETWORK_FUNC_EXIT__;
        return Error;
 }
 
-int _net_dbus_open_pin_connection_without_ssid(const char *pin)
+int _net_dbus_open_pin_connection_without_ssid(network_info_s *network_info,
+               const char *pin)
 {
        __NETWORK_FUNC_ENTER__;
 
        net_err_e Error = NET_ERR_NONE;
 
        GVariant *params = NULL;
-       params = g_variant_new("(s)", pin);
+       params = g_variant_new("(ss)", network_info->interface_name, pin);
 
-       Error = _net_invoke_dbus_method_nonblock(NETCONFIG_SERVICE,
-                       NETCONFIG_WIFI_PATH, NETCONFIG_WIFI_INTERFACE,
-                       "RequestWpsConnect", params, DBUS_REPLY_TIMEOUT,
+       Error = _net_invoke_dbus_method_nonblock(network_info,
+                       NETCONFIG_SERVICE, NETCONFIG_WIFI_PATH,
+                       NETCONFIG_WIFI_INTERFACE, "RequestWpsConnect",
+                       params, DBUS_REPLY_TIMEOUT,
                        __net_wps_connect_wifi_reply);
 
 
@@ -2521,7 +2644,8 @@ int _net_dbus_open_pin_connection_without_ssid(const char *pin)
        return Error;
 }
 
-int _net_dbus_dpp_enter_peer_uri(guint32 peer_id, guint32 own_id, const char *uri)
+int _net_dbus_dpp_enter_peer_uri(network_info_s *network_info,
+               guint32 peer_id, guint32 own_id, const char *uri)
 {
        __NETWORK_FUNC_ENTER__;
 
@@ -2540,8 +2664,8 @@ int _net_dbus_dpp_enter_peer_uri(guint32 peer_id, guint32 own_id, const char *ur
        params = g_variant_new("(@a{sv})", g_variant_builder_end(builder));
        g_variant_builder_unref(builder);
 
-       message = _net_invoke_dbus_method(NETCONFIG_SERVICE,
-                       NETCONFIG_WIFI_PATH, NETCONFIG_WIFI_INTERFACE,
+       message = _net_invoke_dbus_method(network_info,
+                       NETCONFIG_SERVICE, NETCONFIG_WIFI_PATH, NETCONFIG_WIFI_INTERFACE,
                        "DppEnterPeerUri", params, &Error);
 
        if (message == NULL) {
@@ -2551,13 +2675,14 @@ int _net_dbus_dpp_enter_peer_uri(guint32 peer_id, guint32 own_id, const char *ur
        }
 
        g_variant_unref(message);
-       WIFI_LOG(WIFI_INFO, "Successfully DppEnterPeerUri\n");
+       WIFI_LOG(WIFI_INFO, "Successfully DppEnterPeerUri");
 
        __NETWORK_FUNC_EXIT__;
        return Error;
 }
 
-int _net_dbus_dpp_generate_uri(guint32 peer_id, guint32 own_id, gboolean is_initiator, const char *key)
+int _net_dbus_dpp_generate_uri(network_info_s *network_info,
+               guint32 peer_id, guint32 own_id, gboolean is_initiator, const char *key)
 {
        __NETWORK_FUNC_ENTER__;
 
@@ -2578,8 +2703,8 @@ int _net_dbus_dpp_generate_uri(guint32 peer_id, guint32 own_id, gboolean is_init
        params = g_variant_new("(@a{sv})", g_variant_builder_end(builder));
        g_variant_builder_unref(builder);
 
-       message = _net_invoke_dbus_method(NETCONFIG_SERVICE,
-                       NETCONFIG_WIFI_PATH, NETCONFIG_WIFI_INTERFACE,
+       message = _net_invoke_dbus_method(network_info,
+                       NETCONFIG_SERVICE, NETCONFIG_WIFI_PATH, NETCONFIG_WIFI_INTERFACE,
                        "DppGenerateUri", params, &Error);
 
        if (message == NULL) {
@@ -2589,13 +2714,14 @@ int _net_dbus_dpp_generate_uri(guint32 peer_id, guint32 own_id, gboolean is_init
        }
 
        g_variant_unref(message);
-       WIFI_LOG(WIFI_INFO, "Successfully DppGenerateUri\n");
+       WIFI_LOG(WIFI_INFO, "Successfully DppGenerateUri");
 
        __NETWORK_FUNC_EXIT__;
        return Error;
 }
 
-int _net_dbus_dpp_start_configurator_initiator(const gchar *group_id, const gchar *ssid,
+int _net_dbus_dpp_start_configurator_initiator(network_info_s *network_info,
+               const gchar *group_id, const gchar *ssid,
                const gchar *peer_uri, guint32 peer_id, const gchar *net_role,
                const gchar *akm, const gchar *configurator_key, const gchar *pass)
 {
@@ -2624,8 +2750,8 @@ int _net_dbus_dpp_start_configurator_initiator(const gchar *group_id, const gcha
        params = g_variant_new("(@a{sv})", g_variant_builder_end(builder));
        g_variant_builder_unref(builder);
 
-       message = _net_invoke_dbus_method(NETCONFIG_SERVICE,
-                       NETCONFIG_WIFI_PATH, NETCONFIG_WIFI_INTERFACE,
+       message = _net_invoke_dbus_method(network_info,
+                       NETCONFIG_SERVICE, NETCONFIG_WIFI_PATH, NETCONFIG_WIFI_INTERFACE,
                        "DppStartConfiguratorInitiator", params, &Error);
 
        if (message == NULL) {
@@ -2635,13 +2761,14 @@ int _net_dbus_dpp_start_configurator_initiator(const gchar *group_id, const gcha
        }
 
        g_variant_unref(message);
-       WIFI_LOG(WIFI_INFO, "Successfully DppStartConfiguratorInitiator\n");
+       WIFI_LOG(WIFI_INFO, "Successfully DppStartConfiguratorInitiator");
 
        __NETWORK_FUNC_EXIT__;
        return Error;
 }
 
-int _net_dbus_dpp_start_enrollee_initiator(const gchar *peer_uri, guint32 peer_id)
+int _net_dbus_dpp_start_enrollee_initiator(network_info_s *network_info,
+               const gchar *peer_uri, guint32 peer_id)
 {
        __NETWORK_FUNC_ENTER__;
        GVariant *params = NULL;
@@ -2656,8 +2783,8 @@ int _net_dbus_dpp_start_enrollee_initiator(const gchar *peer_uri, guint32 peer_i
        params = g_variant_new("(@a{sv})", g_variant_builder_end(builder));
        g_variant_builder_unref(builder);
 
-       message = _net_invoke_dbus_method(NETCONFIG_SERVICE,
-                       NETCONFIG_WIFI_PATH, NETCONFIG_WIFI_INTERFACE,
+       message = _net_invoke_dbus_method(network_info,
+                       NETCONFIG_SERVICE, NETCONFIG_WIFI_PATH, NETCONFIG_WIFI_INTERFACE,
                        "DppStartEnrolleeInitiator", params, &Error);
 
        if (message == NULL) {
@@ -2667,14 +2794,14 @@ int _net_dbus_dpp_start_enrollee_initiator(const gchar *peer_uri, guint32 peer_i
        }
 
        g_variant_unref(message);
-       WIFI_LOG(WIFI_INFO, "Successfully DppStartEnrolleeInitiator\n");
+       WIFI_LOG(WIFI_INFO, "Successfully DppStartEnrolleeInitiator");
 
        __NETWORK_FUNC_EXIT__;
        return Error;
 }
 
-int _net_dbus_dpp_start_configurator_responder(const gchar *group_id,
-               const gchar *ssid, const gchar *net_role, const gchar *akm,
+int _net_dbus_dpp_start_configurator_responder(network_info_s *network_info,
+               const gchar *group_id, const gchar *ssid, const gchar *net_role, const gchar *akm,
                const gchar *auth_key, const gchar *configurator_key, const gchar *pass)
 {
        __NETWORK_FUNC_ENTER__;
@@ -2701,8 +2828,8 @@ int _net_dbus_dpp_start_configurator_responder(const gchar *group_id,
        params = g_variant_new("(@a{sv})", g_variant_builder_end(builder));
        g_variant_builder_unref(builder);
 
-       message = _net_invoke_dbus_method(NETCONFIG_SERVICE,
-                       NETCONFIG_WIFI_PATH, NETCONFIG_WIFI_INTERFACE,
+       message = _net_invoke_dbus_method(network_info,
+                       NETCONFIG_SERVICE, NETCONFIG_WIFI_PATH, NETCONFIG_WIFI_INTERFACE,
                        "DppStartConfiguratorResponder", params, &Error);
 
        if (message == NULL) {
@@ -2712,13 +2839,14 @@ int _net_dbus_dpp_start_configurator_responder(const gchar *group_id,
        }
 
        g_variant_unref(message);
-       WIFI_LOG(WIFI_INFO, "Successfully DppStartConfiguratorResponder\n");
+       WIFI_LOG(WIFI_INFO, "Successfully DppStartConfiguratorResponder");
 
        __NETWORK_FUNC_EXIT__;
        return Error;
 }
 
-int _net_dbus_dpp_start_enrollee_responder(const gchar *auth_key)
+int _net_dbus_dpp_start_enrollee_responder(network_info_s *network_info,
+               const gchar *auth_key)
 {
        __NETWORK_FUNC_ENTER__;
        GVariant *params = NULL;
@@ -2732,8 +2860,8 @@ int _net_dbus_dpp_start_enrollee_responder(const gchar *auth_key)
        params = g_variant_new("(@a{sv})", g_variant_builder_end(builder));
        g_variant_builder_unref(builder);
 
-       message = _net_invoke_dbus_method(NETCONFIG_SERVICE,
-                       NETCONFIG_WIFI_PATH, NETCONFIG_WIFI_INTERFACE,
+       message = _net_invoke_dbus_method(network_info,
+                       NETCONFIG_SERVICE, NETCONFIG_WIFI_PATH, NETCONFIG_WIFI_INTERFACE,
                        "DppStartEnrolleeResponder", params,  &Error);
 
        if (message == NULL) {
@@ -2743,13 +2871,14 @@ int _net_dbus_dpp_start_enrollee_responder(const gchar *auth_key)
        }
 
        g_variant_unref(message);
-       WIFI_LOG(WIFI_INFO, "Successfully DppStartEnrolleeResponder\n");
+       WIFI_LOG(WIFI_INFO, "Successfully DppStartEnrolleeResponder");
 
        __NETWORK_FUNC_EXIT__;
        return Error;
 }
 
-int _net_dbus_dpp_stop(guint32 peer_id, guint32 own_id, gboolean is_initiator)
+int _net_dbus_dpp_stop(network_info_s *network_info,
+               guint32 peer_id, guint32 own_id, gboolean is_initiator)
 {
        __NETWORK_FUNC_ENTER__;
        GVariant *params = NULL;
@@ -2766,8 +2895,8 @@ int _net_dbus_dpp_stop(guint32 peer_id, guint32 own_id, gboolean is_initiator)
        params = g_variant_new("(@a{sv})", g_variant_builder_end(builder));
        g_variant_builder_unref(builder);
 
-       message = _net_invoke_dbus_method(NETCONFIG_SERVICE,
-                       NETCONFIG_WIFI_PATH, NETCONFIG_WIFI_INTERFACE,
+       message = _net_invoke_dbus_method(network_info,
+                       NETCONFIG_SERVICE, NETCONFIG_WIFI_PATH, NETCONFIG_WIFI_INTERFACE,
                        "DppStop", params, &Error);
 
        if (message == NULL) {
@@ -2777,13 +2906,13 @@ int _net_dbus_dpp_stop(guint32 peer_id, guint32 own_id, gboolean is_initiator)
        }
 
        g_variant_unref(message);
-       WIFI_LOG(WIFI_INFO, "Successfully stop DPP\n");
+       WIFI_LOG(WIFI_INFO, "Successfully stop DPP");
 
        __NETWORK_FUNC_EXIT__;
        return Error;
 }
 
-int _net_dbus_tdls_disconnect(const char* peer_mac_addr)
+int _net_dbus_tdls_disconnect(network_info_s *network_info, const char* peer_mac_addr)
 {
        __NETWORK_FUNC_ENTER__;
 
@@ -2795,12 +2924,13 @@ int _net_dbus_tdls_disconnect(const char* peer_mac_addr)
 
        params = g_variant_new("(s)", peer_mac_addr);
 
-       message = _net_invoke_dbus_method(
+       message = _net_invoke_dbus_method(network_info,
                        NETCONFIG_SERVICE, NETCONFIG_WIFI_PATH,
-                       NETCONFIG_WIFI_INTERFACE, method, params, &Error);
+                       NETCONFIG_WIFI_INTERFACE, method,
+                       params, &Error);
 
        if (message == NULL) {
-               WIFI_LOG(WIFI_ERROR, "Failed to TDLS Disconnect Request\n");
+               WIFI_LOG(WIFI_ERROR, "Failed to TDLS Disconnect Request");
                __NETWORK_FUNC_EXIT__;
                return Error;
        }
@@ -2808,7 +2938,7 @@ int _net_dbus_tdls_disconnect(const char* peer_mac_addr)
        g_variant_get(message, "(i)", &ret);
 
        WIFI_LOG(WIFI_INFO, "[%s] success", method);
-       WIFI_LOG(WIFI_INFO, ", status [%d]\n", ret);
+       WIFI_LOG(WIFI_INFO, ", status [%d]", ret);
 
        if (ret)
                Error = NET_ERR_NONE;
@@ -2821,7 +2951,8 @@ int _net_dbus_tdls_disconnect(const char* peer_mac_addr)
        return Error;
 }
 
-int _net_dbus_tdls_connected_peer(char** peer_mac_addr)
+int _net_dbus_tdls_connected_peer(network_info_s *network_info,
+               char** peer_mac_addr)
 {
        __NETWORK_FUNC_ENTER__;
 
@@ -2830,17 +2961,18 @@ int _net_dbus_tdls_connected_peer(char** peer_mac_addr)
        const char *method = "TdlsConnectedPeer";
 
        if (NULL == peer_mac_addr) {
-                       WIFI_LOG(WIFI_ERROR, "Invalid Parameter\n");
+                       WIFI_LOG(WIFI_ERROR, "Invalid Parameter");
                        __NETWORK_FUNC_EXIT__;
                        return NET_ERR_INVALID_PARAM;
        }
 
-       message = _net_invoke_dbus_method(
+       message = _net_invoke_dbus_method(network_info,
                        NETCONFIG_SERVICE, NETCONFIG_WIFI_PATH,
-                       NETCONFIG_WIFI_INTERFACE, method, NULL, &Error);
+                       NETCONFIG_WIFI_INTERFACE, method,
+                       NULL, &Error);
 
        if (message == NULL) {
-               WIFI_LOG(WIFI_ERROR, "Failed to Get Peer Connected Mac address\n");
+               WIFI_LOG(WIFI_ERROR, "Failed to Get Peer Connected Mac address");
                __NETWORK_FUNC_EXIT__;
                return Error;
        }
@@ -2848,7 +2980,7 @@ int _net_dbus_tdls_connected_peer(char** peer_mac_addr)
        g_variant_get(message, "(s)", peer_mac_addr);
 
        WIFI_LOG(WIFI_INFO, "[%s] success", method);
-       WIFI_LOG(WIFI_INFO, "TDLS Peer Mac address [%s]\n", *peer_mac_addr);
+       WIFI_LOG(WIFI_INFO, "TDLS Peer Mac address [%s]", *peer_mac_addr);
 
        g_variant_unref(message);
        __NETWORK_FUNC_EXIT__;
@@ -2856,7 +2988,7 @@ int _net_dbus_tdls_connected_peer(char** peer_mac_addr)
        return Error;
 }
 
-int _net_dbus_tdls_connect(const char *peer_mac_addr)
+int _net_dbus_tdls_connect(network_info_s *network_info, const char *peer_mac_addr)
 {
 
        __NETWORK_FUNC_ENTER__;
@@ -2869,12 +3001,13 @@ int _net_dbus_tdls_connect(const char *peer_mac_addr)
 
        params = g_variant_new("(s)", peer_mac_addr);
 
-       message = _net_invoke_dbus_method(
+       message = _net_invoke_dbus_method(network_info,
                        NETCONFIG_SERVICE, NETCONFIG_WIFI_PATH,
-                       NETCONFIG_WIFI_INTERFACE, method, params, &Error);
+                       NETCONFIG_WIFI_INTERFACE, method,
+                       params, &Error);
 
        if (message == NULL) {
-               WIFI_LOG(WIFI_ERROR, "Failed to TDLS Connect Request\n");
+               WIFI_LOG(WIFI_ERROR, "Failed to TDLS Connect Request");
                __NETWORK_FUNC_EXIT__;
                return Error;
        }
@@ -2882,7 +3015,7 @@ int _net_dbus_tdls_connect(const char *peer_mac_addr)
        g_variant_get(message, "(i)", &ret);
 
        WIFI_LOG(WIFI_INFO, "[%s] success", method);
-       WIFI_LOG(WIFI_INFO, ", status [%d]\n", ret);
+       WIFI_LOG(WIFI_INFO, ", status [%d]", ret);
 
        if (ret)
                Error = NET_ERR_NONE;
@@ -2895,7 +3028,7 @@ int _net_dbus_tdls_connect(const char *peer_mac_addr)
        return Error;
 }
 
-int _net_dbus_tdls_discover(const char *peer_mac_addr)
+int _net_dbus_tdls_discover(network_info_s *network_info, const char *peer_mac_addr)
 {
 
        __NETWORK_FUNC_ENTER__;
@@ -2908,9 +3041,10 @@ int _net_dbus_tdls_discover(const char *peer_mac_addr)
 
        params = g_variant_new("(s)", peer_mac_addr);
 
-       message = _net_invoke_dbus_method(
+       message = _net_invoke_dbus_method(network_info,
                        NETCONFIG_SERVICE, NETCONFIG_WIFI_PATH,
-                       NETCONFIG_WIFI_INTERFACE, method, params, &Error);
+                       NETCONFIG_WIFI_INTERFACE, method,
+                       params, &Error);
 
        if (message == NULL) {
                WIFI_LOG(WIFI_ERROR, "Failed to request TDLS discover : Error [%d]", Error);
@@ -2921,7 +3055,7 @@ int _net_dbus_tdls_discover(const char *peer_mac_addr)
        g_variant_get(message, "(i)", &ret);
 
        WIFI_LOG(WIFI_INFO, "[%s] success", method);
-       WIFI_LOG(WIFI_INFO, ", status [%d]\n", ret);
+       WIFI_LOG(WIFI_INFO, ", status [%d]", ret);
 
        if (ret == 0x00)
                Error = NET_ERR_NONE;
@@ -2937,7 +3071,8 @@ int _net_dbus_tdls_discover(const char *peer_mac_addr)
        return Error;
 }
 
-int _net_dbus_tdls_enable_channel_switch(const char* peer_mac_addr, int freq)
+int _net_dbus_tdls_enable_channel_switch(network_info_s *network_info,
+               const char* peer_mac_addr, int freq)
 {
        __NETWORK_FUNC_ENTER__;
 
@@ -2948,19 +3083,20 @@ int _net_dbus_tdls_enable_channel_switch(const char* peer_mac_addr, int freq)
 
        params = g_variant_new("(si)", peer_mac_addr, freq);
 
-       message = _net_invoke_dbus_method(
+       message = _net_invoke_dbus_method(network_info,
                        NETCONFIG_SERVICE, NETCONFIG_WIFI_PATH,
-                       NETCONFIG_WIFI_INTERFACE, "TdlsChannelSwitch", params, &Error);
+                       NETCONFIG_WIFI_INTERFACE, "TdlsChannelSwitch",
+                       params, &Error);
 
        if (message == NULL) {
-               WIFI_LOG(WIFI_ERROR, "Failed to Enable TDLS Channel Switch Request\n");
+               WIFI_LOG(WIFI_ERROR, "Failed to Enable TDLS Channel Switch Request");
                __NETWORK_FUNC_EXIT__;
                return Error;
        }
 
        g_variant_get(message, "(i)", &ret);
 
-       WIFI_LOG(WIFI_INFO, "Status [%d]\n", ret);
+       WIFI_LOG(WIFI_INFO, "Status [%d]", ret);
 
        if (ret == 0)
                Error = NET_ERR_NONE;
@@ -2973,7 +3109,8 @@ int _net_dbus_tdls_enable_channel_switch(const char* peer_mac_addr, int freq)
        return Error;
 }
 
-int _net_dbus_tdls_disable_channel_switch(const char* peer_mac_addr)
+int _net_dbus_tdls_disable_channel_switch(network_info_s *network_info,
+               const char* peer_mac_addr)
 {
        __NETWORK_FUNC_ENTER__;
 
@@ -2984,19 +3121,20 @@ int _net_dbus_tdls_disable_channel_switch(const char* peer_mac_addr)
 
        params = g_variant_new("(s)", peer_mac_addr);
 
-       message = _net_invoke_dbus_method(
+       message = _net_invoke_dbus_method(network_info,
                        NETCONFIG_SERVICE, NETCONFIG_WIFI_PATH,
-                       NETCONFIG_WIFI_INTERFACE, "TdlsCancelChannelSwitch", params, &Error);
+                       NETCONFIG_WIFI_INTERFACE, "TdlsCancelChannelSwitch",
+                       params, &Error);
 
        if (message == NULL) {
-               WIFI_LOG(WIFI_ERROR, "Failed to Disable TDLS Channel Switch Request\n");
+               WIFI_LOG(WIFI_ERROR, "Failed to Disable TDLS Channel Switch Request");
                __NETWORK_FUNC_EXIT__;
                return Error;
        }
 
        g_variant_get(message, "(i)", &ret);
 
-       WIFI_LOG(WIFI_INFO, "Status [%d]\n", ret);
+       WIFI_LOG(WIFI_INFO, "Status [%d]", ret);
 
        if (ret == 0)
                Error = NET_ERR_NONE;
@@ -3011,7 +3149,7 @@ int _net_dbus_tdls_disable_channel_switch(const char* peer_mac_addr)
 
 
 
-int _net_dbus_config_get_id_list(GSList **list)
+int _net_dbus_config_get_id_list(network_info_s *network_info, GSList **list)
 {
        __NETWORK_FUNC_ENTER__;
 
@@ -3020,10 +3158,10 @@ int _net_dbus_config_get_id_list(GSList **list)
        GVariantIter *iter = NULL;
        gchar *config_id = NULL;
 
-       message = _net_invoke_dbus_method(
+       message = _net_invoke_dbus_method(network_info,
                        NETCONFIG_SERVICE, NETCONFIG_WIFI_PATH,
                        NETCONFIG_WIFI_INTERFACE, "GetConfigIds",
-                       g_variant_new("()"), &Error);
+                       g_variant_new("(s)", network_info->interface_name), &Error);
 
        if (message == NULL) {
                WIFI_LOG(WIFI_ERROR, "Failed to GetConfigIds");
@@ -3043,14 +3181,15 @@ int _net_dbus_config_get_id_list(GSList **list)
        return Error;
 }
 
-int _net_dbus_config_set_field(const gchar *config_id, const gchar *key, const gchar *value)
+int _net_dbus_config_set_field(network_info_s *network_info,
+               const gchar *config_id, const gchar *key, const gchar *value)
 {
        __NETWORK_FUNC_ENTER__;
 
        net_err_e Error = NET_ERR_NONE;
        GVariant *message = NULL;
 
-       message = _net_invoke_dbus_method(
+       message = _net_invoke_dbus_method(network_info,
                        NETCONFIG_SERVICE, NETCONFIG_WIFI_PATH,
                        NETCONFIG_WIFI_INTERFACE, "SetConfigField",
                        g_variant_new("(sss)", config_id, key, value), &Error);
@@ -3068,7 +3207,8 @@ int _net_dbus_config_set_field(const gchar *config_id, const gchar *key, const g
        return Error;
 }
 
-int _net_dbus_config_get_passphrase(const gchar *config_id, gchar **passphrase)
+int _net_dbus_config_get_passphrase(network_info_s *network_info,
+               const gchar *config_id, gchar **passphrase)
 {
        __NETWORK_FUNC_ENTER__;
 
@@ -3076,7 +3216,7 @@ int _net_dbus_config_get_passphrase(const gchar *config_id, gchar **passphrase)
        GVariant *message = NULL;
        gchar *val = NULL;
 
-       message = _net_invoke_dbus_method(
+       message = _net_invoke_dbus_method(network_info,
                        NETCONFIG_SERVICE, NETCONFIG_WIFI_PATH,
                        NETCONFIG_WIFI_INTERFACE, "GetConfigPassphrase",
                        g_variant_new("(s)", config_id), &Error);
@@ -3099,7 +3239,8 @@ int _net_dbus_config_get_passphrase(const gchar *config_id, gchar **passphrase)
        return Error;
 }
 
-int _net_dbus_config_save_configurations(const gchar *config_id, const gchar *name,
+int _net_dbus_config_save_configurations(network_info_s *network_info,
+               const gchar *config_id, const gchar *name,
                const gchar *ssid, const gchar *passphrase, const gchar *proxy_address,
                net_ip_info_config_s *ip_info, gboolean is_hidden, gboolean is_created)
 {
@@ -3203,10 +3344,11 @@ int _net_dbus_config_save_configurations(const gchar *config_id, const gchar *na
                break;
        }
 
-       params = g_variant_new("(s@a{sv})", config_id, g_variant_builder_end(b));
+       params = g_variant_new("(ss@a{sv})", network_info->interface_name,
+               config_id, g_variant_builder_end(b));
        g_variant_builder_unref(b);
 
-       message = _net_invoke_dbus_method(
+       message = _net_invoke_dbus_method(network_info,
                        NETCONFIG_SERVICE, NETCONFIG_WIFI_PATH,
                        NETCONFIG_WIFI_INTERFACE, "SaveConfiguration",
                        params, &Error);
@@ -3224,8 +3366,8 @@ int _net_dbus_config_save_configurations(const gchar *config_id, const gchar *na
        return Error;
 }
 
-int _net_dbus_config_save_eap_configurations(const gchar *config_id,
-               const gchar *name, const gchar *ssid, const gchar *passphrase,
+int _net_dbus_config_save_eap_configurations(network_info_s *network_info,
+               const gchar *config_id, const gchar *name, const gchar *ssid, const gchar *passphrase,
                const gchar *proxy_address, net_eap_config_s *eap_config, gboolean is_hidden, gboolean is_created)
 {
        __NETWORK_FUNC_ENTER__;
@@ -3276,10 +3418,11 @@ int _net_dbus_config_save_eap_configurations(const gchar *config_id,
                g_free(eap_type);
        }
 
-       params = g_variant_new("(s@a{sv})", config_id, g_variant_builder_end(b));
+       params = g_variant_new("(ss@a{sv})", network_info->interface_name,
+               config_id, g_variant_builder_end(b));
        g_variant_builder_unref(b);
 
-       message = _net_invoke_dbus_method(
+       message = _net_invoke_dbus_method(network_info,
                        NETCONFIG_SERVICE, NETCONFIG_WIFI_PATH,
                        NETCONFIG_WIFI_INTERFACE, "SaveEapConfiguration",
                        params, &Error);
@@ -3297,17 +3440,19 @@ int _net_dbus_config_save_eap_configurations(const gchar *config_id,
        return Error;
 }
 
-int _net_dbus_config_remove_configurations(const gchar *config_id)
+int _net_dbus_config_remove_configurations(network_info_s *network_info,
+               const gchar *config_id)
 {
        __NETWORK_FUNC_ENTER__;
 
        net_err_e Error = NET_ERR_NONE;
        GVariant *message = NULL;
 
-       message = _net_invoke_dbus_method(
+       message = _net_invoke_dbus_method(network_info,
                        NETCONFIG_SERVICE, NETCONFIG_WIFI_PATH,
                        NETCONFIG_WIFI_INTERFACE, "RemoveConfiguration",
-                       g_variant_new("(s)", config_id), &Error);
+                       g_variant_new("(ss)", network_info->interface_name, config_id),
+                       &Error);
 
        if (message == NULL) {
                WIFI_LOG(WIFI_ERROR, "Failed to RemoveConfiguration");
@@ -3322,8 +3467,9 @@ int _net_dbus_config_remove_configurations(const gchar *config_id)
        return Error;
 }
 
-int _net_dbus_config_load_configurations(const gchar *config_id, gchar **name,
-               gchar **passphrase, net_wifi_security_type_e *security_type, gchar **proxy_address,
+int _net_dbus_config_load_configurations(network_info_s *network_info,
+               const gchar *config_id, gchar **name, gchar **passphrase,
+               net_wifi_security_type_e *security_type, gchar **proxy_address,
                gboolean *is_hidden, net_ip_info_config_s **ip_info, void *last_error)
 {
        __NETWORK_FUNC_ENTER__;
@@ -3336,10 +3482,11 @@ int _net_dbus_config_load_configurations(const gchar *config_id, gchar **name,
        int *wifi_last_error = (int *)last_error;
        int order = 0;
 
-       message = _net_invoke_dbus_method(
+       message = _net_invoke_dbus_method(network_info,
                        NETCONFIG_SERVICE, NETCONFIG_WIFI_PATH,
                        NETCONFIG_WIFI_INTERFACE, "LoadConfiguration",
-                       g_variant_new("(s)", config_id), &Error);
+                       g_variant_new("(ss)", network_info->interface_name, config_id),
+                       &Error);
 
        if (message == NULL) {
                WIFI_LOG(WIFI_ERROR, "Failed to LoadConfiguration");
@@ -3411,9 +3558,9 @@ int _net_dbus_config_load_configurations(const gchar *config_id, gchar **name,
        return Error;
 }
 
-int _net_dbus_config_load_eap_configurations(const gchar *config_id,
-               gchar **name, net_wifi_security_type_e *security_type, gchar **proxy_address,
-               gboolean *is_hidden, net_eap_config_s **eap_config, void *last_error)
+int _net_dbus_config_load_eap_configurations(network_info_s *network_info,
+               const gchar *config_id, gchar **name, net_wifi_security_type_e *security_type,
+               gchar **proxy_address, gboolean *is_hidden, net_eap_config_s **eap_config, void *last_error)
 {
        __NETWORK_FUNC_ENTER__;
 
@@ -3424,10 +3571,11 @@ int _net_dbus_config_load_eap_configurations(const gchar *config_id,
        GVariant *value;
        int *wifi_last_error = (int *)last_error;
 
-       message = _net_invoke_dbus_method(
+       message = _net_invoke_dbus_method(network_info,
                        NETCONFIG_SERVICE, NETCONFIG_WIFI_PATH,
                        NETCONFIG_WIFI_INTERFACE, "LoadEapConfiguration",
-                       g_variant_new("(s)", config_id), &Error);
+                       g_variant_new("(ss)", network_info->interface_name, config_id),
+                       &Error);
 
        if (message == NULL) {
                WIFI_LOG(WIFI_ERROR, "Failed to LoadEapConfiguration");
@@ -3491,7 +3639,7 @@ int _net_dbus_config_load_eap_configurations(const gchar *config_id,
        return Error;
 }
 
-int _net_dbus_device_policy_get_wifi(int *state)
+int _net_dbus_device_policy_get_wifi(network_info_s *network_info, int *state)
 {
        __NETWORK_FUNC_ENTER__;
 
@@ -3499,22 +3647,24 @@ int _net_dbus_device_policy_get_wifi(int *state)
        GVariant *message = NULL;
 
        if (state == NULL) {
-               WIFI_LOG(WIFI_ERROR, "Invalid Parameter\n");
+               WIFI_LOG(WIFI_ERROR, "Invalid Parameter");
                __NETWORK_FUNC_EXIT__;
                return NET_ERR_INVALID_PARAM;
        }
 
-       message = _net_invoke_dbus_method(NETCONFIG_SERVICE, NETCONFIG_NETWORK_PATH,
-                       NETCONFIG_NETWORK_INTERFACE, "DevicePolicyGetWifi", NULL, &Error);
+       message = _net_invoke_dbus_method(network_info,
+                       NETCONFIG_SERVICE, NETCONFIG_NETWORK_PATH,
+                       NETCONFIG_NETWORK_INTERFACE, "DevicePolicyGetWifi",
+                       NULL, &Error);
 
        if (message == NULL) {
-               WIFI_LOG(WIFI_ERROR, "Failed to get wifi device policy\n");
+               WIFI_LOG(WIFI_ERROR, "Failed to get wifi device policy");
                return Error;
        }
 
        g_variant_get(message, "(i)", state);
 
-       WIFI_LOG(WIFI_INFO, "Wifi device policy state [%d]\n", *state);
+       WIFI_LOG(WIFI_INFO, "Wifi device policy state [%d]", *state);
 
        g_variant_unref(message);
 
@@ -3522,7 +3672,8 @@ int _net_dbus_device_policy_get_wifi(int *state)
        return Error;
 }
 
-int _net_dbus_device_policy_get_wifi_profile(int *state)
+int _net_dbus_device_policy_get_wifi_profile(network_info_s *network_info,
+               int *state)
 {
        __NETWORK_FUNC_ENTER__;
 
@@ -3530,22 +3681,24 @@ int _net_dbus_device_policy_get_wifi_profile(int *state)
        GVariant *message = NULL;
 
        if (state == NULL) {
-               WIFI_LOG(WIFI_ERROR, "Invalid Parameter\n");
+               WIFI_LOG(WIFI_ERROR, "Invalid Parameter");
                __NETWORK_FUNC_EXIT__;
                return NET_ERR_INVALID_PARAM;
        }
 
-       message = _net_invoke_dbus_method(NETCONFIG_SERVICE, NETCONFIG_NETWORK_PATH,
-                       NETCONFIG_NETWORK_INTERFACE, "DevicePolicyGetWifiProfile", NULL, &Error);
+       message = _net_invoke_dbus_method(network_info,
+                       NETCONFIG_SERVICE, NETCONFIG_NETWORK_PATH,
+                       NETCONFIG_NETWORK_INTERFACE, "DevicePolicyGetWifiProfile",
+                       NULL, &Error);
 
        if (message == NULL) {
-               WIFI_LOG(WIFI_ERROR, "Failed to get wifi device policy\n");
+               WIFI_LOG(WIFI_ERROR, "Failed to get wifi device policy");
                return Error;
        }
 
        g_variant_get(message, "(i)", state);
 
-       WIFI_LOG(WIFI_INFO, "Wifi profile device policy state [%d]\n", *state);
+       WIFI_LOG(WIFI_INFO, "Wifi profile device policy state [%d]", *state);
 
        g_variant_unref(message);
 
@@ -3553,15 +3706,20 @@ int _net_dbus_device_policy_get_wifi_profile(int *state)
        return Error;
 }
 
-int _net_dbus_resume_bgscan(void)
+int _net_dbus_resume_bgscan(network_info_s *network_info)
 {
        __NETWORK_FUNC_ENTER__;
 
        net_err_e Error = NET_ERR_NONE;
+       GVariant *params = NULL;
        GVariant *message = NULL;
 
-       message = _net_invoke_dbus_method(NETCONFIG_SERVICE, NETCONFIG_WIFI_PATH,
-                       NETCONFIG_WIFI_INTERFACE, "ResumeBgscan", NULL, &Error);
+       params = g_variant_new("(s)", network_info->interface_name);
+
+       message = _net_invoke_dbus_method(network_info,
+                       NETCONFIG_SERVICE, NETCONFIG_WIFI_PATH,
+                       NETCONFIG_WIFI_INTERFACE, "ResumeBgscan",
+                       params, &Error);
 
        if (Error != NET_ERR_NONE)
                WIFI_LOG(WIFI_ERROR, "_net_invoke_dbus_method failed");
@@ -3573,15 +3731,20 @@ int _net_dbus_resume_bgscan(void)
        return Error;
 }
 
-int _net_dbus_pause_bgscan(void)
+int _net_dbus_pause_bgscan(network_info_s *network_info)
 {
        __NETWORK_FUNC_ENTER__;
 
        net_err_e Error = NET_ERR_NONE;
+       GVariant *params = NULL;
        GVariant *message = NULL;
 
-       message = _net_invoke_dbus_method(NETCONFIG_SERVICE, NETCONFIG_WIFI_PATH,
-                       NETCONFIG_WIFI_INTERFACE, "PauseBgscan", NULL, &Error);
+       params = g_variant_new("(s)", network_info->interface_name);
+
+       message = _net_invoke_dbus_method(network_info,
+                       NETCONFIG_SERVICE, NETCONFIG_WIFI_PATH,
+                       NETCONFIG_WIFI_INTERFACE, "PauseBgscan",
+                       params, &Error);
 
        if (Error != NET_ERR_NONE)
                WIFI_LOG(WIFI_ERROR, "_net_invoke_dbus_method failed");
@@ -3593,16 +3756,20 @@ int _net_dbus_pause_bgscan(void)
        return Error;
 }
 
-int _net_dbus_get_autoscan(gboolean *autoscan)
+int _net_dbus_get_autoscan(network_info_s *network_info, gboolean *autoscan)
 {
        __NETWORK_FUNC_ENTER__;
 
+       GVariant *params = NULL;
        GVariant *message = NULL;
        net_err_e Error = NET_ERR_NONE;
 
-       message = _net_invoke_dbus_method(NETCONFIG_SERVICE,
-                       NETCONFIG_WIFI_PATH, NETCONFIG_WIFI_INTERFACE,
-                       "GetAutoscan", NULL, &Error);
+       params = g_variant_new("(s)", network_info->interface_name);
+
+       message = _net_invoke_dbus_method(network_info,
+                       NETCONFIG_SERVICE, NETCONFIG_WIFI_PATH,
+                       NETCONFIG_WIFI_INTERFACE, "GetAutoscan",
+                       params, &Error);
        if (message == NULL) {
                WIFI_LOG(WIFI_ERROR, "Failed to Get Passpoint");
                __NETWORK_FUNC_EXIT__;
@@ -3622,16 +3789,21 @@ int _net_dbus_get_autoscan(gboolean *autoscan)
        return Error;
 }
 
-int _net_dbus_get_autoscanmode(unsigned int *autoscanmode)
+int _net_dbus_get_autoscanmode(network_info_s *network_info,
+               unsigned int *autoscanmode)
 {
        __NETWORK_FUNC_ENTER__;
 
+       GVariant *params = NULL;
        GVariant *message = NULL;
        net_err_e Error = NET_ERR_NONE;
 
-       message = _net_invoke_dbus_method(NETCONFIG_SERVICE,
-                       NETCONFIG_WIFI_PATH, NETCONFIG_WIFI_INTERFACE,
-                       "GetAutoscanmode", NULL, &Error);
+       params = g_variant_new("(s)", network_info->interface_name);
+
+       message = _net_invoke_dbus_method(network_info,
+                       NETCONFIG_SERVICE, NETCONFIG_WIFI_PATH,
+                       NETCONFIG_WIFI_INTERFACE, "GetAutoscanmode",
+                       params, &Error);
        if (message == NULL) {
                WIFI_LOG(WIFI_ERROR, "Failed to Get Passpoint");
                __NETWORK_FUNC_EXIT__;
@@ -3658,14 +3830,22 @@ static void __net_multi_scan_request_reply(GObject *source_object, GAsyncResult
 
        GDBusConnection *conn = NULL;
        GError *error = NULL;
-       net_err_e Error = NET_ERR_NONE;
-       net_event_info_s event_data = { 0, };
        GVariant *reply;
+       net_err_e Error = NET_ERR_NONE;
+       net_event_info_s *event_data = NULL;
+       network_info_s *network_info = (network_info_s *)user_data;
+       network_request_table_s *request_table = network_info->request_table;
+
+       event_data = g_try_malloc0(sizeof(net_event_info_s));
+       if (event_data == NULL) {
+               __NETWORK_FUNC_EXIT__;
+               return;
+       }
 
        conn = G_DBUS_CONNECTION(source_object);
        reply = g_dbus_connection_call_finish(conn, res, &error);
        if (error != NULL) {
-               WIFI_LOG(WIFI_ERROR, "Scan failed. Error [%s]\n",
+               WIFI_LOG(WIFI_ERROR, "Scan failed. Error [%s]",
                                error->message);
                Error = __net_error_string_to_enum(error->message);
                g_error_free(error);
@@ -3677,38 +3857,40 @@ static void __net_multi_scan_request_reply(GObject *source_object, GAsyncResult
        if (Error == NET_ERR_IN_PROGRESS) {
                /* should retry scan after receiving scan result */
                if (request_table[NETWORK_REQUEST_TYPE_MULTI_SCAN].flag == TRUE) {
-                       WIFI_LOG(WIFI_INFO, "Multi Scan pending\n");
-                       scan_pending = TRUE;
+                       WIFI_LOG(WIFI_INFO, "Multi Scan pending");
+                       network_info->scan_pending = TRUE;
                }
        } else if (Error != NET_ERR_NONE) {
-               WIFI_LOG(WIFI_ERROR, "Multi Scan failed. Error [%d]\n", Error);
+               WIFI_LOG(WIFI_ERROR, "Multi Scan failed. Error [%d]", Error);
                g_slist_free_full(request_table[NETWORK_REQUEST_TYPE_MULTI_SCAN].multi_scan_list, g_free);
 
                if (request_table[NETWORK_REQUEST_TYPE_MULTI_SCAN].flag == TRUE) {
                        memset(&request_table[NETWORK_REQUEST_TYPE_MULTI_SCAN],
                                        0, sizeof(network_request_table_s));
 
-                       event_data.Event = NET_EVENT_WIFI_MULTI_SCAN_RSP;
-                       event_data.Datalength = 0;
-                       event_data.Data = NULL;
-                       event_data.Error = Error;
+                       event_data->Event = NET_EVENT_WIFI_MULTI_SCAN_RSP;
+                       event_data->Datalength = 0;
+                       event_data->Data = NULL;
+                       event_data->Error = Error;
+
+                       if (network_info->event_callback)
+                               network_info->event_callback(event_data, network_info->user_data);
 
-                       _net_dbus_pending_call_unref();
-                       _net_client_callback(&event_data);
+                       g_free(event_data);
 
                        __NETWORK_FUNC_EXIT__;
                        return;
                }
 
        } else
-               WIFI_LOG(WIFI_INFO, "Multi Scan Request success\n");
-
-       _net_dbus_pending_call_unref();
+               WIFI_LOG(WIFI_INFO, "Multi Scan Request success");
 
+       g_free(event_data);
        __NETWORK_FUNC_EXIT__;
 }
 
-int _net_dbus_multi_scan_request(GSList *multi_scan_list)
+int _net_dbus_multi_scan_request(network_info_s *network_info,
+               GSList *multi_scan_list)
 {
        __NETWORK_FUNC_ENTER__;
 
@@ -3720,18 +3902,18 @@ int _net_dbus_multi_scan_request(GSList *multi_scan_list)
        char freq[NET_WLAN_FREQ_LEN] = {0, };
 
        WIFI_LOG(WIFI_INFO, "multi_scan_type:%d, Number of elements in a list:%d",
-                       request_table[NETWORK_REQUEST_TYPE_MULTI_SCAN].multi_scan_type,
+                       network_info->request_table[NETWORK_REQUEST_TYPE_MULTI_SCAN].multi_scan_type,
                        g_slist_length(multi_scan_list));
 
        builder = g_variant_builder_new(G_VARIANT_TYPE("a{sv}"));
 
-       if (request_table[NETWORK_REQUEST_TYPE_MULTI_SCAN].multi_scan_type == WIFI_MULTI_SCAN_SSID) {
+       if (network_info->request_table[NETWORK_REQUEST_TYPE_MULTI_SCAN].multi_scan_type == WIFI_MULTI_SCAN_SSID) {
                for (list = multi_scan_list; list; list = list->next) {
                        WIFI_LOG(WIFI_INFO, "AP name: %s", ((wifi_manager_multi_scan_ap_s *)list->data)->str);
                        g_strlcpy(ssid, ((wifi_manager_multi_scan_ap_s *)list->data)->str, NET_WLAN_ESSID_LEN + 1);
                        g_variant_builder_add(builder, "{sv}", "SSID", g_variant_new_string(ssid));
                }
-       } else if (request_table[NETWORK_REQUEST_TYPE_MULTI_SCAN].multi_scan_type == WIFI_MULTI_SCAN_FREQ) {
+       } else if (network_info->request_table[NETWORK_REQUEST_TYPE_MULTI_SCAN].multi_scan_type == WIFI_MULTI_SCAN_FREQ) {
                for (list = multi_scan_list; list; list = list->next) {
                        WIFI_LOG(WIFI_INFO, "Freq: %s", ((wifi_manager_multi_scan_ap_s *)list->data)->str);
                        g_strlcpy(freq, ((wifi_manager_multi_scan_ap_s *)list->data)->str, NET_WLAN_FREQ_LEN);
@@ -3754,10 +3936,11 @@ int _net_dbus_multi_scan_request(GSList *multi_scan_list)
        params = g_variant_new("(@a{sv})", g_variant_builder_end(builder));
        g_variant_builder_unref(builder);
 
-       Error = _net_invoke_dbus_method_nonblock(CONNMAN_SERVICE,
-                       CONNMAN_WIFI_TECHNOLOGY_PREFIX,
-                       CONNMAN_TECHNOLOGY_INTERFACE, "SpecificScan", params,
-                       DBUS_REPLY_TIMEOUT, __net_multi_scan_request_reply);
+       Error = _net_invoke_dbus_method_nonblock(network_info,
+                       CONNMAN_SERVICE, CONNMAN_WIFI_TECHNOLOGY_PREFIX,
+                       CONNMAN_TECHNOLOGY_INTERFACE, "SpecificScan",
+                       params, DBUS_REPLY_TIMEOUT,
+                       __net_multi_scan_request_reply);
 
        if (Error == NET_ERR_IN_PROGRESS)
                Error = NET_ERR_NONE; //LCOV_EXCL_LINE
@@ -3766,7 +3949,7 @@ int _net_dbus_multi_scan_request(GSList *multi_scan_list)
        return Error;
 }
 
-int _net_dbus_get_max_scan_ssids(int *max_scan_ssids)
+int _net_dbus_get_max_scan_ssids(network_info_s *network_info, int *max_scan_ssids)
 {
        __NETWORK_FUNC_ENTER__;
 
@@ -3776,9 +3959,10 @@ int _net_dbus_get_max_scan_ssids(int *max_scan_ssids)
        GVariantIter *iter = NULL;
        gchar *key = NULL;
 
-       message = _net_invoke_dbus_method(
+       message = _net_invoke_dbus_method(network_info,
                        CONNMAN_SERVICE, CONNMAN_WIFI_TECHNOLOGY_PREFIX,
-                       CONNMAN_TECHNOLOGY_INTERFACE, "GetMaxScanSsid", NULL, &Error);
+                       CONNMAN_TECHNOLOGY_INTERFACE, "GetMaxScanSsid",
+                       NULL, &Error);
        if (message == NULL) {
                WIFI_LOG(WIFI_ERROR, "Failed to get Max scan SSIDs.");
                *max_scan_ssids = 0;
index 890c5b5..428e7b8 100755 (executable)
 
 #define DBUS_OBJECT_PATH_MAX   150
 
-__thread network_info_s NetworkInfo = { 0, };
-extern __thread network_request_table_s request_table[NETWORK_REQUEST_TYPE_MAX];
-static wifi_tech_state_e g_tech_state = WIFI_TECH_UNKNOWN;
-
 //LCOV_EXCL_START
-static int __net_check_get_privilege()
+static int __net_check_get_privilege(network_info_s *network_info)
 {
        __NETWORK_FUNC_ENTER__;
 
        net_err_e Error = NET_ERR_NONE;
        GVariant *message = NULL;
 
-       message = _net_invoke_dbus_method(NETCONFIG_SERVICE, NETCONFIG_NETWORK_PATH,
-                       NETCONFIG_NETWORK_INTERFACE, "CheckGetPrivilege", NULL, &Error);
+       message = _net_invoke_dbus_method(network_info,
+                       NETCONFIG_SERVICE, NETCONFIG_NETWORK_PATH,
+                       NETCONFIG_NETWORK_INTERFACE, "CheckGetPrivilege",
+                       NULL, &Error);
        if (message == NULL) {
                WIFI_LOG(WIFI_ERROR, "Failed to check get privilege"); //LCOV_EXCL_LINE
                return Error; //LCOV_EXCL_LINE
@@ -53,17 +51,19 @@ static int __net_check_get_privilege()
        return Error;
 }
 
-static int __net_set_ip_conflict_detect_mode(bool detect)
+static int __net_set_ip_conflict_detect_mode(network_info_s *network_info, bool detect)
 {
        __NETWORK_FUNC_ENTER__;
 
        net_err_e Error = NET_ERR_NONE;
        GVariant *message = NULL;
        GVariant *params;
-       params = g_variant_new("(b)", detect);
+       params = g_variant_new("(sb)", network_info->interface_name, detect);
 
-       message = _net_invoke_dbus_method(NETCONFIG_SERVICE, NETCONFIG_WIFI_PATH,
-                       NETCONFIG_WIFI_INTERFACE, "IpConflictSetEnable", params, &Error);
+       message = _net_invoke_dbus_method(network_info,
+                       NETCONFIG_SERVICE, NETCONFIG_WIFI_PATH,
+                       NETCONFIG_WIFI_INTERFACE, "IpConflictSetEnable",
+                       params, &Error);
        if (message == NULL) {
                WIFI_LOG(WIFI_ERROR, "Failed to set conflict detect enable mode"); //LCOV_EXCL_LINE
                __NETWORK_FUNC_EXIT__;
@@ -76,15 +76,21 @@ static int __net_set_ip_conflict_detect_mode(bool detect)
        return Error;
 }
 
-static int __net_ip_conflict_detect_is_enabled(gboolean *state)
+static int __net_ip_conflict_detect_is_enabled(network_info_s *network_info,
+               gboolean *state)
 {
        __NETWORK_FUNC_ENTER__;
 
        net_err_e Error = NET_ERR_NONE;
+       GVariant *params = NULL;
        GVariant *message = NULL;
 
-       message = _net_invoke_dbus_method(NETCONFIG_SERVICE, NETCONFIG_WIFI_PATH,
-                       NETCONFIG_WIFI_INTERFACE, "IsIpConflictDetectEnabled", NULL, &Error);
+       params = g_variant_new("(s)", network_info->interface_name);
+
+       message = _net_invoke_dbus_method(network_info,
+                       NETCONFIG_SERVICE, NETCONFIG_WIFI_PATH,
+                       NETCONFIG_WIFI_INTERFACE, "IsIpConflictDetectEnabled",
+                       params, &Error);
        if (message == NULL) {
                WIFI_LOG(WIFI_ERROR, "Failed to get conflict detect enable mode"); //LCOV_EXCL_LINE
                __NETWORK_FUNC_EXIT__;
@@ -99,15 +105,17 @@ static int __net_ip_conflict_detect_is_enabled(gboolean *state)
 }
 
 
-static int __net_check_profile_privilege()
+static int __net_check_profile_privilege(network_info_s *network_info)
 {
        __NETWORK_FUNC_ENTER__;
 
        net_err_e Error = NET_ERR_NONE;
        GVariant *message = NULL;
 
-       message = _net_invoke_dbus_method(NETCONFIG_SERVICE, NETCONFIG_NETWORK_PATH,
-                       NETCONFIG_NETWORK_INTERFACE, "CheckProfilePrivilege", NULL, &Error);
+       message = _net_invoke_dbus_method(network_info,
+                       NETCONFIG_SERVICE, NETCONFIG_NETWORK_PATH,
+                       NETCONFIG_NETWORK_INTERFACE, "CheckProfilePrivilege",
+                       NULL, &Error);
        if (message == NULL) {
                WIFI_LOG(WIFI_ERROR, "Failed to check profile privilege"); //LCOV_EXCL_LINE
                return Error; //LCOV_EXCL_LINE
@@ -633,8 +641,9 @@ static wlan_eap_auth_type_e __convert_eap_auth_from_string(const char *eap_auth)
                return WLAN_SEC_EAP_AUTH_NONE;
 }
 
-static int __net_wifi_modify_profile(const char* ProfileName,
-               net_profile_info_s* ProfInfo, net_profile_info_s* exProfInfo)
+static int __net_wifi_modify_profile(network_info_s *network_info,
+               const char* ProfileName, net_profile_info_s* ProfInfo,
+               net_profile_info_s* exProfInfo)
 {
        __NETWORK_FUNC_ENTER__;
 
@@ -653,7 +662,7 @@ static int __net_wifi_modify_profile(const char* ProfileName,
        if (ex_security_info->sec_mode == WLAN_SEC_MODE_WEP) {
                if (g_strcmp0(security_info->authentication.wep.wepKey,
                                                ex_security_info->authentication.wep.wepKey) != 0) {
-                       Error = _net_dbus_set_agent_passphrase_and_connect(
+                       Error = _net_dbus_set_agent_passphrase_and_connect(network_info,
                                        security_info->authentication.wep.wepKey, ProfileName);
 
                        if (NET_ERR_NONE != Error) {
@@ -667,7 +676,7 @@ static int __net_wifi_modify_profile(const char* ProfileName,
                        ex_security_info->sec_mode == WLAN_SEC_MODE_WPA2_PSK) {
                if (g_strcmp0(security_info->authentication.psk.pskKey,
                                ex_security_info->authentication.psk.pskKey) != 0) {
-                       Error = _net_dbus_set_agent_passphrase_and_connect(
+                       Error = _net_dbus_set_agent_passphrase_and_connect(network_info,
                                        security_info->authentication.psk.pskKey, ProfileName);
 
                        if (NET_ERR_NONE != Error) {
@@ -683,8 +692,7 @@ static int __net_wifi_modify_profile(const char* ProfileName,
        if ((ex_net_info->ProxyMethod != net_info->ProxyMethod) ||
            (g_strcmp0(ex_net_info->ProxyAddr, net_info->ProxyAddr) != 0)) {
 
-               Error = _net_dbus_set_proxy(ProfInfo, profilePath);
-
+               Error = _net_dbus_set_proxy(network_info, ProfInfo, profilePath);
                if (Error != NET_ERR_NONE) {
                        __NETWORK_FUNC_EXIT__;
                        return Error;
@@ -697,7 +705,8 @@ static int __net_wifi_modify_profile(const char* ProfileName,
                (net_info->IpAddr.Data.Ipv4.s_addr != ex_net_info->IpAddr.Data.Ipv4.s_addr ||
                net_info->SubnetMask.Data.Ipv4.s_addr != ex_net_info->SubnetMask.Data.Ipv4.s_addr ||
                net_info->GatewayAddr.Data.Ipv4.s_addr != ex_net_info->GatewayAddr.Data.Ipv4.s_addr))) {
-               Error = _net_dbus_set_profile_ipv4(ProfInfo, profilePath);
+
+               Error = _net_dbus_set_profile_ipv4(network_info, ProfInfo, profilePath);
 
                if (Error != NET_ERR_NONE) {
                        WIFI_LOG(WIFI_ERROR, "Failed to set IPv4");
@@ -714,10 +723,10 @@ static int __net_wifi_modify_profile(const char* ProfileName,
              net_info->PrefixLen6 != ex_net_info->PrefixLen6 ||
              net_info->GatewayAddr6.Data.Ipv6.s6_addr != ex_net_info->GatewayAddr6.Data.Ipv6.s6_addr))) {
 
-               Error = _net_dbus_set_profile_ipv6(ProfInfo, profilePath);
+               Error = _net_dbus_set_profile_ipv6(network_info, ProfInfo, profilePath);
 
                if (Error != NET_ERR_NONE) {
-                       WIFI_LOG(WIFI_ERROR,  "Error!!! Can't set IPv6\n");
+                       WIFI_LOG(WIFI_ERROR,  "Error!!! Can't set IPv6");
 
                        __NETWORK_FUNC_EXIT__;
                        return Error;
@@ -740,10 +749,11 @@ static int __net_wifi_modify_profile(const char* ProfileName,
        if (i < net_info->DnsCount ||
                        ex_net_info->DnsConfigType != net_info->DnsConfigType ||
                        ex_net_info->DnsConfigType6 != net_info->DnsConfigType6) {
-               Error = _net_dbus_set_profile_dns(ProfInfo, profilePath);
+
+               Error = _net_dbus_set_profile_dns(network_info, ProfInfo, profilePath);
 
                if (Error != NET_ERR_NONE) {
-                       WIFI_LOG(WIFI_ERROR, "Failed to set DNS\n");
+                       WIFI_LOG(WIFI_ERROR, "Failed to set DNS");
 
                        __NETWORK_FUNC_EXIT__;
                        return Error;
@@ -754,8 +764,9 @@ static int __net_wifi_modify_profile(const char* ProfileName,
        return NET_ERR_NONE;
 }
 
-static int __net_wifi_delete_profile(net_profile_name_s* WifiProfName,
-               wlan_security_mode_type_e sec_mode, gboolean passpoint)
+static int __net_wifi_delete_profile(network_info_s *network_info,
+               net_profile_name_s* WifiProfName, wlan_security_mode_type_e sec_mode,
+               gboolean passpoint)
 {
        __NETWORK_FUNC_ENTER__;
 
@@ -765,10 +776,10 @@ static int __net_wifi_delete_profile(net_profile_name_s* WifiProfName,
        GVariant *params;
 
        if (passpoint == TRUE && WLAN_SEC_MODE_IEEE8021X == sec_mode) {
-               message = _net_invoke_dbus_method(CONNMAN_SERVICE,
-                               WifiProfName->ProfileName,
-                               CONNMAN_SERVICE_INTERFACE, "Remove", NULL,
-                               &Error);
+               message = _net_invoke_dbus_method(network_info,
+                               CONNMAN_SERVICE, WifiProfName->ProfileName,
+                               CONNMAN_SERVICE_INTERFACE, "Remove",
+                               NULL, &Error);
 
                if (message == NULL) {
                        WIFI_LOG(WIFI_ERROR, "Failed to Remove service(profile)");
@@ -782,22 +793,24 @@ static int __net_wifi_delete_profile(net_profile_name_s* WifiProfName,
                                WifiProfName->ProfileName);
                params = g_variant_new("(s)", param0);
 
-               message = _net_invoke_dbus_method(NETCONFIG_SERVICE,
-                               NETCONFIG_WIFI_PATH, NETCONFIG_WIFI_INTERFACE,
-                               "DeleteEapConfig", params, &Error);
+               message = _net_invoke_dbus_method(network_info,
+                               NETCONFIG_SERVICE, NETCONFIG_WIFI_PATH,
+                               NETCONFIG_WIFI_INTERFACE, "DeleteEapConfig",
+                               params, &Error);
        } else if (passpoint == TRUE || WLAN_SEC_MODE_IEEE8021X != sec_mode) {
-               message = _net_invoke_dbus_method(CONNMAN_SERVICE,
-                               WifiProfName->ProfileName,
-                               CONNMAN_SERVICE_INTERFACE, "Remove", NULL,
-                               &Error);
+               message = _net_invoke_dbus_method(network_info,
+                               CONNMAN_SERVICE, WifiProfName->ProfileName,
+                               CONNMAN_SERVICE_INTERFACE, "Remove",
+                               NULL, &Error);
        } else {
                g_snprintf(param0, NET_PROFILE_NAME_LEN_MAX + 8, "string:%s",
                                WifiProfName->ProfileName);
                params = g_variant_new("(s)", param0);
 
-               message = _net_invoke_dbus_method(NETCONFIG_SERVICE,
-                               NETCONFIG_WIFI_PATH, NETCONFIG_WIFI_INTERFACE,
-                               "DeleteEapConfig", params, &Error);
+               message = _net_invoke_dbus_method(network_info,
+                               NETCONFIG_SERVICE, NETCONFIG_WIFI_PATH,
+                               NETCONFIG_WIFI_INTERFACE, "DeleteEapConfig",
+                               params, &Error);
        }
 
        if (message == NULL) {
@@ -1076,7 +1089,7 @@ static int __net_extract_wifi_info(GVariantIter *array, net_profile_info_s* Prof
        return Error;
 }
 
-static int __net_extract_service_info(
+static int __net_extract_service_info(network_info_s *network_info,
                const char* ProfileName, GVariantIter *iter,
                net_profile_info_s* ProfInfo)
 {
@@ -1103,7 +1116,7 @@ static int __net_extract_service_info(
        }
 
        if (isProf) {
-               if ((Error = net_init_profile_info(ProfInfo)) != NET_ERR_NONE) {
+               if ((Error = net_init_profile_info(network_info, ProfInfo)) != NET_ERR_NONE) {
                        WIFI_LOG(WIFI_ERROR, "Failed to init profile");
                        __NETWORK_FUNC_EXIT__;
                        return Error;
@@ -1120,8 +1133,8 @@ static int __net_extract_service_info(
        return Error;
 }
 
-static int __net_extract_all_services(GVariantIter *array,
-               const char *service_prefix, GSList **profile_list)
+static int __net_extract_all_services(network_info_s *network_info,
+               GVariantIter *array, const char *service_prefix, GSList **profile_list)
 {
        net_profile_info_s *ProfInfo = NULL;
        net_err_e Error = NET_ERR_NONE;
@@ -1141,12 +1154,15 @@ static int __net_extract_all_services(GVariantIter *array,
                if (obj == NULL)
                        continue;
 
+               if (_net_check_service_mac_addr(network_info, obj) != TRUE)
+                       continue;
+
                if (g_str_has_prefix(obj, service_prefix) == TRUE) {
                        ProfInfo = g_try_malloc0(sizeof(net_profile_info_s));
                        if (ProfInfo == NULL)
                                goto error;
 
-                       if ((Error = net_init_profile_info(ProfInfo)) != NET_ERR_NONE) {
+                       if ((Error = net_init_profile_info(network_info, ProfInfo)) != NET_ERR_NONE) {
                                WIFI_LOG(WIFI_ERROR, "Failed to init profile");
                                goto error;
                        }
@@ -1184,7 +1200,8 @@ error:
        return Error;
 }
 
-static int __net_extract_services(GVariantIter *message, GSList **profile_list)
+static int __net_extract_services(network_info_s *network_info,
+               GVariantIter *message, GSList **profile_list)
 {
        __NETWORK_FUNC_ENTER__;
 
@@ -1193,7 +1210,8 @@ static int __net_extract_services(GVariantIter *message, GSList **profile_list)
 
        service_prefix = CONNMAN_WIFI_SERVICE_PROFILE_PREFIX;
 
-       Error = __net_extract_all_services(message, service_prefix, profile_list);
+       Error = __net_extract_all_services(network_info,
+               message, service_prefix, profile_list);
        if (Error != NET_ERR_NONE) {
                WIFI_LOG(WIFI_ERROR, "Failed to extract services from received message");
                __NETWORK_FUNC_EXIT__;
@@ -1204,8 +1222,8 @@ static int __net_extract_services(GVariantIter *message, GSList **profile_list)
        return Error;
 }
 
-static int __net_get_profile_info(
-               const char* ProfileName, net_profile_info_s* ProfInfo)
+static int __net_get_profile_info(network_info_s *network_info,
+               const char *ProfileName, net_profile_info_s *ProfInfo)
 {
        __NETWORK_FUNC_ENTER__;
 
@@ -1215,8 +1233,10 @@ static int __net_get_profile_info(
        GVariantIter *service = NULL;
        gchar *path = NULL;
 
-       message = _net_invoke_dbus_method(CONNMAN_SERVICE, CONNMAN_MANAGER_PATH,
-                       CONNMAN_MANAGER_INTERFACE, "GetServices", NULL, &Error);
+       message = _net_invoke_dbus_method(network_info,
+                       CONNMAN_SERVICE, CONNMAN_MANAGER_PATH,
+                       CONNMAN_MANAGER_INTERFACE, "GetServices",
+                       NULL, &Error);
        if (message == NULL) {
                WIFI_LOG(WIFI_ERROR, "Failed to get profile");
                goto done;
@@ -1226,7 +1246,8 @@ static int __net_get_profile_info(
        g_variant_get(message, "(a(oa{sv}))", &iter);
        while (g_variant_iter_loop(iter, "(oa{sv})", &path, &service)) {
                if (g_strcmp0(ProfileName, path) == 0) {
-                       Error = __net_extract_service_info(ProfileName, service, ProfInfo);
+                       Error = __net_extract_service_info(network_info,
+                               ProfileName, service, ProfInfo);
                        g_variant_iter_free(service);
                        g_free(path);
                        break;
@@ -1241,95 +1262,52 @@ done:
        return Error;
 }
 
-static gboolean __net_is_connecting(const char *profile_name)
+static net_err_e __net_get_wifi_state(network_info_s *network_info)
 {
-       __NETWORK_FUNC_ENTER__;
+       net_err_e err = NET_ERR_NONE;
 
-       char *svc_name1 = request_table[NETWORK_REQUEST_TYPE_OPEN_CONNECTION].ProfileName;
-       char *svc_name2 = request_table[NETWORK_REQUEST_TYPE_ENROLL_WPS].ProfileName;
-
-       if (request_table[NETWORK_REQUEST_TYPE_OPEN_CONNECTION].flag == TRUE &&
-                       g_strcmp0(profile_name, svc_name1) == 0) {
-               __NETWORK_FUNC_EXIT__;
-               return TRUE;
-       } else if (request_table[NETWORK_REQUEST_TYPE_ENROLL_WPS].flag == TRUE &&
-                       g_strcmp0(profile_name, svc_name2) == 0) {
-               __NETWORK_FUNC_EXIT__;
-               return TRUE;
+       if (network_info->wifi_state == WIFI_UNKNOWN ||
+               network_info->wifi_state == WIFI_OFF) {
+               err = _net_get_wifi_state(network_info);
        }
 
-       __NETWORK_FUNC_EXIT__;
-       return FALSE;
+       return err;
 }
 
-static void __net_abort_open_connection(const char *profile_name)
+void net_forget_ap_finished(network_info_s *network_info, net_err_e Error)
 {
        __NETWORK_FUNC_ENTER__;
 
-       net_event_info_s event_data;
+       net_event_info_s *event_data = NULL;
        char event_string[64];
 
-       char *svc_name1 = request_table[NETWORK_REQUEST_TYPE_OPEN_CONNECTION].ProfileName;
-       char *svc_name2 = request_table[NETWORK_REQUEST_TYPE_ENROLL_WPS].ProfileName;
-
-       if (request_table[NETWORK_REQUEST_TYPE_OPEN_CONNECTION].flag == TRUE &&
-                       g_strcmp0(profile_name, svc_name1) == 0) {
-               memset(&request_table[NETWORK_REQUEST_TYPE_OPEN_CONNECTION], 0,
-                               sizeof(network_request_table_s));
-
-               event_data.Event = NET_EVENT_OPEN_RSP;
-               g_strlcpy(event_string, "Sending NET_EVENT_OPEN_RSP", 64);
-
-               _net_dbus_pending_call_unref();
-       } else if (request_table[NETWORK_REQUEST_TYPE_ENROLL_WPS].flag == TRUE &&
-                       g_strcmp0(profile_name, svc_name2) == 0) {
-               memset(&request_table[NETWORK_REQUEST_TYPE_ENROLL_WPS], 0,
-                               sizeof(network_request_table_s));
-
-               event_data.Event = NET_EVENT_WIFI_WPS_RSP;
-               g_strlcpy(event_string, "Sending NET_EVENT_WIFI_WPS_RSP", 64);
-
-               _net_dbus_pending_call_unref();
-       } else {
+       if (network_info->request_table[NETWORK_REQUEST_TYPE_FORGET_AP].flag == FALSE) {
                __NETWORK_FUNC_EXIT__;
                return;
        }
 
-       g_strlcpy(event_data.ProfileName, profile_name, NET_PROFILE_NAME_LEN_MAX+1);
-       event_data.Error = NET_ERR_OPERATION_ABORTED;
-       event_data.Datalength = 0;
-       event_data.Data = NULL;
-
-       WIFI_LOG(WIFI_INFO, "%s, Error: %d", event_string, event_data.Error);
-       _net_client_callback(&event_data);
-
-       __NETWORK_FUNC_EXIT__;
-}
-
-void net_forget_ap_finshed(net_err_e Error)
-{
-       __NETWORK_FUNC_ENTER__;
-
-       net_event_info_s event_data;
-       char event_string[64];
+       memset(&(network_info->request_table[NETWORK_REQUEST_TYPE_FORGET_AP]), 0,
+              sizeof(network_request_table_s));
 
-       if (request_table[NETWORK_REQUEST_TYPE_FORGET_AP].flag == FALSE) {
+       event_data = g_try_malloc0(sizeof(net_event_info_s));
+       if (event_data == NULL) {
                __NETWORK_FUNC_EXIT__;
                return;
        }
 
-       memset(&request_table[NETWORK_REQUEST_TYPE_FORGET_AP], 0,
-              sizeof(network_request_table_s));
-
-       event_data.Event = NET_EVENT_WIFI_FORGET_AP_IND;
+       event_data->Event = NET_EVENT_WIFI_FORGET_AP_IND;
        g_strlcpy(event_string, "Sending NET_EVENT_WIFI_FORGET_AP_IND", 64);
 
-       event_data.Error = Error;
-       event_data.Datalength = 0;
-       event_data.Data = NULL;
+       event_data->Error = Error;
+       event_data->Datalength = 0;
+       event_data->Data = NULL;
+
+       WIFI_LOG(WIFI_INFO, "%s, Error: %d", event_string, event_data->Error);
 
-       WIFI_LOG(WIFI_INFO, "%s, Error: %d", event_string, event_data.Error);
-       _net_client_callback(&event_data);
+       if (network_info->event_callback)
+               network_info->event_callback(event_data, network_info->user_data);
+
+       g_free(event_data);
 
        __NETWORK_FUNC_EXIT__;
 }
@@ -1369,7 +1347,65 @@ int _net_check_profile_name(const char* ProfileName)
        return NET_ERR_NONE;
 }
 
-int _net_get_profile_list(GSList **profile_list)
+gboolean _net_check_service_mac_addr(network_info_s *network_info, const char* service)
+{
+       __NETWORK_FUNC_ENTER__;
+       const char *service_header = CONNMAN_WIFI_SERVICE_PROFILE_PREFIX;
+       const char *org = NULL;
+       const char *dst = NULL;
+       int service_index = 0;
+       int mac_index = 0;
+       int i = 0;
+
+       service_index = strlen(service_header);
+       for (i = 0; i < 6; i++) {
+               org = &service[service_index];
+               dst = &network_info->mac_address[mac_index];
+
+               if (g_ascii_strncasecmp(org, dst, 2) != 0)
+                       return FALSE;
+
+               service_index += 2;
+               mac_index += 3;
+       }
+
+       __NETWORK_FUNC_EXIT__;
+       return TRUE;
+}
+
+int _net_get_interface_list(network_info_s *network_info, GSList **interface_list)
+{
+       __NETWORK_FUNC_ENTER__;
+
+       net_err_e Error = NET_ERR_NONE;
+       GVariant *message;
+       GVariantIter *iter;
+       gchar *interface_name = NULL;
+
+       message = _net_invoke_dbus_method(network_info,
+                       CONNMAN_SERVICE, CONNMAN_WIFI_TECHNOLOGY_PATH,
+                       CONNMAN_TECHNOLOGY_INTERFACE, "GetInterfaces",
+                       NULL, &Error);
+       if (message == NULL) {
+               WIFI_LOG(WIFI_ERROR, "Failed to get interface list"); //LCOV_EXCL_LINE
+               __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
+               return Error; //LCOV_EXCL_LINE
+       }
+
+       g_variant_get(message, "(as)", &iter);
+       while (g_variant_iter_loop(iter, "s", &interface_name)) {
+               WIFI_LOG(WIFI_INFO, "Ifname [%s]", interface_name);
+               *interface_list = g_slist_append(*interface_list, g_strdup(interface_name));
+       }
+
+       g_variant_iter_free(iter);
+       g_variant_unref(message);
+
+       __NETWORK_FUNC_EXIT__;
+       return Error;
+}
+
+int _net_get_profile_list(network_info_s *network_info, GSList **profile_list)
 {
        __NETWORK_FUNC_ENTER__;
 
@@ -1377,8 +1413,10 @@ int _net_get_profile_list(GSList **profile_list)
        GVariant *message;
        GVariantIter *iter;
 
-       message = _net_invoke_dbus_method(CONNMAN_SERVICE, CONNMAN_MANAGER_PATH,
-                       CONNMAN_MANAGER_INTERFACE, "GetServices", NULL, &Error);
+       message = _net_invoke_dbus_method(network_info,
+                       CONNMAN_SERVICE, CONNMAN_MANAGER_PATH,
+                       CONNMAN_MANAGER_INTERFACE, "GetServices",
+                       NULL, &Error);
        if (message == NULL) {
                WIFI_LOG(WIFI_ERROR, "Failed to get service(profile) list"); //LCOV_EXCL_LINE
                __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
@@ -1386,7 +1424,7 @@ int _net_get_profile_list(GSList **profile_list)
        }
 
        g_variant_get(message, "(a(oa{sv}))", &iter);
-       Error = __net_extract_services(iter, profile_list);
+       Error = __net_extract_services(network_info, iter, profile_list);
 
        if (iter != NULL)
                g_variant_iter_free(iter);
@@ -1397,13 +1435,13 @@ int _net_get_profile_list(GSList **profile_list)
        return Error;
 }
 
-int net_init_profile_info(net_profile_info_s *ProfInfo)
+int net_init_profile_info(network_info_s *network_info, net_profile_info_s *ProfInfo)
 {
        int i = 0;
        net_dev_info_s *net_info = NULL;
 
        if (ProfInfo == NULL) {
-               WIFI_LOG(WIFI_ERROR, "Invalid Parameter\n"); //LCOV_EXCL_LINE
+               WIFI_LOG(WIFI_ERROR, "Invalid Parameter"); //LCOV_EXCL_LINE
                return NET_ERR_INVALID_PARAM; //LCOV_EXCL_LINE
        }
 
@@ -1420,6 +1458,9 @@ int net_init_profile_info(net_profile_info_s *ProfInfo)
        ProfInfo->security_info.wps_support = FALSE;
        ProfInfo->disconnect_reason = WIFI_REASON_UNSPECIFIED;
        ProfInfo->assoc_status_code = 0;
+
+       ProfInfo->network_info = network_info;
+
        net_info = &(ProfInfo->net_info);
 
        net_info->DnsCount = 0;
@@ -1455,7 +1496,7 @@ int net_init_profile_info(net_profile_info_s *ProfInfo)
        return NET_ERR_NONE;
 }
 
-int net_specific_scan_wifi(const char *ssid)
+int net_specific_scan_wifi(network_info_s *network_info, const char *ssid)
 {
        __NETWORK_FUNC_ENTER__;
 
@@ -1467,42 +1508,45 @@ int net_specific_scan_wifi(const char *ssid)
                return NET_ERR_INVALID_PARAM; //LCOV_EXCL_LINE
        }
 
-       if (NetworkInfo.ref_count < 1) {
-               WIFI_LOG(WIFI_ERROR, "Application is not registered"); //LCOV_EXCL_LINE
+       Error = __net_get_wifi_state(network_info);
+       if (Error != NET_ERR_NONE) {
+               WIFI_LOG(WIFI_ERROR, "Failed to get Wi-Fi state"); //LCOV_EXCL_LINE
                __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
-               return NET_ERR_APP_NOT_REGISTERED; //LCOV_EXCL_LINE
+               return Error; //LCOV_EXCL_LINE
        }
 
-       if (request_table[NETWORK_REQUEST_TYPE_SPECIFIC_SCAN].flag == TRUE) {
-               WIFI_LOG(WIFI_ERROR, "Find hidden AP request in progress"); //LCOV_EXCL_LINE
+       if (network_info->wifi_state == WIFI_OFF) {
+               WIFI_LOG(WIFI_ERROR, "Wi-Fi powered off!"); //LCOV_EXCL_LINE
                __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
-               return NET_ERR_IN_PROGRESS; //LCOV_EXCL_LINE
-       }
-
-       if (NetworkInfo.wifi_state == WIFI_OFF) {
-               if ((NetworkInfo.wifi_state = _net_get_wifi_state(&Error)) == WIFI_OFF) {
-                       WIFI_LOG(WIFI_ERROR, "Wi-Fi is powered off!"); //LCOV_EXCL_LINE
-                       __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
-                       return NET_ERR_INVALID_OPERATION; //LCOV_EXCL_LINE
-               }
+               return NET_ERR_INVALID_OPERATION; //LCOV_EXCL_LINE
        }
 
-       if (_net_dbus_is_pending_call_used() == TRUE) {
+       if (network_info->request_table[NETWORK_REQUEST_TYPE_SCAN].flag == TRUE ||
+               network_info->request_table[NETWORK_REQUEST_TYPE_BSSID_SCAN].flag == TRUE ||
+               network_info->request_table[NETWORK_REQUEST_TYPE_NETLINK_SCAN].flag == TRUE ||
+               network_info->request_table[NETWORK_REQUEST_TYPE_MULTI_SCAN].flag == TRUE) {
                WIFI_LOG(WIFI_ERROR, "pending call in progress"); //LCOV_EXCL_LINE
                __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
                return NET_ERR_INVALID_OPERATION; //LCOV_EXCL_LINE
        }
 
-       request_table[NETWORK_REQUEST_TYPE_SPECIFIC_SCAN].flag = TRUE;
-       g_strlcpy(request_table[NETWORK_REQUEST_TYPE_SPECIFIC_SCAN].ssid, ssid, NET_WLAN_ESSID_LEN + 1);
+       if (network_info->request_table[NETWORK_REQUEST_TYPE_SPECIFIC_SCAN].flag == TRUE) {
+               WIFI_LOG(WIFI_ERROR, "Specific scan request in progress"); //LCOV_EXCL_LINE
+               __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
+               return NET_ERR_IN_PROGRESS; //LCOV_EXCL_LINE
+       }
+
+       network_info->request_table[NETWORK_REQUEST_TYPE_SPECIFIC_SCAN].flag = TRUE;
+       g_strlcpy(network_info->request_table[NETWORK_REQUEST_TYPE_SPECIFIC_SCAN].ssid,
+                               ssid, NET_WLAN_ESSID_LEN + 1);
 
-       Error = _net_dbus_specific_scan_request(ssid);
+       Error = _net_dbus_specific_scan_request(network_info, ssid);
        if (Error != NET_ERR_NONE) {
                WIFI_LOG(WIFI_ERROR, //LCOV_EXCL_LINE
                                "_net_dbus_specific_scan_request() failed. Error [%s]",
                                _net_print_error(Error));
 
-               memset(&request_table[NETWORK_REQUEST_TYPE_SPECIFIC_SCAN], 0, //LCOV_EXCL_LINE
+               memset(&(network_info->request_table[NETWORK_REQUEST_TYPE_SPECIFIC_SCAN]), 0, //LCOV_EXCL_LINE
                                sizeof(network_request_table_s));
        }
 
@@ -1511,40 +1555,40 @@ int net_specific_scan_wifi(const char *ssid)
 }
 
 //LCOV_EXCL_START
-int net_bssid_scan_wifi(int activated)
+int net_bssid_scan_wifi(network_info_s *network_info, int activated)
 {
        __NETWORK_FUNC_ENTER__;
 
        net_err_e Error = NET_ERR_NONE;
 
-       if (NetworkInfo.ref_count < 1) {
-               WIFI_LOG(WIFI_ERROR, "Application is not registered");
-               __NETWORK_FUNC_EXIT__;
-               return NET_ERR_APP_NOT_REGISTERED;
+       if (network_info->request_table[NETWORK_REQUEST_TYPE_SCAN].flag == TRUE ||
+               network_info->request_table[NETWORK_REQUEST_TYPE_SPECIFIC_SCAN].flag == TRUE ||
+               network_info->request_table[NETWORK_REQUEST_TYPE_NETLINK_SCAN].flag == TRUE ||
+               network_info->request_table[NETWORK_REQUEST_TYPE_MULTI_SCAN].flag == TRUE) {
+               WIFI_LOG(WIFI_ERROR, "pending call in progress"); //LCOV_EXCL_LINE
+               __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
+               return NET_ERR_INVALID_OPERATION; //LCOV_EXCL_LINE
        }
 
-       if (_net_dbus_is_pending_call_used() == TRUE) {
-               if (request_table[NETWORK_REQUEST_TYPE_BSSID_SCAN].flag == TRUE)
-                       return NET_ERR_IN_PROGRESS;
-
-               WIFI_LOG(WIFI_ERROR, "pending call in progress");
+       if (network_info->request_table[NETWORK_REQUEST_TYPE_BSSID_SCAN].flag == TRUE) {
+               WIFI_LOG(WIFI_ERROR, "BSSID scan request in progress");
                __NETWORK_FUNC_EXIT__;
-               return NET_ERR_INVALID_OPERATION;
+               return NET_ERR_IN_PROGRESS;
        }
 
-       request_table[NETWORK_REQUEST_TYPE_BSSID_SCAN].flag = TRUE;
+       network_info->request_table[NETWORK_REQUEST_TYPE_BSSID_SCAN].flag = TRUE;
 
        if (activated == 0)
-               Error = _net_dbus_bssid_scan_request();
+               Error = _net_dbus_bssid_scan_request(network_info);
        else
-               Error = _net_dbus_scan_request();
+               Error = _net_dbus_scan_request(network_info);
 
        if (Error != NET_ERR_NONE) {
                WIFI_LOG(WIFI_ERROR,
                                "_net_dbus_bssid_scan_request() failed. Error [%s]",
                                _net_print_error(Error));
 
-               memset(&request_table[NETWORK_REQUEST_TYPE_BSSID_SCAN], 0,
+               memset(&(network_info->request_table[NETWORK_REQUEST_TYPE_BSSID_SCAN]), 0,
                                sizeof(network_request_table_s));
        }
 
@@ -1552,35 +1596,35 @@ int net_bssid_scan_wifi(int activated)
        return Error;
 }
 
-int net_netlink_scan_wifi(GSList *nl_scan_list, const char *vsie)
+int net_netlink_scan_wifi(network_info_s *network_info, GSList *nl_scan_list, const char *vsie)
 {
        __NETWORK_FUNC_ENTER__;
 
        net_err_e Error = NET_ERR_NONE;
 
-       if (NetworkInfo.ref_count < 1) {
-               WIFI_LOG(WIFI_ERROR, "Application is not registered");
-               __NETWORK_FUNC_EXIT__;
-               return NET_ERR_APP_NOT_REGISTERED;
+       if (network_info->request_table[NETWORK_REQUEST_TYPE_SCAN].flag == TRUE ||
+               network_info->request_table[NETWORK_REQUEST_TYPE_BSSID_SCAN].flag == TRUE ||
+               network_info->request_table[NETWORK_REQUEST_TYPE_SPECIFIC_SCAN].flag == TRUE ||
+               network_info->request_table[NETWORK_REQUEST_TYPE_MULTI_SCAN].flag == TRUE) {
+               WIFI_LOG(WIFI_ERROR, "pending call in progress"); //LCOV_EXCL_LINE
+               __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
+               return NET_ERR_INVALID_OPERATION; //LCOV_EXCL_LINE
        }
 
-       if (_net_dbus_is_pending_call_used() == TRUE) {
-               if (request_table[NETWORK_REQUEST_TYPE_NETLINK_SCAN].flag == TRUE)
-                       return NET_ERR_IN_PROGRESS;
-
-               WIFI_LOG(WIFI_ERROR, "pending call in progress");
+       if (network_info->request_table[NETWORK_REQUEST_TYPE_NETLINK_SCAN].flag == TRUE) {
+               WIFI_LOG(WIFI_ERROR, "Netlink scan request in progress");
                __NETWORK_FUNC_EXIT__;
-               return NET_ERR_INVALID_OPERATION;
+               return NET_ERR_IN_PROGRESS;
        }
 
-       request_table[NETWORK_REQUEST_TYPE_NETLINK_SCAN].flag = TRUE;
-       Error = _net_dbus_netlink_scan_request(nl_scan_list, vsie);
+       network_info->request_table[NETWORK_REQUEST_TYPE_NETLINK_SCAN].flag = TRUE;
+       Error = _net_dbus_netlink_scan_request(network_info, nl_scan_list, vsie);
 
        if (Error != NET_ERR_NONE) {
                WIFI_LOG(WIFI_ERROR,
                                "netlink dbus request failed. Error [%s]",
                                _net_print_error(Error));
-               memset(&request_table[NETWORK_REQUEST_TYPE_NETLINK_SCAN], 0,
+               memset(&(network_info->request_table[NETWORK_REQUEST_TYPE_NETLINK_SCAN]), 0,
                                sizeof(network_request_table_s));
        }
 
@@ -1588,7 +1632,8 @@ int net_netlink_scan_wifi(GSList *nl_scan_list, const char *vsie)
        return Error;
 }
 
-int net_multi_scan_wifi(GSList *multi_scan_list, gboolean multi_scan_type[])
+int net_multi_scan_wifi(network_info_s *network_info,
+               GSList *multi_scan_list, gboolean multi_scan_type[])
 {
        __NETWORK_FUNC_ENTER__;
 
@@ -1600,40 +1645,42 @@ int net_multi_scan_wifi(GSList *multi_scan_list, gboolean multi_scan_type[])
                return NET_ERR_INVALID_PARAM; //LCOV_EXCL_LINE
        }
 
-       if (NetworkInfo.ref_count < 1) {
-               WIFI_LOG(WIFI_ERROR, "Application is not registered"); //LCOV_EXCL_LINE
+       Error = __net_get_wifi_state(network_info);
+       if (Error != NET_ERR_NONE) {
+               WIFI_LOG(WIFI_ERROR, "Failed to get Wi-Fi state"); //LCOV_EXCL_LINE
                __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
-               return NET_ERR_APP_NOT_REGISTERED; //LCOV_EXCL_LINE
+               return Error; //LCOV_EXCL_LINE
        }
 
-       if (request_table[NETWORK_REQUEST_TYPE_MULTI_SCAN].flag == TRUE) {
-               WIFI_LOG(WIFI_ERROR, "Multi Scan request in progress"); //LCOV_EXCL_LINE
+       if (network_info->wifi_state == WIFI_OFF) {
+               WIFI_LOG(WIFI_ERROR, "Wi-Fi powered off!"); //LCOV_EXCL_LINE
                __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
-               return NET_ERR_IN_PROGRESS; //LCOV_EXCL_LINE
-       }
-
-       if (NetworkInfo.wifi_state == WIFI_OFF) {
-               if ((NetworkInfo.wifi_state = _net_get_wifi_state(&Error)) == WIFI_OFF) {
-                       WIFI_LOG(WIFI_ERROR, "Wi-Fi is powered off!"); //LCOV_EXCL_LINE
-                       __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
-                       return NET_ERR_INVALID_OPERATION; //LCOV_EXCL_LINE
-               }
+               return NET_ERR_INVALID_OPERATION; //LCOV_EXCL_LINE
        }
 
-       if (_net_dbus_is_pending_call_used() == TRUE) {
+       if (network_info->request_table[NETWORK_REQUEST_TYPE_SCAN].flag == TRUE ||
+               network_info->request_table[NETWORK_REQUEST_TYPE_BSSID_SCAN].flag == TRUE ||
+               network_info->request_table[NETWORK_REQUEST_TYPE_NETLINK_SCAN].flag == TRUE ||
+               network_info->request_table[NETWORK_REQUEST_TYPE_SPECIFIC_SCAN].flag == TRUE) {
                WIFI_LOG(WIFI_ERROR, "pending call in progress"); //LCOV_EXCL_LINE
                __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
                return NET_ERR_INVALID_OPERATION; //LCOV_EXCL_LINE
        }
 
-       request_table[NETWORK_REQUEST_TYPE_MULTI_SCAN].flag = TRUE;
+       if (network_info->request_table[NETWORK_REQUEST_TYPE_MULTI_SCAN].flag == TRUE) {
+               WIFI_LOG(WIFI_ERROR, "Multi Scan request in progress"); //LCOV_EXCL_LINE
+               __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
+               return NET_ERR_IN_PROGRESS; //LCOV_EXCL_LINE
+       }
+
+       network_info->request_table[NETWORK_REQUEST_TYPE_MULTI_SCAN].flag = TRUE;
        if (multi_scan_type[WIFI_MULTI_SCAN_SSID] == true &&
                        multi_scan_type[WIFI_MULTI_SCAN_FREQ] == true)
-               request_table[NETWORK_REQUEST_TYPE_MULTI_SCAN].multi_scan_type = WIFI_MULTI_SCAN_SSID_FREQ;
+               network_info->request_table[NETWORK_REQUEST_TYPE_MULTI_SCAN].multi_scan_type = WIFI_MULTI_SCAN_SSID_FREQ;
        else if (multi_scan_type[WIFI_MULTI_SCAN_SSID] == true)
-               request_table[NETWORK_REQUEST_TYPE_MULTI_SCAN].multi_scan_type = WIFI_MULTI_SCAN_SSID;
+               network_info->request_table[NETWORK_REQUEST_TYPE_MULTI_SCAN].multi_scan_type = WIFI_MULTI_SCAN_SSID;
        else if (multi_scan_type[WIFI_MULTI_SCAN_FREQ] == true)
-               request_table[NETWORK_REQUEST_TYPE_MULTI_SCAN].multi_scan_type = WIFI_MULTI_SCAN_FREQ;
+               network_info->request_table[NETWORK_REQUEST_TYPE_MULTI_SCAN].multi_scan_type = WIFI_MULTI_SCAN_FREQ;
 
        wifi_manager_multi_scan_ap_s *temp = NULL;
        for (GSList *list = multi_scan_list; list; list = list->next) {
@@ -1645,18 +1692,18 @@ int net_multi_scan_wifi(GSList *multi_scan_list, gboolean multi_scan_type[])
                g_strlcpy(temp->str, ((wifi_manager_multi_scan_ap_s *)list->data)->str, NET_WLAN_ESSID_LEN + 1);
                temp->flag = ((wifi_manager_multi_scan_ap_s *)list->data)->flag;
 
-               request_table[NETWORK_REQUEST_TYPE_MULTI_SCAN].multi_scan_list = g_slist_append(
-                                       request_table[NETWORK_REQUEST_TYPE_MULTI_SCAN].multi_scan_list, temp);
+               network_info->request_table[NETWORK_REQUEST_TYPE_MULTI_SCAN].multi_scan_list = g_slist_append(
+                                       network_info->request_table[NETWORK_REQUEST_TYPE_MULTI_SCAN].multi_scan_list, temp);
        }
 
-       Error = _net_dbus_multi_scan_request(multi_scan_list);
+       Error = _net_dbus_multi_scan_request(network_info, multi_scan_list);
        if (Error != NET_ERR_NONE) {
                WIFI_LOG(WIFI_ERROR, //LCOV_EXCL_LINE
                                "_net_dbus_multi_scan_request() failed. Error [%s]",
                                _net_print_error(Error));
 
-               g_slist_free_full(request_table[NETWORK_REQUEST_TYPE_MULTI_SCAN].multi_scan_list, g_free);
-               memset(&request_table[NETWORK_REQUEST_TYPE_MULTI_SCAN], 0, //LCOV_EXCL_LINE
+               g_slist_free_full(network_info->request_table[NETWORK_REQUEST_TYPE_MULTI_SCAN].multi_scan_list, g_free);
+               memset(&(network_info->request_table[NETWORK_REQUEST_TYPE_MULTI_SCAN]), 0, //LCOV_EXCL_LINE
                                sizeof(network_request_table_s));
        }
 
@@ -1664,10 +1711,10 @@ int net_multi_scan_wifi(GSList *multi_scan_list, gboolean multi_scan_type[])
        return Error;
 }
 
-int net_get_wps_generated_pin(char **wps_pin)
+int net_get_wps_generated_pin(network_info_s *network_info, char **wps_pin)
 {
        net_err_e error = NET_ERR_NONE;
-       error = _net_dbus_get_wps_generated_pin(wps_pin);
+       error = _net_dbus_get_wps_generated_pin(network_info, wps_pin);
 
        if (error != NET_ERR_NONE)
                WIFI_LOG(WIFI_ERROR, "Failed to get wps pin : %d", error);
@@ -1675,33 +1722,26 @@ int net_get_wps_generated_pin(char **wps_pin)
        return error;
 }
 
-int net_wifi_get_passpoint(int *enabled)
+int net_wifi_get_passpoint(network_info_s *network_info, int *enabled)
 {
        __NETWORK_FUNC_ENTER__;
 
        net_err_e Error = NET_ERR_NONE;
 
-       if (NetworkInfo.ref_count < 1) {
-               WIFI_LOG(WIFI_ERROR, "Application is not registered");
-               __NETWORK_FUNC_EXIT__;
-               return NET_ERR_APP_NOT_REGISTERED;
-       }
-
-       if (NetworkInfo.wifi_state == WIFI_OFF) {
-               if ((NetworkInfo.wifi_state = _net_get_wifi_state(&Error)) == WIFI_OFF) {
-                       WIFI_LOG(WIFI_ERROR, "Wi-Fi is powered off!");
-                       __NETWORK_FUNC_EXIT__;
-                       return NET_ERR_INVALID_OPERATION;
-               }
+       Error = __net_get_wifi_state(network_info);
+       if (Error != NET_ERR_NONE) {
+               WIFI_LOG(WIFI_ERROR, "Failed to get Wi-Fi state"); //LCOV_EXCL_LINE
+               __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
+               return Error; //LCOV_EXCL_LINE
        }
 
-       if (_net_dbus_is_pending_call_used() == TRUE) {
-               WIFI_LOG(WIFI_ERROR, "pending call in progress");
-               __NETWORK_FUNC_EXIT__;
-               return NET_ERR_INVALID_OPERATION;
+       if (network_info->wifi_state == WIFI_OFF) {
+               WIFI_LOG(WIFI_ERROR, "Wi-Fi powered off!"); //LCOV_EXCL_LINE
+               __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
+               return NET_ERR_INVALID_OPERATION; //LCOV_EXCL_LINE
        }
 
-       Error = _net_dbus_get_passpoint(enabled);
+       Error = _net_dbus_get_passpoint(network_info, enabled);
        if (Error != NET_ERR_NONE) {
                WIFI_LOG(WIFI_ERROR,
                                "_net_dbus_get_passpoint() failed. Error [%s]",
@@ -1712,33 +1752,26 @@ int net_wifi_get_passpoint(int *enabled)
        return Error;
 }
 
-int net_wifi_set_passpoint(int enable)
+int net_wifi_set_passpoint(network_info_s *network_info, int enable)
 {
        __NETWORK_FUNC_ENTER__;
 
        net_err_e Error = NET_ERR_NONE;
 
-       if (NetworkInfo.ref_count < 1) {
-               WIFI_LOG(WIFI_ERROR, "Application is not registered");
-               __NETWORK_FUNC_EXIT__;
-               return NET_ERR_APP_NOT_REGISTERED;
-       }
-
-       if (NetworkInfo.wifi_state == WIFI_OFF) {
-               if ((NetworkInfo.wifi_state = _net_get_wifi_state(&Error)) == WIFI_OFF) {
-                       WIFI_LOG(WIFI_ERROR, "Wi-Fi is powered off!");
-                       __NETWORK_FUNC_EXIT__;
-                       return NET_ERR_INVALID_OPERATION;
-               }
+       Error = __net_get_wifi_state(network_info);
+       if (Error != NET_ERR_NONE) {
+               WIFI_LOG(WIFI_ERROR, "Failed to get Wi-Fi state"); //LCOV_EXCL_LINE
+               __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
+               return Error; //LCOV_EXCL_LINE
        }
 
-       if (_net_dbus_is_pending_call_used() == TRUE) {
-               WIFI_LOG(WIFI_ERROR, "pending call in progress");
-               __NETWORK_FUNC_EXIT__;
-               return NET_ERR_INVALID_OPERATION;
+       if (network_info->wifi_state == WIFI_OFF) {
+               WIFI_LOG(WIFI_ERROR, "Wi-Fi powered off!"); //LCOV_EXCL_LINE
+               __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
+               return NET_ERR_INVALID_OPERATION; //LCOV_EXCL_LINE
        }
 
-       Error = _net_dbus_set_passpoint(enable);
+       Error = _net_dbus_set_passpoint(network_info, enable);
        if (Error != NET_ERR_NONE) {
                WIFI_LOG(WIFI_ERROR,
                                "_net_dbus_set_passpoint() failed. Error [%s]",
@@ -1749,33 +1782,26 @@ int net_wifi_set_passpoint(int enable)
        return Error;
 }
 
-int net_wifi_add_vsie(unsigned int frame_id, const char *vsie_str)
+int net_wifi_add_vsie(network_info_s *network_info, unsigned int frame_id, const char *vsie_str)
 {
        __NETWORK_FUNC_ENTER__;
 
        net_err_e Error = NET_ERR_NONE;
 
-       if (NetworkInfo.ref_count < 1) {
-               WIFI_LOG(WIFI_ERROR, "Application is not registered");
-               __NETWORK_FUNC_EXIT__;
-               return NET_ERR_APP_NOT_REGISTERED;
-       }
-
-       if (NetworkInfo.wifi_state == WIFI_OFF) {
-               if ((NetworkInfo.wifi_state = _net_get_wifi_state(&Error)) == WIFI_OFF) {
-                       WIFI_LOG(WIFI_ERROR, "Wi-Fi is powered off!");
-                       __NETWORK_FUNC_EXIT__;
-                       return NET_ERR_INVALID_OPERATION;
-               }
+       Error = __net_get_wifi_state(network_info);
+       if (Error != NET_ERR_NONE) {
+               WIFI_LOG(WIFI_ERROR, "Failed to get Wi-Fi state"); //LCOV_EXCL_LINE
+               __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
+               return Error; //LCOV_EXCL_LINE
        }
 
-       if (_net_dbus_is_pending_call_used() == TRUE) {
-               WIFI_LOG(WIFI_ERROR, "pending call in progress");
-               __NETWORK_FUNC_EXIT__;
-               return NET_ERR_INVALID_OPERATION;
+       if (network_info->wifi_state == WIFI_OFF) {
+               WIFI_LOG(WIFI_ERROR, "Wi-Fi powered off!"); //LCOV_EXCL_LINE
+               __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
+               return NET_ERR_INVALID_OPERATION; //LCOV_EXCL_LINE
        }
 
-       Error = _net_dbus_add_vsie(frame_id, vsie_str);
+       Error = _net_dbus_add_vsie(network_info, frame_id, vsie_str);
        if (Error != NET_ERR_NONE) {
                WIFI_LOG(WIFI_ERROR,
                                "_net_dbus_add_vsie() failed. Error [%s]",
@@ -1786,33 +1812,26 @@ int net_wifi_add_vsie(unsigned int frame_id, const char *vsie_str)
        return Error;
 }
 
-int net_wifi_get_vsie(unsigned int frame_id, char **vsie_str)
+int net_wifi_get_vsie(network_info_s *network_info, unsigned int frame_id, char **vsie_str)
 {
        __NETWORK_FUNC_ENTER__;
 
        net_err_e Error = NET_ERR_NONE;
 
-       if (NetworkInfo.ref_count < 1) {
-               WIFI_LOG(WIFI_ERROR, "Application is not registered");
-               __NETWORK_FUNC_EXIT__;
-               return NET_ERR_APP_NOT_REGISTERED;
-       }
-
-       if (NetworkInfo.wifi_state == WIFI_OFF) {
-               if ((NetworkInfo.wifi_state = _net_get_wifi_state(&Error)) == WIFI_OFF) {
-                       WIFI_LOG(WIFI_ERROR, "Wi-Fi is powered off!");
-                       __NETWORK_FUNC_EXIT__;
-                       return NET_ERR_INVALID_OPERATION;
-               }
+       Error = __net_get_wifi_state(network_info);
+       if (Error != NET_ERR_NONE) {
+               WIFI_LOG(WIFI_ERROR, "Failed to get Wi-Fi state"); //LCOV_EXCL_LINE
+               __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
+               return Error; //LCOV_EXCL_LINE
        }
 
-       if (_net_dbus_is_pending_call_used() == TRUE) {
-               WIFI_LOG(WIFI_ERROR, "pending call in progress");
-               __NETWORK_FUNC_EXIT__;
-               return NET_ERR_INVALID_OPERATION;
+       if (network_info->wifi_state == WIFI_OFF) {
+               WIFI_LOG(WIFI_ERROR, "Wi-Fi powered off!"); //LCOV_EXCL_LINE
+               __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
+               return NET_ERR_INVALID_OPERATION; //LCOV_EXCL_LINE
        }
 
-       Error = _net_dbus_get_vsie(frame_id, vsie_str);
+       Error = _net_dbus_get_vsie(network_info, frame_id, vsie_str);
        if (Error != NET_ERR_NONE) {
                WIFI_LOG(WIFI_ERROR,
                                "_net_dbus_get_vsie() failed. Error [%s]",
@@ -1823,33 +1842,26 @@ int net_wifi_get_vsie(unsigned int frame_id, char **vsie_str)
        return Error;
 }
 
-int net_wifi_remove_vsie(unsigned int frame_id, const char *vsie_str)
+int net_wifi_remove_vsie(network_info_s *network_info, unsigned int frame_id, const char *vsie_str)
 {
        __NETWORK_FUNC_ENTER__;
 
        net_err_e Error = NET_ERR_NONE;
 
-       if (NetworkInfo.ref_count < 1) {
-               WIFI_LOG(WIFI_ERROR, "Application is not registered");
-               __NETWORK_FUNC_EXIT__;
-               return NET_ERR_APP_NOT_REGISTERED;
-       }
-
-       if (NetworkInfo.wifi_state == WIFI_OFF) {
-               if ((NetworkInfo.wifi_state = _net_get_wifi_state(&Error)) == WIFI_OFF) {
-                       WIFI_LOG(WIFI_ERROR, "Wi-Fi is powered off!");
-                       __NETWORK_FUNC_EXIT__;
-                       return NET_ERR_INVALID_OPERATION;
-               }
+       Error = __net_get_wifi_state(network_info);
+       if (Error != NET_ERR_NONE) {
+               WIFI_LOG(WIFI_ERROR, "Failed to get Wi-Fi state"); //LCOV_EXCL_LINE
+               __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
+               return Error; //LCOV_EXCL_LINE
        }
 
-       if (_net_dbus_is_pending_call_used() == TRUE) {
-               WIFI_LOG(WIFI_ERROR, "pending call in progress");
-               __NETWORK_FUNC_EXIT__;
-               return NET_ERR_INVALID_OPERATION;
+       if (network_info->wifi_state == WIFI_OFF) {
+               WIFI_LOG(WIFI_ERROR, "Wi-Fi powered off!"); //LCOV_EXCL_LINE
+               __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
+               return NET_ERR_INVALID_OPERATION; //LCOV_EXCL_LINE
        }
 
-       Error = _net_dbus_remove_vsie(frame_id, vsie_str);
+       Error = _net_dbus_remove_vsie(network_info, frame_id, vsie_str);
        if (Error != NET_ERR_NONE) {
                WIFI_LOG(WIFI_ERROR,
                                "_net_dbus_remove_vsie() failed. Error [%s]",
@@ -1860,21 +1872,15 @@ int net_wifi_remove_vsie(unsigned int frame_id, const char *vsie_str)
        return Error;
 }
 
-EXPORT_API int net_wifi_flush_bss(void)
+EXPORT_API int net_wifi_flush_bss(network_info_s *network_info)
 {
        __NETWORK_CAPI_FUNC_ENTER__;
 
        net_err_e Error = NET_ERR_NONE;
 
-       if (NetworkInfo.ref_count < 1) {
-               WIFI_LOG(WIFI_ERROR, "Application is not registered");
-               __NETWORK_CAPI_FUNC_EXIT__;
-               return NET_ERR_APP_NOT_REGISTERED;
-       }
-
-       Error = _net_dbus_flush_bss();
+       Error = _net_dbus_flush_bss(network_info);
        if (Error != NET_ERR_NONE) {
-               WIFI_LOG(WIFI_ERROR, "Failed to flush bss. Error [%s]\n",
+               WIFI_LOG(WIFI_ERROR, "Failed to flush bss. Error [%s]",
                                _net_print_error(Error));
                __NETWORK_CAPI_FUNC_EXIT__;
                return Error;
@@ -1884,21 +1890,15 @@ EXPORT_API int net_wifi_flush_bss(void)
        return NET_ERR_NONE;
 }
 
-int net_wifi_set_bssid(char *bssid)
+int net_wifi_set_bssid(network_info_s *network_info, char *bssid)
 {
        __NETWORK_CAPI_FUNC_ENTER__;
 
        net_err_e Error = NET_ERR_NONE;
 
-       if (NetworkInfo.ref_count < 1) {
-               WIFI_LOG(WIFI_ERROR, "Application is not registered");
-               __NETWORK_CAPI_FUNC_EXIT__;
-               return NET_ERR_APP_NOT_REGISTERED;
-       }
-
-       Error = _net_dbus_set_bssid(bssid);
+       Error = _net_dbus_set_bssid(network_info, bssid);
        if (Error != NET_ERR_NONE) {
-               WIFI_LOG(WIFI_ERROR, "Failed to set bssid. Error [%s]\n",
+               WIFI_LOG(WIFI_ERROR, "Failed to set bssid. Error [%s]",
                                _net_print_error(Error));
                __NETWORK_CAPI_FUNC_EXIT__;
                return Error;
@@ -1908,19 +1908,14 @@ int net_wifi_set_bssid(char *bssid)
        return NET_ERR_NONE;
 }
 
-EXPORT_API int net_wifi_set_auto_connect_mode(int connect_mode)
+EXPORT_API int net_wifi_set_auto_connect_mode(network_info_s *network_info,
+               int connect_mode)
 {
        __NETWORK_CAPI_FUNC_ENTER__;
 
        net_err_e Error = NET_ERR_NONE;
 
-       if (NetworkInfo.ref_count < 1) {
-               WIFI_LOG(WIFI_ERROR, "Application is not registered");
-               __NETWORK_CAPI_FUNC_EXIT__;
-               return NET_ERR_APP_NOT_REGISTERED;
-       }
-
-       if ((Error = _net_dbus_set_auto_connect_mode(connect_mode)) != NET_ERR_NONE) {
+       if ((Error = _net_dbus_set_auto_connect_mode(network_info, connect_mode)) != NET_ERR_NONE) {
                WIFI_LOG(WIFI_ERROR,
                                "Failed to set auto connect mode. Error [%s]",
                                _net_print_error(Error));
@@ -1933,19 +1928,13 @@ EXPORT_API int net_wifi_set_auto_connect_mode(int connect_mode)
        return NET_ERR_NONE;
 }
 
-EXPORT_API int net_wifi_get_5ghz_support(gboolean *supported)
+EXPORT_API int net_wifi_get_5ghz_support(network_info_s *network_info, gboolean *supported)
 {
        __NETWORK_CAPI_FUNC_ENTER__;
 
        net_err_e Error = NET_ERR_NONE;
 
-       if (NetworkInfo.ref_count < 1) {
-               WIFI_LOG(WIFI_ERROR, "Application is not registered");
-               __NETWORK_CAPI_FUNC_EXIT__;
-               return NET_ERR_APP_NOT_REGISTERED;
-       }
-
-       if ((Error = _net_dbus_get_5ghz_support(supported)) != NET_ERR_NONE) {
+       if ((Error = _net_dbus_get_5ghz_support(network_info, supported)) != NET_ERR_NONE) {
                WIFI_LOG(WIFI_ERROR,
                                "Failed to get 5 Ghz supported. Error [%s]",
                                _net_print_error(Error));
@@ -1958,19 +1947,14 @@ EXPORT_API int net_wifi_get_5ghz_support(gboolean *supported)
        return NET_ERR_NONE;
 }
 
-EXPORT_API int net_wifi_get_auto_connect_mode(int *connect_mode)
+EXPORT_API int net_wifi_get_auto_connect_mode(network_info_s *network_info,
+               int *connect_mode)
 {
        __NETWORK_CAPI_FUNC_ENTER__;
 
        net_err_e Error = NET_ERR_NONE;
 
-       if (NetworkInfo.ref_count < 1) {
-               WIFI_LOG(WIFI_ERROR, "Application is not registered");
-               __NETWORK_CAPI_FUNC_EXIT__;
-               return NET_ERR_APP_NOT_REGISTERED;
-       }
-
-       if ((Error = _net_dbus_get_auto_connect_mode(connect_mode)) != NET_ERR_NONE) {
+       if ((Error = _net_dbus_get_auto_connect_mode(network_info, connect_mode)) != NET_ERR_NONE) {
                WIFI_LOG(WIFI_ERROR,
                                "Failed to set auto connect mode. Error [%s]",
                                _net_print_error(Error));
@@ -1983,25 +1967,20 @@ EXPORT_API int net_wifi_get_auto_connect_mode(int *connect_mode)
        return NET_ERR_NONE;
 }
 
-EXPORT_API int net_wifi_set_ap_auto_connect(const char *profile_name, gboolean autoconnect)
+EXPORT_API int net_wifi_set_ap_auto_connect(network_info_s *network_info,
+               const char *profile_name, gboolean autoconnect)
 {
        __NETWORK_FUNC_ENTER__;
 
        net_err_e Error = NET_ERR_NONE;
 
-       if (NetworkInfo.ref_count < 1) {
-               WIFI_LOG(WIFI_ERROR, "Application is not registered");
-               __NETWORK_FUNC_EXIT__;
-               return NET_ERR_APP_NOT_REGISTERED;
-       }
-
        if (_net_check_profile_name(profile_name) != NET_ERR_NONE) {
                WIFI_LOG(WIFI_ERROR, "Invalid profile name");
                __NETWORK_FUNC_EXIT__;
                return NET_ERR_INVALID_PARAM;
        }
 
-       Error = _net_dbus_wifi_set_autoconnect(profile_name, autoconnect);
+       Error = _net_dbus_wifi_set_autoconnect(network_info, profile_name, autoconnect);
        if (Error != NET_ERR_NONE)
                WIFI_LOG(WIFI_ERROR, "Failed to set autoconnect(%d), Error[%s]",
                                autoconnect, _net_print_error(Error));
@@ -2010,25 +1989,20 @@ EXPORT_API int net_wifi_set_ap_auto_connect(const char *profile_name, gboolean a
        return Error;
 }
 
-EXPORT_API int net_wifi_get_ap_auto_connect(const char *profile_name, gboolean *autoconnect)
+EXPORT_API int net_wifi_get_ap_auto_connect(network_info_s *network_info,
+               const char *profile_name, gboolean *autoconnect)
 {
        __NETWORK_FUNC_ENTER__;
 
        net_err_e Error = NET_ERR_NONE;
 
-       if (NetworkInfo.ref_count < 1) {
-               WIFI_LOG(WIFI_ERROR, "Application is not registered");
-               __NETWORK_FUNC_EXIT__;
-               return NET_ERR_APP_NOT_REGISTERED;
-       }
-
        if (_net_check_profile_name(profile_name) != NET_ERR_NONE) {
                WIFI_LOG(WIFI_ERROR, "Invalid profile name");
                __NETWORK_FUNC_EXIT__;
                return NET_ERR_INVALID_PARAM;
        }
 
-       Error = _net_dbus_wifi_get_autoconnect(profile_name, autoconnect);
+       Error = _net_dbus_wifi_get_autoconnect(network_info, profile_name, autoconnect);
        if (Error != NET_ERR_NONE)
                WIFI_LOG(WIFI_ERROR, "Failed to get autoconnect, Error[%s]",
                                _net_print_error(Error));
@@ -2038,7 +2012,8 @@ EXPORT_API int net_wifi_get_ap_auto_connect(const char *profile_name, gboolean *
 }
 //LCOV_EXCL_STOP
 
-int net_open_connection_with_wifi_info(const net_wifi_connection_info_s *wifi_info)
+int net_open_connection_with_wifi_info(network_info_s *network_info,
+               const net_wifi_connection_info_s *wifi_info)
 {
        __NETWORK_FUNC_ENTER__;
 
@@ -2050,42 +2025,44 @@ int net_open_connection_with_wifi_info(const net_wifi_connection_info_s *wifi_in
                return NET_ERR_INVALID_PARAM; //LCOV_EXCL_LINE
        }
 
-       if (NetworkInfo.ref_count < 1) {
-               WIFI_LOG(WIFI_ERROR, "Application is not registered"); //LCOV_EXCL_LINE
+       Error = __net_get_wifi_state(network_info);
+       if (Error != NET_ERR_NONE) {
+               WIFI_LOG(WIFI_ERROR, "Failed to get Wi-Fi state"); //LCOV_EXCL_LINE
                __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
-               return NET_ERR_APP_NOT_REGISTERED; //LCOV_EXCL_LINE
+               return Error; //LCOV_EXCL_LINE
        }
 
-       if (request_table[NETWORK_REQUEST_TYPE_OPEN_CONNECTION].flag == TRUE) {
-               WIFI_LOG(WIFI_ERROR, "Connection open request in progress"); //LCOV_EXCL_LINE
+       if (network_info->wifi_state == WIFI_OFF) {
+               WIFI_LOG(WIFI_ERROR, "Wi-Fi powered off!"); //LCOV_EXCL_LINE
                __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
-               return NET_ERR_IN_PROGRESS; //LCOV_EXCL_LINE
-       }
-
-       if (NetworkInfo.wifi_state == WIFI_OFF) {
-               if ((NetworkInfo.wifi_state = _net_get_wifi_state(&Error)) == WIFI_OFF) {
-                       WIFI_LOG(WIFI_ERROR, "Wi-Fi is powered off!"); //LCOV_EXCL_LINE
-                       __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
-                       return NET_ERR_INVALID_OPERATION; //LCOV_EXCL_LINE
-               }
+               return NET_ERR_INVALID_OPERATION; //LCOV_EXCL_LINE
        }
 
-       if (_net_dbus_is_pending_call_used() == TRUE) {
+       if (network_info->request_table[NETWORK_REQUEST_TYPE_WIFI_POWER].flag == TRUE ||
+               network_info->request_table[NETWORK_REQUEST_TYPE_CLOSE_CONNECTION].flag == TRUE ||
+               network_info->request_table[NETWORK_REQUEST_TYPE_ENROLL_WPS].flag == TRUE ||
+               network_info->request_table[NETWORK_REQUEST_TYPE_FORGET_AP].flag == TRUE) {
                WIFI_LOG(WIFI_ERROR, "pending call in progress"); //LCOV_EXCL_LINE
                __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
                return NET_ERR_INVALID_OPERATION; //LCOV_EXCL_LINE
        }
 
-       request_table[NETWORK_REQUEST_TYPE_OPEN_CONNECTION].flag = TRUE;
+       if (network_info->request_table[NETWORK_REQUEST_TYPE_OPEN_CONNECTION].flag == TRUE) {
+               WIFI_LOG(WIFI_ERROR, "Connection open request in progress"); //LCOV_EXCL_LINE
+               __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
+               return NET_ERR_IN_PROGRESS; //LCOV_EXCL_LINE
+       }
+
+       network_info->request_table[NETWORK_REQUEST_TYPE_OPEN_CONNECTION].flag = TRUE;
 
-       Error = _net_open_connection_with_wifi_info(wifi_info);
+       Error = _net_open_connection_with_wifi_info(network_info, wifi_info);
        if (Error != NET_ERR_NONE) {
                WIFI_LOG(WIFI_ERROR, //LCOV_EXCL_LINE
                                "net_open_connection_with_wifi_info() failed. Error [%s]",
                                _net_print_error(Error));
 
-               if (request_table[NETWORK_REQUEST_TYPE_OPEN_CONNECTION].flag != 0)
-                       memset(&request_table[NETWORK_REQUEST_TYPE_OPEN_CONNECTION], 0, //LCOV_EXCL_LINE
+               if (network_info->request_table[NETWORK_REQUEST_TYPE_OPEN_CONNECTION].flag != 0)
+                       memset(&(network_info->request_table[NETWORK_REQUEST_TYPE_OPEN_CONNECTION]), 0, //LCOV_EXCL_LINE
                                        sizeof(network_request_table_s));
 
                __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
@@ -2096,25 +2073,20 @@ int net_open_connection_with_wifi_info(const net_wifi_connection_info_s *wifi_in
        return NET_ERR_NONE;
 }
 
-int net_wifi_power_on(gboolean wifi_picker_test)
+int net_wifi_power_on(network_info_s *network_info, gboolean wifi_picker_test)
 {
        __NETWORK_FUNC_ENTER__;
 
        net_err_e Error = NET_ERR_NONE;
        int hotspot_state = 0;
 
-       if (NetworkInfo.ref_count < 1) {
-               WIFI_LOG(WIFI_ERROR, "Application is not registered"); //LCOV_EXCL_LINE
-               __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
-               return NET_ERR_APP_NOT_REGISTERED; //LCOV_EXCL_LINE
-       }
-
-       if (!net_get_device_policy_wifi()) {
+       if (!net_get_device_policy_wifi(network_info)) {
                WIFI_LOG(WIFI_ERROR, "Wifi profile device policy restricts"); //LCOV_EXCL_LINE
                __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
                return NET_ERR_SECURITY_RESTRICTED; //LCOV_EXCL_LINE
        }
 
+       /* TODO */
        if (vconf_get_int(VCONFKEY_MOBILE_HOTSPOT_MODE, &hotspot_state) != 0) {
                WIFI_LOG(WIFI_ERROR, "Failed to get vconf key of hotspot mode"); //LCOV_EXCL_LINE
                __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
@@ -2127,36 +2099,36 @@ int net_wifi_power_on(gboolean wifi_picker_test)
                return NET_ERR_INVALID_OPERATION; //LCOV_EXCL_LINE
        }
 
-       if (NetworkInfo.wifi_state != WIFI_OFF) {
-               if ((NetworkInfo.wifi_state = _net_get_wifi_state(&Error)) == WIFI_ON) {
-                       WIFI_LOG(WIFI_ERROR, "Wi-Fi is powered on already!"); //LCOV_EXCL_LINE
-                       __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
-                       return NET_ERR_ALREADY_EXISTS; //LCOV_EXCL_LINE
-               } else if (Error != NET_ERR_NONE) {
-                       WIFI_LOG(WIFI_ERROR, "Failed to get Wi-Fi state"); //LCOV_EXCL_LINE
-                       __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
-                       return Error; //LCOV_EXCL_LINE
-               }
+       Error = __net_get_wifi_state(network_info);
+       if (Error != NET_ERR_NONE) {
+               WIFI_LOG(WIFI_ERROR, "Failed to get Wi-Fi state"); //LCOV_EXCL_LINE
+               __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
+               return Error; //LCOV_EXCL_LINE
+       }
+
+       if (network_info->wifi_state == WIFI_ON) {
+               WIFI_LOG(WIFI_ERROR, "Wi-Fi is powered on already!"); //LCOV_EXCL_LINE
+               __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
+               return NET_ERR_ALREADY_EXISTS; //LCOV_EXCL_LINE
        }
 
-       if (request_table[NETWORK_REQUEST_TYPE_WIFI_POWER].flag == TRUE) {
+       if (network_info->request_table[NETWORK_REQUEST_TYPE_WIFI_POWER].flag == TRUE) {
                WIFI_LOG(WIFI_ERROR, "Request in progress"); //LCOV_EXCL_LINE
                __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
                return NET_ERR_IN_PROGRESS; //LCOV_EXCL_LINE
        }
 
-       _net_dbus_pending_call_unref();
-       memset(request_table, 0, sizeof(request_table));
+       memset(network_info->request_table, 0, sizeof(network_info->request_table));
 
-       request_table[NETWORK_REQUEST_TYPE_WIFI_POWER].flag = TRUE;
+       network_info->request_table[NETWORK_REQUEST_TYPE_WIFI_POWER].flag = TRUE;
 
-       Error = _net_dbus_load_wifi_driver(wifi_picker_test);
+       Error = _net_dbus_load_wifi_driver(network_info, wifi_picker_test);
        if (Error != NET_ERR_NONE) {
                WIFI_LOG(WIFI_ERROR, //LCOV_EXCL_LINE
                                "Failed to request Wi-Fi power on/off. Error [%s]",
                                _net_print_error(Error));
 
-               memset(&request_table[NETWORK_REQUEST_TYPE_WIFI_POWER], 0, //LCOV_EXCL_LINE
+               memset(&(network_info->request_table[NETWORK_REQUEST_TYPE_WIFI_POWER]), 0, //LCOV_EXCL_LINE
                                sizeof(network_request_table_s));
 
                __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
@@ -2167,94 +2139,70 @@ int net_wifi_power_on(gboolean wifi_picker_test)
        return NET_ERR_NONE;
 }
 
-int net_wifi_power_off(void)
+int net_wifi_power_off(network_info_s *network_info)
 {
        __NETWORK_FUNC_ENTER__;
 
        net_err_e Error = NET_ERR_NONE;
 
-       if (NetworkInfo.ref_count < 1) {
-               WIFI_LOG(WIFI_ERROR, "Application is not registered"); //LCOV_EXCL_LINE
+       Error = __net_get_wifi_state(network_info);
+       if (Error != NET_ERR_NONE) {
+               WIFI_LOG(WIFI_ERROR, "Failed to get Wi-Fi state"); //LCOV_EXCL_LINE
+               __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
+               return Error; //LCOV_EXCL_LINE
+       }
+
+       if (network_info->wifi_state == WIFI_OFF) {
+               WIFI_LOG(WIFI_ERROR, "Wi-Fi is powered off already!"); //LCOV_EXCL_LINE
                __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
-               return NET_ERR_APP_NOT_REGISTERED; //LCOV_EXCL_LINE
+               return NET_ERR_ALREADY_EXISTS; //LCOV_EXCL_LINE
        }
 
-       if (NetworkInfo.wifi_state == WIFI_OFF) {
-               if ((NetworkInfo.wifi_state = _net_get_wifi_state(&Error)) == WIFI_OFF) {
-                       WIFI_LOG(WIFI_ERROR, "Wi-Fi is powered off already!"); //LCOV_EXCL_LINE
-                       __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
-                       return NET_ERR_ALREADY_EXISTS; //LCOV_EXCL_LINE
-               }
+       if (network_info->request_table[NETWORK_REQUEST_TYPE_NETLINK_SCAN].flag == TRUE) {
+               WIFI_LOG(WIFI_ERROR, "pending call in progress"); //LCOV_EXCL_LINE
+               __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
+               return NET_ERR_INVALID_OPERATION; //LCOV_EXCL_LINE
        }
 
-       if (request_table[NETWORK_REQUEST_TYPE_WIFI_POWER].flag == TRUE) {
+       if (network_info->request_table[NETWORK_REQUEST_TYPE_WIFI_POWER].flag == TRUE) {
                WIFI_LOG(WIFI_ERROR, "Request in progress"); //LCOV_EXCL_LINE
                __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
                return NET_ERR_IN_PROGRESS; //LCOV_EXCL_LINE
        }
 
-       //LCOV_EXCL_START
-       if (_net_dbus_is_pending_call_used() == TRUE) {
-               if (request_table[NETWORK_REQUEST_TYPE_SCAN].flag == TRUE) {
-                       _net_dbus_pending_call_unref();
-
-                       memset(&request_table[NETWORK_REQUEST_TYPE_SCAN],
-                                       0, sizeof(network_request_table_s));
-               }
-
-               if (request_table[NETWORK_REQUEST_TYPE_OPEN_CONNECTION].flag == TRUE) {
-                       _net_dbus_pending_call_unref();
-
-                       memset(&request_table[NETWORK_REQUEST_TYPE_OPEN_CONNECTION],
-                                       0, sizeof(network_request_table_s));
-               }
-
-               if (request_table[NETWORK_REQUEST_TYPE_ENROLL_WPS].flag == TRUE) {
-                       _net_dbus_pending_call_unref();
-
-                       memset(&request_table[NETWORK_REQUEST_TYPE_ENROLL_WPS],
-                                       0, sizeof(network_request_table_s));
-               }
-
-               if (request_table[NETWORK_REQUEST_TYPE_CLOSE_CONNECTION].flag == TRUE) {
-                       _net_dbus_pending_call_unref();
-
-                       memset(&request_table[NETWORK_REQUEST_TYPE_CLOSE_CONNECTION],
-                                       0, sizeof(network_request_table_s));
-               }
-
-               if (request_table[NETWORK_REQUEST_TYPE_SPECIFIC_SCAN].flag == TRUE) {
-                       _net_dbus_pending_call_unref();
+       if (network_info->request_table[NETWORK_REQUEST_TYPE_SCAN].flag == TRUE)
+               memset(&(network_info->request_table[NETWORK_REQUEST_TYPE_SCAN]),
+                               0, sizeof(network_request_table_s));
 
-                       memset(&request_table[NETWORK_REQUEST_TYPE_SPECIFIC_SCAN],
-                                       0, sizeof(network_request_table_s));
-               }
+       if (network_info->request_table[NETWORK_REQUEST_TYPE_OPEN_CONNECTION].flag == TRUE)
+               memset(&(network_info->request_table[NETWORK_REQUEST_TYPE_OPEN_CONNECTION]),
+                               0, sizeof(network_request_table_s));
 
-               if (request_table[NETWORK_REQUEST_TYPE_BSSID_SCAN].flag == TRUE) {
-                       _net_dbus_pending_call_unref();
+       if (network_info->request_table[NETWORK_REQUEST_TYPE_ENROLL_WPS].flag == TRUE)
+               memset(&(network_info->request_table[NETWORK_REQUEST_TYPE_ENROLL_WPS]),
+                               0, sizeof(network_request_table_s));
 
-                       memset(&request_table[NETWORK_REQUEST_TYPE_BSSID_SCAN],
-                                       0, sizeof(network_request_table_s));
-               }
+       if (network_info->request_table[NETWORK_REQUEST_TYPE_CLOSE_CONNECTION].flag == TRUE)
+               memset(&(network_info->request_table[NETWORK_REQUEST_TYPE_CLOSE_CONNECTION]),
+                               0, sizeof(network_request_table_s));
 
-               if (_net_dbus_is_pending_call_used() == TRUE) {
-                       WIFI_LOG(WIFI_ERROR, "pending call in progress");
+       if (network_info->request_table[NETWORK_REQUEST_TYPE_SPECIFIC_SCAN].flag == TRUE)
+               memset(&(network_info->request_table[NETWORK_REQUEST_TYPE_SPECIFIC_SCAN]),
+                               0, sizeof(network_request_table_s));
 
-                       __NETWORK_FUNC_EXIT__;
-                       return NET_ERR_INVALID_OPERATION;
-               }
-       }
-       //LCOV_EXCL_STOP
+       if (network_info->request_table[NETWORK_REQUEST_TYPE_BSSID_SCAN].flag == TRUE)
+               memset(&(network_info->request_table[NETWORK_REQUEST_TYPE_BSSID_SCAN]),
+                               0, sizeof(network_request_table_s));
 
-       request_table[NETWORK_REQUEST_TYPE_WIFI_POWER].flag = TRUE;
+       network_info->request_table[NETWORK_REQUEST_TYPE_WIFI_POWER].flag = TRUE;
 
-       Error = _net_dbus_remove_wifi_driver();
+       Error = _net_dbus_remove_wifi_driver(network_info);
        if (Error != NET_ERR_NONE) {
                WIFI_LOG(WIFI_ERROR, //LCOV_EXCL_LINE
                                "Failed to request Wi-Fi power on/off. Error [%s]",
                                _net_print_error(Error));
 
-               memset(&request_table[NETWORK_REQUEST_TYPE_WIFI_POWER], //LCOV_EXCL_LINE
+               memset(&(network_info->request_table[NETWORK_REQUEST_TYPE_WIFI_POWER]), //LCOV_EXCL_LINE
                                0, sizeof(network_request_table_s));
 
                __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
@@ -2265,50 +2213,48 @@ int net_wifi_power_off(void)
        return NET_ERR_NONE;
 }
 
-int net_scan_wifi(void)
+int net_scan_wifi(network_info_s *network_info)
 {
        __NETWORK_FUNC_ENTER__;
 
        net_err_e Error = NET_ERR_NONE;
 
-       if (NetworkInfo.ref_count < 1) {
-               WIFI_LOG(WIFI_ERROR, "Application is not registered"); //LCOV_EXCL_LINE
+       Error = __net_get_wifi_state(network_info);
+       if (Error != NET_ERR_NONE) {
+               WIFI_LOG(WIFI_ERROR, "Failed to get Wi-Fi state"); //LCOV_EXCL_LINE
                __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
-               return NET_ERR_APP_NOT_REGISTERED; //LCOV_EXCL_LINE
+               return Error; //LCOV_EXCL_LINE
        }
 
-       if (request_table[NETWORK_REQUEST_TYPE_SCAN].flag == TRUE) {
-               WIFI_LOG(WIFI_ERROR, "Request in progress"); //LCOV_EXCL_LINE
+       if (network_info->wifi_state == WIFI_OFF) {
+               WIFI_LOG(WIFI_ERROR, "Wi-Fi powered off!"); //LCOV_EXCL_LINE
                __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
-               return NET_ERR_IN_PROGRESS; //LCOV_EXCL_LINE
+               return NET_ERR_INVALID_OPERATION; //LCOV_EXCL_LINE
        }
 
-       if (NetworkInfo.wifi_state == WIFI_OFF) {
-               if ((NetworkInfo.wifi_state = _net_get_wifi_state(&Error)) == WIFI_OFF) {
-                       WIFI_LOG(WIFI_ERROR, "Wi-Fi powered off!"); //LCOV_EXCL_LINE
-                       __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
-                       return NET_ERR_INVALID_OPERATION; //LCOV_EXCL_LINE
-               }
+       if (network_info->request_table[NETWORK_REQUEST_TYPE_SPECIFIC_SCAN].flag == TRUE ||
+               network_info->request_table[NETWORK_REQUEST_TYPE_BSSID_SCAN].flag == TRUE ||
+               network_info->request_table[NETWORK_REQUEST_TYPE_NETLINK_SCAN].flag == TRUE ||
+               network_info->request_table[NETWORK_REQUEST_TYPE_MULTI_SCAN].flag == TRUE) {
+               WIFI_LOG(WIFI_ERROR, "pending call in progress"); //LCOV_EXCL_LINE
+               __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
+               return NET_ERR_INVALID_OPERATION; //LCOV_EXCL_LINE
        }
 
-       if (_net_dbus_is_pending_call_used() == TRUE) {
-               if (request_table[NETWORK_REQUEST_TYPE_SCAN].flag == TRUE) {
-                       __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
-                       return NET_ERR_IN_PROGRESS; //LCOV_EXCL_LINE
-               } else {
-                       __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
-                       return NET_ERR_INVALID_OPERATION; //LCOV_EXCL_LINE
-               }
+       if (network_info->request_table[NETWORK_REQUEST_TYPE_SCAN].flag == TRUE) {
+               WIFI_LOG(WIFI_ERROR, "Scan request in progress"); //LCOV_EXCL_LINE
+               __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
+               return NET_ERR_IN_PROGRESS; //LCOV_EXCL_LINE
        }
 
-       request_table[NETWORK_REQUEST_TYPE_SCAN].flag = TRUE;
+       network_info->request_table[NETWORK_REQUEST_TYPE_SCAN].flag = TRUE;
 
-       Error = _net_dbus_scan_request();
+       Error = _net_dbus_scan_request(network_info);
        if (Error != NET_ERR_NONE) {
                WIFI_LOG(WIFI_ERROR, "Failed to request scan. Error [%s]", //LCOV_EXCL_LINE
                                _net_print_error(Error));
 
-               memset(&request_table[NETWORK_REQUEST_TYPE_SCAN], 0, //LCOV_EXCL_LINE
+               memset(&(network_info->request_table[NETWORK_REQUEST_TYPE_SCAN]), 0, //LCOV_EXCL_LINE
                                sizeof(network_request_table_s));
 
                __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
@@ -2319,34 +2265,33 @@ int net_scan_wifi(void)
        return NET_ERR_NONE;
 }
 
-int net_wifi_get_scan_state(int *scanstate)
+int net_wifi_get_scan_state(network_info_s *network_info, int *scanstate)
 {
        __NETWORK_FUNC_ENTER__;
 
        net_err_e Error = NET_ERR_NONE;
 
-       if (NetworkInfo.ref_count < 1) {
-               WIFI_LOG(WIFI_ERROR, "Application is not registered"); //LCOV_EXCL_LINE
+       Error = __net_get_wifi_state(network_info);
+       if (Error != NET_ERR_NONE) {
+               WIFI_LOG(WIFI_ERROR, "Failed to get Wi-Fi state"); //LCOV_EXCL_LINE
                __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
-               return NET_ERR_APP_NOT_REGISTERED; //LCOV_EXCL_LINE
+               return Error; //LCOV_EXCL_LINE
        }
 
-       if (NetworkInfo.wifi_state == WIFI_OFF) {
-               if ((NetworkInfo.wifi_state = _net_get_wifi_state(&Error)) == WIFI_OFF) {
-                       WIFI_LOG(WIFI_ERROR, "Wi-Fi powered off!"); //LCOV_EXCL_LINE
-                       __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
-                       return NET_ERR_INVALID_OPERATION; //LCOV_EXCL_LINE
-               }
+       if (network_info->wifi_state == WIFI_OFF) {
+               WIFI_LOG(WIFI_ERROR, "Wi-Fi powered off!"); //LCOV_EXCL_LINE
+               __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
+               return NET_ERR_INVALID_OPERATION; //LCOV_EXCL_LINE
        }
 
-       if (request_table[NETWORK_REQUEST_TYPE_SCAN].flag == TRUE) {
-               WIFI_LOG(WIFI_ERROR, "Request in progress"); //LCOV_EXCL_LINE
+       if (network_info->request_table[NETWORK_REQUEST_TYPE_SCAN].flag == TRUE) {
+               WIFI_LOG(WIFI_ERROR, "Scan request in progress"); //LCOV_EXCL_LINE
                *scanstate = 1; //LCOV_EXCL_LINE
                __NETWORK_FUNC_EXIT__;
                return NET_ERR_NONE; //LCOV_EXCL_LINE
        }
 
-       Error = _net_dbus_get_scan_state(scanstate);
+       Error = _net_dbus_get_scan_state(network_info, scanstate);
        if (Error != NET_ERR_NONE) {
                WIFI_LOG(WIFI_ERROR, "Failed to get scan state. Error [%s]", //LCOV_EXCL_LINE
                                _net_print_error(Error));
@@ -2360,7 +2305,8 @@ int net_wifi_get_scan_state(int *scanstate)
 }
 
 //LCOV_EXCL_START
-int net_wifi_enroll_wps(const char *profile_name, net_wifi_wps_info_s *wps_info)
+int net_wifi_enroll_wps(network_info_s *network_info,
+               const char *profile_name, net_wifi_wps_info_s *wps_info)
 {
        __NETWORK_FUNC_ENTER__;
 
@@ -2372,48 +2318,49 @@ int net_wifi_enroll_wps(const char *profile_name, net_wifi_wps_info_s *wps_info)
                return NET_ERR_INVALID_PARAM;
        }
 
-       if (NetworkInfo.ref_count < 1) {
-               WIFI_LOG(WIFI_ERROR, "Application is not registered");
+       Error = __net_get_wifi_state(network_info);
+       if (Error != NET_ERR_NONE) {
+               WIFI_LOG(WIFI_ERROR, "Failed to get Wi-Fi state");
                __NETWORK_FUNC_EXIT__;
-               return NET_ERR_APP_NOT_REGISTERED;
+               return Error;
        }
 
-       if (request_table[NETWORK_REQUEST_TYPE_ENROLL_WPS].flag == TRUE) {
-               WIFI_LOG(WIFI_ERROR, "Request in progress");
+       if (network_info->wifi_state == WIFI_OFF) {
+               WIFI_LOG(WIFI_ERROR, "Wi-Fi powered off!");
                __NETWORK_FUNC_EXIT__;
-               return NET_ERR_IN_PROGRESS;
+               return NET_ERR_INVALID_OPERATION;
        }
 
-       if (NetworkInfo.wifi_state == WIFI_OFF) {
-               if ((NetworkInfo.wifi_state = _net_get_wifi_state(&Error)) == WIFI_OFF) {
-                       WIFI_LOG(WIFI_ERROR, "Wi-Fi is powered off!");
-                       __NETWORK_FUNC_EXIT__;
-                       return NET_ERR_INVALID_OPERATION;
-               }
+       if (network_info->request_table[NETWORK_REQUEST_TYPE_WIFI_POWER].flag == TRUE ||
+               network_info->request_table[NETWORK_REQUEST_TYPE_CLOSE_CONNECTION].flag == TRUE ||
+               network_info->request_table[NETWORK_REQUEST_TYPE_OPEN_CONNECTION].flag == TRUE ||
+               network_info->request_table[NETWORK_REQUEST_TYPE_FORGET_AP].flag == TRUE) {
+               WIFI_LOG(WIFI_ERROR, "pending call in progress"); //LCOV_EXCL_LINE
+               __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
+               return NET_ERR_INVALID_OPERATION; //LCOV_EXCL_LINE
        }
 
-       if (_net_dbus_is_pending_call_used() == TRUE) {
-               WIFI_LOG(WIFI_ERROR, "pending call in progress");
+       if (network_info->request_table[NETWORK_REQUEST_TYPE_ENROLL_WPS].flag == TRUE) {
+               WIFI_LOG(WIFI_ERROR, "Request in progress");
                __NETWORK_FUNC_EXIT__;
-               return NET_ERR_INVALID_OPERATION;
+               return NET_ERR_IN_PROGRESS;
        }
 
-       request_table[NETWORK_REQUEST_TYPE_ENROLL_WPS].flag = TRUE;
-       g_strlcpy(request_table[NETWORK_REQUEST_TYPE_ENROLL_WPS].ProfileName,
+       network_info->request_table[NETWORK_REQUEST_TYPE_ENROLL_WPS].flag = TRUE;
+       g_strlcpy(network_info->request_table[NETWORK_REQUEST_TYPE_ENROLL_WPS].ProfileName,
                        profile_name, NET_PROFILE_NAME_LEN_MAX+1);
 
        if (wps_info->type == WIFI_WPS_PBC)
-               Error = _net_dbus_set_agent_wps_pbc_and_connect(profile_name);
+               Error = _net_dbus_set_agent_wps_pbc_and_connect(network_info, profile_name);
        else if (wps_info->type == WIFI_WPS_PIN)
-               Error = _net_dbus_set_agent_wps_pin_and_connect(wps_info->pin, profile_name);
+               Error = _net_dbus_set_agent_wps_pin_and_connect(network_info, wps_info->pin, profile_name);
        else
                Error = NET_ERR_INVALID_PARAM;
 
        if (NET_ERR_NONE != Error) {
-               WIFI_LOG(WIFI_ERROR,
-                               "WPS configuration failed(%s)", _net_print_error(Error));
+               WIFI_LOG(WIFI_ERROR, "WPS configuration failed(%s)", _net_print_error(Error));
 
-               memset(&request_table[NETWORK_REQUEST_TYPE_ENROLL_WPS], 0,
+               memset(&(network_info->request_table[NETWORK_REQUEST_TYPE_ENROLL_WPS]), 0,
                                sizeof(network_request_table_s));
        }
 
@@ -2421,68 +2368,65 @@ int net_wifi_enroll_wps(const char *profile_name, net_wifi_wps_info_s *wps_info)
        return Error;
 }
 
-int net_wifi_cancel_wps(void)
+int net_wifi_cancel_wps(network_info_s *network_info)
 {
        __NETWORK_FUNC_ENTER__;
 
        net_err_e Error = NET_ERR_NONE;
-       WIFI_LOG(WIFI_ERROR, "net_wifi_wps_cancel called\n");
 
-       if (g_atomic_int_get(&NetworkInfo.ref_count) == 0) {
-               WIFI_LOG(WIFI_ERROR, "Application is not registered\n");
-               __NETWORK_FUNC_EXIT__;
-               return NET_ERR_APP_NOT_REGISTERED;
-       }
+       WIFI_LOG(WIFI_INFO, "net_wifi_wps_cancel called");
 
-       if (request_table[NETWORK_REQUEST_TYPE_ENROLL_WPS].flag == FALSE) {
-               WIFI_LOG(WIFI_ERROR, "No pending call in progress\n");
-               __NETWORK_FUNC_EXIT__;
-               return NET_ERR_INVALID_OPERATION;
+       Error = __net_get_wifi_state(network_info);
+       if (Error != NET_ERR_NONE) {
+               WIFI_LOG(WIFI_ERROR, "Failed to get Wi-Fi state"); //LCOV_EXCL_LINE
+               __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
+               return Error; //LCOV_EXCL_LINE
        }
 
-       if (_net_get_wifi_state(&Error) != WIFI_ON) {
-               WIFI_LOG(WIFI_ERROR, "Wi-Fi is powered off!\n");
-               __NETWORK_FUNC_EXIT__;
-               return NET_ERR_INVALID_OPERATION;
+       if (network_info->wifi_state != WIFI_ON) {
+               WIFI_LOG(WIFI_ERROR, "Wi-Fi powered off!"); //LCOV_EXCL_LINE
+               __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
+               return NET_ERR_INVALID_OPERATION; //LCOV_EXCL_LINE
        }
 
-       if (_net_dbus_is_pending_call_used() == TRUE) {
-               WIFI_LOG(WIFI_ERROR, "pending call in progress\n");
+       if (network_info->request_table[NETWORK_REQUEST_TYPE_ENROLL_WPS].flag == FALSE) {
+               WIFI_LOG(WIFI_ERROR, "No pending call in progress");
                __NETWORK_FUNC_EXIT__;
                return NET_ERR_INVALID_OPERATION;
        }
 
-       if (request_table[NETWORK_REQUEST_TYPE_ENROLL_WPS].ProfileName[0] != '\0')
-               net_delete_profile(request_table[NETWORK_REQUEST_TYPE_ENROLL_WPS].ProfileName);
+       if (network_info->request_table[NETWORK_REQUEST_TYPE_ENROLL_WPS].ProfileName[0] != '\0')
+               net_delete_profile(network_info, network_info->request_table[NETWORK_REQUEST_TYPE_ENROLL_WPS].ProfileName);
 
-       Error = _net_dbus_cancel_wps();
+       Error = _net_dbus_cancel_wps(network_info);
        if (Error != NET_ERR_NONE) {
                WIFI_LOG(WIFI_ERROR,
-                       "Failed to request cancel WPS, Error [%s]\n",
+                       "Failed to request cancel WPS, Error [%s]",
                        _net_print_error(Error));
        }
 
-       memset(&request_table[NETWORK_REQUEST_TYPE_ENROLL_WPS], 0,
+       memset(&(network_info->request_table[NETWORK_REQUEST_TYPE_ENROLL_WPS]), 0,
                        sizeof(network_request_table_s));
 
        __NETWORK_FUNC_EXIT__;
        return Error;
 }
 
-wifi_tech_state_e wifi_state_get_technology_state(void)
+wifi_tech_state_e net_get_technology_state(network_info_s *network_info)
 {
        GVariant *message = NULL, *variant;
        GVariantIter *iter, *next;
-       wifi_tech_state_e ret = WIFI_TECH_OFF;
+       wifi_tech_state_e tech_state = WIFI_TECH_OFF;
        gboolean wifi_tech_powered = FALSE;
        gboolean wifi_tech_connected = FALSE;
        const char *path;
        gchar *key;
        net_err_e Error = NET_ERR_NONE;
 
-       message = _net_invoke_dbus_method(CONNMAN_SERVICE,
-                       CONNMAN_MANAGER_PATH, CONNMAN_MANAGER_INTERFACE,
-                       "GetTechnologies", NULL, &Error);
+       message = _net_invoke_dbus_method(network_info,
+                       CONNMAN_SERVICE, CONNMAN_MANAGER_PATH,
+                       CONNMAN_MANAGER_INTERFACE, "GetTechnologies",
+                       NULL, &Error);
 
        if (message == NULL) {
                WIFI_LOG(WIFI_ERROR, "Failed to get_technology_state");
@@ -2495,23 +2439,35 @@ wifi_tech_state_e wifi_state_get_technology_state(void)
                        continue;
 
                while (g_variant_iter_loop(next, "{sv}", &key, &variant)) {
-                       const gchar *sdata = NULL;
-                       gboolean data;
-
-                       if (g_variant_is_of_type(variant, G_VARIANT_TYPE_BOOLEAN)) {
-                               data = g_variant_get_boolean(variant);
-                               WIFI_LOG(WIFI_INFO, "key-[%s] - %s", key, data ? "True" : "False");
-
-                               if (strcmp(key, "Powered") == 0 && data)
-                                       wifi_tech_powered = TRUE;
-                               else if (strcmp(key, "Connected") == 0 && data)
-                                       wifi_tech_connected = TRUE;
-                               /* For further use
-                               else if (strcmp(key, "Tethering") == 0 && data) {
-                               } */
-                       } else if (g_variant_is_of_type(variant, G_VARIANT_TYPE_STRING)) {
-                               sdata = g_variant_get_string(variant, NULL);
-                               WIFI_LOG(WIFI_INFO, "%s", sdata);
+                       if (g_strcmp0(key, "Device.List") == 0) {
+                               GVariantIter *list_iter = NULL;
+                               gchar *dev_key = NULL;
+                               GVariant *dev_var = NULL;
+                               const gchar *sdata = NULL;
+                               gboolean bdata = FALSE;
+                               gboolean find = FALSE;
+
+                               g_variant_get(variant, "a{sv}", &list_iter);
+                               while(g_variant_iter_loop(list_iter, "{sv}", &dev_key, &dev_var)) {
+                                       if (g_variant_is_of_type(dev_var, G_VARIANT_TYPE_STRING)) {
+                                               sdata = g_variant_get_string(dev_var, NULL);
+                                               WIFI_LOG(WIFI_INFO, "%s [%s]", dev_key, sdata);
+
+                                               if (g_strcmp0(dev_key, "Ifname") == 0) {
+                                                       find = g_strcmp0(sdata, network_info->interface_name) == 0 ? TRUE : FALSE;
+                                               }
+                                       } else if (g_variant_is_of_type(dev_var, G_VARIANT_TYPE_BOOLEAN)) {
+                                               bdata = g_variant_get_boolean(dev_var);
+                                               WIFI_LOG(WIFI_INFO, "%s [%s]", dev_key, bdata ? "True" : "False");
+
+                                               if (find && g_strcmp0(dev_key, "Powered") == 0) {
+                                                       wifi_tech_powered = bdata;
+                                               } else if (find && g_strcmp0(dev_key, "Connected") == 0) {
+                                                       wifi_tech_connected = bdata;
+                                               }
+                                       }
+                               }
+                               g_variant_iter_free(list_iter);
                        }
                }
        }
@@ -2521,56 +2477,34 @@ wifi_tech_state_e wifi_state_get_technology_state(void)
        g_variant_iter_free(iter);
 
        if (wifi_tech_powered == TRUE)
-               ret = WIFI_TECH_POWERED;
+               tech_state = WIFI_TECH_POWERED;
 
        if (wifi_tech_connected == TRUE)
-               ret = WIFI_TECH_CONNECTED;
-
-       g_tech_state = ret;
+               tech_state = WIFI_TECH_CONNECTED;
 
-       return g_tech_state;
+       return tech_state;
 }
 
-int net_get_wifi_power_state(net_wifi_state_e *current_state)
+int net_check_get_privilege(network_info_s *network_info)
 {
-       __NETWORK_FUNC_ENTER__;
-
        net_err_e Error = NET_ERR_NONE;
 
-       if (NetworkInfo.ref_count < 1) {
-               WIFI_LOG(WIFI_ERROR, "Application is not registered");
-               __NETWORK_FUNC_EXIT__;
-               return NET_ERR_APP_NOT_REGISTERED;
-       }
-
-       *current_state = _net_get_wifi_state(&Error);
-
-       __NETWORK_FUNC_EXIT__;
-       return Error;
-}
-
-int net_check_get_privilege()
-{
-       net_err_e Error = NET_ERR_NONE;
-
-       Error = __net_check_get_privilege();
+       Error = __net_check_get_privilege(network_info);
        if (Error != NET_ERR_NONE) {
                WIFI_LOG(WIFI_ERROR, "Failed to check get privilege. Error [%s]", //LCOV_EXCL_LINE
-               _net_print_error(Error));
-
-               return Error; //LCOV_EXCL_LINE
+               _net_print_error(Error)); //LCOV_EXCL_LINE
        }
 
        return Error;
 }
 
-int net_set_ip_conflict_detect_mode(gboolean detect)
+int net_set_ip_conflict_detect_mode(network_info_s *network_info, gboolean detect)
 {
        __NETWORK_FUNC_ENTER__;
 
        net_err_e Error = NET_ERR_NONE;
 
-       Error = __net_set_ip_conflict_detect_mode(detect);
+       Error = __net_set_ip_conflict_detect_mode(network_info, detect);
        if (Error != NET_ERR_NONE) {
                WIFI_LOG(WIFI_ERROR, "Failed to set ip conflict detection enable, Error [%s]", //LCOV_EXCL_LINE
                _net_print_error(Error));
@@ -2582,13 +2516,13 @@ int net_set_ip_conflict_detect_mode(gboolean detect)
        return Error;
 }
 
-int net_ip_conflict_detect_is_enabled(gboolean *state)
+int net_ip_conflict_detect_is_enabled(network_info_s *network_info, gboolean *state)
 {
        __NETWORK_FUNC_ENTER__;
 
        net_err_e Error = NET_ERR_NONE;
 
-       Error = __net_ip_conflict_detect_is_enabled(state);
+       Error = __net_ip_conflict_detect_is_enabled(network_info, state);
        if (Error != NET_ERR_NONE) {
                WIFI_LOG(WIFI_ERROR, "Failed to get ip conflict detection mode, Error [%s]", //LCOV_EXCL_LINE
                _net_print_error(Error));
@@ -2600,59 +2534,62 @@ int net_ip_conflict_detect_is_enabled(gboolean *state)
        return Error;
 }
 
-int net_check_profile_privilege()
+int net_check_profile_privilege(network_info_s *network_info)
 {
        net_err_e Error = NET_ERR_NONE;
 
-       Error = __net_check_profile_privilege();
+       Error = __net_check_profile_privilege(network_info);
        if (Error != NET_ERR_NONE) {
                WIFI_LOG(WIFI_ERROR, "Failed to check profile privilege. Error [%s]", //LCOV_EXCL_LINE
-               _net_print_error(Error));
-
-               return Error; //LCOV_EXCL_LINE
+               _net_print_error(Error)); //LCOV_EXCL_LINE
        }
 
        return Error;
 }
 
-int net_wifi_enroll_wps_without_ssid(net_wifi_wps_info_s *wps_info)
+int net_wifi_enroll_wps_without_ssid(network_info_s *network_info,
+               net_wifi_wps_info_s *wps_info)
 {
        __NETWORK_FUNC_ENTER__;
 
        net_err_e Error = NET_ERR_NONE;
 
-       if (g_atomic_int_get(&NetworkInfo.ref_count) == 0) {
-               WIFI_LOG(WIFI_ERROR, "Application is not registered\n");
-               __NETWORK_FUNC_EXIT__;
-               return NET_ERR_APP_NOT_REGISTERED;
+       Error = __net_get_wifi_state(network_info);
+       if (Error != NET_ERR_NONE) {
+               WIFI_LOG(WIFI_ERROR, "Failed to get Wi-Fi state"); //LCOV_EXCL_LINE
+               __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
+               return Error; //LCOV_EXCL_LINE
        }
 
-       if (request_table[NETWORK_REQUEST_TYPE_ENROLL_WPS].flag == TRUE) {
-               WIFI_LOG(WIFI_ERROR, "Request in progress\n");
-               __NETWORK_FUNC_EXIT__;
-               return NET_ERR_IN_PROGRESS;
+       if (network_info->wifi_state != WIFI_ON) {
+               WIFI_LOG(WIFI_ERROR, "Wi-Fi powered off!"); //LCOV_EXCL_LINE
+               __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
+               return NET_ERR_INVALID_OPERATION; //LCOV_EXCL_LINE
        }
 
-       if (_net_get_wifi_state(&Error) != WIFI_ON) {
-               WIFI_LOG(WIFI_ERROR, "Wi-Fi is powered off!\n");
-               __NETWORK_FUNC_EXIT__;
-               return NET_ERR_INVALID_OPERATION;
+       if (network_info->request_table[NETWORK_REQUEST_TYPE_WIFI_POWER].flag == TRUE ||
+               network_info->request_table[NETWORK_REQUEST_TYPE_CLOSE_CONNECTION].flag == TRUE ||
+               network_info->request_table[NETWORK_REQUEST_TYPE_OPEN_CONNECTION].flag == TRUE ||
+               network_info->request_table[NETWORK_REQUEST_TYPE_FORGET_AP].flag == TRUE) {
+               WIFI_LOG(WIFI_ERROR, "pending call in progress"); //LCOV_EXCL_LINE
+               __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
+               return NET_ERR_INVALID_OPERATION; //LCOV_EXCL_LINE
        }
 
-       if (_net_dbus_is_pending_call_used() == TRUE) {
-               WIFI_LOG(WIFI_ERROR, "pending call in progress\n");
+       if (network_info->request_table[NETWORK_REQUEST_TYPE_ENROLL_WPS].flag == TRUE) {
+               WIFI_LOG(WIFI_ERROR, "Request in progress");
                __NETWORK_FUNC_EXIT__;
-               return NET_ERR_INVALID_OPERATION;
+               return NET_ERR_IN_PROGRESS;
        }
 
-       memset(&request_table[NETWORK_REQUEST_TYPE_ENROLL_WPS], 0,
+       memset(&(network_info->request_table[NETWORK_REQUEST_TYPE_ENROLL_WPS]), 0,
                                                sizeof(network_request_table_s));
-       request_table[NETWORK_REQUEST_TYPE_ENROLL_WPS].flag = TRUE;
+       network_info->request_table[NETWORK_REQUEST_TYPE_ENROLL_WPS].flag = TRUE;
 
        if (wps_info->type == WIFI_WPS_PBC) {
-               Error = _net_dbus_open_connection_without_ssid();
+               Error = _net_dbus_open_connection_without_ssid(network_info);
        } else if (wps_info->type == WIFI_WPS_PIN) {
-               Error = _net_dbus_open_pin_connection_without_ssid(wps_info->pin);
+               Error = _net_dbus_open_pin_connection_without_ssid(network_info, wps_info->pin);
        } else{
                __NETWORK_FUNC_EXIT__;
                return NET_ERR_INVALID_PARAM;
@@ -2660,10 +2597,10 @@ int net_wifi_enroll_wps_without_ssid(net_wifi_wps_info_s *wps_info)
 
        if (Error != NET_ERR_NONE) {
                WIFI_LOG(WIFI_ERROR,
-                               "Failed to request open connection, Error [%s]\n",
+                               "Failed to request open connection, Error [%s]",
                                _net_print_error(Error));
 
-               memset(&request_table[NETWORK_REQUEST_TYPE_ENROLL_WPS], 0,
+               memset(&(network_info->request_table[NETWORK_REQUEST_TYPE_ENROLL_WPS]), 0,
                                sizeof(network_request_table_s));
        }
 
@@ -2671,28 +2608,22 @@ int net_wifi_enroll_wps_without_ssid(net_wifi_wps_info_s *wps_info)
        return Error;
 }
 
-int net_wifi_tdls_disconnect(const char* peer_mac_addr)
+int net_wifi_tdls_disconnect(network_info_s *network_info, const char* peer_mac_addr)
 {
        __NETWORK_FUNC_ENTER__;
 
        net_err_e Error = NET_ERR_NONE;
 
        if (peer_mac_addr == NULL) {
-               WIFI_LOG(WIFI_ERROR, "invalid parameter\n");
+               WIFI_LOG(WIFI_ERROR, "invalid parameter");
                __NETWORK_FUNC_EXIT__;
                return NET_ERR_INVALID_PARAM;
        }
 
-       if (g_atomic_int_get(&NetworkInfo.ref_count) == 0) {
-               WIFI_LOG(WIFI_ERROR, "Application is not registered\n");
-               __NETWORK_FUNC_EXIT__;
-               return NET_ERR_APP_NOT_REGISTERED;
-       }
-
-       Error = _net_dbus_tdls_disconnect(peer_mac_addr);
+       Error = _net_dbus_tdls_disconnect(network_info, peer_mac_addr);
 
        if (Error != NET_ERR_NONE)
-               WIFI_LOG(WIFI_ERROR, "_net_dbus_tdls_set_device_type failed\n");
+               WIFI_LOG(WIFI_ERROR, "_net_dbus_tdls_set_device_type failed");
 
 
        __NETWORK_FUNC_EXIT__;
@@ -2700,28 +2631,22 @@ int net_wifi_tdls_disconnect(const char* peer_mac_addr)
 
 }
 
-int net_wifi_tdls_connected_peer(char** peer_mac_addr)
+int net_wifi_tdls_connected_peer(network_info_s *network_info, char** peer_mac_addr)
 {
        __NETWORK_FUNC_ENTER__;
 
        net_err_e Error = NET_ERR_NONE;
 
        if (peer_mac_addr == NULL) {
-               WIFI_LOG(WIFI_ERROR, "invalid parameter\n");
+               WIFI_LOG(WIFI_ERROR, "invalid parameter");
                __NETWORK_FUNC_EXIT__;
                return NET_ERR_INVALID_PARAM;
        }
 
-       if (g_atomic_int_get(&NetworkInfo.ref_count) == 0) {
-               WIFI_LOG(WIFI_ERROR, "Application is not registered\n");
-               __NETWORK_FUNC_EXIT__;
-               return NET_ERR_APP_NOT_REGISTERED;
-       }
-
-       Error = _net_dbus_tdls_connected_peer(peer_mac_addr);
+       Error = _net_dbus_tdls_connected_peer(network_info, peer_mac_addr);
 
        if (Error != NET_ERR_NONE)
-               WIFI_LOG(WIFI_ERROR, "net_wifi_tdls_connected_peer failed\n");
+               WIFI_LOG(WIFI_ERROR, "net_wifi_tdls_connected_peer failed");
 
 
        __NETWORK_FUNC_EXIT__;
@@ -2729,55 +2654,44 @@ int net_wifi_tdls_connected_peer(char** peer_mac_addr)
 
 }
 
-int net_wifi_tdls_enable_channel_switch(const char* peer_mac_addr, int freq)
+int net_wifi_tdls_enable_channel_switch(network_info_s *network_info,
+               const char* peer_mac_addr, int freq)
 {
        __NETWORK_FUNC_ENTER__;
 
        net_err_e Error = NET_ERR_NONE;
 
        if (peer_mac_addr == NULL || freq < 0) {
-               WIFI_LOG(WIFI_ERROR, "invalid parameter\n");
+               WIFI_LOG(WIFI_ERROR, "invalid parameter");
                __NETWORK_FUNC_EXIT__;
                return NET_ERR_INVALID_PARAM;
        }
 
-       if (g_atomic_int_get(&NetworkInfo.ref_count) == 0) {
-               WIFI_LOG(WIFI_ERROR, "Application is not registered\n");
-               __NETWORK_FUNC_EXIT__;
-               return NET_ERR_APP_NOT_REGISTERED;
-       }
-
-       Error = _net_dbus_tdls_enable_channel_switch(peer_mac_addr, freq);
+       Error = _net_dbus_tdls_enable_channel_switch(network_info, peer_mac_addr, freq);
        if (Error != NET_ERR_NONE)
-               WIFI_LOG(WIFI_ERROR, "net_wifi_tdls_enable_channel_switch failed\n");
+               WIFI_LOG(WIFI_ERROR, "net_wifi_tdls_enable_channel_switch failed");
 
        __NETWORK_FUNC_EXIT__;
        return Error;
 
 }
 
-int net_wifi_tdls_disbale_channel_switch(const char* peer_mac_addr)
+int net_wifi_tdls_disbale_channel_switch(network_info_s *network_info,
+               const char* peer_mac_addr)
 {
        __NETWORK_FUNC_ENTER__;
 
        net_err_e Error = NET_ERR_NONE;
 
        if (peer_mac_addr == NULL) {
-               WIFI_LOG(WIFI_ERROR, "invalid parameter\n");
+               WIFI_LOG(WIFI_ERROR, "invalid parameter");
                __NETWORK_FUNC_EXIT__;
                return NET_ERR_INVALID_PARAM;
        }
 
-       if (g_atomic_int_get(&NetworkInfo.ref_count) == 0) {
-               WIFI_LOG(WIFI_ERROR, "Application is not registered\n");
-               __NETWORK_FUNC_EXIT__;
-               return NET_ERR_APP_NOT_REGISTERED;
-       }
-
-       Error = _net_dbus_tdls_disable_channel_switch(peer_mac_addr);
-
+       Error = _net_dbus_tdls_disable_channel_switch(network_info, peer_mac_addr);
        if (Error != NET_ERR_NONE)
-               WIFI_LOG(WIFI_ERROR, "net_wifi_tdls_disbale_channel_switch failed\n");
+               WIFI_LOG(WIFI_ERROR, "net_wifi_tdls_disbale_channel_switch failed");
 
 
        __NETWORK_FUNC_EXIT__;
@@ -2786,22 +2700,21 @@ int net_wifi_tdls_disbale_channel_switch(const char* peer_mac_addr)
 }
 
 
-int net_wifi_tdls_connect(const char* peer_mac_addr)
+int net_wifi_tdls_connect(network_info_s *network_info, const char* peer_mac_addr)
 {
        __NETWORK_FUNC_ENTER__;
 
        net_err_e Error = NET_ERR_NONE;
 
        if (peer_mac_addr == NULL) {
-               WIFI_LOG(WIFI_ERROR, "invalid parameter\n");
+               WIFI_LOG(WIFI_ERROR, "invalid parameter");
                __NETWORK_FUNC_EXIT__;
                return NET_ERR_INVALID_PARAM;
        }
 
-       Error = _net_dbus_tdls_connect(peer_mac_addr);
-
+       Error = _net_dbus_tdls_connect(network_info, peer_mac_addr);
        if (Error != NET_ERR_NONE)
-               WIFI_LOG(WIFI_ERROR, "_net_dbus_tdls_connect failed\n");
+               WIFI_LOG(WIFI_ERROR, "_net_dbus_tdls_connect failed");
 
 
        __NETWORK_FUNC_EXIT__;
@@ -2809,33 +2722,31 @@ int net_wifi_tdls_connect(const char* peer_mac_addr)
 
 }
 
-int net_wifi_tdls_discover(const char* peer_mac_addr)
+int net_wifi_tdls_discover(network_info_s *network_info, const char* peer_mac_addr)
 {
        __NETWORK_FUNC_ENTER__;
 
        net_err_e Error = NET_ERR_NONE;
 
        if (peer_mac_addr == NULL) {
-               WIFI_LOG(WIFI_ERROR, "invalid parameter\n");
+               WIFI_LOG(WIFI_ERROR, "invalid parameter");
                __NETWORK_FUNC_EXIT__;
                return NET_ERR_INVALID_PARAM;
        }
 
-
-       if (request_table[NETWORK_REQUEST_TYPE_TDLS_DISCOVERY].flag == TRUE) {
+       if (network_info->request_table[NETWORK_REQUEST_TYPE_TDLS_DISCOVERY].flag == TRUE) {
                WIFI_LOG(WIFI_ERROR, "TDLS Discovery Request in progress"); //LCOV_EXCL_LINE
                __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
                return NET_ERR_IN_PROGRESS; //LCOV_EXCL_LINE
        }
 
-       request_table[NETWORK_REQUEST_TYPE_TDLS_DISCOVERY].flag = TRUE;
-
-       Error = _net_dbus_tdls_discover(peer_mac_addr);
+       network_info->request_table[NETWORK_REQUEST_TYPE_TDLS_DISCOVERY].flag = TRUE;
 
+       Error = _net_dbus_tdls_discover(network_info, peer_mac_addr);
        if (Error != NET_ERR_NONE) {
-               WIFI_LOG(WIFI_ERROR, "_net_dbus_tdls_discover failed\n");
+               WIFI_LOG(WIFI_ERROR, "_net_dbus_tdls_discover failed");
 
-               memset(&request_table[NETWORK_REQUEST_TYPE_TDLS_DISCOVERY], 0, //LCOV_EXCL_LINE
+               memset(&(network_info->request_table[NETWORK_REQUEST_TYPE_TDLS_DISCOVERY]), 0, //LCOV_EXCL_LINE
                                sizeof(network_request_table_s));
 
                __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
@@ -2845,48 +2756,52 @@ int net_wifi_tdls_discover(const char* peer_mac_addr)
        __NETWORK_FUNC_EXIT__;
        return Error;
 }
-int net_get_device_policy_wifi(void)
+int net_get_device_policy_wifi(network_info_s *network_info)
 {
        __NETWORK_FUNC_ENTER__;
 
        int state = -1;
-       net_err_e Error = _net_dbus_device_policy_get_wifi(&state);
+       net_err_e Error = _net_dbus_device_policy_get_wifi(network_info, &state);
 
        if (Error != NET_ERR_NONE) {
-               WIFI_LOG(WIFI_ERROR, "_net_dbus_device_policy_get_wifi failed\n");
+               WIFI_LOG(WIFI_ERROR, "_net_dbus_device_policy_get_wifi failed");
                state = TRUE;
        }
 
-       WIFI_LOG(WIFI_INFO, "Wifi device policy state [%d]\n", state);
+       WIFI_LOG(WIFI_INFO, "Wifi device policy state [%d]", state);
 
        __NETWORK_FUNC_EXIT__;
        return state;
 }
 
-int net_get_device_policy_wifi_profile(void)
+int net_get_device_policy_wifi_profile(network_info_s *network_info)
 {
        __NETWORK_FUNC_ENTER__;
 
        int state = -1;
-       net_err_e Error = _net_dbus_device_policy_get_wifi_profile(&state);
+       net_err_e Error = _net_dbus_device_policy_get_wifi_profile(network_info, &state);
 
        if (Error != NET_ERR_NONE) {
-               WIFI_LOG(WIFI_ERROR, "_net_dbus_device_policy_get_wifi_profile failed\n");
+               WIFI_LOG(WIFI_ERROR, "_net_dbus_device_policy_get_wifi_profile failed");
                state = TRUE;
        }
 
-       WIFI_LOG(WIFI_INFO, "Wifi profile policy state [%d]\n", state);
+       WIFI_LOG(WIFI_INFO, "Wifi profile policy state [%d]", state);
 
        __NETWORK_FUNC_EXIT__;
        return state;
 }
 //LCOV_EXCL_STOP
 
-int net_register_client_ext(net_event_cb event_cb, void *user_data)
+int net_register_client_ext(network_info_s **network_info,
+               const char *interface_name, net_event_cb event_cb, void *user_data)
 {
        __NETWORK_FUNC_ENTER__;
 
        net_err_e Error = NET_ERR_NONE;
+       network_info_s *net_info = NULL;
+       GSList *list = NULL;
+       GSList *interface_list = NULL;
 
        if (event_cb == NULL) {
                WIFI_LOG(WIFI_ERROR, "Invalid EventCb parameter"); //LCOV_EXCL_LINE
@@ -2894,86 +2809,99 @@ int net_register_client_ext(net_event_cb event_cb, void *user_data)
                return NET_ERR_INVALID_PARAM; //LCOV_EXCL_LINE
        }
 
-       if (NetworkInfo.ClientEventCb_wifi != NULL) {
-               WIFI_LOG(WIFI_ERROR, "Wi-Fi EventCb Already registered"); //LCOV_EXCL_LINE
+       net_info = g_try_malloc0(sizeof(network_info_s));
+       if (net_info == NULL) {
+               WIFI_LOG(WIFI_ERROR, "Failed to allocate memory"); //LCOV_EXCL_LINE
                __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
-               return NET_ERR_APP_ALREADY_REGISTERED; //LCOV_EXCL_LINE
+               return NET_ERR_OUT_OF_MEMORY; //LCOV_EXCL_LINE
        }
 
-       if (NetworkInfo.ref_count < 1) {
-               Error = _net_register_signal();
-               if (Error != NET_ERR_NONE && Error != NET_ERR_APP_ALREADY_REGISTERED) {
-                       WIFI_LOG(WIFI_ERROR, "Failed to register DBus signal [%s]", //LCOV_EXCL_LINE
-                                       _net_print_error(Error));
-                       __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
-                       return Error; //LCOV_EXCL_LINE
-               }
-
-               Error = _net_init_service_state();
-               if (Error != NET_ERR_NONE) {
-                       WIFI_LOG(WIFI_ERROR, "Failed to init service state [%s]", //LCOV_EXCL_LINE
-                                       _net_print_error(Error));
-                       _net_deregister_signal();
-                       __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
-                       return Error; //LCOV_EXCL_LINE
-               }
+       Error = _net_dbus_create_gdbus_call(net_info);
+       if (Error != NET_ERR_NONE) {
+               g_free(net_info); //LCOV_EXCL_LINE
+               __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
+               return Error; //LCOV_EXCL_LINE
        }
 
-       NetworkInfo.ClientEventCb_wifi = event_cb;
-       NetworkInfo.user_data_wifi = user_data;
-
-       __sync_fetch_and_add(&NetworkInfo.ref_count, 1);
+       Error = _net_get_interface_list(net_info, &interface_list);
+       if (Error != NET_ERR_NONE) {
+               WIFI_LOG(WIFI_ERROR, "Failed to get interface list. Error [%s]", //LCOV_EXCL_LINE
+                               _net_print_error(Error));
+               _net_dbus_close_gdbus_call(net_info); //LCOV_EXCL_LINE
+               g_free(net_info); //LCOV_EXCL_LINE
+               __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
+               return Error; //LCOV_EXCL_LINE
+       }
 
-       __NETWORK_FUNC_EXIT__;
-       return NET_ERR_NONE;
-}
+       for (list = interface_list; list; list = list->next) {
+               const char *ifname = list->data;
+               if (interface_name == NULL || !g_strcmp0(interface_name, ifname)) {
+                       g_strlcpy(net_info->interface_name, ifname, NET_WLAN_IF_NAME_LEN + 1);
+                       WIFI_LOG(WIFI_INFO, "Set interface name [%s]", ifname);
+                       break;
+               }
+       }
 
-int net_deregister_client_ext()
-{
-       __NETWORK_FUNC_ENTER__;
+       if (list == NULL) {
+               WIFI_LOG(WIFI_ERROR, "Failed to find interface [%s]", interface_name);  //LCOV_EXCL_LINE
+               _net_dbus_close_gdbus_call(net_info); //LCOV_EXCL_LINE
+               g_free(net_info); //LCOV_EXCL_LINE
+               __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
+               return NET_ERR_INVALID_OPERATION; //LCOV_EXCL_LINE
+       }
 
-       if (NetworkInfo.ref_count < 1) {
-               WIFI_LOG(WIFI_ERROR, "Application is not registered"); //LCOV_EXCL_LINE
+       Error = _net_register_signal(net_info);
+       if (Error != NET_ERR_NONE) {
+               WIFI_LOG(WIFI_ERROR, "Failed to register DBus signal [%s]", //LCOV_EXCL_LINE
+                               _net_print_error(Error));
+               _net_dbus_close_gdbus_call(net_info); //LCOV_EXCL_LINE
+               g_free(net_info); //LCOV_EXCL_LINE
                __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
-               return NET_ERR_APP_NOT_REGISTERED; //LCOV_EXCL_LINE
+               return Error; //LCOV_EXCL_LINE
        }
 
-       if (NetworkInfo.ClientEventCb_wifi == NULL) {
-               WIFI_LOG(WIFI_ERROR, "Wi-Fi EventCb was not registered"); //LCOV_EXCL_LINE
+       Error = _net_init_service_state(net_info);
+       if (Error != NET_ERR_NONE) {
+               WIFI_LOG(WIFI_ERROR, "Failed to init service state [%s]", //LCOV_EXCL_LINE
+                               _net_print_error(Error));
+               _net_deregister_signal(net_info); //LCOV_EXCL_LINE
+               _net_dbus_close_gdbus_call(net_info); //LCOV_EXCL_LINE
+               g_free(net_info); //LCOV_EXCL_LINE
                __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
-               return NET_ERR_APP_NOT_REGISTERED; //LCOV_EXCL_LINE
+               return Error; //LCOV_EXCL_LINE
        }
 
-       NetworkInfo.ClientEventCb_wifi = NULL;
-       NetworkInfo.user_data_wifi = NULL;
+       net_info->event_callback = event_cb;
+       net_info->user_data = user_data;
 
-       if (__sync_sub_and_fetch(&NetworkInfo.ref_count, 1) < 1) {
-               _net_deregister_signal();
-               _net_clear_request_table();
-               _net_client_callback_cleanup();
-       }
+       *network_info = net_info;
 
        __NETWORK_FUNC_EXIT__;
        return NET_ERR_NONE;
 }
 
-gboolean net_check_ref_count(void)
+void net_deregister_client_ext(network_info_s *network_info)
 {
-       if (NetworkInfo.ref_count > 0)
-               return TRUE;
+       __NETWORK_FUNC_ENTER__;
+
+       if (network_info) {
+               network_info->event_callback = NULL;
+               network_info->user_data = NULL;
 
-       return FALSE; //LCOV_EXCL_LINE
+               _net_deregister_signal(network_info);
+               _net_dbus_close_gdbus_call(network_info);
+               _net_clear_request_table(network_info);
+
+               g_free(network_info);
+       }
+
+       __NETWORK_FUNC_EXIT__;
 }
 
 //LCOV_EXCL_START
-void net_set_cs_tid(int tid)
+void net_set_cs_tid(network_info_s *network_info, int tid)
 {
-       if (NetworkInfo.ref_count < 1) {
-               WIFI_LOG(WIFI_ERROR, "Application is not registered");
-               return;
-       }
-
-       _net_set_cs_tid(tid);
+       _net_set_cs_tid(network_info, tid);
 }
 
 void net_unset_cs_tid(int tid)
@@ -2982,7 +2910,7 @@ void net_unset_cs_tid(int tid)
 }
 //LCOV_EXCL_STOP
 
-int net_open_connection(const char *profile_name)
+int net_open_connection(network_info_s *network_info, const char *profile_name)
 {
        __NETWORK_FUNC_ENTER__;
 
@@ -2996,35 +2924,32 @@ int net_open_connection(const char *profile_name)
                return NET_ERR_INVALID_PARAM; //LCOV_EXCL_LINE
        }
 
-       if (NetworkInfo.ref_count < 1) {
-               WIFI_LOG(WIFI_ERROR, "Application is not registered"); //LCOV_EXCL_LINE
+       if (network_info->request_table[NETWORK_REQUEST_TYPE_WIFI_POWER].flag == TRUE ||
+               network_info->request_table[NETWORK_REQUEST_TYPE_CLOSE_CONNECTION].flag == TRUE ||
+               network_info->request_table[NETWORK_REQUEST_TYPE_ENROLL_WPS].flag == TRUE ||
+               network_info->request_table[NETWORK_REQUEST_TYPE_FORGET_AP].flag == TRUE) {
+               WIFI_LOG(WIFI_ERROR, "pending call in progress"); //LCOV_EXCL_LINE
                __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
-               return NET_ERR_APP_NOT_REGISTERED; //LCOV_EXCL_LINE
+               return NET_ERR_INVALID_OPERATION; //LCOV_EXCL_LINE
        }
 
-       if (request_table[NETWORK_REQUEST_TYPE_OPEN_CONNECTION].flag == TRUE) {
+       if (network_info->request_table[NETWORK_REQUEST_TYPE_OPEN_CONNECTION].flag == TRUE) {
                WIFI_LOG(WIFI_ERROR, "Request in progress"); //LCOV_EXCL_LINE
                __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
                return NET_ERR_IN_PROGRESS; //LCOV_EXCL_LINE
        }
 
-       if (_net_dbus_is_pending_call_used() == TRUE) {
-               WIFI_LOG(WIFI_ERROR, "Pending call in progress"); //LCOV_EXCL_LINE
-               __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
-               return NET_ERR_INVALID_OPERATION; //LCOV_EXCL_LINE
-       }
-
-       request_table[NETWORK_REQUEST_TYPE_OPEN_CONNECTION].flag = TRUE;
-       g_strlcpy(request_table[NETWORK_REQUEST_TYPE_OPEN_CONNECTION].ProfileName,
+       network_info->request_table[NETWORK_REQUEST_TYPE_OPEN_CONNECTION].flag = TRUE;
+       g_strlcpy(network_info->request_table[NETWORK_REQUEST_TYPE_OPEN_CONNECTION].ProfileName,
                        profile_name, NET_PROFILE_NAME_LEN_MAX+1);
 
-       Error = _net_dbus_open_connection(profile_name);
+       Error = _net_dbus_open_connection(network_info, profile_name);
        if (Error != NET_ERR_NONE) {
                WIFI_LOG(WIFI_ERROR, //LCOV_EXCL_LINE
                                "Failed to request open connection, Error [%s]",
                                _net_print_error(Error));
 
-               memset(&request_table[NETWORK_REQUEST_TYPE_OPEN_CONNECTION], //LCOV_EXCL_LINE
+               memset(&(network_info->request_table[NETWORK_REQUEST_TYPE_OPEN_CONNECTION]), //LCOV_EXCL_LINE
                                0, sizeof(network_request_table_s));
 
                __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
@@ -3035,12 +2960,11 @@ int net_open_connection(const char *profile_name)
        return NET_ERR_NONE;
 }
 
-int net_close_connection(const char *profile_name)
+int net_close_connection(network_info_s *network_info, const char *profile_name)
 {
        __NETWORK_FUNC_ENTER__;
 
        net_err_e Error = NET_ERR_NONE;
-       gboolean is_connecting = FALSE;
 
        WIFI_LOG(WIFI_INFO, "ProfileName [%s] passed", profile_name);
 
@@ -3050,53 +2974,34 @@ int net_close_connection(const char *profile_name)
                return NET_ERR_INVALID_PARAM; //LCOV_EXCL_LINE
        }
 
-       if (NetworkInfo.ref_count < 1) {
-               WIFI_LOG(WIFI_ERROR, "Application is not registered"); //LCOV_EXCL_LINE
-               __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
-               return NET_ERR_APP_NOT_REGISTERED; //LCOV_EXCL_LINE
-       }
-
-       if (request_table[NETWORK_REQUEST_TYPE_CLOSE_CONNECTION].flag == TRUE) {
+       if (network_info->request_table[NETWORK_REQUEST_TYPE_CLOSE_CONNECTION].flag == TRUE) {
                WIFI_LOG(WIFI_ERROR, "Request in progress"); //LCOV_EXCL_LINE
                __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
                return NET_ERR_IN_PROGRESS; //LCOV_EXCL_LINE
        }
 
-       if (_net_dbus_is_pending_call_used() == TRUE) {
-               is_connecting = __net_is_connecting(profile_name); //LCOV_EXCL_LINE
-               if (is_connecting == FALSE) { //LCOV_EXCL_LINE
-                       WIFI_LOG(WIFI_ERROR, "pending call in progress"); //LCOV_EXCL_LINE
-
-                       __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
-                       return NET_ERR_IN_PROGRESS; //LCOV_EXCL_LINE
-               }
-       }
-
-       request_table[NETWORK_REQUEST_TYPE_CLOSE_CONNECTION].flag = TRUE;
-       g_strlcpy(request_table[NETWORK_REQUEST_TYPE_CLOSE_CONNECTION].ProfileName,
+       network_info->request_table[NETWORK_REQUEST_TYPE_CLOSE_CONNECTION].flag = TRUE;
+       g_strlcpy(network_info->request_table[NETWORK_REQUEST_TYPE_CLOSE_CONNECTION].ProfileName,
                        profile_name, NET_PROFILE_NAME_LEN_MAX+1);
 
-       Error = _net_dbus_close_connection(profile_name);
+       Error = _net_dbus_close_connection(network_info, profile_name);
        if (Error != NET_ERR_NONE) {
                WIFI_LOG(WIFI_ERROR, //LCOV_EXCL_LINE
                                "Failed to request close connection, Error [%s]",
                                _net_print_error(Error));
 
-               memset(&request_table[NETWORK_REQUEST_TYPE_CLOSE_CONNECTION], //LCOV_EXCL_LINE
+               memset(&(network_info->request_table[NETWORK_REQUEST_TYPE_CLOSE_CONNECTION]), //LCOV_EXCL_LINE
                                0, sizeof(network_request_table_s));
 
                __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
                return Error; //LCOV_EXCL_LINE
        }
 
-       if (is_connecting == TRUE)
-               __net_abort_open_connection(profile_name); //LCOV_EXCL_LINE
-
        __NETWORK_FUNC_EXIT__;
        return NET_ERR_NONE;
 }
 
-int net_delete_profile(const char* profile_name)
+int net_delete_profile(network_info_s *network_info, const char* profile_name)
 {
        __NETWORK_FUNC_ENTER__;
 
@@ -3104,12 +3009,6 @@ int net_delete_profile(const char* profile_name)
        net_profile_name_s wifi_prof_name;
        net_profile_info_s prof_info;
 
-       if (NetworkInfo.ref_count < 1) {
-               WIFI_LOG(WIFI_ERROR, "Application is not registered"); //LCOV_EXCL_LINE
-               __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
-               return NET_ERR_APP_NOT_REGISTERED; //LCOV_EXCL_LINE
-       }
-
        WIFI_LOG(WIFI_INFO, "Delete Profile [%s]", profile_name);
 
        if (_net_check_profile_name(profile_name) != NET_ERR_NONE) {
@@ -3118,7 +3017,7 @@ int net_delete_profile(const char* profile_name)
                return NET_ERR_INVALID_PARAM; //LCOV_EXCL_LINE
        }
 
-       Error = __net_get_profile_info(profile_name, &prof_info);
+       Error = __net_get_profile_info(network_info, profile_name, &prof_info);
        if (Error != NET_ERR_NONE) {
                WIFI_LOG(WIFI_ERROR, //LCOV_EXCL_LINE
                                "Failed to get service(profile) information. Error [%s]",
@@ -3130,7 +3029,8 @@ int net_delete_profile(const char* profile_name)
 
        g_strlcpy(wifi_prof_name.ProfileName, profile_name, NET_PROFILE_NAME_LEN_MAX + 1);
 
-       Error = __net_wifi_delete_profile(&wifi_prof_name,
+       Error = __net_wifi_delete_profile(network_info,
+                       &wifi_prof_name,
                        prof_info.security_info.sec_mode,
                        prof_info.passpoint);
        if (Error != NET_ERR_NONE) {
@@ -3147,8 +3047,7 @@ int net_delete_profile(const char* profile_name)
 }
 
 static void _net_delete_profile_async_reply(GObject *source_object,
-                                           GAsyncResult *res,
-                                           gpointer user_data)
+                       GAsyncResult *res, gpointer user_data)
 {
        __NETWORK_FUNC_ENTER__;
 
@@ -3161,11 +3060,13 @@ static void _net_delete_profile_async_reply(GObject *source_object,
        gchar *path = NULL;
        net_profile_name_s wifi_prof_name;
        net_profile_info_s prof_info;
+       network_info_s *network_info = (network_info_s *)user_data;
+       network_request_table_s *request_table = network_info->request_table;
 
        conn = G_DBUS_CONNECTION(source_object);
        message = g_dbus_connection_call_finish(conn, res, &error);
        if (message == NULL && error != NULL) {
-               WIFI_LOG(WIFI_ERROR, "Delete profile, error [%s]\n", error->message);
+               WIFI_LOG(WIFI_ERROR, "Delete profile, error [%s]", error->message);
                Error = NET_ERR_UNKNOWN;
                g_error_free(error);
                goto error;
@@ -3180,8 +3081,8 @@ static void _net_delete_profile_async_reply(GObject *source_object,
 
        while (g_variant_iter_loop(iter, "(oa{sv})", &path, &service)) {
                if (g_strcmp0(request_table[NETWORK_REQUEST_TYPE_FORGET_AP].ProfileName, path) == 0) {
-                       Error = __net_extract_service_info(path, service,
-                                                          &prof_info);
+                       Error = __net_extract_service_info(network_info,
+                                               path, service, &prof_info);
                        g_variant_iter_free(service);
                        g_free(path);
                        break;
@@ -3198,9 +3099,8 @@ static void _net_delete_profile_async_reply(GObject *source_object,
                  request_table[NETWORK_REQUEST_TYPE_FORGET_AP].ProfileName,
                  NET_PROFILE_NAME_LEN_MAX + 1);
 
-       Error = __net_wifi_delete_profile(&wifi_prof_name,
-                                         prof_info.security_info.sec_mode,
-                                         prof_info.passpoint);
+       Error = __net_wifi_delete_profile(network_info, &wifi_prof_name,
+                       prof_info.security_info.sec_mode, prof_info.passpoint);
        if (Error != NET_ERR_NONE) {
                WIFI_LOG(WIFI_ERROR, //LCOV_EXCL_LINE
                                "Failed to delete service(profile). Error [%s]",
@@ -3212,30 +3112,22 @@ static void _net_delete_profile_async_reply(GObject *source_object,
            prof_info.ProfileState != NET_STATE_TYPE_READY &&
            prof_info.ProfileState != NET_STATE_TYPE_ASSOCIATION &&
            prof_info.ProfileState != NET_STATE_TYPE_CONFIGURATION)
-               net_forget_ap_finshed(Error);
+               net_forget_ap_finished(network_info, Error);
 
-       _net_dbus_pending_call_unref();
        __NETWORK_FUNC_EXIT__;
        return;
 
 error:
-       net_forget_ap_finshed(Error);
-       _net_dbus_pending_call_unref();
+       net_forget_ap_finished(network_info, Error);
        __NETWORK_FUNC_EXIT__;
 }
 
-int net_delete_profile_async(const char* profile_name)
+int net_delete_profile_async(network_info_s *network_info, const char* profile_name)
 {
        __NETWORK_FUNC_ENTER__;
 
        net_err_e Error = NET_ERR_NONE;
 
-       if (NetworkInfo.ref_count < 1) {
-               WIFI_LOG(WIFI_ERROR, "Application is not registered"); //LCOV_EXCL_LINE
-               __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
-               return NET_ERR_APP_NOT_REGISTERED; //LCOV_EXCL_LINE
-       }
-
        WIFI_LOG(WIFI_INFO, "Delete Profile [%s]", profile_name);
 
        if (_net_check_profile_name(profile_name) != NET_ERR_NONE) {
@@ -3245,22 +3137,21 @@ int net_delete_profile_async(const char* profile_name)
        }
 
        /* Get service details */
-       request_table[NETWORK_REQUEST_TYPE_FORGET_AP].flag = TRUE;
-       g_strlcpy(request_table[NETWORK_REQUEST_TYPE_FORGET_AP].ProfileName,
+       network_info->request_table[NETWORK_REQUEST_TYPE_FORGET_AP].flag = TRUE;
+       g_strlcpy(network_info->request_table[NETWORK_REQUEST_TYPE_FORGET_AP].ProfileName,
                  profile_name, NET_PROFILE_NAME_LEN_MAX+1);
 
-       Error = _net_invoke_dbus_method_nonblock(CONNMAN_SERVICE,
-                                                CONNMAN_MANAGER_PATH,
-                                                CONNMAN_MANAGER_INTERFACE,
-                                                "GetServices", NULL,
-                                                DBUS_REPLY_TIMEOUT,
-                                                _net_delete_profile_async_reply);
+       Error = _net_invoke_dbus_method_nonblock(network_info,
+                               CONNMAN_SERVICE, CONNMAN_MANAGER_PATH,
+                               CONNMAN_MANAGER_INTERFACE, "GetServices",
+                               NULL, DBUS_REPLY_TIMEOUT,
+                               _net_delete_profile_async_reply);
        if (Error != NET_ERR_NONE) {
                WIFI_LOG(WIFI_ERROR, //LCOV_EXCL_LINE
                                "Failed to get service(profile) information. Error [%s]",
                                _net_print_error(Error));
 
-               request_table[NETWORK_REQUEST_TYPE_FORGET_AP].flag = FALSE;
+               network_info->request_table[NETWORK_REQUEST_TYPE_FORGET_AP].flag = FALSE;
                __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
                return Error; //LCOV_EXCL_LINE
        }
@@ -3269,32 +3160,27 @@ int net_delete_profile_async(const char* profile_name)
        return NET_ERR_NONE;
 }
 
-int net_modify_profile(const char* profile_name, net_profile_info_s* prof_info)
+int net_modify_profile(network_info_s *network_info,
+               const char* profile_name, net_profile_info_s* prof_info)
 {
        __NETWORK_FUNC_ENTER__;
 
        net_err_e Error = NET_ERR_NONE;
        net_profile_info_s exProfInfo;
 
-       if (NetworkInfo.ref_count < 1) {
-               WIFI_LOG(WIFI_ERROR, "Application is not registered"); //LCOV_EXCL_LINE
-               __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
-               return NET_ERR_APP_NOT_REGISTERED; //LCOV_EXCL_LINE
-       }
-
-       if (!net_get_device_policy_wifi()) {
+       if (!net_get_device_policy_wifi(network_info)) {
                WIFI_LOG(WIFI_ERROR, "Wifi device policy restricts"); //LCOV_EXCL_LINE
                __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
                return NET_ERR_SECURITY_RESTRICTED; //LCOV_EXCL_LINE
        }
 
-       if (!net_get_device_policy_wifi_profile()) {
+       if (!net_get_device_policy_wifi_profile(network_info)) {
                WIFI_LOG(WIFI_ERROR, "Wifi profile device policy restricts"); //LCOV_EXCL_LINE
                __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
                return NET_ERR_SECURITY_RESTRICTED; //LCOV_EXCL_LINE
        }
 
-       Error = net_get_profile_info(profile_name, &exProfInfo);
+       Error = net_get_profile_info(network_info, profile_name, &exProfInfo);
        if (Error != NET_ERR_NONE) {
                WIFI_LOG(WIFI_ERROR, //LCOV_EXCL_LINE
                                "Failed to get service(profile) information. Error [%s]",
@@ -3305,13 +3191,13 @@ int net_modify_profile(const char* profile_name, net_profile_info_s* prof_info)
        }
 
        if (prof_info == NULL) {
-               WIFI_LOG(WIFI_ERROR, "Invalid Parameter\n"); //LCOV_EXCL_LINE
+               WIFI_LOG(WIFI_ERROR, "Invalid Parameter"); //LCOV_EXCL_LINE
                __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
                return NET_ERR_INVALID_PARAM; //LCOV_EXCL_LINE
        }
 
 
-       Error = __net_wifi_modify_profile(profile_name, prof_info, &exProfInfo);
+       Error = __net_wifi_modify_profile(network_info, profile_name, prof_info, &exProfInfo);
 
        if (Error != NET_ERR_NONE) {
                WIFI_LOG(WIFI_ERROR, //LCOV_EXCL_LINE
@@ -3326,18 +3212,13 @@ int net_modify_profile(const char* profile_name, net_profile_info_s* prof_info)
        return NET_ERR_NONE;
 }
 
-int net_get_profile_info(const char *profile_name, net_profile_info_s *prof_info)
+int net_get_profile_info(network_info_s *network_info,
+               const char *profile_name, net_profile_info_s *prof_info)
 {
        __NETWORK_FUNC_ENTER__;
 
        net_err_e Error = NET_ERR_NONE;
 
-       if (NetworkInfo.ref_count < 1) {
-               WIFI_LOG(WIFI_ERROR, "Application is not registered"); //LCOV_EXCL_LINE
-               __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
-               return NET_ERR_APP_NOT_REGISTERED; //LCOV_EXCL_LINE
-       }
-
        if (prof_info == NULL ||
                        _net_check_profile_name(profile_name) != NET_ERR_NONE) {
                WIFI_LOG(WIFI_ERROR, "Invalid Parameter"); //LCOV_EXCL_LINE
@@ -3346,7 +3227,7 @@ int net_get_profile_info(const char *profile_name, net_profile_info_s *prof_info
                return NET_ERR_INVALID_PARAM; //LCOV_EXCL_LINE
        }
 
-       Error = __net_get_profile_info(profile_name, prof_info);
+       Error = __net_get_profile_info(network_info, profile_name, prof_info);
        if (Error != NET_ERR_NONE)
                WIFI_LOG(WIFI_ERROR, //LCOV_EXCL_LINE
                                "Failed to get service(profile) information. Error [%s]",
@@ -3356,45 +3237,47 @@ int net_get_profile_info(const char *profile_name, net_profile_info_s *prof_info
        return Error;
 }
 
-int net_get_profile_list(GSList **profile_list)
+int net_get_interface_list(network_info_s *network_info, GSList **interface_list)
 {
        __NETWORK_FUNC_ENTER__;
 
        net_err_e Error = NET_ERR_NONE;
 
-       if (NetworkInfo.ref_count < 1) {
-               WIFI_LOG(WIFI_ERROR, "Application is not registered"); //LCOV_EXCL_LINE
-               __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
-               return NET_ERR_APP_NOT_REGISTERED; //LCOV_EXCL_LINE
+       Error = _net_get_interface_list(network_info, interface_list);
+       if (Error != NET_ERR_NONE) {
+               WIFI_LOG(WIFI_ERROR, //LCOV_EXCL_LINE
+                               "Failed to get interface list. Error [%s]",
+                               _net_print_error(Error));
        }
 
-       Error = _net_get_profile_list(profile_list);
+       __NETWORK_FUNC_EXIT__;
+       return Error;
+}
+
+int net_get_profile_list(network_info_s *network_info, GSList **profile_list)
+{
+       __NETWORK_FUNC_ENTER__;
 
+       net_err_e Error = NET_ERR_NONE;
+
+       Error = _net_get_profile_list(network_info, profile_list);
        if (Error != NET_ERR_NONE) {
                WIFI_LOG(WIFI_ERROR, //LCOV_EXCL_LINE
                                "Failed to get service(profile) list. Error [%s]",
                                _net_print_error(Error));
-               __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
-               return Error; //LCOV_EXCL_LINE
        }
 
        __NETWORK_FUNC_EXIT__;
-       return NET_ERR_NONE;
+       return Error;
 }
 
-int net_get_technology_properties(net_tech_info_s *tech_info)
+int net_get_technology_properties(network_info_s *network_info, net_tech_info_s *tech_info)
 {
        __NETWORK_FUNC_ENTER__;
 
        net_err_e Error = NET_ERR_NONE;
 
-       if (NetworkInfo.ref_count < 1) {
-               WIFI_LOG(WIFI_ERROR, "Application is not registered"); //LCOV_EXCL_LINE
-               __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
-               return NET_ERR_APP_NOT_REGISTERED; //LCOV_EXCL_LINE
-       }
-
-       if ((Error = _net_dbus_get_tech_status(tech_info)) != NET_ERR_NONE) {
+       if ((Error = _net_dbus_get_tech_status(network_info, tech_info)) != NET_ERR_NONE) {
                WIFI_LOG(WIFI_ERROR, "Failed to get technology status. Error [%s]", //LCOV_EXCL_LINE
                                _net_print_error(Error));
                __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
@@ -3405,19 +3288,13 @@ int net_get_technology_properties(net_tech_info_s *tech_info)
        return NET_ERR_NONE;
 }
 
-int net_config_get_id_list(GSList **list)
+int net_config_get_id_list(network_info_s *network_info, GSList **list)
 {
        __NETWORK_FUNC_ENTER__;
 
        net_err_e Error = NET_ERR_NONE;
 
-       if (NetworkInfo.ref_count < 1) {
-               WIFI_LOG(WIFI_ERROR, "Application is not registered"); //LCOV_EXCL_LINE
-               __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
-               return NET_ERR_APP_NOT_REGISTERED; //LCOV_EXCL_LINE
-       }
-
-       Error = _net_dbus_config_get_id_list(list);
+       Error = _net_dbus_config_get_id_list(network_info, list);
        if (Error != NET_ERR_NONE)
                WIFI_LOG(WIFI_ERROR, //LCOV_EXCL_LINE
                                "Failed to get config id list. Error [%s]",
@@ -3427,19 +3304,14 @@ int net_config_get_id_list(GSList **list)
        return Error;
 }
 
-int net_config_set_field(const gchar *config_id, const gchar *key, const gchar *value)
+int net_config_set_field(network_info_s *network_info,
+               const gchar *config_id, const gchar *key, const gchar *value)
 {
        __NETWORK_FUNC_ENTER__;
 
        net_err_e Error = NET_ERR_NONE;
 
-       if (NetworkInfo.ref_count < 1) {
-               WIFI_LOG(WIFI_ERROR, "Application is not registered"); //LCOV_EXCL_LINE
-               __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
-               return NET_ERR_APP_NOT_REGISTERED; //LCOV_EXCL_LINE
-       }
-
-       Error = _net_dbus_config_set_field(config_id, key, value);
+       Error = _net_dbus_config_set_field(network_info, config_id, key, value);
        if (Error != NET_ERR_NONE)
                WIFI_LOG(WIFI_ERROR, //LCOV_EXCL_LINE
                                "Failed to set field. Error [%s]",
@@ -3449,19 +3321,14 @@ int net_config_set_field(const gchar *config_id, const gchar *key, const gchar *
        return Error;
 }
 
-int net_config_get_passphrase(const gchar *config_id, gchar **passphrase)
+int net_config_get_passphrase(network_info_s *network_info,
+               const gchar *config_id, gchar **passphrase)
 {
        __NETWORK_FUNC_ENTER__;
 
        net_err_e Error = NET_ERR_NONE;
 
-       if (NetworkInfo.ref_count < 1) {
-               WIFI_LOG(WIFI_ERROR, "Application is not registered"); //LCOV_EXCL_LINE
-               __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
-               return NET_ERR_APP_NOT_REGISTERED; //LCOV_EXCL_LINE
-       }
-
-       Error = _net_dbus_config_get_passphrase(config_id, passphrase);
+       Error = _net_dbus_config_get_passphrase(network_info, config_id, passphrase);
        if (Error != NET_ERR_NONE)
                WIFI_LOG(WIFI_ERROR, //LCOV_EXCL_LINE
                                "Failed to get config id list. Error [%s]",
@@ -3471,22 +3338,18 @@ int net_config_get_passphrase(const gchar *config_id, gchar **passphrase)
        return Error;
 }
 
-int net_config_save_configurations(const gchar *config_id, const gchar *name,
-               const gchar *ssid, const gchar *passphrase, const gchar *proxy_address,
-               net_ip_info_config_s *ip_info, gboolean is_hidden, gboolean is_created)
+int net_config_save_configurations(network_info_s *network_info,
+               const gchar *config_id, const gchar *name, const gchar *ssid, const gchar *passphrase,
+               const gchar *proxy_address, net_ip_info_config_s *ip_info,
+               gboolean is_hidden, gboolean is_created)
 {
        __NETWORK_FUNC_ENTER__;
 
        net_err_e Error = NET_ERR_NONE;
 
-       if (NetworkInfo.ref_count < 1) {
-               WIFI_LOG(WIFI_ERROR, "Application is not registered"); //LCOV_EXCL_LINE
-               __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
-               return NET_ERR_APP_NOT_REGISTERED; //LCOV_EXCL_LINE
-       }
-
-       Error = _net_dbus_config_save_configurations(config_id, name, ssid,
-                       passphrase, proxy_address, ip_info, is_hidden, is_created);
+       Error = _net_dbus_config_save_configurations(network_info,
+                       config_id, name, ssid, passphrase, proxy_address,
+                       ip_info, is_hidden, is_created);
        if (Error != NET_ERR_NONE)
                WIFI_LOG(WIFI_ERROR, //LCOV_EXCL_LINE
                                "Failed to save configurations. Error [%s]",
@@ -3497,8 +3360,8 @@ int net_config_save_configurations(const gchar *config_id, const gchar *name,
 }
 
 //LCOV_EXCL_START
-int net_config_save_eap_configurations(const gchar *config_id,
-               const gchar *name, const gchar *ssid, const gchar *passphrase,
+int net_config_save_eap_configurations(network_info_s *network_info,
+               const gchar *config_id, const gchar *name, const gchar *ssid, const gchar *passphrase,
                const gchar *proxy_address, void *eap_config, gboolean is_hidden, gboolean is_created)
 {
        __NETWORK_FUNC_ENTER__;
@@ -3506,13 +3369,8 @@ int net_config_save_eap_configurations(const gchar *config_id,
        net_err_e Error = NET_ERR_NONE;
        net_eap_config_s *net_eap_config = (net_eap_config_s *)eap_config;
 
-       if (NetworkInfo.ref_count < 1) {
-               WIFI_LOG(WIFI_ERROR, "Application is not registered");
-               __NETWORK_FUNC_EXIT__;
-               return NET_ERR_APP_NOT_REGISTERED;
-       }
-
-       Error = _net_dbus_config_save_eap_configurations(config_id, name, ssid, passphrase,
+       Error = _net_dbus_config_save_eap_configurations(network_info,
+                               config_id, name, ssid, passphrase,
                                proxy_address, net_eap_config, is_hidden, is_created);
        if (Error != NET_ERR_NONE)
                WIFI_LOG(WIFI_ERROR,
@@ -3524,19 +3382,14 @@ int net_config_save_eap_configurations(const gchar *config_id,
 }
 //LCOV_EXCL_STOP
 
-int net_config_remove_configurations(const gchar *config_id)
+int net_config_remove_configurations(network_info_s *network_info,
+               const gchar *config_id)
 {
        __NETWORK_FUNC_ENTER__;
 
        net_err_e Error = NET_ERR_NONE;
 
-       if (NetworkInfo.ref_count < 1) {
-               WIFI_LOG(WIFI_ERROR, "Application is not registered"); //LCOV_EXCL_LINE
-               __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
-               return NET_ERR_APP_NOT_REGISTERED; //LCOV_EXCL_LINE
-       }
-
-       Error = _net_dbus_config_remove_configurations(config_id);
+       Error = _net_dbus_config_remove_configurations(network_info, config_id);
        if (Error != NET_ERR_NONE)
                WIFI_LOG(WIFI_ERROR, //LCOV_EXCL_LINE
                                "Failed to remove configurations. Error [%s]",
@@ -3546,7 +3399,8 @@ int net_config_remove_configurations(const gchar *config_id)
        return Error;
 }
 
-int net_config_load_configurations(const gchar *config_id, gchar **name,
+int net_config_load_configurations(network_info_s *network_info,
+               const gchar *config_id, gchar **name,
                gchar **passphrase, void *security_type, gchar **proxy_address, gboolean *is_hidden,
                net_ip_info_config_s **ip_info, void *last_error)
 {
@@ -3555,14 +3409,9 @@ int net_config_load_configurations(const gchar *config_id, gchar **name,
        net_err_e Error = NET_ERR_NONE;
        net_wifi_security_type_e *sec_type = (net_wifi_security_type_e *)security_type;
 
-       if (NetworkInfo.ref_count < 1) {
-               WIFI_LOG(WIFI_ERROR, "Application is not registered"); //LCOV_EXCL_LINE
-               __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
-               return NET_ERR_APP_NOT_REGISTERED; //LCOV_EXCL_LINE
-       }
-
-       Error = _net_dbus_config_load_configurations(config_id, name, passphrase,
-                               sec_type, proxy_address, is_hidden, ip_info, last_error);
+       Error = _net_dbus_config_load_configurations(network_info,
+                               config_id, name, passphrase, sec_type, proxy_address,
+                               is_hidden, ip_info, last_error);
        if (Error != NET_ERR_NONE)
                WIFI_LOG(WIFI_ERROR, //LCOV_EXCL_LINE
                                "Failed to load configurations. Error [%s]",
@@ -3573,8 +3422,8 @@ int net_config_load_configurations(const gchar *config_id, gchar **name,
 }
 
 //LCOV_EXCL_START
-int net_config_load_eap_configurations(const gchar *config_id,
-               gchar **name, void *security_type, gchar **proxy_address,
+int net_config_load_eap_configurations(network_info_s *network_info,
+               const gchar *config_id, gchar **name, void *security_type, gchar **proxy_address,
                gboolean *is_hidden, void **eap_config, void *last_error)
 {
        __NETWORK_FUNC_ENTER__;
@@ -3583,14 +3432,9 @@ int net_config_load_eap_configurations(const gchar *config_id,
        net_eap_config_s **net_eap_config = (net_eap_config_s **)eap_config;
        net_wifi_security_type_e *sec_type = (net_wifi_security_type_e *)security_type;
 
-       if (NetworkInfo.ref_count < 1) {
-               WIFI_LOG(WIFI_ERROR, "Application is not registered");
-               __NETWORK_FUNC_EXIT__;
-               return NET_ERR_APP_NOT_REGISTERED;
-       }
-
-       Error = _net_dbus_config_load_eap_configurations(config_id, name, sec_type,
-                               proxy_address, is_hidden, net_eap_config, last_error);
+       Error = _net_dbus_config_load_eap_configurations(network_info,
+                               config_id, name, sec_type, proxy_address, is_hidden,
+                               net_eap_config, last_error);
        if (Error != NET_ERR_NONE)
                WIFI_LOG(WIFI_ERROR,
                                "Failed to load eap configurations. Error [%s]",
@@ -3600,24 +3444,18 @@ int net_config_load_eap_configurations(const gchar *config_id,
        return Error;
 }
 
-int net_wifi_set_autoscan(gboolean autoscan)
+int net_wifi_set_autoscan(network_info_s *network_info, gboolean autoscan)
 {
        __NETWORK_FUNC_ENTER__;
 
        net_err_e Error = NET_ERR_NONE;
 
-       if (NetworkInfo.ref_count < 1) {
-               WIFI_LOG(WIFI_ERROR, "Application is not registered");
-               __NETWORK_FUNC_EXIT__;
-               return NET_ERR_APP_NOT_REGISTERED;
-       }
-
        WIFI_LOG(WIFI_INFO, "[%s] auto scan", autoscan ? "enable" : "disable");
 
        if (autoscan)
-               Error = _net_dbus_resume_bgscan();
+               Error = _net_dbus_resume_bgscan(network_info);
        else
-               Error = _net_dbus_pause_bgscan();
+               Error = _net_dbus_pause_bgscan(network_info);
 
        if (Error != NET_ERR_NONE) {
                WIFI_LOG(WIFI_ERROR,
@@ -3632,27 +3470,27 @@ int net_wifi_set_autoscan(gboolean autoscan)
        return NET_ERR_NONE;
 }
 
-int net_wifi_set_background_scan_mode(net_wifi_background_scan_mode_e scan_mode)
+int net_wifi_set_background_scan_mode(network_info_s *network_info,
+               net_wifi_background_scan_mode_e scan_mode)
 {
        __NETWORK_FUNC_ENTER__;
 
        net_err_e Error = NET_ERR_NONE;
 
-       if (NetworkInfo.ref_count < 1) {
-               WIFI_LOG(WIFI_ERROR, "Application is not registered");
-               __NETWORK_FUNC_EXIT__;
-               return NET_ERR_APP_NOT_REGISTERED;
+       Error = __net_get_wifi_state(network_info);
+       if (Error != NET_ERR_NONE) {
+               WIFI_LOG(WIFI_ERROR, "Failed to get Wi-Fi state"); //LCOV_EXCL_LINE
+               __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
+               return Error; //LCOV_EXCL_LINE
        }
 
-       if (NetworkInfo.wifi_state == WIFI_OFF) {
-               if ((NetworkInfo.wifi_state = _net_get_wifi_state(&Error)) == WIFI_OFF) {
-                       WIFI_LOG(WIFI_ERROR, "Wi-Fi is powered off!");
-                       __NETWORK_FUNC_EXIT__;
-                       return NET_ERR_INVALID_OPERATION;
-               }
+       if (network_info->wifi_state == WIFI_OFF) {
+               WIFI_LOG(WIFI_ERROR, "Wi-Fi powered off!"); //LCOV_EXCL_LINE
+               __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
+               return NET_ERR_INVALID_OPERATION; //LCOV_EXCL_LINE
        }
 
-       if ((Error = _net_dbus_set_bgscan_mode(scan_mode)) != NET_ERR_NONE) {
+       if ((Error = _net_dbus_set_bgscan_mode(network_info, scan_mode)) != NET_ERR_NONE) {
                WIFI_LOG(WIFI_ERROR,
                                "Failed to set bgscan mode. Error [%s]",
                                _net_print_error(Error));
@@ -3665,13 +3503,14 @@ int net_wifi_set_background_scan_mode(net_wifi_background_scan_mode_e scan_mode)
        return NET_ERR_NONE;
 }
 
-int net_wifi_set_ip_conflict_period(unsigned int initial_time)
+int net_wifi_set_ip_conflict_period(network_info_s *network_info,
+               unsigned int initial_time)
 {
        __NETWORK_FUNC_ENTER__;
 
        net_err_e Error = NET_ERR_NONE;
 
-       if ((Error = _net_dbus_set_ip_conflict_period(initial_time)) != NET_ERR_NONE) {
+       if ((Error = _net_dbus_set_ip_conflict_period(network_info, initial_time)) != NET_ERR_NONE) {
                WIFI_LOG(WIFI_ERROR,
                                "Failed to set ip conflict detect period. Error [%s]",
                                _net_print_error(Error));
@@ -3684,15 +3523,21 @@ int net_wifi_set_ip_conflict_period(unsigned int initial_time)
        return NET_ERR_NONE;
 }
 
-int net_wifi_get_ip_conflict_period(unsigned int* initial_time)
+int net_wifi_get_ip_conflict_period(network_info_s *network_info,
+               unsigned int* initial_time)
 {
        __NETWORK_FUNC_ENTER__;
 
        net_err_e Error = NET_ERR_NONE;
+       GVariant *params = NULL;
        GVariant *message = NULL;
 
-       message = _net_invoke_dbus_method(NETCONFIG_SERVICE, NETCONFIG_WIFI_PATH,
-                       NETCONFIG_WIFI_INTERFACE, "GetIpConflictPeriod", NULL, &Error);
+       params = g_variant_new("(s)", network_info->interface_name);
+
+       message = _net_invoke_dbus_method(network_info,
+                       NETCONFIG_SERVICE, NETCONFIG_WIFI_PATH,
+                       NETCONFIG_WIFI_INTERFACE, "GetIpConflictPeriod",
+                       params, &Error);
        if (message == NULL) {
                WIFI_LOG(WIFI_ERROR, "Failed to get IP conflict detection period"); //LCOV_EXCL_LINE
                __NETWORK_FUNC_EXIT__;
@@ -3706,15 +3551,20 @@ int net_wifi_get_ip_conflict_period(unsigned int* initial_time)
        return Error;
 }
 
-int net_wifi_get_ip_conflict_state(unsigned int *state)
+int net_wifi_get_ip_conflict_state(network_info_s *network_info, unsigned int *state)
 {
        __NETWORK_FUNC_ENTER__;
 
        net_err_e Error = NET_ERR_NONE;
+       GVariant *params = NULL;
        GVariant *message = NULL;
 
-       message = _net_invoke_dbus_method(NETCONFIG_SERVICE, NETCONFIG_WIFI_PATH,
-                       NETCONFIG_WIFI_INTERFACE, "GetIpConflictState", NULL, &Error);
+       params = g_variant_new("(s)", network_info->interface_name);
+
+       message = _net_invoke_dbus_method(network_info,
+                       NETCONFIG_SERVICE, NETCONFIG_WIFI_PATH,
+                       NETCONFIG_WIFI_INTERFACE, "GetIpConflictState",
+                       params, &Error);
        if (message == NULL) {
                WIFI_LOG(WIFI_ERROR, "Failed to get IP conflict state"); //LCOV_EXCL_LINE
                __NETWORK_FUNC_EXIT__;
@@ -3728,25 +3578,13 @@ int net_wifi_get_ip_conflict_state(unsigned int *state)
        return Error;
 }
 
-int net_wifi_get_autoscan(gboolean *autoscan)
+int net_wifi_get_autoscan(network_info_s *network_info, gboolean *autoscan)
 {
        __NETWORK_FUNC_ENTER__;
 
        net_err_e Error = NET_ERR_NONE;
 
-       if (NetworkInfo.ref_count < 1) {
-               WIFI_LOG(WIFI_ERROR, "Application is not registered");
-               __NETWORK_FUNC_EXIT__;
-               return NET_ERR_APP_NOT_REGISTERED;
-       }
-
-       if (_net_dbus_is_pending_call_used() == TRUE) {
-               WIFI_LOG(WIFI_ERROR, "pending call in progress");
-               __NETWORK_FUNC_EXIT__;
-               return NET_ERR_INVALID_OPERATION;
-       }
-
-       Error = _net_dbus_get_autoscan(autoscan);
+       Error = _net_dbus_get_autoscan(network_info, autoscan);
        if (Error != NET_ERR_NONE) {
                WIFI_LOG(WIFI_ERROR,
                                "_net_dbus_get_autoscan() failed. Error [%s]",
@@ -3757,25 +3595,13 @@ int net_wifi_get_autoscan(gboolean *autoscan)
        return Error;
 }
 
-int net_wifi_get_autoscanmode(unsigned int *autoscanmode)
+int net_wifi_get_autoscanmode(network_info_s *network_info, unsigned int *autoscanmode)
 {
        __NETWORK_FUNC_ENTER__;
 
        net_err_e Error = NET_ERR_NONE;
 
-       if (NetworkInfo.ref_count < 1) {
-               WIFI_LOG(WIFI_ERROR, "Application is not registered");
-               __NETWORK_FUNC_EXIT__;
-               return NET_ERR_APP_NOT_REGISTERED;
-       }
-
-       if (_net_dbus_is_pending_call_used() == TRUE) {
-               WIFI_LOG(WIFI_ERROR, "pending call in progress");
-               __NETWORK_FUNC_EXIT__;
-               return NET_ERR_INVALID_OPERATION;
-       }
-
-       Error = _net_dbus_get_autoscanmode(autoscanmode);
+       Error = _net_dbus_get_autoscanmode(network_info, autoscanmode);
        if (Error != NET_ERR_NONE) {
                WIFI_LOG(WIFI_ERROR,
                                "_net_dbus_get_autoscanmode() failed. Error [%s]",
@@ -3786,6 +3612,61 @@ int net_wifi_get_autoscanmode(unsigned int *autoscanmode)
        return Error;
 }
 
+int net_wifi_get_module_state(network_info_s *network_info, int *module_state)
+{
+       GVariant *message = NULL, *variant;
+       GVariantIter *iter, *next;
+       const char *path;
+       gchar *key;
+       net_err_e Error = NET_ERR_NONE;
+
+       message = _net_invoke_dbus_method(network_info,
+                       CONNMAN_SERVICE, CONNMAN_MANAGER_PATH,
+                       CONNMAN_MANAGER_INTERFACE, "GetTechnologies",
+                       NULL, &Error);
+
+       if (message == NULL) {
+               WIFI_LOG(WIFI_ERROR, "Failed to get_technology_state");
+               return Error;
+       }
+
+       *module_state = 0;
+
+       g_variant_get(message, "(a(oa{sv}))", &iter);
+       while (g_variant_iter_loop(iter, "(oa{sv})", &path, &next)) {
+               if (path == NULL || g_strcmp0(path, CONNMAN_WIFI_TECHNOLOGY_PREFIX) != 0)
+                       continue;
+
+               while (g_variant_iter_loop(next, "{sv}", &key, &variant)) {
+                       if (g_strcmp0(key, "Device.List") == 0) {
+                               GVariantIter *list_iter = NULL;
+                               gchar *dev_key = NULL;
+                               GVariant *dev_var = NULL;
+                               const gchar *sdata = NULL;
+
+                               g_variant_get(variant, "a{sv}", &list_iter);
+                               while(g_variant_iter_loop(list_iter, "{sv}", &dev_key, &dev_var)) {
+                                       if (g_variant_is_of_type(dev_var, G_VARIANT_TYPE_STRING)) {
+                                               sdata = g_variant_get_string(dev_var, NULL);
+                                               WIFI_LOG(WIFI_INFO, "%s [%s]", dev_key, sdata);
+
+                                               if (g_strcmp0(dev_key, "Ifname") == 0) {
+                                                       if (g_strcmp0(sdata, network_info->interface_name) == 0)
+                                                               *module_state = 1;
+                                               }
+                                       }
+                               }
+                               g_variant_iter_free(list_iter);
+                       }
+               }
+       }
+
+       g_variant_unref(message);
+       g_variant_iter_free(iter);
+
+       return NET_ERR_NONE;
+}
+
 static int __net_convert_string_to_ipv6_string(char *str, char **ip_address)
 {
        int i = 1;
@@ -3794,7 +3675,7 @@ static int __net_convert_string_to_ipv6_string(char *str, char **ip_address)
 
        *ip_address = (char *)malloc(INET6_ADDRSTRLEN);
        if (NULL == *ip_address) {
-               WIFI_LOG(WIFI_ERROR, "Malloc Failed\n");
+               WIFI_LOG(WIFI_ERROR, "Malloc Failed");
                return NET_ERR_INVALID_OPERATION;
        }
 
@@ -3851,38 +3732,32 @@ int net_foreach_ipv6_address(GSList **ipv6_address_list)
        return Error;
 }
 
-int net_get_preferred_ipv6_address(const char *profilename, char **address)
+int net_get_preferred_ipv6_address(network_info_s *network_info,
+               const char *profilename, char **address)
 {
        __NETWORK_FUNC_ENTER__;
        net_err_e Error = NET_ERR_NONE;
 
-       Error = _net_dbus_get_preferred_ipv6_address(profilename, address);
+       Error = _net_dbus_get_preferred_ipv6_address(network_info, profilename, address);
        if (Error != NET_ERR_NONE)
-               WIFI_LOG(WIFI_ERROR, "_net_dbus_get_preferred_ipv6_address failed\n");
+               WIFI_LOG(WIFI_ERROR, "_net_dbus_get_preferred_ipv6_address failed");
 
        __NETWORK_FUNC_EXIT__;
        return Error;
 }
 
-int net_get_service_state()
+int net_get_service_state(network_info_s *network_info)
 {
-       __NETWORK_FUNC_ENTER__;
-       return _net_get_service_state();
+       return network_info->service_state;
 }
 
-int net_wifi_get_max_scan_ssids(int *max_scan_ssids)
+int net_wifi_get_max_scan_ssids(network_info_s *network_info, int *max_scan_ssids)
 {
        __NETWORK_CAPI_FUNC_ENTER__;
 
        net_err_e Error = NET_ERR_NONE;
 
-       if (NetworkInfo.ref_count < 1) {
-               WIFI_LOG(WIFI_ERROR, "Application is not registered");
-               __NETWORK_CAPI_FUNC_EXIT__;
-               return NET_ERR_APP_NOT_REGISTERED;
-       }
-
-       Error = _net_dbus_get_max_scan_ssids(max_scan_ssids);
+       Error = _net_dbus_get_max_scan_ssids(network_info, max_scan_ssids);
        if (Error != NET_ERR_NONE) {
                WIFI_LOG(WIFI_ERROR,
                                "Failed to get Max scan SSIDs. Error [%s]",
@@ -3896,37 +3771,37 @@ int net_wifi_get_max_scan_ssids(int *max_scan_ssids)
        return NET_ERR_NONE;
 }
 
-static net_err_e __check_preconditions()
+static net_err_e __check_preconditions(network_info_s *network_info)
 {
-       net_err_e rv = NET_ERR_NONE;
+       net_err_e Error = NET_ERR_NONE;
 
-       if (g_atomic_int_get(&NetworkInfo.ref_count) == 0) {
-               WIFI_LOG(WIFI_ERROR, "Application is not registered\n");
-               __NETWORK_FUNC_EXIT__;
-               return NET_ERR_APP_NOT_REGISTERED;
+       Error = __net_get_wifi_state(network_info);
+       if (Error != NET_ERR_NONE) {
+               WIFI_LOG(WIFI_ERROR, "Failed to get Wi-Fi state"); //LCOV_EXCL_LINE
+               __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
+               return Error; //LCOV_EXCL_LINE
        }
 
-       if (NetworkInfo.wifi_state == WIFI_OFF) {
-               if ((NetworkInfo.wifi_state = _net_get_wifi_state(&rv)) == WIFI_OFF) {
-                       WIFI_LOG(WIFI_ERROR, "Wi-Fi is powered off!"); //LCOV_EXCL_LINE
-                       __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
-                       return NET_ERR_INVALID_OPERATION; //LCOV_EXCL_LINE
-               }
+       if (network_info->wifi_state == WIFI_OFF) {
+               WIFI_LOG(WIFI_ERROR, "Wi-Fi powered off!"); //LCOV_EXCL_LINE
+               __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
+               return NET_ERR_INVALID_OPERATION; //LCOV_EXCL_LINE
        }
 
-       return rv;
+       return Error;
 }
 
-int net_dpp_enter_peer_uri(guint32 peer_id, guint32 own_id, const char *uri)
+int net_dpp_enter_peer_uri(network_info_s *network_info,
+               guint32 peer_id, guint32 own_id, const char *uri)
 {
        net_err_e Error = NET_ERR_NONE;
 
-       Error = __check_preconditions();
+       Error = __check_preconditions(network_info);
        if (Error != NET_ERR_NONE)
                WIFI_LOG(WIFI_ERROR, "Failed to enter peer uri : %d", Error);
        /* TODO generate args, set request table value, handle return values*/
 
-       Error = _net_dbus_dpp_enter_peer_uri(peer_id, own_id, uri);
+       Error = _net_dbus_dpp_enter_peer_uri(network_info, peer_id, own_id, uri);
 
        if (Error != NET_ERR_NONE) {
                WIFI_LOG(WIFI_ERROR,
@@ -3937,16 +3812,17 @@ int net_dpp_enter_peer_uri(guint32 peer_id, guint32 own_id, const char *uri)
        return Error;
 }
 
-int net_dpp_generate_own_uri(guint32 peer_id, guint32 own_id, gboolean is_initiator, const char *key)
+int net_dpp_generate_own_uri(network_info_s *network_info,
+               guint32 peer_id, guint32 own_id, gboolean is_initiator, const char *key)
 {
        net_err_e Error = NET_ERR_NONE;
 
-       Error = __check_preconditions();
+       Error = __check_preconditions(network_info);
        if (Error != NET_ERR_NONE)
                WIFI_LOG(WIFI_ERROR, "Failed to generate uri : %d", Error);
        /* TODO generate args, set request table value, handle return values*/
 
-       Error = _net_dbus_dpp_generate_uri(peer_id, own_id, is_initiator, key);
+       Error = _net_dbus_dpp_generate_uri(network_info, peer_id, own_id, is_initiator, key);
 
        if (Error != NET_ERR_NONE) {
                WIFI_LOG(WIFI_ERROR,
@@ -3986,35 +3862,39 @@ static net_err_e __net_dpp_start_each(wifi_dpp_s *p_dpp, const char *auth_key,
        gboolean is_configurator = (p_dpp->role == WIFI_MANAGER_DPP_ROLE_CONFIGURATOR);
 
        if (p_dpp->is_initiator && is_configurator)
-               rv = _net_dbus_dpp_start_configurator_initiator(p_dpp->group_id, p_dpp->ssid,
+               rv = _net_dbus_dpp_start_configurator_initiator(p_dpp->network_info,
+                               p_dpp->group_id, p_dpp->ssid,
                                p_dpp->peer_uri, p_dpp->peer_id,
                                __dpp_network_role_to_string(p_dpp->net_role),
                                __dpp_akm_to_string(p_dpp->akm),
                                configurator_key, pass);
        else if (p_dpp->is_initiator && !is_configurator)
-               rv = _net_dbus_dpp_start_enrollee_initiator(p_dpp->peer_uri, p_dpp->peer_id);
+               rv = _net_dbus_dpp_start_enrollee_initiator(p_dpp->network_info,
+                               p_dpp->peer_uri, p_dpp->peer_id);
        else if (!p_dpp->is_initiator && is_configurator)
-               rv = _net_dbus_dpp_start_configurator_responder(p_dpp->group_id, p_dpp->ssid,
+               rv = _net_dbus_dpp_start_configurator_responder(p_dpp->network_info,
+                               p_dpp->group_id, p_dpp->ssid,
                                __dpp_network_role_to_string(p_dpp->net_role),
                                __dpp_akm_to_string(p_dpp->akm),
                                auth_key, configurator_key, pass);
        else
-               rv = _net_dbus_dpp_start_enrollee_responder(auth_key);
+               rv = _net_dbus_dpp_start_enrollee_responder(p_dpp->network_info, auth_key);
 
        return rv;
 }
 
-int net_dpp_start(void *dpp_data, const char *auth_key,
+int net_dpp_start(void *dpp_handle, const char *auth_key,
                const char *configurator_key, const char *pass)
 {
        net_err_e Error = NET_ERR_NONE;
+       wifi_dpp_s *dpp_data = (wifi_dpp_s *)dpp_handle;
 
-       Error = __check_preconditions();
+       Error = __check_preconditions(dpp_data->network_info);
        if (Error != NET_ERR_NONE)
                WIFI_LOG(WIFI_ERROR, "Failed to start dpp uri : %d", Error);
        /* TODO generate args, set request table value, handle return values*/
 
-       Error = __net_dpp_start_each((wifi_dpp_s *)dpp_data, auth_key, configurator_key, pass);
+       Error = __net_dpp_start_each(dpp_data, auth_key, configurator_key, pass);
 
        if (Error != NET_ERR_NONE) {
                WIFI_LOG(WIFI_ERROR,
@@ -4025,16 +3905,17 @@ int net_dpp_start(void *dpp_data, const char *auth_key,
        return Error;
 }
 
-int net_dpp_stop(guint32 peer_id, guint32 own_id, gboolean is_initiator)
+int net_dpp_stop(network_info_s *network_info,
+               guint32 peer_id, guint32 own_id, gboolean is_initiator)
 {
        net_err_e Error = NET_ERR_NONE;
 
-       Error = __check_preconditions();
+       Error = __check_preconditions(network_info);
        if (Error != NET_ERR_NONE)
                WIFI_LOG(WIFI_ERROR, "Failed to stop dpp : %d", Error);
        /* TODO generate args, set request table value, handle return values*/
 
-       Error = _net_dbus_dpp_stop(peer_id, own_id, is_initiator);
+       Error = _net_dbus_dpp_stop(network_info, peer_id, own_id, is_initiator);
 
        if (Error != NET_ERR_NONE) {
                WIFI_LOG(WIFI_ERROR,
index 3a764c9..822bc99 100755 (executable)
 #include "network_internal.h"
 #include "network_dbus.h"
 
-typedef struct {
-       GDBusConnection *connection;
-       int conn_ref_count;
-       GCancellable *cancellable;
-       void *handle_libnetwork;
-} gdbus_connection_data_s;
-
-typedef struct {
-       GSourceFunc func;
-       gpointer user_data;
-       guint id;
-} managed_idle_data_s;
-
-extern __thread network_info_s NetworkInfo;
-__thread network_request_table_s request_table[NETWORK_REQUEST_TYPE_MAX] = { { 0, }, };
-
-static __thread gdbus_connection_data_s gdbus_conn = { NULL, 0, NULL, NULL };
-static __thread GSList *managed_idler_list = NULL;
-
 //LCOV_EXCL_START
 static char *__convert_eap_type_to_string(gchar eap_type)
 {
@@ -181,7 +162,8 @@ char* _net_print_error(net_err_e error)
        }
 }
 
-int _net_get_tech_state(GVariant *msg, network_tech_state_info_s* tech_state)
+int _net_get_tech_state(network_info_s *network_info,
+               GVariant *msg, network_tech_state_info_s* tech_state)
 {
        __NETWORK_FUNC_ENTER__;
 
@@ -192,7 +174,6 @@ int _net_get_tech_state(GVariant *msg, network_tech_state_info_s* tech_state)
        gchar *tech_prefix;
        gchar *path = NULL;
        gchar *key = NULL;
-       gboolean data;
 
        tech_prefix = CONNMAN_WIFI_TECHNOLOGY_PREFIX;
 
@@ -203,22 +184,35 @@ int _net_get_tech_state(GVariant *msg, network_tech_state_info_s* tech_state)
                        continue;
 
                while (g_variant_iter_loop(var, "{sv}", &key, &value)) {
-                       if (g_strcmp0(key, "Powered") == 0) {
-                               data = g_variant_get_boolean(value);
-
-                               if (data)
-                                       tech_state->Powered = TRUE;
-                               else
-                                       tech_state->Powered = FALSE;
-                       } else if (g_strcmp0(key, "Connected") == 0) {
-                               data = g_variant_get_boolean(value);
-
-                               if (data)
-                                       tech_state->Connected = TRUE;
-                               else
-                                       tech_state->Connected = FALSE;
-                       } else if (g_strcmp0(key, "Tethering") == 0) {
-                               /* For further use */
+                       if (g_strcmp0(key, "Device.List") == 0) {
+                               GVariantIter *list_iter = NULL;
+                               gchar *dev_key = NULL;
+                               GVariant *dev_var = NULL;
+                               const gchar *sdata = NULL;
+                               gboolean bdata = FALSE;
+                               gboolean find = FALSE;
+
+                               g_variant_get(value, "a{sv}", &list_iter);
+                               while(g_variant_iter_loop(list_iter, "{sv}", &dev_key, &dev_var)) {
+                                       if (g_variant_is_of_type(dev_var, G_VARIANT_TYPE_STRING)) {
+                                               sdata = g_variant_get_string(dev_var, NULL);
+                                               WIFI_LOG(WIFI_INFO, "%s [%s]", dev_key, sdata);
+
+                                               if (g_strcmp0(dev_key, "Ifname") == 0) {
+                                                       find = g_strcmp0(sdata, network_info->interface_name) == 0 ? TRUE : FALSE;
+                                               }
+                                       } else if (g_variant_is_of_type(dev_var, G_VARIANT_TYPE_BOOLEAN)) {
+                                               bdata = g_variant_get_boolean(dev_var);
+                                               WIFI_LOG(WIFI_INFO, "%s [%s]", dev_key, bdata ? "True" : "False");
+
+                                               if (find && g_strcmp0(dev_key, "Powered") == 0) {
+                                                       tech_state->Powered = bdata;
+                                               } else if (find && g_strcmp0(dev_key, "Connected") == 0) {
+                                                       tech_state->Connected = bdata;
+                                               }
+                                       }
+                               }
+                               g_variant_iter_free(list_iter);
                        }
                }
        }
@@ -229,7 +223,8 @@ int _net_get_tech_state(GVariant *msg, network_tech_state_info_s* tech_state)
 }
 
 /** This function is used only to open Wi-Fi connection with hidden APs */
-int _net_open_connection_with_wifi_info(const net_wifi_connection_info_s* wifi_info)
+int _net_open_connection_with_wifi_info(network_info_s *network_info,
+               const net_wifi_connection_info_s* wifi_info)
 {
        __NETWORK_FUNC_ENTER__;
 
@@ -344,7 +339,7 @@ int _net_open_connection_with_wifi_info(const net_wifi_connection_info_s* wifi_i
                return NET_ERR_INVALID_PARAM;
        }
 
-       Error = _net_dbus_connect_service(&wifi_connection_info);
+       Error = _net_dbus_connect_service(network_info, &wifi_connection_info);
        if (Error != NET_ERR_NONE)
                WIFI_LOG(WIFI_ERROR, "Failed to request connect service. Error [%s]",
                                _net_print_error(Error));
@@ -353,273 +348,59 @@ int _net_open_connection_with_wifi_info(const net_wifi_connection_info_s* wifi_i
        return Error;
 }
 
-static void __net_client_clear_cb_data(net_event_info_s *client)
-{
-       if (client && client->Datalength > 0) {
-               if (client->Event == NET_EVENT_WIFI_SPECIFIC_SCAN_IND ||
-                               client->Event == NET_EVENT_WIFI_BSSID_SCAN_IND ||
-                               client->Event == NET_EVENT_WIFI_NETLINK_SCAN_IND) {
-                       GSList *bss_info_list = client->Data;
-
-                       if (bss_info_list != NULL) {
-                               g_slist_free_full(bss_info_list, g_free);
-                               client->Data = NULL;
-                       }
-               }
-               g_free(client->Data);
-               client->Data = NULL;
-       }
-       g_free(client);
-}
-
-static gboolean __net_client_cb_wifi_idle(gpointer data)
-{
-       net_event_info_s *event_data = (net_event_info_s *)data;
-
-       if (NetworkInfo.ClientEventCb_wifi != NULL)
-               NetworkInfo.ClientEventCb_wifi(event_data, NetworkInfo.user_data_wifi);
-
-       __net_client_clear_cb_data(event_data);
-
-       return FALSE;
-}
-
-void _net_client_callback(net_event_info_s *event_data)
-{
-       guint id;
-
-       __NETWORK_FUNC_ENTER__;
-
-       if (NetworkInfo.ref_count < 1) {
-               WIFI_LOG(WIFI_ERROR, "Application is not registered. "
-                               "If multi-threaded, thread integrity be broken.");
-               __NETWORK_FUNC_EXIT__;
-               return;
-       }
-
-       if (NetworkInfo.ClientEventCb_wifi != NULL) {
-               net_event_info_s *client = g_try_new0(net_event_info_s, 1);
-               if (client == NULL) {
-                       __NETWORK_FUNC_EXIT__;
-                       return;
-               }
-
-               memcpy(client, event_data, sizeof(net_event_info_s));
-               if (event_data->Datalength > 0) {
-                       if (event_data->Event == NET_EVENT_WIFI_SPECIFIC_SCAN_IND ||
-                               event_data->Event == NET_EVENT_WIFI_BSSID_SCAN_IND ||
-                               event_data->Event == NET_EVENT_WIFI_NETLINK_SCAN_IND) {
-                               client->Data = event_data->Data;
-                       } else {
-                               client->Data = g_try_malloc0(event_data->Datalength);
-                               if (client->Data == NULL) {
-                                       g_free(client);
-                                       __NETWORK_FUNC_EXIT__;
-                                       return;
-                               }
-
-                               memcpy(client->Data, event_data->Data, event_data->Datalength);
-                       }
-               } else {
-                       client->Datalength = 0;
-                       client->Data = NULL;
-               }
-
-               id = _net_client_callback_add(__net_client_cb_wifi_idle, (gpointer)client);
-               if (!id)
-                       __net_client_clear_cb_data(client);
-       }
-
-       __NETWORK_FUNC_EXIT__;
-}
-
-net_wifi_state_e _net_get_wifi_state(net_err_e *net_error)
+net_err_e _net_get_wifi_state(network_info_s *network_info)
 {
        __NETWORK_FUNC_ENTER__;
 
        net_err_e Error = NET_ERR_NONE;
        network_tech_state_info_s tech_state = { { 0, }, };
-       net_wifi_state_e wifi_state = WIFI_UNKNOWN;
 
        g_strlcpy(tech_state.technology, "wifi", NET_TECH_LENGTH_MAX);
-       Error = _net_dbus_get_technology_state(&tech_state);
+       Error = _net_dbus_get_technology_state(network_info, &tech_state);
        if (Error != NET_ERR_NONE) {
                WIFI_LOG(WIFI_ERROR,
                        "_net_dbus_get_technology_state() failed. Error [%s]",
                        _net_print_error(Error));
-               *net_error = Error;
                goto state_done;
        }
 
        if (tech_state.Powered == TRUE)
-               wifi_state = WIFI_ON;
+               network_info->wifi_state = WIFI_ON;
        else
-               wifi_state = WIFI_OFF;
+               network_info->wifi_state = WIFI_OFF;
 
 state_done:
        __NETWORK_FUNC_EXIT__;
-       return wifi_state;
-}
-
-static void __net_client_idle_destroy_cb(gpointer data)
-{
-       __NETWORK_FUNC_ENTER__;
-
-       if (!data) {
-               __NETWORK_FUNC_EXIT__;
-               return;
-       }
-
-       managed_idler_list = g_slist_remove(managed_idler_list, data);
-       g_free(data);
-
-       __NETWORK_FUNC_EXIT__;
-}
-
-static gboolean __net_client_idle_cb(gpointer user_data)
-{
-       __NETWORK_FUNC_ENTER__;
-
-       managed_idle_data_s *data = (managed_idle_data_s *)user_data;
-
-       if (!data) {
-               __NETWORK_FUNC_EXIT__;
-               return FALSE;
-       }
-
-       __NETWORK_FUNC_EXIT__;
-       return data->func(data->user_data);
-}
-
-guint _net_client_callback_add(GSourceFunc func, gpointer user_data)
-{
-       __NETWORK_FUNC_ENTER__;
-
-       guint id;
-       managed_idle_data_s *data;
-       GMainContext *context;
-       GSource *src;
-
-       if (!func) {
-               __NETWORK_FUNC_EXIT__;
-               return 0;
-       }
-
-       data = g_try_new0(managed_idle_data_s, 1);
-       if (!data) {
-               __NETWORK_FUNC_EXIT__;
-               return 0;
-       }
-
-       data->func = func;
-       data->user_data = user_data;
-
-       context = g_main_context_get_thread_default();
-       src = g_idle_source_new();
-       g_source_set_callback(src, __net_client_idle_cb, data,
-                       __net_client_idle_destroy_cb);
-       id = g_source_attach(src, context);
-       g_source_unref(src);
-       if (!id) {
-               g_free(data);
-               __NETWORK_FUNC_EXIT__;
-               return id;
-       }
-
-       data->id = id;
-
-       managed_idler_list = g_slist_append(managed_idler_list, data);
-
-       __NETWORK_FUNC_EXIT__;
-       return id;
-}
-
-void _net_client_callback_cleanup(void)
-{
-       __NETWORK_FUNC_ENTER__;
-
-       GSList *cur = managed_idler_list;
-       GSource *src;
-       managed_idle_data_s *data;
-
-       while (cur) {
-               GSList *next = cur->next;
-               data = (managed_idle_data_s *)cur->data;
-
-               src = g_main_context_find_source_by_id(g_main_context_default(), data->id);
-               if (src) {
-                       __net_client_clear_cb_data((net_event_info_s *)data->user_data);
-                       g_source_destroy(src);
-                       cur = managed_idler_list;
-               } else
-                       cur = next;
-       }
-
-       g_slist_free(managed_idler_list);
-       managed_idler_list = NULL;
-
-       __NETWORK_FUNC_EXIT__;
+       return Error;
 }
 
-void _net_clear_request_table(void)
+void _net_clear_request_table(network_info_s *network_info)
 {
        __NETWORK_FUNC_ENTER__;
 
        int i;
 
        for (i = 0; i < NETWORK_REQUEST_TYPE_MAX; i++)
-               memset(&request_table[i], 0, sizeof(network_request_table_s));
+               memset(&(network_info->request_table[i]), 0, sizeof(network_request_table_s));
 
        __NETWORK_FUNC_EXIT__;
 }
 
-gboolean _net_dbus_is_pending_call_used(void)
-{
-       if (gdbus_conn.conn_ref_count > 0)
-               return TRUE;
-
-       return FALSE;
-}
-
-void _net_dbus_pending_call_ref(void)
-{
-       g_object_ref(gdbus_conn.connection);
-
-       __sync_fetch_and_add(&gdbus_conn.conn_ref_count, 1);
-}
-
-void _net_dbus_pending_call_unref(void)
-{
-       if (gdbus_conn.conn_ref_count < 1)
-               return;
-
-       if (gdbus_conn.connection)
-               g_object_unref(gdbus_conn.connection);
-
-       if (__sync_sub_and_fetch(&gdbus_conn.conn_ref_count, 1) < 1 &&
-                       gdbus_conn.handle_libnetwork != NULL) {
-               WIFI_LOG(WIFI_ERROR, "A handle of libnetwork is not NULL");
-
-               if (NetworkInfo.ref_count < 1)
-                       gdbus_conn.connection = NULL;
-       }
-}
-
-int _net_dbus_create_gdbus_call(void)
+int _net_dbus_create_gdbus_call(network_info_s *network_info)
 {
        GError *error = NULL;
 
-       if (gdbus_conn.connection != NULL) {
-               __NETWORK_FUNC_EXIT__;
-               return NET_ERR_APP_ALREADY_REGISTERED;
-       }
-
 #if !GLIB_CHECK_VERSION(2, 36, 0)
        g_type_init();
 #endif
 
-       gdbus_conn.connection = g_bus_get_sync(G_BUS_TYPE_SYSTEM, NULL, &error);
-       if (gdbus_conn.connection == NULL) {
+       if (network_info == NULL) {
+               __NETWORK_FUNC_EXIT__;
+               return NET_ERR_APP_NOT_REGISTERED;
+       }
+
+       network_info->connection = g_bus_get_sync(G_BUS_TYPE_SYSTEM, NULL, &error);
+       if (network_info->connection == NULL) {
                if (error != NULL) {
                        WIFI_LOG(WIFI_ERROR,
                                        "Failed to connect to the D-BUS daemon [%s]", error->message);
@@ -628,55 +409,21 @@ int _net_dbus_create_gdbus_call(void)
                return NET_ERR_UNKNOWN;
        }
 
-       gdbus_conn.cancellable = g_cancellable_new();
-
-       if (gdbus_conn.handle_libnetwork != NULL) {
-               WIFI_LOG(WIFI_ERROR,
-                               "A handle of libnetwork is not NULL and should be released");
-
-               dlclose(gdbus_conn.handle_libnetwork);
-               gdbus_conn.handle_libnetwork = NULL;
-       }
+       network_info->cancellable = g_cancellable_new();
 
        return NET_ERR_NONE;
 }
 
-int _net_dbus_close_gdbus_call(void)
+void _net_dbus_close_gdbus_call(network_info_s *network_info)
 {
-       g_cancellable_cancel(gdbus_conn.cancellable);
-       g_object_unref(gdbus_conn.cancellable);
-       gdbus_conn.cancellable = NULL;
-
-       if (gdbus_conn.conn_ref_count < 1) {
-               WIFI_LOG(WIFI_INFO, "There is no pending call");
-       } else {
-               WIFI_LOG(WIFI_ERROR,
-                               "There are %d pending calls, waiting to be cleared",
-                               gdbus_conn.conn_ref_count);
+       if (network_info) {
+               g_cancellable_cancel(network_info->cancellable);
+               g_object_unref(network_info->cancellable);
+               network_info->cancellable = NULL;
 
-               if (gdbus_conn.handle_libnetwork != NULL)
-                       WIFI_LOG(WIFI_ERROR, "A handle of libnetwork is not NULL");
-
-               gdbus_conn.handle_libnetwork = dlopen("/usr/lib/libnetwork.so", RTLD_LAZY);
-               g_object_unref(gdbus_conn.connection);
+               g_object_unref(network_info->connection);
+               network_info->connection = NULL;
        }
-
-       if (G_IS_OBJECT(gdbus_conn.connection))
-               g_clear_object(&gdbus_conn.connection);
-       else
-               gdbus_conn.connection = NULL;
-
-       return NET_ERR_NONE;
-}
-
-GDBusConnection *_net_dbus_get_gdbus_conn(void)
-{
-       return gdbus_conn.connection;
-}
-
-GCancellable *_net_dbus_get_gdbus_cancellable(void)
-{
-       return gdbus_conn.cancellable;
 }
 //LCOV_EXCL_STOP
 
index 7f0e4d4..70a2be5 100755 (executable)
 #define NET_WPS_EI_OPERATION_FAILED 1
 #define NET_WPS_EI_SECURITY_WEP_PROHIBITED 2
 
-extern __thread network_info_s NetworkInfo;
-extern __thread network_request_table_s request_table[NETWORK_REQUEST_TYPE_MAX];
-extern __thread gboolean scan_pending;
-
-static __thread net_state_type_e service_state = NET_STATE_TYPE_UNKNOWN;
-static __thread int net_service_error = NET_ERR_NONE;
-static __thread guint gdbus_conn_subscribe_id_connman_state = 0;
-static __thread guint gdbus_conn_subscribe_id_connman_error = 0;
-static __thread guint gdbus_conn_subscribe_id_connman_scandone = 0;
-static __thread guint gdbus_conn_subscribe_id_connman_scanstarted = 0;
-static __thread guint gdbus_conn_subscribe_id_netconfig_wifi = 0;
-static __thread guint gdbus_conn_subscribe_id_netconfig = 0;
-
 struct cs_tid_info {
        int tid;
        guint subscribe_id_connman_state;
@@ -122,43 +109,58 @@ static const char *_convert_net_state_to_string(net_state_type_e net_state_type)
        return "Invalid parameter";
 }
 
-static int __net_handle_wifi_power_rsp(gboolean value)
+static int __net_handle_wifi_power_rsp(network_info_s *network_info,
+               GVariant *param, gboolean value)
 {
        __NETWORK_FUNC_ENTER__;
 
-       net_event_info_s event_data = { 0, };
+       net_event_info_s *event_data = NULL;
+       char *interface_name = NULL;
+
+       g_variant_get(param, "(s)", &interface_name);
+       if (g_strcmp0(interface_name, network_info->interface_name) != 0) {
+               __NETWORK_FUNC_EXIT__;
+               return NET_ERR_NONE;
+       }
+
+       event_data = g_try_malloc0(sizeof(net_event_info_s));
+       if (event_data == NULL) {
+               __NETWORK_FUNC_EXIT__;
+               return NET_ERR_OUT_OF_MEMORY;
+       }
 
        if (value == TRUE) {
-               NetworkInfo.wifi_state = WIFI_ON;
-               event_data.Error = NET_ERR_NONE;
+               network_info->wifi_state = WIFI_ON;
+               event_data->Error = NET_ERR_NONE;
                WIFI_LOG(WIFI_INFO, "wifi state: WIFI_ON");
        } else {
-               NetworkInfo.wifi_state = WIFI_OFF;
-               event_data.Error = NET_ERR_NONE;
+               network_info->wifi_state = WIFI_OFF;
+               event_data->Error = NET_ERR_NONE;
                WIFI_LOG(WIFI_INFO, "wifi state: WIFI_OFF");
 
-               if (request_table[NETWORK_REQUEST_TYPE_SCAN].flag == TRUE)
-                       memset(&request_table[NETWORK_REQUEST_TYPE_SCAN],
+               if (network_info->request_table[NETWORK_REQUEST_TYPE_SCAN].flag == TRUE)
+                       memset(&(network_info->request_table[NETWORK_REQUEST_TYPE_SCAN]),
                                        0, sizeof(network_request_table_s));
        }
 
-       if (request_table[NETWORK_REQUEST_TYPE_WIFI_POWER].flag == TRUE) {
-               memset(&request_table[NETWORK_REQUEST_TYPE_WIFI_POWER],
+       if (network_info->request_table[NETWORK_REQUEST_TYPE_WIFI_POWER].flag == TRUE) {
+               memset(&(network_info->request_table[NETWORK_REQUEST_TYPE_WIFI_POWER]),
                                0, sizeof(network_request_table_s));
 
-               event_data.Event = NET_EVENT_WIFI_POWER_RSP;
+               event_data->Event = NET_EVENT_WIFI_POWER_RSP;
                WIFI_LOG(WIFI_INFO, "NET_EVENT_WIFI_POWER_RSP");
-
-               _net_dbus_pending_call_unref();
        } else {
-               event_data.Event = NET_EVENT_WIFI_POWER_IND;
+               event_data->Event = NET_EVENT_WIFI_POWER_IND;
                WIFI_LOG(WIFI_INFO, "NET_EVENT_WIFI_POWER_IND");
        }
 
-       event_data.Datalength = sizeof(net_wifi_state_e);
-       event_data.Data = &(NetworkInfo.wifi_state);
+       event_data->Datalength = sizeof(net_wifi_state_e);
+       event_data->Data = &(network_info->wifi_state);
 
-       _net_client_callback(&event_data);
+       if (network_info->event_callback)
+               network_info->event_callback(event_data, network_info->user_data);
+
+       g_free(event_data);
 
        __NETWORK_FUNC_EXIT__;
        return NET_ERR_NONE;
@@ -184,18 +186,24 @@ static wlan_security_mode_type_e __net_get_wlan_sec_mode(int security)
        }
 }
 
-static int __net_handle_specific_scan_resp(GSList *bss_info_list)
+static int __net_handle_specific_scan_resp(network_info_s *network_info,
+               GSList *bss_info_list)
 {
        __NETWORK_FUNC_ENTER__;
 
        int count = 0;;
-       net_event_info_s event_data = { 0, };
+       net_event_info_s *event_data = NULL;
 
-       if (request_table[NETWORK_REQUEST_TYPE_SPECIFIC_SCAN].flag == TRUE) {
-               memset(&request_table[NETWORK_REQUEST_TYPE_SPECIFIC_SCAN],
-                               0, sizeof(network_request_table_s));
+       event_data = g_try_malloc0(sizeof(net_event_info_s));
+       if (event_data == NULL) {
+               g_slist_free_full(bss_info_list, g_free);
+               __NETWORK_FUNC_EXIT__;
+               return NET_ERR_OUT_OF_MEMORY;
+       }
 
-               _net_dbus_pending_call_unref();
+       if (network_info->request_table[NETWORK_REQUEST_TYPE_SPECIFIC_SCAN].flag == TRUE) {
+               memset(&(network_info->request_table[NETWORK_REQUEST_TYPE_SPECIFIC_SCAN]),
+                               0, sizeof(network_request_table_s));
 
                count = (int)g_slist_length(bss_info_list);
                WIFI_LOG(WIFI_INFO,
@@ -203,19 +211,22 @@ static int __net_handle_specific_scan_resp(GSList *bss_info_list)
                                NETCONFIG_SIGNAL_SPECIFIC_SCAN_DONE,
                                count);
 
-               event_data.Event = NET_EVENT_WIFI_SPECIFIC_SCAN_IND;
-               event_data.Datalength = count;
-               event_data.Data = bss_info_list;
+               event_data->Event = NET_EVENT_WIFI_SPECIFIC_SCAN_IND;
+               event_data->Datalength = count;
+               event_data->Data = bss_info_list;
 
-               _net_client_callback(&event_data);
-       } else
-               g_slist_free_full(bss_info_list, g_free);
+               if (network_info->event_callback)
+                       network_info->event_callback(event_data, network_info->user_data);
+       }
 
+       g_slist_free_full(bss_info_list, g_free);
+       g_free(event_data);
        __NETWORK_FUNC_EXIT__;
        return NET_ERR_NONE;
 }
 
-static int __net_handle_wifi_specific_scan_rsp(GVariant *param)
+static int __net_handle_wifi_specific_scan_rsp(network_info_s *network_info,
+               GVariant *param)
 {
        GVariantIter *iter = NULL;
        GVariant *value = NULL;
@@ -286,26 +297,29 @@ static int __net_handle_wifi_specific_scan_rsp(GVariant *param)
        }
        g_variant_iter_free(iter);
 
-       __net_handle_specific_scan_resp(bss_info_list);
-
-       /* To enhance performance,
-        * BSS list should be release in a delayed manner in _net_client_callback */
+       __net_handle_specific_scan_resp(network_info, bss_info_list);
 
        return NET_ERR_NONE;
 }
 
-static int __net_handle_bssid_scan_resp(GSList *bss_info_list)
+static int __net_handle_bssid_scan_resp(network_info_s *network_info,
+               GSList *bss_info_list)
 {
        __NETWORK_FUNC_ENTER__;
 
        int count = 0;;
-       net_event_info_s event_data = { 0, };
+       net_event_info_s *event_data = NULL;
 
-       if (request_table[NETWORK_REQUEST_TYPE_BSSID_SCAN].flag == TRUE) {
-               memset(&request_table[NETWORK_REQUEST_TYPE_BSSID_SCAN],
-                               0, sizeof(network_request_table_s));
+       event_data = g_try_malloc0(sizeof(net_event_info_s));
+       if (event_data == NULL) {
+               g_slist_free_full(bss_info_list, g_free);
+               __NETWORK_FUNC_EXIT__;
+               return NET_ERR_OUT_OF_MEMORY;
+       }
 
-               _net_dbus_pending_call_unref();
+       if (network_info->request_table[NETWORK_REQUEST_TYPE_BSSID_SCAN].flag == TRUE) {
+               memset(&(network_info->request_table[NETWORK_REQUEST_TYPE_BSSID_SCAN]),
+                               0, sizeof(network_request_table_s));
 
                count = (int)g_slist_length(bss_info_list);
                WIFI_LOG(WIFI_INFO,
@@ -313,19 +327,22 @@ static int __net_handle_bssid_scan_resp(GSList *bss_info_list)
                                NETCONFIG_SIGNAL_BSSID_SCAN_DONE,
                                count);
 
-               event_data.Event = NET_EVENT_WIFI_BSSID_SCAN_IND;
-               event_data.Datalength = count;
-               event_data.Data = bss_info_list;
+               event_data->Event = NET_EVENT_WIFI_BSSID_SCAN_IND;
+               event_data->Datalength = count;
+               event_data->Data = bss_info_list;
 
-               _net_client_callback(&event_data);
-       } else
-               g_slist_free_full(bss_info_list, g_free);
+               if (network_info->event_callback)
+                       network_info->event_callback(event_data, network_info->user_data);
+       }
 
+       g_slist_free_full(bss_info_list, g_free);
+       g_free(event_data);
        __NETWORK_FUNC_EXIT__;
        return NET_ERR_NONE;
 }
 
-static int __net_handle_wifi_bssid_scan_rsp(GVariant *param)
+static int __net_handle_wifi_bssid_scan_rsp(network_info_s *network_info,
+               GVariant *param)
 {
        GVariantIter *iter = NULL;
        GVariant *value = NULL;
@@ -340,8 +357,12 @@ static int __net_handle_wifi_bssid_scan_rsp(GVariant *param)
        gboolean bssid_found = FALSE;
        gboolean rssi_found = FALSE;
        gboolean mode_found = FALSE;
+       char *interface_name = NULL;
 
-       g_variant_get(param, "(a{sv})", &iter);
+       g_variant_get(param, "(sa{sv})", &interface_name, &iter);
+
+       if (g_strcmp0(interface_name, network_info->interface_name) != 0)
+               return NET_ERR_NONE;
 
        while (g_variant_iter_loop(iter, "{sv}", &key, &value)) {
                if (g_strcmp0(key, "ssid") == 0) {
@@ -383,23 +404,29 @@ static int __net_handle_wifi_bssid_scan_rsp(GVariant *param)
        }
        g_variant_iter_free(iter);
 
-       __net_handle_bssid_scan_resp(bss_info_list);
+       __net_handle_bssid_scan_resp(network_info, bss_info_list);
 
        return NET_ERR_NONE;
 }
 
-static int __net_handle_netlink_scan_resp(GSList *bss_info_list)
+static int __net_handle_netlink_scan_resp(network_info_s *network_info,
+               GSList *bss_info_list)
 {
        __NETWORK_FUNC_ENTER__;
 
        int count = 0;;
-       net_event_info_s event_data = { 0, };
+       net_event_info_s *event_data = NULL;
 
-       if (request_table[NETWORK_REQUEST_TYPE_NETLINK_SCAN].flag == TRUE) {
-               memset(&request_table[NETWORK_REQUEST_TYPE_NETLINK_SCAN],
-                               0, sizeof(network_request_table_s));
+       event_data = g_try_malloc0(sizeof(net_event_info_s));
+       if (event_data == NULL) {
+               g_slist_free_full(bss_info_list, g_free);
+               __NETWORK_FUNC_EXIT__;
+               return NET_ERR_OUT_OF_MEMORY;
+       }
 
-               _net_dbus_pending_call_unref();
+       if (network_info->request_table[NETWORK_REQUEST_TYPE_NETLINK_SCAN].flag == TRUE) {
+               memset(&(network_info->request_table[NETWORK_REQUEST_TYPE_NETLINK_SCAN]),
+                               0, sizeof(network_request_table_s));
 
                count = (int)g_slist_length(bss_info_list);
                WIFI_LOG(WIFI_INFO,
@@ -407,19 +434,22 @@ static int __net_handle_netlink_scan_resp(GSList *bss_info_list)
                                NETCONFIG_SIGNAL_NETLINK_SCAN_DONE,
                                count);
 
-               event_data.Event = NET_EVENT_WIFI_NETLINK_SCAN_IND;
-               event_data.Datalength = count;
-               event_data.Data = bss_info_list;
+               event_data->Event = NET_EVENT_WIFI_NETLINK_SCAN_IND;
+               event_data->Datalength = count;
+               event_data->Data = bss_info_list;
 
-               _net_client_callback(&event_data);
-       } else
-               g_slist_free_full(bss_info_list, g_free);
+               if (network_info->event_callback)
+                       network_info->event_callback(event_data, network_info->user_data);
+       }
 
+       g_slist_free_full(bss_info_list, g_free);
+       g_free(event_data);
        __NETWORK_FUNC_EXIT__;
        return NET_ERR_NONE;
 }
 
-static int __net_handle_wifi_netlink_scan_rsp(GVariant *param)
+static int __net_handle_wifi_netlink_scan_rsp(network_info_s *network_info,
+               GVariant *param)
 {
        GVariantIter *iter = NULL;
        GVariant *value = NULL;
@@ -439,8 +469,12 @@ static int __net_handle_wifi_netlink_scan_rsp(GVariant *param)
        gboolean freq_found = FALSE;
        gboolean rssi_found = FALSE;
        gboolean vsie_found = FALSE;
+       char *interface_name = NULL;
 
-       g_variant_get(param, "(a{sv})", &iter);
+       g_variant_get(param, "(sa{sv})", &interface_name, &iter);
+
+       if (g_strcmp0(interface_name, network_info->interface_name) != 0)
+               return NET_ERR_NONE;
 
        while (g_variant_iter_loop(iter, "{sv}", &key, &value)) {
                if (g_strcmp0(key, "ssid") == 0) {
@@ -516,7 +550,7 @@ static int __net_handle_wifi_netlink_scan_rsp(GVariant *param)
                                return NET_ERR_UNKNOWN;
                        }
 
-                       g_strlcpy(bss->ssid, ssid, strlen(ssid)+1);
+                       g_strlcpy(bss->ssid, ssid, strlen(ssid) + 1);
                        g_strlcpy(bss->bssid, bssid, WIFI_MAC_ADDR_LEN + 1);
                        bss->freq = freq;
                        bss->rssi = rssi;
@@ -535,117 +569,133 @@ static int __net_handle_wifi_netlink_scan_rsp(GVariant *param)
                }
        }
        g_variant_iter_free(iter);
-       __net_handle_netlink_scan_resp(bss_info_list);
+
+       __net_handle_netlink_scan_resp(network_info, bss_info_list);
 
        return NET_ERR_NONE;
 }
 
-static void __net_handle_state_ind(const char *profile_name,
-               net_state_type_e profile_state)
+static void __net_handle_state_ind(network_info_s *network_info,
+               const char *profile_name, net_state_type_e profile_state)
 {
        __NETWORK_FUNC_ENTER__;
 
-       net_event_info_s event_data = { 0, };
+       net_event_info_s *event_data = NULL;
 
-       event_data.Error = NET_ERR_NONE;
-       event_data.Event = NET_EVENT_NET_STATE_IND;
+       event_data = g_try_malloc0(sizeof(net_event_info_s));
+       if (event_data == NULL) {
+               __NETWORK_FUNC_EXIT__;
+               return;
+       }
 
-       g_strlcpy(event_data.ProfileName, profile_name, sizeof(event_data.ProfileName));
+       event_data->Error = NET_ERR_NONE;
+       event_data->Event = NET_EVENT_NET_STATE_IND;
 
-       event_data.Datalength = sizeof(net_state_type_e);
-       event_data.Data = &profile_state;
+       g_strlcpy(event_data->ProfileName, profile_name, sizeof(event_data->ProfileName));
+
+       event_data->Datalength = sizeof(net_state_type_e);
+       event_data->Data = &profile_state;
 
        WIFI_LOG(WIFI_INFO,
                        "Sending NET_EVENT_NET_STATE_IND, state: %d, profile name: %s",
-                       profile_state, event_data.ProfileName);
+                       profile_state, event_data->ProfileName);
+
+       if (network_info->event_callback)
+               network_info->event_callback(event_data, network_info->user_data);
 
-       _net_client_callback(&event_data);
+       g_free(event_data);
 
        __NETWORK_FUNC_EXIT__;
 }
 
-static void __net_handle_failure_ind(const char *profile_name)
+static void __net_handle_failure_ind(network_info_s *network_info,
+               const char *profile_name)
 {
        __NETWORK_FUNC_ENTER__;
 
-       net_event_info_s event_data = { 0, };
+       net_event_info_s *event_data = NULL;
 
-       const char *svc_name1 =
-                       request_table[NETWORK_REQUEST_TYPE_OPEN_CONNECTION].ProfileName;
-       const char *svc_name2 =
-                       request_table[NETWORK_REQUEST_TYPE_ENROLL_WPS].ProfileName;
-       const char *svc_name3 =
-                       request_table[NETWORK_REQUEST_TYPE_CLOSE_CONNECTION].ProfileName;
+       network_request_table_s *request_table = network_info->request_table;
+       const char *svc_name1 = request_table[NETWORK_REQUEST_TYPE_OPEN_CONNECTION].ProfileName;
+       const char *svc_name2 = request_table[NETWORK_REQUEST_TYPE_ENROLL_WPS].ProfileName;
+       const char *svc_name3 = request_table[NETWORK_REQUEST_TYPE_CLOSE_CONNECTION].ProfileName;
+
+       event_data = g_try_malloc0(sizeof(net_event_info_s));
+       if (event_data == NULL) {
+               __NETWORK_FUNC_EXIT__;
+               return;
+       }
 
        if (request_table[NETWORK_REQUEST_TYPE_OPEN_CONNECTION].flag == TRUE &&
                        strstr(profile_name, svc_name1) != NULL) {
                memset(&request_table[NETWORK_REQUEST_TYPE_OPEN_CONNECTION], 0,
                                sizeof(network_request_table_s));
 
-               event_data.Event = NET_EVENT_OPEN_RSP;
-
-               _net_dbus_pending_call_unref();
+               event_data->Event = NET_EVENT_OPEN_RSP;
        } else if (request_table[NETWORK_REQUEST_TYPE_ENROLL_WPS].flag == TRUE &&
                        g_strcmp0(profile_name, svc_name2) == 0) {
                memset(&request_table[NETWORK_REQUEST_TYPE_ENROLL_WPS], 0,
                                sizeof(network_request_table_s));
 
-               event_data.Event = NET_EVENT_WIFI_WPS_RSP;
+               event_data->Event = NET_EVENT_WIFI_WPS_RSP;
 
                memset(&request_table[NETWORK_REQUEST_TYPE_CLOSE_CONNECTION], 0,
                                                sizeof(network_request_table_s));
-
-               _net_dbus_pending_call_unref();
        } else if (request_table[NETWORK_REQUEST_TYPE_CLOSE_CONNECTION].flag == TRUE &&
                        g_strcmp0(profile_name, svc_name3) == 0) {
                memset(&request_table[NETWORK_REQUEST_TYPE_CLOSE_CONNECTION], 0,
                                sizeof(network_request_table_s));
 
-               event_data.Event = NET_EVENT_CLOSE_RSP;
-
-               _net_dbus_pending_call_unref();
+               event_data->Event = NET_EVENT_CLOSE_RSP;
        } else {
-               __net_handle_state_ind(profile_name, NET_STATE_TYPE_FAILURE);
+               __net_handle_state_ind(network_info, profile_name, NET_STATE_TYPE_FAILURE);
 
                __NETWORK_FUNC_EXIT__;
                return;
        }
 
-       g_strlcpy(event_data.ProfileName,
+       g_strlcpy(event_data->ProfileName,
                        profile_name, NET_PROFILE_NAME_LEN_MAX+1);
 
-       if (net_service_error != NET_ERR_NONE)
-               event_data.Error = net_service_error;
+       if (network_info->net_service_error != NET_ERR_NONE)
+               event_data->Error = network_info->net_service_error;
        else {
-               event_data.Error = NET_ERR_CONNECTION_CONNECT_FAILED;
-               WIFI_LOG(WIFI_ERROR, "Event error defined %d", event_data.Error);
+               event_data->Error = NET_ERR_CONNECTION_CONNECT_FAILED;
+               WIFI_LOG(WIFI_ERROR, "Event error defined %d", event_data->Error);
        }
-       event_data.Datalength = 0;
-       event_data.Data = NULL;
+       event_data->Datalength = 0;
+       event_data->Data = NULL;
 
-       net_service_error = NET_ERR_NONE;
+       network_info->net_service_error = NET_ERR_NONE;
 
-       WIFI_LOG(WIFI_ERROR, "State failure %d", event_data.Error);
-       _net_client_callback(&event_data);
+       WIFI_LOG(WIFI_ERROR, "State failure %d", event_data->Error);
 
        /* Reseting the state back in case of failure state */
-       service_state = NET_STATE_TYPE_IDLE;
+       network_info->service_state = NET_STATE_TYPE_IDLE;
+
+       if (network_info->event_callback)
+               network_info->event_callback(event_data, network_info->user_data);
 
+       g_free(event_data);
        __NETWORK_FUNC_EXIT__;
 }
 
-static void __net_handle_disconnect_ind(const char *profile_name)
+static void __net_handle_disconnect_ind(network_info_s *network_info,
+               const char *profile_name)
 {
        __NETWORK_FUNC_ENTER__;
 
-       net_event_info_s event_data = { 0, };
+       net_event_info_s *event_data = NULL;
+       network_request_table_s *request_table = network_info->request_table;
+       const char *svc_name1 = request_table[NETWORK_REQUEST_TYPE_CLOSE_CONNECTION].ProfileName;
+       const char *svc_name2 = request_table[NETWORK_REQUEST_TYPE_OPEN_CONNECTION].ProfileName;
+       const char *svc_name3 = request_table[NETWORK_REQUEST_TYPE_ENROLL_WPS].ProfileName;
 
-       const char *svc_name1 =
-                       request_table[NETWORK_REQUEST_TYPE_CLOSE_CONNECTION].ProfileName;
-       const char *svc_name2 =
-                       request_table[NETWORK_REQUEST_TYPE_OPEN_CONNECTION].ProfileName;
-       const char *svc_name3 =
-                       request_table[NETWORK_REQUEST_TYPE_ENROLL_WPS].ProfileName;
+       event_data = g_try_malloc0(sizeof(net_event_info_s));
+       if (event_data == NULL) {
+               __NETWORK_FUNC_EXIT__;
+               return;
+       }
 
        if (request_table[NETWORK_REQUEST_TYPE_OPEN_CONNECTION].flag == TRUE &&
                        strstr(profile_name, svc_name2) != NULL) {
@@ -653,16 +703,18 @@ static void __net_handle_disconnect_ind(const char *profile_name)
                                sizeof(network_request_table_s));
 
                /** Send Open Resp */
-               event_data.Error = NET_ERR_OPERATION_ABORTED;
-               event_data.Event =  NET_EVENT_OPEN_RSP;
-               g_strlcpy(event_data.ProfileName, profile_name, NET_PROFILE_NAME_LEN_MAX+1);
+               event_data->Error = NET_ERR_OPERATION_ABORTED;
+               event_data->Event =  NET_EVENT_OPEN_RSP;
+               g_strlcpy(event_data->ProfileName, profile_name, NET_PROFILE_NAME_LEN_MAX+1);
 
                WIFI_LOG(WIFI_INFO, "Sending NET_EVENT_OPEN_RSP");
 
-               _net_dbus_pending_call_unref();
+               if (network_info->event_callback)
+                       network_info->event_callback(event_data, network_info->user_data);
 
-               _net_client_callback(&event_data);
-               goto out;
+               g_free(event_data);
+               __NETWORK_FUNC_EXIT__;
+               return;
        }
 
        if (request_table[NETWORK_REQUEST_TYPE_ENROLL_WPS].flag == TRUE &&
@@ -671,15 +723,18 @@ static void __net_handle_disconnect_ind(const char *profile_name)
                                sizeof(network_request_table_s));
 
                /** Send WPS Resp */
-               event_data.Error = NET_ERR_OPERATION_ABORTED;
-               event_data.Event =  NET_EVENT_WIFI_WPS_RSP;
-               g_strlcpy(event_data.ProfileName, profile_name, NET_PROFILE_NAME_LEN_MAX+1);
+               event_data->Error = NET_ERR_OPERATION_ABORTED;
+               event_data->Event =  NET_EVENT_WIFI_WPS_RSP;
+               g_strlcpy(event_data->ProfileName, profile_name, NET_PROFILE_NAME_LEN_MAX+1);
 
                WIFI_LOG(WIFI_INFO, "Sending NET_EVENT_WIFI_WPS_RSP");
-               _net_dbus_pending_call_unref();
 
-               _net_client_callback(&event_data);
-               goto out;
+               if (network_info->event_callback)
+                       network_info->event_callback(event_data, network_info->user_data);
+
+               g_free(event_data);
+               __NETWORK_FUNC_EXIT__;
+               return;
        }
 
        if (request_table[NETWORK_REQUEST_TYPE_CLOSE_CONNECTION].flag == TRUE &&
@@ -688,50 +743,57 @@ static void __net_handle_disconnect_ind(const char *profile_name)
                                sizeof(network_request_table_s));
 
                /** Send Close Resp */
-               event_data.Error = NET_ERR_NONE;
-               event_data.Event =  NET_EVENT_CLOSE_RSP;
-               g_strlcpy(event_data.ProfileName, profile_name, NET_PROFILE_NAME_LEN_MAX+1);
+               event_data->Error = NET_ERR_NONE;
+               event_data->Event =  NET_EVENT_CLOSE_RSP;
+               g_strlcpy(event_data->ProfileName, profile_name, NET_PROFILE_NAME_LEN_MAX+1);
 
                WIFI_LOG(WIFI_INFO, "Sending NET_EVENT_CLOSE_RSP");
 
-               _net_dbus_pending_call_unref();
+               if (network_info->event_callback)
+                       network_info->event_callback(event_data, network_info->user_data);
 
-               _net_client_callback(&event_data);
-               goto out;
+               g_free(event_data);
+               __NETWORK_FUNC_EXIT__;
+               return;
        }
 
        /** Send Close Ind */
-       event_data.Error = NET_ERR_NONE;
-       event_data.Event =  NET_EVENT_CLOSE_IND;
-       g_strlcpy(event_data.ProfileName, profile_name, NET_PROFILE_NAME_LEN_MAX+1);
+       event_data->Error = NET_ERR_NONE;
+       event_data->Event =  NET_EVENT_CLOSE_IND;
+       g_strlcpy(event_data->ProfileName, profile_name, NET_PROFILE_NAME_LEN_MAX+1);
 
        WIFI_LOG(WIFI_INFO, "Sending NET_EVENT_CLOSE_IND");
 
-       _net_client_callback(&event_data);
-       net_forget_ap_finshed(NET_ERR_NONE);
-out:
-       __NETWORK_FUNC_EXIT__;
+       if (network_info->event_callback)
+               network_info->event_callback(event_data, network_info->user_data);
+
+       g_free(event_data);
+
+       net_forget_ap_finished(network_info, NET_ERR_NONE);
 }
 
-static int __net_handle_service_state_changed(const gchar *sig_path,
-               const char *key, const char *state)
+static int __net_handle_service_state_changed(network_info_s *network_info,
+               const gchar *sig_path, const char *key, const char *state)
 {
        net_err_e Error = NET_ERR_NONE;
        net_state_type_e old_state, new_state;
-
-       net_event_info_s event_data = { 0, };
+       net_event_info_s *event_data = NULL;
+       network_request_table_s *request_table = network_info->request_table;
 
        if (sig_path == NULL)
                return Error;
 
        WIFI_LOG(WIFI_INFO, "profile name: %s", sig_path);
 
-       if (NetworkInfo.wifi_state == WIFI_OFF) {
+       if (_net_check_service_mac_addr(network_info, sig_path) == FALSE)
+               return Error;
+
+       if (network_info->wifi_state == WIFI_OFF) {
                WIFI_LOG(WIFI_INFO, "Wi-Fi is off");
                return Error;
        }
 
-       old_state = service_state;
+       old_state = network_info->service_state;
        new_state = string2state(state);
        WIFI_LOG(WIFI_INFO, "old state [%s], new state [%s]",
                        _convert_net_state_to_string(old_state), _convert_net_state_to_string(new_state));
@@ -739,42 +801,43 @@ static int __net_handle_service_state_changed(const gchar *sig_path,
        if (old_state == new_state)
                return Error;
 
-       service_state = new_state;
+       network_info->service_state = new_state;
 
        switch (new_state) {
        case NET_STATE_TYPE_IDLE:
-               if (NetworkInfo.wifi_state == WIFI_CONNECTED)
-                       NetworkInfo.wifi_state = WIFI_ON;
+               if (network_info->wifi_state == WIFI_CONNECTED)
+                       network_info->wifi_state = WIFI_ON;
                if (old_state == NET_STATE_TYPE_DISCONNECT) {
                        break;
                } else if (old_state != NET_STATE_TYPE_FAILURE) {
-                       __net_handle_disconnect_ind(sig_path);
+                       __net_handle_disconnect_ind(network_info, sig_path);
                        break;
                }
 
        case NET_STATE_TYPE_ASSOCIATION:
        case NET_STATE_TYPE_CONFIGURATION:
-               __net_handle_state_ind(sig_path, new_state);
+               __net_handle_state_ind(network_info, sig_path, new_state);
                break;
 
        case NET_STATE_TYPE_READY:
        case NET_STATE_TYPE_ONLINE:
        {
+               event_data = g_try_malloc0(sizeof(net_event_info_s));
+               if (event_data == NULL)
+                       break;
+
                if (old_state != NET_STATE_TYPE_READY &&
                                old_state != NET_STATE_TYPE_ONLINE) {
-                       const char *svc_name1 =
-                                       request_table[NETWORK_REQUEST_TYPE_OPEN_CONNECTION].ProfileName;
+                       const char *svc_name1 = request_table[NETWORK_REQUEST_TYPE_OPEN_CONNECTION].ProfileName;
 
                        if (request_table[NETWORK_REQUEST_TYPE_OPEN_CONNECTION].flag == TRUE &&
                                        strstr(sig_path, svc_name1) != NULL) {
                                memset(&request_table[NETWORK_REQUEST_TYPE_OPEN_CONNECTION], 0,
                                                sizeof(network_request_table_s));
 
-                               event_data.Event = NET_EVENT_OPEN_RSP;
+                               event_data->Event = NET_EVENT_OPEN_RSP;
 
                                WIFI_LOG(WIFI_INFO, "Sending NET_EVENT_OPEN_RSP");
-
-                               _net_dbus_pending_call_unref();
                        } else if (request_table[NETWORK_REQUEST_TYPE_ENROLL_WPS].flag == TRUE) {
                                const char *svc_name2 =
                                        request_table[NETWORK_REQUEST_TYPE_ENROLL_WPS].ProfileName;
@@ -784,44 +847,44 @@ static int __net_handle_service_state_changed(const gchar *sig_path,
                                memset(&request_table[NETWORK_REQUEST_TYPE_ENROLL_WPS], 0,
                                           sizeof(network_request_table_s));
 
-                               event_data.Event = NET_EVENT_WIFI_WPS_RSP;
+                               event_data->Event = NET_EVENT_WIFI_WPS_RSP;
 
                                WIFI_LOG(WIFI_INFO, "Sending NET_EVENT_WIFI_WPS_RSP");
-
-                               _net_dbus_pending_call_unref();
                        } else {
-                               event_data.Event = NET_EVENT_OPEN_IND;
+                               event_data->Event = NET_EVENT_OPEN_IND;
 
                                WIFI_LOG(WIFI_INFO, "Sending NET_EVENT_OPEN_IND");
                        }
 
                        net_profile_info_s prof_info;
-                       if ((Error = net_get_profile_info(sig_path, &prof_info)) != NET_ERR_NONE) {
+                       if ((Error = net_get_profile_info(network_info, sig_path, &prof_info)) != NET_ERR_NONE) {
                                WIFI_LOG(WIFI_ERROR, "net_get_profile_info() failed [%s]",
                                                _net_print_error(Error));
 
-                               event_data.Datalength = 0;
-                               event_data.Data = NULL;
+                               event_data->Datalength = 0;
+                               event_data->Data = NULL;
                        } else {
-                               event_data.Datalength = sizeof(net_profile_info_s);
-                               event_data.Data = &prof_info;
+                               event_data->Datalength = sizeof(net_profile_info_s);
+                               event_data->Data = &prof_info;
                        }
 
-                       event_data.Error = Error;
-                       g_strlcpy(event_data.ProfileName, sig_path, NET_PROFILE_NAME_LEN_MAX+1);
+                       event_data->Error = Error;
+                       g_strlcpy(event_data->ProfileName, sig_path, NET_PROFILE_NAME_LEN_MAX+1);
 
-                       _net_client_callback(&event_data);
+                       if (network_info->event_callback)
+                               network_info->event_callback(event_data, network_info->user_data);
                }
 
+               g_free(event_data);
                break;
        }
        case NET_STATE_TYPE_DISCONNECT:
        {
-               __net_handle_disconnect_ind(sig_path);
+               __net_handle_disconnect_ind(network_info, sig_path);
                break;
        }
        case NET_STATE_TYPE_FAILURE:
-               __net_handle_failure_ind(sig_path);
+               __net_handle_failure_ind(network_info, sig_path);
                break;
 
        default:
@@ -832,92 +895,96 @@ static int __net_handle_service_state_changed(const gchar *sig_path,
        return Error;
 }
 
-static int __net_handle_service_set_error(const char *key, const char *error)
+static int __net_handle_service_set_error(network_info_s *network_info,
+               const char *key, const char *error)
 {
        if (error == NULL || *error == '\0')
                return NET_ERR_NONE;
 
        WIFI_LOG(WIFI_ERROR, "[%s] %s", key, error);
 
-       net_service_error = string2error(error);
+       network_info->net_service_error = string2error(error);
 
        return NET_ERR_NONE;
 }
 
-static int __net_handle_scan_changed(GVariant *param)
+static int __net_handle_scan_changed(network_info_s *network_info, GVariant *param)
 {
        __NETWORK_FUNC_ENTER__;
 
-       const char *key = NULL;
-       gboolean value = false;
        GVariant *var;
-       net_event_info_s event_data = { 0, };
+       gboolean value = false;
+       net_event_info_s *event_data = NULL;
+       char *interface_name = NULL;
+
+       g_variant_get(param, "(sv)", &interface_name, &var);
+
+       if (g_strcmp0(interface_name, network_info->interface_name) != 0) {
+               __NETWORK_FUNC_EXIT__;
+               return NET_ERR_NONE;
+       }
 
-       g_variant_get(param, "(sv)", &key, &var);
+       event_data = g_try_malloc0(sizeof(net_event_info_s));
+       if (event_data == NULL) {
+               __NETWORK_FUNC_EXIT__;
+               return NET_ERR_OUT_OF_MEMORY;
+       }
 
-       if (g_strcmp0(key, "scan_started") == 0)
-               value = true;
-       else if (g_strcmp0(key, "scan_done") == 0)
-               value = false;
+       value = g_variant_get_boolean(var);
 
-       WIFI_LOG(WIFI_INFO, "Key:[%s] value:[%d]", key, value);
+       WIFI_LOG(WIFI_INFO, "%s [%d]", interface_name, value);
 
-       event_data.Event = NET_EVENT_WIFI_SCAN_CHANGED;
-       event_data.Error = NET_ERR_NONE;
-       event_data.Datalength = sizeof(gboolean);
-       event_data.Data = &value;
+       event_data->Event = NET_EVENT_WIFI_SCAN_CHANGED;
+       event_data->Error = NET_ERR_NONE;
+       event_data->Datalength = sizeof(gboolean);
+       event_data->Data = &value;
 
-       _net_client_callback(&event_data);
+       if (network_info->event_callback)
+               network_info->event_callback(event_data, network_info->user_data);
 
-       g_free((gchar *)key);
-       if (NULL != var)
-               g_variant_unref(var);
+       g_free(event_data);
+
+       g_variant_unref(var);
 
        WIFI_LOG(WIFI_INFO, "Exit Function");
+
        __NETWORK_FUNC_EXIT__;
        return NET_ERR_NONE;
 }
 
-static int __net_handle_scan_done(GVariant *param)
+static int __net_handle_scan_done(network_info_s *network_info, GVariant *param)
 {
-       net_event_info_s event_data = { 0, };
-
-       const char *key = NULL;
        GVariant *value;
+       net_event_info_s *event_data = NULL;
        int last_scan_type = -1;
+       char *interface_name = NULL;
 
-       WIFI_LOG(WIFI_INFO, "param type: %s", g_variant_get_type_string(param));
+       g_variant_get(param, "(sv)", &interface_name, &value);
 
-       if (g_variant_is_of_type(param, ((const GVariantType *)"(sv)"))) {
-               g_variant_get(param, "(sv)", &key, &value);
-               WIFI_LOG(WIFI_INFO, "key: %s", key);
-               if (g_strcmp0(key, "Scantype") == 0) {
-                       if (g_variant_is_of_type(value, G_VARIANT_TYPE_INT32)) {
-                               last_scan_type = g_variant_get_int32(value);
-                               WIFI_LOG(WIFI_INFO, "last scan type: %d (0:full,1:specific,2:multi)", last_scan_type);
-                       }
-               }
+       if (g_strcmp0(interface_name, network_info->interface_name) != 0)
+               return NET_ERR_NONE;
 
-               g_free((gchar *)key);
-               if (NULL != value)
-                       g_variant_unref(value);
-       }
+       last_scan_type = g_variant_get_int32(value);
+       WIFI_LOG(WIFI_INFO, "%s last scan type: %d (0:full,1:specific,2:multi)",
+               interface_name, last_scan_type);
+
+       g_variant_unref(value);
 
        /* Check if any scan request is pending, if scan request is pending then
         * do not send scan-done signal to application and invoke pending scan request. */
-       WIFI_LOG(WIFI_INFO, "scan_pending: %d", scan_pending);
-       if (scan_pending == TRUE) {
+       WIFI_LOG(WIFI_INFO, "scan_pending: %d", network_info->scan_pending);
+       if (network_info->scan_pending == TRUE) {
                net_err_e Error = NET_ERR_NONE;
-               scan_pending = FALSE;
+               network_info->scan_pending = FALSE;
 
                int current_scan_type = -1;
-               if (request_table[NETWORK_REQUEST_TYPE_SCAN].flag == TRUE)
+               if (network_info->request_table[NETWORK_REQUEST_TYPE_SCAN].flag == TRUE)
                        current_scan_type = NETWORK_SCAN_TYPE_FULL_CHANNEL;
-               else if (request_table[NETWORK_REQUEST_TYPE_BSSID_SCAN].flag == TRUE)
+               else if (network_info->request_table[NETWORK_REQUEST_TYPE_BSSID_SCAN].flag == TRUE)
                        current_scan_type = NETWORK_SCAN_TYPE_BSSID_SCAN;
-               else if (request_table[NETWORK_REQUEST_TYPE_SPECIFIC_SCAN].flag == TRUE)
+               else if (network_info->request_table[NETWORK_REQUEST_TYPE_SPECIFIC_SCAN].flag == TRUE)
                        current_scan_type = NETWORK_SCAN_TYPE_SPECIFIC_SCAN;
-               else if (request_table[NETWORK_REQUEST_TYPE_MULTI_SCAN].flag == TRUE)
+               else if (network_info->request_table[NETWORK_REQUEST_TYPE_MULTI_SCAN].flag == TRUE)
                        current_scan_type = NETWORK_SCAN_TYPE_MULTI_SCAN;
 
                WIFI_LOG(WIFI_INFO, "Request scan type: %d (0:full,1:specific,2:multi)", current_scan_type);
@@ -925,67 +992,69 @@ static int __net_handle_scan_done(GVariant *param)
                        goto out;
 
                } else if (current_scan_type == NETWORK_SCAN_TYPE_FULL_CHANNEL) {
-                       Error = _net_dbus_scan_request();
+                       Error = _net_dbus_scan_request(network_info);
                        return Error;
                } else if (current_scan_type == NETWORK_SCAN_TYPE_BSSID_SCAN &&
                                last_scan_type != NETWORK_SCAN_TYPE_FULL_CHANNEL) {
-                       Error = _net_dbus_scan_request();
+                       Error = _net_dbus_scan_request(network_info);
                        return Error;
                } else if (current_scan_type == NETWORK_SCAN_TYPE_SPECIFIC_SCAN) {
-                       Error = _net_dbus_specific_scan_request(request_table[NETWORK_REQUEST_TYPE_SPECIFIC_SCAN].ssid);
+                       Error = _net_dbus_specific_scan_request(network_info,
+                               network_info->request_table[NETWORK_REQUEST_TYPE_SPECIFIC_SCAN].ssid);
                        return Error;
                } else if (current_scan_type == NETWORK_SCAN_TYPE_MULTI_SCAN) {
-                       GSList *list = request_table[NETWORK_REQUEST_TYPE_MULTI_SCAN].multi_scan_list;
+                       GSList *list = network_info->request_table[NETWORK_REQUEST_TYPE_MULTI_SCAN].multi_scan_list;
 
-                       Error = _net_dbus_multi_scan_request(list);
+                       Error = _net_dbus_multi_scan_request(network_info, list);
                        return Error;
                }
        }
 
 out:
-       if (request_table[NETWORK_REQUEST_TYPE_SPECIFIC_SCAN].flag == TRUE) {
-               memset(&request_table[NETWORK_REQUEST_TYPE_SPECIFIC_SCAN],
-                               0, sizeof(network_request_table_s));
+       event_data = g_try_malloc0(sizeof(net_event_info_s));
+       if (event_data == NULL)
+               return NET_ERR_OUT_OF_MEMORY;
 
-               _net_dbus_pending_call_unref();
+       if (network_info->request_table[NETWORK_REQUEST_TYPE_SPECIFIC_SCAN].flag == TRUE) {
+               memset(&(network_info->request_table[NETWORK_REQUEST_TYPE_SPECIFIC_SCAN]),
+                               0, sizeof(network_request_table_s));
 
                WIFI_LOG(WIFI_INFO, "Specific scan completed");
 
-               event_data.Event = NET_EVENT_WIFI_SPECIFIC_SCAN_IND;
+               event_data->Event = NET_EVENT_WIFI_SPECIFIC_SCAN_IND;
 
-       } else if (request_table[NETWORK_REQUEST_TYPE_MULTI_SCAN].flag == TRUE) {
+       } else if (network_info->request_table[NETWORK_REQUEST_TYPE_MULTI_SCAN].flag == TRUE) {
                WIFI_LOG(WIFI_INFO, "Multi scan completed");
-               g_slist_free_full(request_table[NETWORK_REQUEST_TYPE_MULTI_SCAN].multi_scan_list, g_free);
+               g_slist_free_full(network_info->request_table[NETWORK_REQUEST_TYPE_MULTI_SCAN].multi_scan_list, g_free);
 
-               memset(&request_table[NETWORK_REQUEST_TYPE_MULTI_SCAN], 0,
+               memset(&(network_info->request_table[NETWORK_REQUEST_TYPE_MULTI_SCAN]), 0,
                                sizeof(network_request_table_s));
 
-               _net_dbus_pending_call_unref();
-               event_data.Event = NET_EVENT_WIFI_MULTI_SCAN_IND;
+               event_data->Event = NET_EVENT_WIFI_MULTI_SCAN_IND;
 
-       } else if (request_table[NETWORK_REQUEST_TYPE_BSSID_SCAN].flag == TRUE) {
-
-               _net_dbus_pending_call_unref();
+       } else if (network_info->request_table[NETWORK_REQUEST_TYPE_BSSID_SCAN].flag == TRUE) {
                WIFI_LOG(WIFI_INFO, "BSSID Scan Completed");
-               __net_dbus_get_bssid_list();
+               __net_dbus_get_bssid_list(network_info);
+               g_free(event_data);
                return NET_ERR_NONE;
 
-       } else if (request_table[NETWORK_REQUEST_TYPE_SCAN].flag == TRUE) {
-               memset(&request_table[NETWORK_REQUEST_TYPE_SCAN], 0,
+       } else if (network_info->request_table[NETWORK_REQUEST_TYPE_SCAN].flag == TRUE) {
+               memset(&(network_info->request_table[NETWORK_REQUEST_TYPE_SCAN]), 0,
                                sizeof(network_request_table_s));
 
-               event_data.Event = NET_EVENT_WIFI_SCAN_RSP;
-
-               _net_dbus_pending_call_unref();
+               event_data->Event = NET_EVENT_WIFI_SCAN_RSP;
        } else {
-               event_data.Event = NET_EVENT_WIFI_SCAN_IND;
+               event_data->Event = NET_EVENT_WIFI_SCAN_IND;
        }
 
-       event_data.Error = NET_ERR_NONE;
-       event_data.Datalength = 0;
-       event_data.Data = NULL;
+       event_data->Error = NET_ERR_NONE;
+       event_data->Datalength = 0;
+       event_data->Data = NULL;
 
-       _net_client_callback(&event_data);
+       if (network_info->event_callback)
+               network_info->event_callback(event_data, network_info->user_data);
+
+       g_free(event_data);
 
        return NET_ERR_NONE;
 }
@@ -999,6 +1068,7 @@ static void __net_connman_service_signal_filter(GDBusConnection *conn,
        const char *key = NULL;
        const char *value = NULL;
        GVariant *var;
+       network_info_s *network_info = (network_info_s *)user_data;
 
        if (g_strcmp0(sig, SIGNAL_PROPERTY_CHANGED) == 0) {
                g_variant_get(param, "(sv)", &key, &var);
@@ -1009,11 +1079,11 @@ static void __net_connman_service_signal_filter(GDBusConnection *conn,
                        if (g_strcmp0(key, "State") == 0) {
                                g_variant_get(var, "s", &value);
 
-                               __net_handle_service_state_changed(path, key, value);
+                               __net_handle_service_state_changed(network_info, path, key, value);
                        } else if (g_strcmp0(key, "Error") == 0) {
                                g_variant_get(var, "s", &value);
 
-                               __net_handle_service_set_error(key, value);
+                               __net_handle_service_set_error(network_info, key, value);
                        }
                }
 
@@ -1026,7 +1096,8 @@ static void __net_connman_service_signal_filter(GDBusConnection *conn,
        __NETWORK_FUNC_EXIT__;
 }
 
-static int __net_handle_wifi_tdls_discover_event(GVariant *param)
+static int __net_handle_wifi_tdls_discover_event(network_info_s *network_info,
+               GVariant *param)
 {
        __NETWORK_FUNC_ENTER__;
 
@@ -1035,9 +1106,15 @@ static int __net_handle_wifi_tdls_discover_event(GVariant *param)
        const char *key = NULL;
        const gchar *sig_value = NULL;
        net_tdls_discover_s discover_info = { 0, "" };
+       net_event_info_s *event_data = NULL;
+       char *interface_name = NULL;
 
+       g_variant_get(param, "(sa{sv})", &interface_name, &iter);
 
-       g_variant_get(param, "(a{sv})", &iter);
+       if (g_strcmp0(interface_name, network_info->interface_name) != 0) {
+               __NETWORK_FUNC_EXIT__
+               return NET_ERR_NONE;
+       }
 
        while (g_variant_iter_loop(iter, "{sv}", &key, &value)) {
                if (g_strcmp0(key, "peermac") == 0) {
@@ -1055,35 +1132,40 @@ static int __net_handle_wifi_tdls_discover_event(GVariant *param)
        if (discover_info.type == 0
                        || NULL != strstr("00:00:00:00:00:00", discover_info.mac_add)) {
                WIFI_LOG(WIFI_INFO, "Clear the Discovery Flag");
-               if (request_table[NETWORK_REQUEST_TYPE_TDLS_DISCOVERY].flag == TRUE) {
-                               memset(&request_table[NETWORK_REQUEST_TYPE_TDLS_DISCOVERY], 0,
+               if (network_info->request_table[NETWORK_REQUEST_TYPE_TDLS_DISCOVERY].flag == TRUE) {
+                               memset(&(network_info->request_table[NETWORK_REQUEST_TYPE_TDLS_DISCOVERY]), 0,
                                                sizeof(network_request_table_s));
                }
        }
 
-       net_event_info_s event_data;
+       event_data = g_try_malloc0(sizeof(net_event_info_s));
+       if (event_data == NULL) {
+               __NETWORK_FUNC_EXIT__;
+               return NET_ERR_OUT_OF_MEMORY;
+       }
 
-       memset(&event_data, 0, sizeof(event_data));
-       event_data.Error = NET_ERR_NONE;
-       event_data.Event = NET_EVENT_WIFI_TDLS_DISCOVERED_IND;
+       event_data->Error = NET_ERR_NONE;
+       event_data->Event = NET_EVENT_WIFI_TDLS_DISCOVERED_IND;
 
-       event_data.Data = &discover_info;
+       event_data->Data = &discover_info;
 
-       if (event_data.Data)
-               event_data.Datalength = sizeof(net_tdls_discover_s);
+       if (event_data->Data)
+               event_data->Datalength = sizeof(net_tdls_discover_s);
        else
-               event_data.Datalength = 0;
+               event_data->Datalength = 0;
 
        WIFI_LOG(WIFI_ERROR, "Sending NET_EVENT_TDLS_DISCOVER_IND, Discover Type [%d]", discover_info.type);
 
-       _net_client_callback(&event_data);
-
+       if (network_info->event_callback)
+               network_info->event_callback(event_data, network_info->user_data);
 
+       g_free(event_data);
        __NETWORK_FUNC_EXIT__;
        return NET_ERR_NONE;
 }
 
-static int __net_handle_wifi_tdls_connected_event(GVariant *param)
+static int __net_handle_wifi_tdls_connected_event(network_info_s *network_info,
+               GVariant *param)
 {
        __NETWORK_FUNC_ENTER__;
 
@@ -1091,8 +1173,15 @@ static int __net_handle_wifi_tdls_connected_event(GVariant *param)
        GVariant *value = NULL;
        const char *key = NULL;
        const gchar *sig_value = NULL;
+       net_event_info_s *event_data = NULL;
+       char *interface_name = NULL;
 
-       g_variant_get(param, "(a{sv})", &iter);
+       g_variant_get(param, "(sa{sv})", &interface_name, &iter);
+
+       if (g_strcmp0(interface_name, network_info->interface_name) != 0) {
+               __NETWORK_FUNC_EXIT__
+               return NET_ERR_NONE;
+       }
 
        while (g_variant_iter_loop(iter, "{sv}", &key, &value)) {
                if (g_strcmp0(key, "peermac") == 0) {
@@ -1104,27 +1193,34 @@ static int __net_handle_wifi_tdls_connected_event(GVariant *param)
        }
        g_variant_iter_free(iter);
 
-       net_event_info_s event_data;
-       memset(&event_data, 0, sizeof(event_data));
+       event_data = g_try_malloc0(sizeof(net_event_info_s));
+       if (event_data == NULL) {
+               __NETWORK_FUNC_EXIT__;
+               return NET_ERR_OUT_OF_MEMORY;
+       }
 
-       event_data.Error = NET_ERR_NONE;
-       event_data.Event = NET_EVENT_WIFI_TDLS_CONNECTED_IND;
-       event_data.Data = g_strdup(sig_value);
+       event_data->Error = NET_ERR_NONE;
+       event_data->Event = NET_EVENT_WIFI_TDLS_CONNECTED_IND;
+       event_data->Data = g_strdup(sig_value);
 
-       if (event_data.Data)
-               event_data.Datalength = strlen(event_data.Data);
+       if (event_data->Data)
+               event_data->Datalength = strlen(event_data->Data);
        else
-               event_data.Datalength = 0;
+               event_data->Datalength = 0;
 
        WIFI_LOG(WIFI_ERROR, "Sending NET_EVENT_TDLS_CONNECTED_IND");
-       _net_client_callback(&event_data);
-       g_free(event_data.Data);
 
+       if (network_info->event_callback)
+               network_info->event_callback(event_data, network_info->user_data);
+
+       g_free(event_data->Data);
+       g_free(event_data);
        __NETWORK_FUNC_EXIT__;
        return NET_ERR_NONE;
 }
 
-static int __net_handle_wifi_tdls_disconnected_event(GVariant *param)
+static int __net_handle_wifi_tdls_disconnected_event(network_info_s *network_info,
+               GVariant *param)
 {
        __NETWORK_FUNC_ENTER__;
 
@@ -1132,8 +1228,15 @@ static int __net_handle_wifi_tdls_disconnected_event(GVariant *param)
        GVariant *value = NULL;
        const char *key = NULL;
        const gchar *sig_value = NULL;
+       net_event_info_s *event_data = NULL;
+       char *interface_name = NULL;
 
-       g_variant_get(param, "(a{sv})", &iter);
+       g_variant_get(param, "(a{sv})", &interface_name, &iter);
+
+       if (g_strcmp0(interface_name, network_info->interface_name) != 0) {
+               __NETWORK_FUNC_EXIT__
+               return NET_ERR_NONE;
+       }
 
        while (g_variant_iter_loop(iter, "{sv}", &key, &value)) {
                if (g_strcmp0(key, "peermac") == 0) {
@@ -1145,71 +1248,102 @@ static int __net_handle_wifi_tdls_disconnected_event(GVariant *param)
        }
        g_variant_iter_free(iter);
 
-       net_event_info_s event_data;
-       memset(&event_data, 0, sizeof(event_data));
+       event_data = g_try_malloc0(sizeof(net_event_info_s));
+       if (event_data == NULL) {
+               __NETWORK_FUNC_EXIT__;
+               return NET_ERR_OUT_OF_MEMORY;
+       }
 
-       event_data.Error = NET_ERR_NONE;
-       event_data.Event = NET_EVENT_WIFI_TDLS_DISCONNECTED_IND;
-       event_data.Data = g_strdup(sig_value);
+       event_data->Error = NET_ERR_NONE;
+       event_data->Event = NET_EVENT_WIFI_TDLS_DISCONNECTED_IND;
+       event_data->Data = g_strdup(sig_value);
 
-       if (event_data.Data)
-               event_data.Datalength = strlen(event_data.Data);
+       if (event_data->Data)
+               event_data->Datalength = strlen(event_data->Data);
        else
-               event_data.Datalength = 0;
+               event_data->Datalength = 0;
 
        WIFI_LOG(WIFI_ERROR, "Sending NET_EVENT_TDLS_DISCONNECTED_IND");
-       _net_client_callback(&event_data);
-       g_free(event_data.Data);
 
+       if (network_info->event_callback)
+               network_info->event_callback(event_data, network_info->user_data);
+
+       g_free(event_data->Data);
+       g_free(event_data);
        __NETWORK_FUNC_EXIT__;
        return NET_ERR_NONE;
 }
 
-static int __net_handle_wifi_connect_fail_event(GVariant *param)
+static int __net_handle_wifi_connect_fail_event(network_info_s *network_info,
+               GVariant *param)
 {
        __NETWORK_FUNC_ENTER__;
 
-       net_event_info_s event_data = { 0, };
+       net_event_info_s *event_data = NULL;
+       char *interface_name = NULL;
        network_request_table_s *open_info =
-                       &request_table[NETWORK_REQUEST_TYPE_OPEN_CONNECTION];
+                       &(network_info->request_table[NETWORK_REQUEST_TYPE_OPEN_CONNECTION]);
        network_request_table_s *wps_info =
-                       &request_table[NETWORK_REQUEST_TYPE_ENROLL_WPS];
+                       &(network_info->request_table[NETWORK_REQUEST_TYPE_ENROLL_WPS]);
+
+       g_variant_get(param, "(s)", &interface_name);
+       if (g_strcmp0(interface_name, network_info->interface_name) != 0) {
+               __NETWORK_FUNC_EXIT__;
+               return NET_ERR_NONE;
+       }
+
+       event_data = g_try_malloc0(sizeof(net_event_info_s));
+       if (event_data == NULL) {
+               __NETWORK_FUNC_EXIT__;
+               return NET_ERR_OUT_OF_MEMORY;
+       }
 
-       event_data.Datalength = 0;
-       event_data.Data = NULL;
+       event_data->Datalength = 0;
+       event_data->Data = NULL;
 
        WIFI_LOG(WIFI_ERROR, "Failed to connect WiFi");
 
        if (open_info->flag == TRUE) {
                memset(open_info, 0, sizeof(network_request_table_s));
-               event_data.Error = NET_ERR_INVALID_OPERATION;
-               event_data.Event = NET_EVENT_OPEN_RSP;
+               event_data->Error = NET_ERR_INVALID_OPERATION;
+               event_data->Event = NET_EVENT_OPEN_RSP;
                WIFI_LOG(WIFI_INFO, "Sending NET_EVENT_OPEN_RSP");
        } else if (wps_info->flag == TRUE) {
                memset(wps_info, 0, sizeof(network_request_table_s));
-               event_data.Error = NET_ERR_INVALID_OPERATION;
-               event_data.Event = NET_EVENT_WIFI_WPS_RSP;
+               event_data->Error = NET_ERR_INVALID_OPERATION;
+               event_data->Event = NET_EVENT_WIFI_WPS_RSP;
                WIFI_LOG(WIFI_INFO, "Sending NET_EVENT_WIFI_WPS_RSP");
        } else {
                WIFI_LOG(WIFI_WARN, "WiFi Connection flag not set");
                __NETWORK_FUNC_EXIT__;
                return NET_ERR_NONE;
        }
-       _net_client_callback(&event_data);
 
+       if (network_info->event_callback)
+               network_info->event_callback(event_data, network_info->user_data);
+
+       g_free(event_data);
        __NETWORK_FUNC_EXIT__;
        return NET_ERR_NONE;
 }
 
-static int __net_handle_wifi_wps_fail_event_rsp(GVariant *param)
+static int __net_handle_wifi_wps_fail_event_rsp(network_info_s *network_info,
+               GVariant *param)
 {
        GVariantIter *iter = NULL;
        GVariant *value = NULL;
        const char *key = NULL;
        gint32 config_error = 0;
        gint32 error_indication = 0;
+       net_event_info_s *event_data = NULL;
+       char *interface_name = NULL;
 
-       g_variant_get(param, "(a{sv})", &iter);
+       g_variant_get(param, "(a{sv})", &interface_name, &iter);
+
+       if (g_strcmp0(interface_name, network_info->interface_name) != 0) {
+               __NETWORK_FUNC_EXIT__;
+               return NET_ERR_NONE;
+       }
 
        while (g_variant_iter_loop(iter, "{sv}", &key, &value)) {
                if (g_strcmp0(key, "config_error") == 0) {
@@ -1222,37 +1356,42 @@ static int __net_handle_wifi_wps_fail_event_rsp(GVariant *param)
        }
        g_variant_iter_free(iter);
 
-       net_event_info_s event_data;
-       memset(&event_data, 0, sizeof(event_data));
+       event_data = g_try_malloc0(sizeof(net_event_info_s));
+       if (event_data == NULL) {
+               __NETWORK_FUNC_EXIT__;
+               return NET_ERR_OUT_OF_MEMORY;
+       }
 
-       if (request_table[NETWORK_REQUEST_TYPE_ENROLL_WPS].flag ==
-                                                                               TRUE)
-               memset(&request_table[NETWORK_REQUEST_TYPE_ENROLL_WPS], 0,
+       if (network_info->request_table[NETWORK_REQUEST_TYPE_ENROLL_WPS].flag == TRUE)
+               memset(&(network_info->request_table[NETWORK_REQUEST_TYPE_ENROLL_WPS]), 0,
                                sizeof(network_request_table_s));
 
-       event_data.Event = NET_EVENT_WIFI_WPS_RSP;
+       event_data->Event = NET_EVENT_WIFI_WPS_RSP;
        if (config_error == NET_WPS_CFG_MSG_TIMEOUT &&
                        error_indication == NET_WPS_EI_NO_ERROR)
-               event_data.Error = NET_ERR_CONNECTION_WPS_TIMEOUT;
+               event_data->Error = NET_ERR_CONNECTION_WPS_TIMEOUT;
        else if (config_error == NET_WPS_CFG_NO_ERROR &&
                        error_indication == NET_WPS_EI_OPERATION_FAILED)
-               event_data.Error = NET_ERR_CONNECTION_CONNECT_FAILED;
+               event_data->Error = NET_ERR_CONNECTION_CONNECT_FAILED;
        else if (config_error == NET_WPS_CFG_MULTIPLE_PBC_DETECTED &&
                        error_indication == NET_WPS_EI_NO_ERROR)
-               event_data.Error = NET_ERR_CONNECTION_WPS_OVERLAP;
+               event_data->Error = NET_ERR_CONNECTION_WPS_OVERLAP;
        else if (config_error == NET_WPS_CFG_NO_ERROR &&
                        error_indication == NET_WPS_EI_SECURITY_WEP_PROHIBITED)
-               event_data.Error = NET_ERR_CONNECTION_WPS_WEP_PROHIBITED;
+               event_data->Error = NET_ERR_CONNECTION_WPS_WEP_PROHIBITED;
 
-       event_data.Datalength = 0;
-       event_data.Data = NULL;
+       event_data->Datalength = 0;
+       event_data->Data = NULL;
 
-       _net_client_callback(&event_data);
+       if (network_info->event_callback)
+               network_info->event_callback(event_data, network_info->user_data);
 
+       g_free(event_data);
        return NET_ERR_NONE;
 }
 
-static int __net_handle_ip_conflict_rsp(GVariant *param)
+static int __net_handle_ip_conflict_rsp(network_info_s *network_info,
+               GVariant *param)
 {
        GVariantIter *iter = NULL;
        GVariant *value = NULL;
@@ -1262,10 +1401,13 @@ static int __net_handle_ip_conflict_rsp(GVariant *param)
        net_ip_conflict_info_s conflict_info;
        conflict_info.state = NULL;
        conflict_info.mac = NULL;
-       net_event_info_s event_data;
-       memset(&event_data, 0, sizeof(event_data));
+       net_event_info_s *event_data = NULL;
+       char *interface_name = NULL;
 
-       g_variant_get(param, "(a{sv})", &iter);
+       g_variant_get(param, "(sa{sv})", &interface_name, &iter);
+
+       if (g_strcmp0(interface_name, network_info->interface_name) != 0)
+               return NET_ERR_NONE;
 
        while (g_variant_iter_loop(iter, "{sv}", &key, &value)) {
                if (g_strcmp0(key, "state") == 0) {
@@ -1278,29 +1420,152 @@ static int __net_handle_ip_conflict_rsp(GVariant *param)
        }
        g_variant_iter_free(iter);
 
-
        WIFI_LOG(WIFI_INFO,
                        "Received the signal: %s",
                        NETCONFIG_SIGNAL_IP_CONFLICT_EVENT);
 
-       event_data.Error = NET_ERR_NONE;
-       event_data.Event = NET_EVENT_WIFI_IP_CONFLICT_IND;
-       event_data.Datalength = sizeof(net_ip_conflict_info_s);
-       event_data.Data = &conflict_info;
-       _net_client_callback(&event_data);
+       event_data = g_try_malloc0(sizeof(net_event_info_s));
+       if (event_data == NULL)
+               return NET_ERR_OUT_OF_MEMORY;
+
+       event_data->Error = NET_ERR_NONE;
+       event_data->Event = NET_EVENT_WIFI_IP_CONFLICT_IND;
+       event_data->Datalength = sizeof(net_ip_conflict_info_s);
+       event_data->Data = &conflict_info;
+
+       if (network_info->event_callback)
+               network_info->event_callback(event_data, network_info->user_data);
+
+       g_free(event_data);
+       return NET_ERR_NONE;
+}
+
+static int __net_handle_rssi_changed(network_info_s *network_info,
+               GVariant *param)
+{
+       net_rssi_info_s rssi_info = { 0, };
+       net_event_info_s *event_data = NULL;
+       char *interface_name = NULL;
+
+       g_variant_get(param, "(si)", &interface_name, &(rssi_info.rssi_level));
+
+       if (g_strcmp0(interface_name, network_info->interface_name) != 0)
+               return NET_ERR_NONE;
+
+       g_strlcpy(rssi_info.ifname, interface_name, strlen(interface_name) + 1);
+
+       WIFI_LOG(WIFI_INFO, "Rssi changed [%s:%d]",
+               rssi_info.ifname, rssi_info.rssi_level);
+
+       event_data = g_try_malloc0(sizeof(net_event_info_s));
+       if (event_data == NULL)
+               return NET_ERR_OUT_OF_MEMORY;
+
+       event_data->Error = NET_ERR_NONE;
+       event_data->Event = NET_EVENT_WIFI_RSSI_CHANGED;
+       event_data->Datalength = sizeof(net_rssi_info_s);
+       event_data->Data = &rssi_info;
+
+       if (network_info->event_callback)
+               network_info->event_callback(event_data, network_info->user_data);
+
+       g_free(event_data);
+       return NET_ERR_NONE;
+}
+
+static int __net_handle_rssi_level_changed(network_info_s *network_info,
+               GVariant *param)
+{
+       GVariantIter *iter = NULL;
+       GVariant *value = NULL;
+       const char *key = NULL;
+       const gchar *ifname = NULL;
+       net_rssi_info_s rssi_info = {0,};
+       net_event_info_s *event_data = NULL;
+
+       g_variant_get(param, "(a{sv})", &iter);
+
+       while (g_variant_iter_loop(iter, "{sv}", &key, &value)) {
+               if (g_strcmp0(key, "ifname") == 0) {
+                       ifname = g_variant_get_string(value, NULL);
+                       if (ifname && strlen(ifname) > 0)
+                               g_strlcpy(rssi_info.ifname, ifname, strlen(ifname) + 1);
+               } else if (g_strcmp0(key, "rssi_level") == 0) {
+                       rssi_info.rssi_level = g_variant_get_uint32(value);
+               }
+       }
+       g_variant_iter_free(iter);
+
+       WIFI_LOG(WIFI_INFO, "Rssi level changed [%s:%d]",
+               rssi_info.ifname, rssi_info.rssi_level);
 
+       event_data = g_try_malloc0(sizeof(net_event_info_s));
+       if (event_data == NULL)
+               return NET_ERR_OUT_OF_MEMORY;
+
+       event_data->Error = NET_ERR_NONE;
+       event_data->Event = NET_EVENT_WIFI_RSSI_LEVEL_CHANGED;
+       event_data->Datalength = sizeof(net_rssi_info_s);
+       event_data->Data = &rssi_info;
+
+       if (network_info->event_callback)
+               network_info->event_callback(event_data, network_info->user_data);
+
+       g_free(event_data);
        return NET_ERR_NONE;
 }
 
-static int __net_handle_dpp_uri_generated(GVariant *param)
+static int __net_handle_module_state_changed(network_info_s *network_info,
+               GVariant *param)
+{
+       GVariantIter *iter = NULL;
+       GVariant *value = NULL;
+       const char *key = NULL;
+       const gchar *ifname = NULL;
+       net_module_info_s module_info = {0,};
+       net_event_info_s *event_data = NULL;
+
+       g_variant_get(param, "(a{sv})", &iter);
+
+       while (g_variant_iter_loop(iter, "{sv}", &key, &value)) {
+               if (g_strcmp0(key, "ifname") == 0) {
+                       ifname = g_variant_get_string(value, NULL);
+                       if (ifname && strlen(ifname) > 0)
+                               g_strlcpy(module_info.ifname, ifname, strlen(ifname) + 1);
+               } else if (g_strcmp0(key, "status_uevent") == 0) {
+                       module_info.status_uevent = g_variant_get_uint32(value);
+               }
+       }
+       g_variant_iter_free(iter);
+
+       WIFI_LOG(WIFI_INFO, "Module state changed [%s:%d]",
+               module_info.ifname, module_info.status_uevent);
+
+       event_data = g_try_malloc0(sizeof(net_event_info_s));
+       if (event_data == NULL)
+               return NET_ERR_OUT_OF_MEMORY;
+
+       event_data->Error = NET_ERR_NONE;
+       event_data->Event = NET_EVENT_WIFI_MODULE_STATE_CHANGED;
+       event_data->Datalength = sizeof(net_module_info_s);
+       event_data->Data = &module_info;
+
+       if (network_info->event_callback)
+               network_info->event_callback(event_data, network_info->user_data);
+
+       g_free(event_data);
+       return NET_ERR_NONE;
+}
+
+static int __net_handle_dpp_uri_generated(network_info_s *network_info,
+               GVariant *param)
 {
        GVariantIter *iter = NULL;
        GVariant *value = NULL;
        gchar *key = NULL;
        const gchar *uri_str = NULL;
        net_dpp_event_info_s dpp_event_info = {0,};
-       net_event_info_s event_data;
-       memset(&event_data, 0, sizeof(event_data));
+       net_event_info_s *event_data = NULL;
 
        g_variant_get(param, "(a{sv})", &iter);
 
@@ -1319,24 +1584,31 @@ static int __net_handle_dpp_uri_generated(GVariant *param)
                        "Received the signal: %s",
                        NETCONFIG_SIGNAL_DPP_URI_GENERATED);
 
-       event_data.Error = NET_ERR_NONE;
-       event_data.Event = NET_EVENT_WIFI_DPP_URI_GENERATED;
-       event_data.Datalength = sizeof(net_dpp_event_info_s);
-       event_data.Data = &dpp_event_info;
-       _net_client_callback(&event_data);
+       event_data = g_try_malloc0(sizeof(net_event_info_s));
+       if (event_data == NULL)
+               return NET_ERR_OUT_OF_MEMORY;
+
+       event_data->Error = NET_ERR_NONE;
+       event_data->Event = NET_EVENT_WIFI_DPP_URI_GENERATED;
+       event_data->Datalength = sizeof(net_dpp_event_info_s);
+       event_data->Data = &dpp_event_info;
+
+       if (network_info->event_callback)
+               network_info->event_callback(event_data, network_info->user_data);
 
+       g_free(event_data);
        return NET_ERR_NONE;
 }
 
-static int __net_handle_dpp_bootstrapped(GVariant *param)
+static int __net_handle_dpp_bootstrapped(network_info_s *network_info,
+               GVariant *param)
 {
        GVariantIter *iter = NULL;
        GVariant *value = NULL;
        gchar *key = NULL;
        net_dpp_event_info_s dpp_event_info;
        dpp_event_info.peer_id = 0;
-       net_event_info_s event_data;
-       memset(&event_data, 0, sizeof(event_data));
+       net_event_info_s *event_data = NULL;
 
        g_variant_get(param, "(a{sv})", &iter);
 
@@ -1350,24 +1622,31 @@ static int __net_handle_dpp_bootstrapped(GVariant *param)
                        "Received the signal: %s",
                        NETCONFIG_SIGNAL_DPP_BOOTSTRAPPED);
 
-       event_data.Error = NET_ERR_NONE;
-       event_data.Event = NET_EVENT_WIFI_DPP_BOOTSTRAPPED;
-       event_data.Datalength = sizeof(net_dpp_event_info_s);
-       event_data.Data = &dpp_event_info;
-       _net_client_callback(&event_data);
+       event_data = g_try_malloc0(sizeof(net_event_info_s));
+       if (event_data == NULL)
+               return NET_ERR_OUT_OF_MEMORY;
 
+       event_data->Error = NET_ERR_NONE;
+       event_data->Event = NET_EVENT_WIFI_DPP_BOOTSTRAPPED;
+       event_data->Datalength = sizeof(net_dpp_event_info_s);
+       event_data->Data = &dpp_event_info;
+
+       if (network_info->event_callback)
+               network_info->event_callback(event_data, network_info->user_data);
+
+       g_free(event_data);
        return NET_ERR_NONE;
 }
 
-static int __net_handle_dpp_awaiting(GVariant *param)
+static int __net_handle_dpp_awaiting(network_info_s *network_info,
+               GVariant *param)
 {
        GVariantIter *iter = NULL;
        GVariant *value = NULL;
        gchar *key = NULL;
        net_dpp_event_info_s dpp_event_info;
        dpp_event_info.own_id = 0;
-       net_event_info_s event_data;
-       memset(&event_data, 0, sizeof(event_data));
+       net_event_info_s *event_data = NULL;
 
        g_variant_get(param, "(a{sv})", &iter);
 
@@ -1381,25 +1660,32 @@ static int __net_handle_dpp_awaiting(GVariant *param)
                        "Received the signal: %s",
                        NETCONFIG_SIGNAL_DPP_AWAITING);
 
-       event_data.Error = NET_ERR_NONE;
-       event_data.Event = NET_EVENT_WIFI_DPP_AWAITING;
-       event_data.Datalength = sizeof(net_dpp_event_info_s);
-       event_data.Data = &dpp_event_info;
-       _net_client_callback(&event_data);
+       event_data = g_try_malloc0(sizeof(net_event_info_s));
+       if (event_data == NULL)
+               return NET_ERR_OUT_OF_MEMORY;
+
+       event_data->Error = NET_ERR_NONE;
+       event_data->Event = NET_EVENT_WIFI_DPP_AWAITING;
+       event_data->Datalength = sizeof(net_dpp_event_info_s);
+       event_data->Data = &dpp_event_info;
+
+       if (network_info->event_callback)
+               network_info->event_callback(event_data, network_info->user_data);
 
+       g_free(event_data);
        return NET_ERR_NONE;
 }
 
 
-static int __net_handle_dpp_events(GVariant *param, net_event_e event)
+static int __net_handle_dpp_events(network_info_s *network_info,
+               GVariant *param, net_event_e event)
 {
        GVariantIter *iter = NULL;
        GVariant *value = NULL;
        gchar *key = NULL;
        net_dpp_event_info_s dpp_event_info;
        dpp_event_info.peer_id = 0;
-       net_event_info_s event_data;
-       memset(&event_data, 0, sizeof(event_data));
+       net_event_info_s *event_data = NULL;
 
        g_variant_get(param, "(a{sv})", &iter);
 
@@ -1411,32 +1697,50 @@ static int __net_handle_dpp_events(GVariant *param, net_event_e event)
        }
        g_variant_iter_free(iter);
 
-       event_data.Error = NET_ERR_NONE;
-       event_data.Event = event;
-       event_data.Datalength = sizeof(net_dpp_event_info_s);
-       event_data.Data = &dpp_event_info;
-       _net_client_callback(&event_data);
+       event_data = g_try_malloc0(sizeof(net_event_info_s));
+       if (event_data == NULL)
+               return NET_ERR_OUT_OF_MEMORY;
 
+       event_data->Error = NET_ERR_NONE;
+       event_data->Event = event;
+       event_data->Datalength = sizeof(net_dpp_event_info_s);
+       event_data->Data = &dpp_event_info;
+
+       if (network_info->event_callback)
+               network_info->event_callback(event_data, network_info->user_data);
+
+       g_free(event_data);
        return NET_ERR_NONE;
 }
 
-static int __net_handle_dpp_failed(GVariant *param)
+static int __net_handle_dpp_failed(network_info_s *network_info,
+               GVariant *param)
 {
-       net_event_info_s event_data;
-       memset(&event_data, 0, sizeof(event_data));
+       net_event_info_s *event_data = NULL;
 
        WIFI_LOG(WIFI_INFO,
                        "Received the signal: %s",
                        NETCONFIG_SIGNAL_DPP_FAILED);
 
-       event_data.Error = NET_ERR_NONE;
-       event_data.Event = NET_EVENT_WIFI_DPP_FAILED;
-       _net_client_callback(&event_data);
 
+       event_data = g_try_malloc0(sizeof(net_event_info_s));
+       if (event_data == NULL) {
+               __NETWORK_FUNC_EXIT__;
+               return NET_ERR_OUT_OF_MEMORY;
+       }
+
+       event_data->Error = NET_ERR_NONE;
+       event_data->Event = NET_EVENT_WIFI_DPP_FAILED;
+
+       if (network_info->event_callback)
+               network_info->event_callback(event_data, network_info->user_data);
+
+       g_free(event_data);
        return NET_ERR_NONE;
 }
 
-static int __net_handle_dpp_removed(GVariant *param)
+static int __net_handle_dpp_removed(network_info_s *network_info,
+               GVariant *param)
 {
        GVariantIter *iter = NULL;
        GVariant *value = NULL;
@@ -1444,8 +1748,7 @@ static int __net_handle_dpp_removed(GVariant *param)
        net_dpp_event_info_s dpp_event_info;
        dpp_event_info.peer_id = 0;
        dpp_event_info.own_id = 0;
-       net_event_info_s event_data;
-       memset(&event_data, 0, sizeof(event_data));
+       net_event_info_s *event_data = NULL;
 
        g_variant_get(param, "(a{sv})", &iter);
 
@@ -1461,80 +1764,98 @@ static int __net_handle_dpp_removed(GVariant *param)
                        "Received the signal: %s",
                        NETCONFIG_SIGNAL_DPP_REMOVED);
 
-       event_data.Error = NET_ERR_NONE;
-       event_data.Event = NET_EVENT_WIFI_DPP_REMOVED;
-       event_data.Datalength = sizeof(net_dpp_event_info_s);
-       event_data.Data = &dpp_event_info;
-       _net_client_callback(&event_data);
+       event_data = g_try_malloc0(sizeof(net_event_info_s));
+       if (event_data == NULL) {
+               __NETWORK_FUNC_EXIT__;
+               return NET_ERR_OUT_OF_MEMORY;
+       }
 
+       event_data->Error = NET_ERR_NONE;
+       event_data->Event = NET_EVENT_WIFI_DPP_REMOVED;
+       event_data->Datalength = sizeof(net_dpp_event_info_s);
+       event_data->Data = &dpp_event_info;
+
+       if (network_info->event_callback)
+               network_info->event_callback(event_data, network_info->user_data);
+
+       g_free(event_data);
        return NET_ERR_NONE;
 }
 
-
 static void __net_connman_manager_signal_filter(GDBusConnection *conn,
                const gchar *name, const gchar *path, const gchar *interface,
                const gchar *sig, GVariant *param, gpointer user_data)
 {
+       network_info_s *network_info = (network_info_s *)user_data;
+
        if (g_strcmp0(sig, SIGNAL_SCAN_CHANGED) == 0)
-               __net_handle_scan_changed(param);
+               __net_handle_scan_changed(network_info, param);
        else if (g_strcmp0(sig, SIGNAL_SCAN_DONE) == 0)
-               __net_handle_scan_done(param);
+               __net_handle_scan_done(network_info, param);
 }
 
 static void __net_netconfig_signal_filter(GDBusConnection *conn,
                const gchar *name, const gchar *path, const gchar *interface,
                const gchar *sig, GVariant *param, gpointer user_data)
 {
+       network_info_s *network_info = (network_info_s *)user_data;
+
        if (g_strcmp0(sig, NETCONFIG_SIGNAL_POWERON_COMPLETED) == 0)
-               __net_handle_wifi_power_rsp(TRUE);
+               __net_handle_wifi_power_rsp(network_info, param, TRUE);
        else if (g_strcmp0(sig, NETCONFIG_SIGNAL_POWEROFF_COMPLETED) == 0)
-               __net_handle_wifi_power_rsp(FALSE);
+               __net_handle_wifi_power_rsp(network_info, param, FALSE);
        else if (g_strcmp0(sig, NETCONFIG_SIGNAL_SPECIFIC_SCAN_DONE) == 0)
-               __net_handle_wifi_specific_scan_rsp(param);
+               __net_handle_wifi_specific_scan_rsp(network_info, param);
        else if (g_strcmp0(sig, NETCONFIG_SIGNAL_BSSID_SCAN_DONE) == 0)
-               __net_handle_wifi_bssid_scan_rsp(param);
+               __net_handle_wifi_bssid_scan_rsp(network_info, param);
        else if (g_strcmp0(sig, NETCONFIG_SIGNAL_NETLINK_SCAN_DONE) == 0)
-               __net_handle_wifi_netlink_scan_rsp(param);
+               __net_handle_wifi_netlink_scan_rsp(network_info, param);
        else if (g_strcmp0(sig, NETCONFIG_SIGNAL_TDLS_PEER_FOUND) == 0)
-               __net_handle_wifi_tdls_discover_event(param);
+               __net_handle_wifi_tdls_discover_event(network_info, param);
        else if (g_strcmp0(sig, NETCONFIG_SIGNAL_TDLS_CONNECTED) == 0)
-               __net_handle_wifi_tdls_connected_event(param);
+               __net_handle_wifi_tdls_connected_event(network_info, param);
        else if (g_strcmp0(sig, NETCONFIG_SIGNAL_TDLS_DISCONNECTED) == 0)
-               __net_handle_wifi_tdls_disconnected_event(param);
+               __net_handle_wifi_tdls_disconnected_event(network_info, param);
        else if (g_strcmp0(sig, NETCONFIG_SIGNAL_WIFI_CONNECT_FAIL) == 0)
-               __net_handle_wifi_connect_fail_event(param);
+               __net_handle_wifi_connect_fail_event(network_info, param);
        else if (g_strcmp0(sig, NETCONFIG_SIGNAL_WPS_FAIL_EVENT) == 0)
-               __net_handle_wifi_wps_fail_event_rsp(param);
+               __net_handle_wifi_wps_fail_event_rsp(network_info, param);
        else if (g_strcmp0(sig, NETCONFIG_SIGNAL_IP_CONFLICT_EVENT) == 0)
-               __net_handle_ip_conflict_rsp(param);
+               __net_handle_ip_conflict_rsp(network_info, param);
+       else if (g_strcmp0(sig, NETCONFIG_SIGNAL_RSSI_CHANGED) == 0)
+               __net_handle_rssi_changed(network_info, param);
+       else if (g_strcmp0(sig, NETCONFIG_SIGNAL_RSSI_LEVEL_CHANGED) == 0)
+               __net_handle_rssi_level_changed(network_info, param);
+       else if (g_strcmp0(sig, NETCONFIG_SIGNAL_MODULE_STATE_CHANGED) == 0)
+               __net_handle_module_state_changed(network_info, param);
        else if (g_strcmp0(sig, NETCONFIG_SIGNAL_DPP_URI_GENERATED) == 0)
-               __net_handle_dpp_uri_generated(param);
+               __net_handle_dpp_uri_generated(network_info, param);
        else if (g_strcmp0(sig, NETCONFIG_SIGNAL_DPP_BOOTSTRAPPED) == 0)
-               __net_handle_dpp_bootstrapped(param);
+               __net_handle_dpp_bootstrapped(network_info, param);
        else if (g_strcmp0(sig, NETCONFIG_SIGNAL_DPP_AWAITING) == 0)
-               __net_handle_dpp_awaiting(param);
+               __net_handle_dpp_awaiting(network_info, param);
        else if (g_strcmp0(sig, NETCONFIG_SIGNAL_DPP_AUTHENTICATING) == 0)
-               __net_handle_dpp_events(param, NET_EVENT_WIFI_DPP_AUTHENTICATING);
+               __net_handle_dpp_events(network_info, param, NET_EVENT_WIFI_DPP_AUTHENTICATING);
        else if (g_strcmp0(sig, NETCONFIG_SIGNAL_DPP_AUTH_SUCCESS) == 0)
-               __net_handle_dpp_events(param, NET_EVENT_WIFI_DPP_AUTH_SUCCESS);
+               __net_handle_dpp_events(network_info, param, NET_EVENT_WIFI_DPP_AUTH_SUCCESS);
        else if (g_strcmp0(sig, NETCONFIG_SIGNAL_DPP_AUTH_FAILED) == 0)
-               __net_handle_dpp_events(param, NET_EVENT_WIFI_DPP_AUTH_FAILED);
+               __net_handle_dpp_events(network_info, param, NET_EVENT_WIFI_DPP_AUTH_FAILED);
        else if (g_strcmp0(sig, NETCONFIG_SIGNAL_DPP_NOT_COMPATIBLE) == 0)
-               __net_handle_dpp_events(param, NET_EVENT_WIFI_DPP_NOT_COMPATIBLE);
+               __net_handle_dpp_events(network_info, param, NET_EVENT_WIFI_DPP_NOT_COMPATIBLE);
        else if (g_strcmp0(sig, NETCONFIG_SIGNAL_DPP_CONF_FAILED) == 0)
-               __net_handle_dpp_events(param, NET_EVENT_WIFI_DPP_CONF_FAILED);
+               __net_handle_dpp_events(network_info, param, NET_EVENT_WIFI_DPP_CONF_FAILED);
        else if (g_strcmp0(sig, NETCONFIG_SIGNAL_DPP_SCAN_PEER_QR) == 0)
-               __net_handle_dpp_events(param, NET_EVENT_WIFI_DPP_SCAN_PEER_QR);
+               __net_handle_dpp_events(network_info, param, NET_EVENT_WIFI_DPP_SCAN_PEER_QR);
        else if (g_strcmp0(sig, NETCONFIG_SIGNAL_DPP_NETWORK_ID) == 0)
-               __net_handle_dpp_events(param, NET_EVENT_WIFI_DPP_NETWORK_ID);
+               __net_handle_dpp_events(network_info, param, NET_EVENT_WIFI_DPP_NETWORK_ID);
        else if (g_strcmp0(sig, NETCONFIG_SIGNAL_DPP_CONF_SENT) == 0)
-               __net_handle_dpp_events(param, NET_EVENT_WIFI_DPP_CONF_SENT);
+               __net_handle_dpp_events(network_info, param, NET_EVENT_WIFI_DPP_CONF_SENT);
        else if (g_strcmp0(sig, NETCONFIG_SIGNAL_DPP_CONF_RECEIVED) == 0)
-               __net_handle_dpp_events(param, NET_EVENT_WIFI_DPP_CONF_RECEIVED);
+               __net_handle_dpp_events(network_info, param, NET_EVENT_WIFI_DPP_CONF_RECEIVED);
        else if (g_strcmp0(sig, NETCONFIG_SIGNAL_DPP_FAILED) == 0)
-               __net_handle_dpp_failed(param);
+               __net_handle_dpp_failed(network_info, param);
        else if (g_strcmp0(sig, NETCONFIG_SIGNAL_DPP_REMOVED) == 0)
-               __net_handle_dpp_removed(param);
+               __net_handle_dpp_removed(network_info, param);
 }
 
 static void __net_netconfig_network_signal_filter(GDBusConnection *conn,
@@ -1544,7 +1865,7 @@ static void __net_netconfig_network_signal_filter(GDBusConnection *conn,
        return;
 }
 
-static int __net_get_tech_states(GVariant *message, net_state_type_e *state)
+static int __net_get_tech_states(network_info_s *network_info, GVariant *message)
 {
        __NETWORK_FUNC_ENTER__;
 
@@ -1555,8 +1876,8 @@ static int __net_get_tech_states(GVariant *message, net_state_type_e *state)
        gchar *path = NULL;
        gchar *key = NULL;
 
-       if (NetworkInfo.wifi_state == WIFI_UNKNOWN)
-               NetworkInfo.wifi_state = WIFI_OFF;
+       if (network_info->wifi_state == WIFI_UNKNOWN)
+               network_info->wifi_state = WIFI_OFF;
 
        g_variant_get(message, "(a(oa{sv}))", &iter);
        while (g_variant_iter_loop(iter, "(oa{sv})", &path, &next)) {
@@ -1564,24 +1885,43 @@ static int __net_get_tech_states(GVariant *message, net_state_type_e *state)
                        continue;
 
                while (g_variant_iter_loop(next, "{sv}", &key, &variant)) {
-                       gboolean data;
-
-                       if (g_variant_is_of_type(variant, G_VARIANT_TYPE_BOOLEAN)) {
-                               data = g_variant_get_boolean(variant);
-                               WIFI_LOG(WIFI_INFO, "key-[%s] - %s", key, data ? "True" : "False");
-
-                               if (strcmp(key, "Powered") == 0) {
-                                       if (data == FALSE)
-                                               NetworkInfo.wifi_state = WIFI_OFF;
-                                       else if (data == TRUE && NetworkInfo.wifi_state < WIFI_ON)
-                                               NetworkInfo.wifi_state = WIFI_ON;
-                               } else if (strcmp(key, "Connected") == 0 && data) {
-                                       *(state) = NET_STATE_TYPE_READY;
-                                       NetworkInfo.wifi_state = WIFI_CONNECTED;
+                       if (g_strcmp0(key, "Device.List") == 0) {
+                               GVariantIter *list_iter = NULL;
+                               gchar *dev_key = NULL;
+                               GVariant *dev_var = NULL;
+                               const gchar *sdata = NULL;
+                               gboolean bdata = FALSE;
+                               gboolean find = FALSE;
+
+                               g_variant_get(variant, "a{sv}", &list_iter);
+                               while(g_variant_iter_loop(list_iter, "{sv}", &dev_key, &dev_var)) {
+                                       if (g_variant_is_of_type(dev_var, G_VARIANT_TYPE_STRING)) {
+                                               sdata = g_variant_get_string(dev_var, NULL);
+                                               WIFI_LOG(WIFI_INFO, "%s [%s]", dev_key, sdata);
+
+                                               if (g_strcmp0(dev_key, "Ifname") == 0) {
+                                                       find = g_strcmp0(sdata, network_info->interface_name) == 0 ? TRUE : FALSE;
+                                               } else if (find && g_strcmp0(dev_key, "MAC.Address") == 0) {
+                                                       g_strlcpy(network_info->mac_address, sdata, WIFI_MAC_ADDR_LEN + 1);
+                                               }
+                                       } else if (g_variant_is_of_type(dev_var, G_VARIANT_TYPE_BOOLEAN)) {
+                                               bdata = g_variant_get_boolean(dev_var);
+                                               WIFI_LOG(WIFI_INFO, "%s [%s]", dev_key, bdata ? "True" : "False");
+
+                                               if (find && g_strcmp0(dev_key, "Powered") == 0) {
+                                                       if (bdata == FALSE)
+                                                               network_info->wifi_state = WIFI_OFF;
+                                                       else if (network_info->wifi_state < WIFI_ON)
+                                                               network_info->wifi_state = WIFI_ON;
+                                               } else if (find && g_strcmp0(dev_key, "Connected") == 0) {
+                                                       if (bdata == TRUE) {
+                                                               network_info->service_state = NET_STATE_TYPE_READY;
+                                                               network_info->wifi_state = WIFI_CONNECTED;
+                                                       }
+                                               }
+                                       }
                                }
-                               /* For further use
-                               else if (strcmp(key, "Tethering") == 0 && data) {
-                               } */
+                               g_variant_iter_free(list_iter);
                        }
                }
        }
@@ -1591,16 +1931,20 @@ static int __net_get_tech_states(GVariant *message, net_state_type_e *state)
        return Error;
 }
 
-static int __net_dbus_get_bssid_list()
+static int __net_dbus_get_bssid_list(network_info_s *network_info)
 {
        __NETWORK_FUNC_ENTER__;
 
        net_err_e Error = NET_ERR_NONE;
+       GVariant *params = NULL;
        GVariant *message = NULL;
 
-       message = _net_invoke_dbus_method(NETCONFIG_SERVICE,
-                       NETCONFIG_WIFI_PATH, NETCONFIG_WIFI_INTERFACE,
-                       "GetBssidList", NULL, &Error);
+       params = g_variant_new("(s)", network_info->interface_name);
+
+       message = _net_invoke_dbus_method(network_info,
+                       NETCONFIG_SERVICE, NETCONFIG_WIFI_PATH,
+                       NETCONFIG_WIFI_INTERFACE, "GetBssidList",
+                       params, &Error);
        if (message == NULL) {
                WIFI_LOG(WIFI_ERROR, "Failed to get bssid list");
                goto done;
@@ -1613,28 +1957,25 @@ done:
        return Error;
 }
 
-static int __net_dbus_get_technology_states(net_state_type_e *state)
+static int __net_dbus_get_technology_states(network_info_s *network_info)
 {
        __NETWORK_FUNC_ENTER__;
 
        net_err_e Error = NET_ERR_NONE;
        GVariant *message = NULL;
 
-       if (state == NULL) {
-               WIFI_LOG(WIFI_ERROR, "Invalid parameter");
-               __NETWORK_FUNC_EXIT__;
-               return NET_ERR_INVALID_PARAM;
-       }
+       network_info->service_state = NET_STATE_TYPE_UNKNOWN;
 
-       message = _net_invoke_dbus_method(CONNMAN_SERVICE,
-                       CONNMAN_MANAGER_PATH, CONNMAN_MANAGER_INTERFACE,
-                       "GetTechnologies", NULL, &Error);
+       message = _net_invoke_dbus_method(network_info,
+                       CONNMAN_SERVICE, CONNMAN_MANAGER_PATH,
+                       CONNMAN_MANAGER_INTERFACE, "GetTechnologies",
+                       NULL, &Error);
        if (message == NULL) {
                WIFI_LOG(WIFI_ERROR, "Failed to get technology info");
                goto done;
        }
 
-       Error = __net_get_tech_states(message, state);
+       Error = __net_get_tech_states(network_info, message);
 
        g_variant_unref(message);
 
@@ -1643,7 +1984,7 @@ done:
        return Error;
 }
 
-void _net_set_cs_tid(int tid)
+void _net_set_cs_tid(network_info_s *network_info, int tid)
 {
        GSList *list;
        struct cs_tid_info *tid_info = NULL;
@@ -1670,12 +2011,12 @@ void _net_set_cs_tid(int tid)
                cs_tid_list = g_slist_prepend(cs_tid_list, tid_info);
        }
 
-       tid_info->subscribe_id_connman_state = gdbus_conn_subscribe_id_connman_state;
-       tid_info->subscribe_id_connman_error = gdbus_conn_subscribe_id_connman_error;
-       tid_info->subscribe_id_connman_scandone = gdbus_conn_subscribe_id_connman_scandone;
-       tid_info->subscribe_id_connman_scanstarted = gdbus_conn_subscribe_id_connman_scanstarted;
-       tid_info->subscribe_id_netconfig_wifi = gdbus_conn_subscribe_id_netconfig_wifi;
-       tid_info->subscribe_id_netconfig = gdbus_conn_subscribe_id_netconfig;
+       tid_info->subscribe_id_connman_state = network_info->subscribe_id_connman_state;
+       tid_info->subscribe_id_connman_error = network_info->subscribe_id_connman_error;
+       tid_info->subscribe_id_connman_scandone = network_info->subscribe_id_connman_scandone;
+       tid_info->subscribe_id_connman_scanstarted = network_info->subscribe_id_connman_scanstarted;
+       tid_info->subscribe_id_netconfig_wifi = network_info->subscribe_id_netconfig_wifi;
+       tid_info->subscribe_id_netconfig = network_info->subscribe_id_netconfig;
 
        WIFI_LOG(WIFI_INFO, "tid %d, tid_info %p", tid, tid_info);
 }
@@ -1729,65 +2070,20 @@ void _net_unset_cs_tid(int tid)
 }
 //LCOV_EXCL_STOP
 
-int _net_deregister_signal(void)
+int _net_register_signal(network_info_s *network_info)
 {
        __NETWORK_FUNC_ENTER__;
 
-       GDBusConnection *connection;
        net_err_e Error = NET_ERR_NONE;
 
-       connection = _net_dbus_get_gdbus_conn();
-       if (connection == NULL) {
-               WIFI_LOG(WIFI_ERROR, "Already de-registered"); //LCOV_EXCL_LINE
-               __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
-               return NET_ERR_APP_NOT_REGISTERED; //LCOV_EXCL_LINE
-       }
-
-       g_dbus_connection_signal_unsubscribe(connection,
-                                               gdbus_conn_subscribe_id_connman_state);
-       g_dbus_connection_signal_unsubscribe(connection,
-                                               gdbus_conn_subscribe_id_connman_error);
-       g_dbus_connection_signal_unsubscribe(connection,
-                                               gdbus_conn_subscribe_id_connman_scandone);
-       g_dbus_connection_signal_unsubscribe(connection,
-                                               gdbus_conn_subscribe_id_connman_scanstarted);
-       g_dbus_connection_signal_unsubscribe(connection,
-                                               gdbus_conn_subscribe_id_netconfig_wifi);
-       g_dbus_connection_signal_unsubscribe(connection,
-                                               gdbus_conn_subscribe_id_netconfig);
-
-       Error = _net_dbus_close_gdbus_call();
-       if (Error != NET_ERR_NONE) {
-               __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
-               return Error; //LCOV_EXCL_LINE
-       }
-
-       __NETWORK_FUNC_EXIT__;
-       return Error;
-}
-
-int _net_register_signal(void)
-{
-       __NETWORK_FUNC_ENTER__;
-
-       GDBusConnection *connection;
-       net_err_e Error = NET_ERR_NONE;
-
-       Error = _net_dbus_create_gdbus_call();
-       if (Error != NET_ERR_NONE) {
-               __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
-               return Error; //LCOV_EXCL_LINE
-       }
-
-       connection = _net_dbus_get_gdbus_conn();
-       if (connection == NULL) {
-               __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
-               return NET_ERR_UNKNOWN; //LCOV_EXCL_LINE
+       if (network_info == NULL) {
+               __NETWORK_FUNC_EXIT__;
+               return NET_ERR_INVALID_PARAM;
        }
 
        /* Create connman service state connection */
-       gdbus_conn_subscribe_id_connman_state = g_dbus_connection_signal_subscribe(
-                       connection,
+       network_info->subscribe_id_connman_state = g_dbus_connection_signal_subscribe(
+                       network_info->connection,
                        CONNMAN_SERVICE,
                        CONNMAN_SERVICE_INTERFACE,
                        SIGNAL_PROPERTY_CHANGED,
@@ -1795,12 +2091,12 @@ int _net_register_signal(void)
                        "State",
                        G_DBUS_SIGNAL_FLAGS_NONE,
                        __net_connman_service_signal_filter,
-                       NULL,
+                       network_info,
                        NULL);
 
        /* Create connman service error connection */
-       gdbus_conn_subscribe_id_connman_error = g_dbus_connection_signal_subscribe(
-                       connection,
+       network_info->subscribe_id_connman_error = g_dbus_connection_signal_subscribe(
+                       network_info->connection,
                        CONNMAN_SERVICE,
                        CONNMAN_SERVICE_INTERFACE,
                        SIGNAL_PROPERTY_CHANGED,
@@ -1808,12 +2104,12 @@ int _net_register_signal(void)
                        "Error",
                        G_DBUS_SIGNAL_FLAGS_NONE,
                        __net_connman_service_signal_filter,
-                       NULL,
+                       network_info,
                        NULL);
 
        /* Create net-config service connection for network */
-       gdbus_conn_subscribe_id_netconfig = g_dbus_connection_signal_subscribe(
-                       connection,
+       network_info->subscribe_id_netconfig = g_dbus_connection_signal_subscribe(
+                       network_info->connection,
                        NETCONFIG_SERVICE,
                        NETCONFIG_NETWORK_INTERFACE,
                        NULL,
@@ -1821,12 +2117,12 @@ int _net_register_signal(void)
                        NULL,
                        G_DBUS_SIGNAL_FLAGS_NONE,
                        __net_netconfig_network_signal_filter,
-                       NULL,
+                       network_info,
                        NULL);
 
        /* Create connman service scandone connection */
-       gdbus_conn_subscribe_id_connman_scandone = g_dbus_connection_signal_subscribe(
-                       connection,
+       network_info->subscribe_id_connman_scandone = g_dbus_connection_signal_subscribe(
+                       network_info->connection,
                        CONNMAN_SERVICE,
                        CONNMAN_MANAGER_INTERFACE,
                        "ScanDone",
@@ -1834,12 +2130,12 @@ int _net_register_signal(void)
                        NULL,
                        G_DBUS_SIGNAL_FLAGS_NONE,
                        __net_connman_manager_signal_filter,
-                       NULL,
+                       network_info,
                        NULL);
 
        /* Create connman service scanstarted connection */
-       gdbus_conn_subscribe_id_connman_scanstarted = g_dbus_connection_signal_subscribe(
-                       connection,
+       network_info->subscribe_id_connman_scanstarted = g_dbus_connection_signal_subscribe(
+                       network_info->connection,
                        CONNMAN_SERVICE,
                        CONNMAN_MANAGER_INTERFACE,
                        SIGNAL_SCAN_CHANGED,
@@ -1847,12 +2143,12 @@ int _net_register_signal(void)
                        NULL,
                        G_DBUS_SIGNAL_FLAGS_NONE,
                        __net_connman_manager_signal_filter,
-                       NULL,
+                       network_info,
                        NULL);
 
        /* Create net-config service connection */
-       gdbus_conn_subscribe_id_netconfig_wifi = g_dbus_connection_signal_subscribe(
-                       connection,
+       network_info->subscribe_id_netconfig_wifi = g_dbus_connection_signal_subscribe(
+                       network_info->connection,
                        NETCONFIG_SERVICE,
                        NETCONFIG_WIFI_INTERFACE,
                        NULL,
@@ -1860,34 +2156,69 @@ int _net_register_signal(void)
                        NULL,
                        G_DBUS_SIGNAL_FLAGS_NONE,
                        __net_netconfig_signal_filter,
-                       NULL,
+                       network_info,
                        NULL);
 
+       /* LCOV_EXCL_START */
+       if (network_info->subscribe_id_connman_state == 0 ||
+               network_info->subscribe_id_connman_error == 0 ||
+               network_info->subscribe_id_connman_scandone == 0 ||
+               network_info->subscribe_id_connman_scanstarted == 0 ||
+               network_info->subscribe_id_netconfig_wifi == 0) {
+               WIFI_LOG(WIFI_ERROR, "Failed register signals "
+                               "connman_state(%d), connman_error(%d), connman_scandone(%d), "
+                               "connman_scanstarted(%d), netconfig_wifi(%d)",
+                               network_info->subscribe_id_connman_state,
+                               network_info->subscribe_id_connman_error,
+                               network_info->subscribe_id_connman_scandone,
+                               network_info->subscribe_id_connman_scanstarted,
+                               network_info->subscribe_id_netconfig_wifi);
+               _net_deregister_signal(network_info);
+               Error = NET_ERR_INVALID_OPERATION;
+       }
+       /* LCOV_EXCL_STOP */
+
        __NETWORK_FUNC_EXIT__;
        return Error;
 }
 
-int _net_init_service_state(void)
+void _net_deregister_signal(network_info_s *network_info)
+{
+       __NETWORK_FUNC_ENTER__;
+
+       if (network_info) {
+               g_dbus_connection_signal_unsubscribe(network_info->connection,
+                                       network_info->subscribe_id_connman_state);
+               g_dbus_connection_signal_unsubscribe(network_info->connection,
+                                       network_info->subscribe_id_connman_error);
+               g_dbus_connection_signal_unsubscribe(network_info->connection,
+                                       network_info->subscribe_id_connman_scandone);
+               g_dbus_connection_signal_unsubscribe(network_info->connection,
+                                       network_info->subscribe_id_connman_scanstarted);
+               g_dbus_connection_signal_unsubscribe(network_info->connection,
+                                       network_info->subscribe_id_netconfig_wifi);
+               g_dbus_connection_signal_unsubscribe(network_info->connection,
+                                       network_info->subscribe_id_netconfig);
+       }
+
+       __NETWORK_FUNC_EXIT__;
+}
+
+int _net_init_service_state(network_info_s *network_info)
 {
        __NETWORK_FUNC_ENTER__;
 
        net_err_e Error = NET_ERR_NONE;
-       service_state = NET_STATE_TYPE_UNKNOWN;
 
-       Error = __net_dbus_get_technology_states(&service_state);
+       Error = __net_dbus_get_technology_states(network_info);
        if (Error != NET_ERR_NONE) {
                __NETWORK_FUNC_EXIT__; //LCOV_EXCL_LINE
                return Error; //LCOV_EXCL_LINE
        }
 
        WIFI_LOG(WIFI_INFO, "init service state, wifi:%s",
-                       _convert_net_state_to_string(service_state));
+               _convert_net_state_to_string(network_info->service_state));
 
        __NETWORK_FUNC_EXIT__;
        return NET_ERR_NONE;
 }
-
-net_state_type_e _net_get_service_state()
-{
-       return service_state;
-}
index 367e39c..8d7b7f1 100755 (executable)
@@ -51,7 +51,8 @@ static char *__ap_convert_ip_to_string(net_addr_s *ip_addr,
        return ipstr;
 }
 
-static void __wifi_init_ap(net_profile_info_s *profile_info, const char *essid)
+static void __wifi_init_ap(wifi_manager_handle_s *wifi_handle,
+               net_profile_info_s *profile_info, const char *essid)
 {
        profile_info->ProfileState = NET_STATE_TYPE_IDLE;
        profile_info->net_info.IpConfigType = NET_IP_CONFIG_TYPE_OFF;
@@ -60,6 +61,8 @@ static void __wifi_init_ap(net_profile_info_s *profile_info, const char *essid)
        profile_info->security_info.sec_mode = WLAN_SEC_MODE_NONE;
        profile_info->security_info.enc_mode = WLAN_ENC_MODE_NONE;
        g_strlcpy(profile_info->essid, essid, NET_WLAN_ESSID_LEN+1);
+
+       profile_info->network_info = wifi_handle->network_info;
 }
 
 static char *__wifi_create_profile_name(const char *ssid,
@@ -347,9 +350,9 @@ EXPORT_API int wifi_manager_ap_create(wifi_manager_h wifi,
                return WIFI_MANAGER_ERROR_OUT_OF_MEMORY; //LCOV_EXCL_LINE
        }
 
-       __wifi_init_ap(ap_info, essid);
+       __wifi_init_ap(wifi, ap_info, essid);
 
-       _wifi_add_to_ap_list((wifi_manager_ap_h)ap_info);
+       _wifi_add_to_ap_list(ap_info);
        *ap = (wifi_manager_ap_h)ap_info;
 
        __NETWORK_CAPI_FUNC_EXIT__;
@@ -378,10 +381,10 @@ EXPORT_API int wifi_manager_ap_hidden_create(wifi_manager_h wifi,
                return WIFI_MANAGER_ERROR_OUT_OF_MEMORY; //LCOV_EXCL_LINE
        }
 
-       __wifi_init_ap(ap_info, essid);
+       __wifi_init_ap(wifi, ap_info, essid);
        ap_info->is_hidden = TRUE;
 
-       _wifi_add_to_ap_list((wifi_manager_ap_h)ap_info);
+       _wifi_add_to_ap_list(ap_info);
        *ap = (wifi_manager_ap_h)ap_info;
 
        __NETWORK_CAPI_FUNC_EXIT__;
@@ -420,6 +423,7 @@ EXPORT_API int wifi_manager_ap_clone(wifi_manager_ap_h *cloned_ap, wifi_manager_
                return WIFI_MANAGER_ERROR_INVALID_PARAMETER; //LCOV_EXCL_LINE
        }
 
+       net_profile_info_s *origin_info = origin;
        net_profile_info_s *ap_info = g_try_malloc0(sizeof(net_profile_info_s));
        if (ap_info == NULL) {
                /* __NETWORK_CAPI_FUNC_EXIT__; //LCOV_EXCL_LINE */
@@ -427,8 +431,12 @@ EXPORT_API int wifi_manager_ap_clone(wifi_manager_ap_h *cloned_ap, wifi_manager_
        }
 
        memcpy(ap_info, origin, sizeof(net_profile_info_s));
+       ap_info->vsie_list = g_slist_copy_deep(origin_info->vsie_list,
+                                                       _wifi_copy_vsie_list, NULL);
+       ap_info->bssid_list = g_slist_copy_deep(origin_info->bssid_list,
+                                                       _wifi_copy_bssid_list, NULL);
 
-       _wifi_add_to_ap_list((wifi_manager_ap_h)ap_info);
+       _wifi_add_to_ap_list(ap_info);
        *cloned_ap = (wifi_manager_ap_h)ap_info;
 
        /* __NETWORK_CAPI_FUNC_EXIT__; */
@@ -452,7 +460,7 @@ EXPORT_API int wifi_manager_ap_refresh(wifi_manager_ap_h ap)
        }
 
        int rv = NET_ERR_NONE;
-       rv = net_get_profile_info(ap_info->ProfileName, &ap_info_local);
+       rv = net_get_profile_info(ap_info->network_info, ap_info->ProfileName, &ap_info_local);
        if (rv == NET_ERR_ACCESS_DENIED) {
                WIFI_LOG(WIFI_ERROR, "Access denied"); //LCOV_EXCL_LINE
                __NETWORK_CAPI_FUNC_EXIT__; //LCOV_EXCL_LINE
@@ -923,7 +931,8 @@ EXPORT_API int wifi_manager_ap_get_ip_address(wifi_manager_ap_h ap,
                        return WIFI_MANAGER_ERROR_NO_CONNECTION; //LCOV_EXCL_LINE
                }
        } else if (address_family == WIFI_MANAGER_ADDRESS_FAMILY_IPV6) {
-               if (net_get_preferred_ipv6_address(profile_info->ProfileName, ip_address) != NET_ERR_NONE) {
+               if (net_get_preferred_ipv6_address(profile_info->network_info,
+                               profile_info->ProfileName, ip_address) != NET_ERR_NONE) {
                        WIFI_LOG(WIFI_ERROR, "Failed to get preferred ipv6 address");
                        *ip_address = __ap_convert_ip_to_string(
                                        &profile_info->net_info.IpAddr6,
index c0f0908..5098f15 100755 (executable)
@@ -28,6 +28,7 @@ EXPORT_API int wifi_manager_config_create(wifi_manager_h wifi, const char *name,
 
        CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
 
+       wifi_manager_handle_s *wifi_handle = wifi;
        wifi_config_s *h = NULL;
 
        RET_ERR_IF_HANDLE_IS_NOT_VALID_OR_NOT_INITIALIZED(wifi, __NETWORK_CAPI_FUNC_EXIT__);
@@ -91,8 +92,9 @@ EXPORT_API int wifi_manager_config_create(wifi_manager_h wifi, const char *name,
                h->eap_config->eap_auth_type = WIFI_MANAGER_EAP_AUTH_TYPE_NONE;
        }
 
-       _wifi_add_to_config_list((wifi_manager_config_h)h);
-       *config = (wifi_manager_config_h)h;
+       h->wifi_handle = wifi_handle;
+       _wifi_add_to_config_list(h);
+       *config = h;
 
        __NETWORK_CAPI_FUNC_EXIT__;
 
@@ -182,8 +184,9 @@ EXPORT_API int wifi_manager_config_clone(wifi_manager_config_h origin, wifi_mana
                h->eap_config->eap_auth_type = config->eap_config->eap_auth_type;
        }
 
-       _wifi_add_to_config_list((wifi_manager_config_h)h);
-       *cloned_config = (wifi_manager_config_h)h;
+       h->wifi_handle = config->wifi_handle;
+       _wifi_add_to_config_list(h);
+       *cloned_config = h;
 
        __NETWORK_CAPI_FUNC_EXIT__;
 
@@ -205,6 +208,8 @@ EXPORT_API int wifi_manager_config_destroy(wifi_manager_config_h config)
                return WIFI_MANAGER_ERROR_INVALID_PARAMETER; //LCOV_EXCL_LINE
        }
 
+       _wifi_remove_from_config_list(config);
+
        g_free(h->name);
        g_free(h->passphrase);
        g_free(h->proxy_address);
@@ -227,7 +232,7 @@ EXPORT_API int wifi_manager_config_destroy(wifi_manager_config_h config)
                g_free(h->eap_config);
        }
 
-       _wifi_remove_from_config_list(config);
+       g_free(h);
 
        __NETWORK_CAPI_FUNC_EXIT__;
 
@@ -253,12 +258,12 @@ EXPORT_API int wifi_manager_config_save(wifi_manager_h wifi,
        }
 
        if (h->security_type == WIFI_MANAGER_SECURITY_TYPE_EAP) {
-               ret = _wifi_save_eap_configurations(h->name, h->passphrase, h->security_type,
+               ret = _wifi_save_eap_configurations(wifi, h->name, h->passphrase, h->security_type,
                        h->proxy_address, h->eap_config, h->is_hidden, h->is_created);
                if (ret != WIFI_MANAGER_ERROR_NONE)
                        WIFI_LOG(WIFI_ERROR, "Fail to wifi_save_eap_configurations"); //LCOV_EXCL_LINE
        } else {
-               ret = _wifi_save_configuration(h->name, h->passphrase, h->security_type,
+               ret = _wifi_save_configuration(wifi, h->name, h->passphrase, h->security_type,
                                h->proxy_address, h->ip_info, h->is_hidden, h->is_created);
                if (ret != WIFI_MANAGER_ERROR_NONE)
                        WIFI_LOG(WIFI_ERROR, "Fail to save configurations [%d]", ret); //LCOV_EXCL_LINE
@@ -298,7 +303,7 @@ EXPORT_API int wifi_manager_config_remove(wifi_manager_h wifi, wifi_manager_conf
 
                config_id = _wifi_config_get_config_id(h->name, h->security_type);
 
-               ret = _wifi_remove_configuration(config_id);
+               ret = _wifi_remove_configuration(wifi, config_id);
                if (ret != WIFI_MANAGER_ERROR_NONE)
                        WIFI_LOG(WIFI_ERROR, "Fail to remove configurations [%d]", ret);
 
@@ -327,16 +332,47 @@ EXPORT_API int wifi_manager_config_foreach_configuration(wifi_manager_h wifi,
                return WIFI_MANAGER_ERROR_INVALID_PARAMETER; //LCOV_EXCL_LINE
        }
 
-       ret = _wifi_load_configurations();
+       ret = _wifi_load_configurations(wifi);
        if (ret != WIFI_MANAGER_ERROR_NONE) {
                WIFI_LOG(WIFI_ERROR, "Fail to load configurations [%d]", ret); //LCOV_EXCL_LINE
                __NETWORK_CAPI_FUNC_EXIT__; //LCOV_EXCL_LINE
                return ret; //LCOV_EXCL_LINE
        }
 
+       ret = _wifi_foreach_configuration(wifi, callback, user_data);
+
        __NETWORK_CAPI_FUNC_EXIT__;
+       return ret;
+}
+
+EXPORT_API int wifi_manager_config_foreach_configuration_in_all_interfaces(wifi_manager_h wifi,
+                       wifi_manager_config_list_cb callback, void *user_data)
+{
+       __NETWORK_CAPI_FUNC_ENTER__;
+
+       CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
+
+       int ret = WIFI_MANAGER_ERROR_NONE;
+
+       RET_ERR_IF_HANDLE_IS_NOT_VALID_OR_NOT_INITIALIZED(wifi, __NETWORK_CAPI_FUNC_EXIT__);
 
-       return _wifi_foreach_configuration(callback, user_data);
+       if (callback == NULL) {
+               WIFI_LOG(WIFI_ERROR, "Invalid parameter"); //LCOV_EXCL_LINE
+               __NETWORK_CAPI_FUNC_EXIT__; //LCOV_EXCL_LINE
+               return WIFI_MANAGER_ERROR_INVALID_PARAMETER; //LCOV_EXCL_LINE
+       }
+
+       ret = _wifi_load_configurations(wifi);
+       if (ret != WIFI_MANAGER_ERROR_NONE) {
+               WIFI_LOG(WIFI_ERROR, "Fail to load configurations [%d]", ret); //LCOV_EXCL_LINE
+               __NETWORK_CAPI_FUNC_EXIT__; //LCOV_EXCL_LINE
+               return ret; //LCOV_EXCL_LINE
+       }
+
+       ret = _wifi_foreach_configuration(wifi, callback, user_data);
+
+       __NETWORK_CAPI_FUNC_EXIT__;
+       return ret;
 }
 
 EXPORT_API int wifi_manager_config_get_name(wifi_manager_config_h config, char **name)
old mode 100644 (file)
new mode 100755 (executable)
index ba9b230..55da5ed
@@ -29,6 +29,7 @@ EXPORT_API int wifi_manager_dpp_create(wifi_manager_h wifi,
        CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
 
        wifi_dpp_s *p_dpp = NULL;
+       wifi_manager_handle_s *wifi_handle = wifi;
 
        RET_ERR_IF_HANDLE_IS_NOT_VALID_OR_NOT_INITIALIZED(wifi, __NETWORK_CAPI_FUNC_EXIT__);
 
@@ -39,6 +40,7 @@ EXPORT_API int wifi_manager_dpp_create(wifi_manager_h wifi,
        }
 
        p_dpp->is_initiator = is_initiator;
+       p_dpp->network_info = wifi_handle->network_info;
 
        _wifi_add_to_dpp_list((wifi_manager_dpp_h)p_dpp);
        *handle = (wifi_manager_dpp_h)p_dpp;
@@ -74,15 +76,11 @@ EXPORT_API int wifi_manager_dpp_destroy(wifi_manager_dpp_h handle)
        return WIFI_MANAGER_ERROR_NONE;
 }
 
-static int __wifi_set_dpp_event_cb(wifi_manager_h wifi,
+static void __wifi_set_dpp_event_cb(wifi_manager_handle_s *wifi_handle,
                        void *callback, void *user_data)
 {
-       wifi_manager_handle_s *local_handle = (wifi_manager_handle_s *)wifi;
-
-       local_handle->dpp_event_cb = callback;
-       local_handle->dpp_event_user_data = user_data;
-
-       return WIFI_MANAGER_ERROR_NONE;
+       wifi_handle->dpp_event_cb = callback;
+       wifi_handle->dpp_event_user_data = user_data;
 }
 
 EXPORT_API int wifi_manager_dpp_set_event_cb(wifi_manager_h wifi,
@@ -100,8 +98,10 @@ EXPORT_API int wifi_manager_dpp_set_event_cb(wifi_manager_h wifi,
                return WIFI_MANAGER_ERROR_INVALID_PARAMETER;
        }
 
+       __wifi_set_dpp_event_cb(wifi, callback, user_data);
+
        __NETWORK_CAPI_FUNC_EXIT__;
-       return __wifi_set_dpp_event_cb(wifi, callback, user_data);
+       return WIFI_MANAGER_ERROR_NONE;
 }
 
 EXPORT_API int wifi_manager_dpp_unset_event_cb(wifi_manager_h wifi)
@@ -112,8 +112,10 @@ EXPORT_API int wifi_manager_dpp_unset_event_cb(wifi_manager_h wifi)
 
        RET_ERR_IF_HANDLE_IS_NOT_VALID_OR_NOT_INITIALIZED(wifi, __NETWORK_CAPI_FUNC_EXIT__);
 
+       __wifi_set_dpp_event_cb(wifi, NULL, NULL);
+
        __NETWORK_CAPI_FUNC_EXIT__;
-       return __wifi_set_dpp_event_cb(wifi, NULL, NULL);
+       return WIFI_MANAGER_ERROR_NONE;
 }
 
 EXPORT_API int wifi_manager_dpp_is_initiator(wifi_manager_dpp_h handle,
index 7e947a2..cd6a566 100755 (executable)
 
 #include "wifi_internal.h"
 
-bool is_disconnect_wps_pbc = false;
-bool is_disconnect_wps_pin = false;
-static gboolean multi_scan_type[WIFI_MULTI_SCAN_MAX] = {0, };
-
 #define WIFI_SECURITY_NONE                     "none"
 #define WIFI_SECURITY_WEP                      "wep"
 #define WIFI_SECURITY_WPA_PSK                  "psk"
@@ -36,27 +32,24 @@ static gboolean multi_scan_type[WIFI_MULTI_SCAN_MAX] = {0, };
 #define WIFI_SECURITY_DPP                      "dpp"
 #define WIFI_SECURITY_EAP                      "ieee8021x"
 
+#define WIFI_MAC_ADDR_PATH_LEN      32
+#define WIFI_MAC_ADDR_PATH          "/sys/class/net/%s/address"
 
 /* DPP related DBus calls are sync method.
  * If DPP is not allowed to start from net-config, there's no g_p_dpp_current for lib.
  * So, we should take care about changing DPP DBus call mechanism
  */
-static __thread wifi_dpp_s *g_p_dpp_current = NULL;
-
-static __thread GSList *wifi_manager_handle_list = NULL;
-static __thread GSList *ap_handle_list = NULL;
-static __thread GSList *config_handle_list = NULL;
-static __thread GSList *multi_scan_handle_list = NULL;
-static __thread GSList *netlink_scan_handle_list = NULL;
-static __thread GSList *dpp_handle_list = NULL;
-
-static __thread GSList *profile_iterator = NULL;
-static __thread GSList *specific_profile_iterator = NULL;
-static __thread GSList *bss_profile_iterator = NULL;
-static __thread GSList *config_iterator = NULL;
-static __thread char specific_profile_essid[NET_WLAN_ESSID_LEN + 1] = { 0, };
-static __thread bool wifi_is_feature_checked[WIFI_SUPPORTED_FEATURE_MAX] = {0, };
-static __thread bool wifi_feature_supported[WIFI_SUPPORTED_FEATURE_MAX] = {0, };
+static wifi_dpp_s *g_p_dpp_current = NULL;
+
+static GSList *wifi_manager_handle_list = NULL;
+static GSList *multi_scan_handle_list = NULL;
+static GSList *netlink_scan_handle_list = NULL;
+static GSList *dpp_handle_list = NULL;
+
+static gboolean multi_scan_type[WIFI_MULTI_SCAN_MAX] = {0, };
+
+static bool wifi_is_feature_checked[WIFI_SUPPORTED_FEATURE_MAX] = {0, };
+static bool wifi_feature_supported[WIFI_SUPPORTED_FEATURE_MAX] = {0, };
 
 //LCOV_EXCL_START
 static wifi_manager_error_e __convert_to_ap_error_type(net_err_e err_type)
@@ -305,11 +298,11 @@ gchar *_wifi_eap_auth_type_to_string(wifi_manager_eap_auth_type_e eap_auth_type)
        return type;
 }
 
-static void __clear_profile_internal_list(GSList **iterator)
+static void __clear_profile_internal_list(GSList *iterator)
 {
        GSList *list;
 
-       for (list = *iterator; list; list = list->next) {
+       for (list = iterator; list; list = list->next) {
                net_profile_info_s *prof_info = (net_profile_info_s *)list->data;
 
                if (prof_info->vsie_list) {
@@ -326,23 +319,53 @@ static void __clear_profile_internal_list(GSList **iterator)
 
 //LCOV_EXCL_STOP
 
+void __clear_interface_list(GSList **iterator)
+{
+       if (*iterator) {
+               *iterator = g_slist_nth(*iterator, 0);
+               g_slist_free_full(*iterator, g_free);
+               *iterator = NULL;
+       }
+}
+
 void __clear_profile_list(GSList **iterator)
 {
        if (*iterator) {
                *iterator = g_slist_nth(*iterator, 0);
-               __clear_profile_internal_list(iterator);
+               __clear_profile_internal_list(*iterator);
                g_slist_free_full(*iterator, g_free);
                *iterator = NULL;
        }
 }
 
-static int __update_profile_iterator(void)
+gpointer _wifi_copy_vsie_list(gconstpointer data, gpointer user_data)
+{
+       return g_strdup(data);
+}
+
+gpointer _wifi_copy_bssid_list(gconstpointer data, gpointer user_data)
+{
+       net_profile_bssid_list_s *org_data, *dst_data;
+
+       org_data = (net_profile_bssid_list_s *)data;
+       dst_data = g_try_malloc0(sizeof(net_profile_bssid_list_s));
+       if (dst_data) {
+               g_strlcpy(dst_data->bssid, org_data->bssid, 18);
+               dst_data->strength = org_data->strength;
+               dst_data->frequency = org_data->frequency;
+       }
+
+       return dst_data;
+}
+
+static int __update_profile_iterator(wifi_manager_handle_s *wifi_handle)
 {
        int rv;
 
-       __clear_profile_list(&profile_iterator);
+       __clear_profile_list(&(wifi_handle->profile_iterator));
 
-       rv = net_get_profile_list(&profile_iterator);
+       rv = net_get_profile_list(wifi_handle->network_info,
+                               &(wifi_handle->profile_iterator));
        if (rv == NET_ERR_ACCESS_DENIED) {
                WIFI_LOG(WIFI_ERROR, "Access denied"); //LCOV_EXCL_LINE
                return WIFI_MANAGER_ERROR_PERMISSION_DENIED; //LCOV_EXCL_LINE
@@ -351,7 +374,23 @@ static int __update_profile_iterator(void)
        return WIFI_MANAGER_ERROR_NONE;
 }
 
-static void __update_specific_iterator(GSList *bss_list)
+static int __update_interface_iterator(wifi_manager_handle_s *wifi_handle)
+{
+       int rv;
+
+       __clear_interface_list(&(wifi_handle->interface_iterator));
+
+       rv = net_get_interface_list(wifi_handle->network_info,
+                               &(wifi_handle->interface_iterator));
+       if (rv == NET_ERR_ACCESS_DENIED) {
+               WIFI_LOG(WIFI_ERROR, "Access denied"); //LCOV_EXCL_LINE
+               return WIFI_MANAGER_ERROR_PERMISSION_DENIED; //LCOV_EXCL_LINE
+       }
+
+       return WIFI_MANAGER_ERROR_NONE;
+}
+
+static void __update_specific_iterator(wifi_manager_handle_s *wifi_handle, GSList *bss_list)
 {
        int i, count = 0;
        GSList *list = bss_list;
@@ -370,22 +409,27 @@ static void __update_specific_iterator(GSList *bss_list)
                        WIFI_LOG(WIFI_ERROR, "Failed to alloc profile"); //LCOV_EXCL_LINE
                        return; //LCOV_EXCL_LINE
                }
-               if (net_init_profile_info(prof_info) != NET_ERR_NONE) {
+
+               if (net_init_profile_info(wifi_handle->network_info, prof_info) != NET_ERR_NONE) {
                        WIFI_LOG(WIFI_ERROR, "Failed to init profile"); //LCOV_EXCL_LINE
                        g_free(prof_info); //LCOV_EXCL_LINE
                        return; //LCOV_EXCL_LINE
                }
+
                g_strlcpy(prof_info->essid, info->ssid, NET_WLAN_ESSID_LEN);
                memcpy(prof_info->raw_ssid, info->raw_ssid, info->raw_ssid_len);
                prof_info->raw_ssid_len = info->raw_ssid_len;
                prof_info->security_info.sec_mode = info->security;
                prof_info->security_info.wps_support = (char)info->wps;
-               specific_profile_iterator = g_slist_append(specific_profile_iterator,
-                                       (net_profile_info_s *)prof_info);
+
+               wifi_handle->specific_profile_iterator =
+                       g_slist_append(wifi_handle->specific_profile_iterator,
+                               (net_profile_info_s *)prof_info);
        }
 }
 
-static void __update_bss_profile_iterator(GSList *bss_list)
+static void __update_bss_profile_iterator(wifi_manager_handle_s *wifi_handle,
+               GSList *bss_list)
 {
        int count = 0;
        GSList *list = bss_list;
@@ -405,13 +449,13 @@ static void __update_bss_profile_iterator(GSList *bss_list)
                        return; //LCOV_EXCL_LINE
                }
 
-               if (net_init_profile_info(profile) != NET_ERR_NONE) {
+               if (net_init_profile_info(wifi_handle->network_info, profile) != NET_ERR_NONE) {
                        WIFI_LOG(WIFI_ERROR, "Failed to init profile"); //LCOV_EXCL_LINE
                        g_free(profile); //LCOV_EXCL_LINE
                        return; //LCOV_EXCL_LINE
                }
 
-               g_strlcpy(profile->essid, (char *)ap->ssid, NET_WLAN_ESSID_LEN+1);
+               g_strlcpy(profile->essid, (char *)ap->ssid, NET_WLAN_ESSID_LEN + 1);
                g_strlcpy(profile->bssid, ap->bssid, WIFI_MAC_ADDR_LEN + 1);
 
                profile->wlan_mode = ap->mode;
@@ -420,13 +464,15 @@ static void __update_bss_profile_iterator(GSList *bss_list)
                 * so modify the rssi value in same manner as done in connman. */
                profile->Strength = 120 + ap->rssi;
 
-               bss_profile_iterator = g_slist_append(bss_profile_iterator,
-                                       (net_profile_info_s *)profile);
+               wifi_handle->bss_profile_iterator =
+                       g_slist_append(wifi_handle->bss_profile_iterator,
+                               (net_profile_info_s *)profile);
        }
 }
 
 //LCOV_EXCL_START
-static void __update_netlink_scan_profile_iterator(GSList *bss_list)
+static void __update_netlink_scan_profile_iterator(wifi_manager_handle_s *wifi_handle,
+               GSList *bss_list)
 {
        int count = 0;
        GSList *list = bss_list;
@@ -446,7 +492,7 @@ static void __update_netlink_scan_profile_iterator(GSList *bss_list)
                        return;
                }
 
-               if (net_init_profile_info(profile) != NET_ERR_NONE) {
+               if (net_init_profile_info(wifi_handle->network_info, profile) != NET_ERR_NONE) {
                        WIFI_LOG(WIFI_ERROR, "Failed to init profile");
                        g_free(profile);
                        return;
@@ -522,7 +568,7 @@ static void __update_netlink_scan_profile_iterator(GSList *bss_list)
                        break;
                }
 
-               bss_profile_iterator = g_slist_append(bss_profile_iterator,
+               wifi_handle->bss_profile_iterator = g_slist_append(wifi_handle->bss_profile_iterator,
                                        (net_profile_info_s *)profile);
        }
 }
@@ -539,24 +585,28 @@ static void __convert_profile_info_to_wifi_info(net_wifi_connection_info_s *wifi
        wifi_info->is_hidden = ap_info->is_hidden;
 }
 
-static int __connect_with_wifi_info(net_profile_info_s *ap_info)
+static int __connect_with_wifi_info(wifi_manager_handle_s *wifi_handle,
+               net_profile_info_s *ap_info)
 {
        net_wifi_connection_info_s wifi_info;
+
        memset(&wifi_info, 0, sizeof(net_wifi_connection_info_s));
 
        __convert_profile_info_to_wifi_info(&wifi_info, ap_info);
 
-       return net_open_connection_with_wifi_info(&wifi_info);
+       return net_open_connection_with_wifi_info(wifi_handle->network_info, &wifi_info);
 }
 
-static int __load_configurations(const gchar *config_id, gchar **name,
+static int __load_configurations(wifi_manager_handle_s *wifi_handle,
+               const gchar *config_id, gchar **name,
                gchar **passphrase, wifi_manager_security_type_e *security_type, gchar **proxy_address,
                gboolean *is_hidden, wifi_config_ip_info_s **ip_info,
                wifi_manager_error_e *last_error)
 {
        int rv;
 
-       rv = net_config_load_configurations(config_id, name, passphrase, security_type,
+       rv = net_config_load_configurations(wifi_handle->network_info,
+                               config_id, name, passphrase, security_type,
                                proxy_address, is_hidden, (net_ip_info_config_s **)ip_info,
                                last_error);
        if (rv == NET_ERR_ACCESS_DENIED) {
@@ -570,13 +620,15 @@ static int __load_configurations(const gchar *config_id, gchar **name,
        return WIFI_MANAGER_ERROR_NONE;
 }
 
-static int __load_eap_configurations(const gchar *config_id, gchar **name,
+static int __load_eap_configurations(wifi_manager_handle_s *wifi_handle,
+               const gchar *config_id, gchar **name,
                wifi_manager_security_type_e *security_type, gchar **proxy_address, gboolean *is_hidden,
                wifi_eap_config_s **eap_config, wifi_manager_error_e *last_error)
 {
        int rv;
 
-       rv = net_config_load_eap_configurations(config_id, name, security_type,
+       rv = net_config_load_eap_configurations(wifi_handle->network_info,
+                               config_id, name, security_type,
                                proxy_address, is_hidden, (void **)eap_config, last_error);
        if (rv == NET_ERR_ACCESS_DENIED) {
                WIFI_LOG(WIFI_ERROR, "Access denied"); //LCOV_EXCL_LINE
@@ -590,10 +642,9 @@ static int __load_eap_configurations(const gchar *config_id, gchar **name,
 }
 
 //LCOV_EXCL_START
-static void __state_changed_cb(char *profile_name,
+static void __state_changed_cb(wifi_manager_handle_s *wifi_handle, char *profile_name,
                net_profile_info_s *profile_info, wifi_manager_connection_state_e state)
 {
-       GSList *list;
        net_profile_info_s *ap_info = NULL;
 
        if (profile_name == NULL)
@@ -601,7 +652,7 @@ static void __state_changed_cb(char *profile_name,
 
        WIFI_LOG(WIFI_INFO, "%s state changed : %s", profile_name, __convert_ap_state_to_string(state));
 
-       if (_wifi_get_callback_count_from_handle_list(WIFI_MANAGER_CONNECTION_STATE_CB)) {
+       if (wifi_handle->connection_state_cb) {
                ap_info = g_try_malloc0(sizeof(net_profile_info_s));
                if (ap_info == NULL) {
                        WIFI_LOG(WIFI_ERROR, "Memory allocation error");
@@ -610,63 +661,48 @@ static void __state_changed_cb(char *profile_name,
 
                if (profile_info)
                        memcpy(ap_info, profile_info, sizeof(net_profile_info_s));
+               else
+                       ap_info->network_info = wifi_handle->network_info;
 
                WIFI_LOG(WIFI_INFO, "[Ap info] profile name(%s) essid(%s) bssid(%s)",
                                ap_info->ProfileName, ap_info->essid, ap_info->bssid);
 
                _wifi_add_to_ap_list(ap_info);
 
-               for (list = wifi_manager_handle_list; list; list = list->next) {
-                       wifi_manager_handle_s *local_handle = (wifi_manager_handle_s *)list->data;
-                       if (local_handle->connection_state_cb)
-                               local_handle->connection_state_cb(state, ap_info,
-                                                       local_handle->connection_state_user_data);
-               }
+               wifi_handle->connection_state_cb(state, ap_info,
+                       wifi_handle->connection_state_user_data);
 
                _wifi_remove_from_ap_list(ap_info);
+               g_free(ap_info);
        }
 }
 
-static void __set_activated_cb(wifi_manager_h wifi,
+static void __set_activated_cb(wifi_manager_handle_s *wifi_handle,
                wifi_manager_activated_cb user_cb, void *user_data)
 {
-       wifi_manager_handle_s *local_handle = (wifi_manager_handle_s *)wifi;
-
-       if (user_cb != NULL) {
-               local_handle->activated_cb = user_cb;
-               local_handle->activated_user_data = user_data;
-       }
+       wifi_handle->activated_cb = user_cb;
+       wifi_handle->activated_user_data = user_data;
 }
 
-static void __set_deactivated_cb(wifi_manager_h wifi,
+static void __set_deactivated_cb(wifi_manager_handle_s *wifi_handle,
                wifi_manager_deactivated_cb user_cb, void *user_data)
 {
-       wifi_manager_handle_s *local_handle = (wifi_manager_handle_s *)wifi;
-
-       if (user_cb != NULL) {
-               local_handle->deactivated_cb = user_cb;
-               local_handle->deactivated_user_data = user_data;
-       }
+       wifi_handle->deactivated_cb = user_cb;
+       wifi_handle->deactivated_user_data = user_data;
 }
 
-static void __power_on_off_cb(net_event_info_s *event_cb, bool is_requested)
+static void __power_on_off_cb(wifi_manager_handle_s *wifi_handle,
+               net_event_info_s *event_cb, bool is_requested)
 {
-       if (net_check_ref_count() != true) {
-               WIFI_LOG(WIFI_ERROR, "Application is not registered"
-                               "If multi-threaded, thread integrity be broken.");
-               return;
-       }
-
-       if (!_wifi_get_callback_count_from_handle_list(WIFI_ACTIVATED_CB) &&
-               !_wifi_get_callback_count_from_handle_list(WIFI_DEACTIVATED_CB) &&
-               !_wifi_get_callback_count_from_handle_list(WIFI_DEVICE_STATE_CB))
-               return;
-
-       GSList *list;
        wifi_manager_error_e error_code = WIFI_MANAGER_ERROR_NONE;
        wifi_manager_device_state_e state = WIFI_MANAGER_DEVICE_STATE_DEACTIVATED;
        net_wifi_state_e *wifi_state = (net_wifi_state_e *)event_cb->Data;
 
+       if (wifi_handle->activated_cb == NULL &&
+               wifi_handle->deactivated_cb == NULL &&
+               wifi_handle->device_state_cb == NULL)
+               return;
+
        if (event_cb->Error == NET_ERR_NONE &&
                        event_cb->Datalength == sizeof(net_wifi_state_e)) {
                if (*wifi_state == WIFI_ON) {
@@ -675,9 +711,9 @@ static void __power_on_off_cb(net_event_info_s *event_cb, bool is_requested)
                } else if (*wifi_state == WIFI_OFF) {
                        WIFI_LOG(WIFI_INFO, "Wi-Fi power off");
                        state = WIFI_MANAGER_DEVICE_STATE_DEACTIVATED;
-                       __clear_profile_list(&profile_iterator);
-                       __clear_profile_list(&specific_profile_iterator);
-                       __clear_profile_list(&bss_profile_iterator);
+                       __clear_profile_list(&(wifi_handle->profile_iterator));
+                       __clear_profile_list(&(wifi_handle->specific_profile_iterator));
+                       __clear_profile_list(&(wifi_handle->bss_profile_iterator));
                } else {
                        WIFI_LOG(WIFI_ERROR, "Error Wi-Fi state %d", *wifi_state);
                        error_code = WIFI_MANAGER_ERROR_OPERATION_FAILED;
@@ -694,222 +730,146 @@ static void __power_on_off_cb(net_event_info_s *event_cb, bool is_requested)
                state = WIFI_MANAGER_DEVICE_STATE_DEACTIVATED;
        }
 
-       if (_wifi_get_callback_count_from_handle_list(WIFI_ACTIVATED_CB)) {
-               for (list = wifi_manager_handle_list; list; list = list->next) {
-                       wifi_manager_handle_s *local_handle = (wifi_manager_handle_s *)list->data;
-                       if (local_handle->activated_cb)
-                               local_handle->activated_cb(error_code, local_handle->activated_user_data);
+       if (wifi_handle->activated_cb)
+               wifi_handle->activated_cb(error_code, wifi_handle->activated_user_data);
 
-                       local_handle->activated_cb = NULL;
-                       local_handle->activated_user_data = NULL;
-               }
-       }
+       wifi_handle->activated_cb = NULL;
+       wifi_handle->activated_user_data = NULL;
 
-       if (_wifi_get_callback_count_from_handle_list(WIFI_DEACTIVATED_CB)) {
-               for (list = wifi_manager_handle_list; list; list = list->next) {
-                       wifi_manager_handle_s *local_handle = (wifi_manager_handle_s *)list->data;
-                       if (local_handle->deactivated_cb != NULL)
-                               local_handle->deactivated_cb(error_code, local_handle->deactivated_user_data);
+       if (wifi_handle->deactivated_cb)
+               wifi_handle->deactivated_cb(error_code, wifi_handle->deactivated_user_data);
 
-                       local_handle->deactivated_cb = NULL;
-                       local_handle->deactivated_user_data = NULL;
-               }
-       }
+       wifi_handle->deactivated_cb = NULL;
+       wifi_handle->deactivated_user_data = NULL;
 
-       if (_wifi_get_callback_count_from_handle_list(WIFI_DEVICE_STATE_CB)) {
-               for (list = wifi_manager_handle_list; list; list = list->next) {
-                       wifi_manager_handle_s *local_handle = (wifi_manager_handle_s *)list->data;
-                       if (local_handle->device_state_cb)
-                               local_handle->device_state_cb(state, local_handle->device_state_user_data);
-               }
+       if (error_code == WIFI_MANAGER_ERROR_NONE) {
+               if (wifi_handle->device_state_cb)
+                       wifi_handle->device_state_cb(state, wifi_handle->device_state_user_data);
        }
 }
 
-static void __set_scan_cb(wifi_manager_h wifi,
+static void __set_scan_cb(wifi_manager_handle_s *wifi_handle,
                wifi_manager_scan_finished_cb user_cb, void *user_data)
 {
-       wifi_manager_handle_s *local_handle = (wifi_manager_handle_s *)wifi;
-
-       if (user_cb) {
-               local_handle->scan_request_cb = user_cb;
-               local_handle->scan_request_user_data = user_data;
-       }
+       wifi_handle->scan_request_cb = user_cb;
+       wifi_handle->scan_request_user_data = user_data;
 }
 
-static void __set_specific_scan_cb(wifi_manager_h wifi,
+static void __set_specific_scan_cb(wifi_manager_handle_s *wifi_handle,
                wifi_manager_scan_finished_cb user_cb, void *user_data)
 {
-       wifi_manager_handle_s *local_handle = (wifi_manager_handle_s *)wifi;
-
-       if (user_cb) {
-               local_handle->specific_scan_cb = user_cb;
-               local_handle->specific_scan_user_data = user_data;
-       }
+       wifi_handle->specific_scan_cb = user_cb;
+       wifi_handle->specific_scan_user_data = user_data;
 }
 
-static void __set_bssid_scan_cb(wifi_manager_h wifi,
+static void __set_bssid_scan_cb(wifi_manager_handle_s *wifi_handle,
                wifi_manager_bssid_scan_finished_cb user_cb, void *user_data)
 {
-       wifi_manager_handle_s *local_handle = (wifi_manager_handle_s *)wifi;
-
-       if (user_cb) {
-               local_handle->bssid_scan_cb = user_cb;
-               local_handle->bssid_scan_user_data = user_data;
-       }
+       wifi_handle->bssid_scan_cb = user_cb;
+       wifi_handle->bssid_scan_user_data = user_data;
 }
 
-static void __set_netlink_scan_cb(wifi_manager_h wifi,
+static void __set_netlink_scan_cb(wifi_manager_handle_s *wifi_handle,
                wifi_manager_netlink_scan_finished_cb user_cb, void *user_data)
 {
-       wifi_manager_handle_s *local_handle = (wifi_manager_handle_s *)wifi;
-
-       if (user_cb) {
-               local_handle->netlink_scan_cb = user_cb;
-               local_handle->netlink_scan_user_data = user_data;
-       }
+       wifi_handle->netlink_scan_cb = user_cb;
+       wifi_handle->netlink_scan_user_data = user_data;
 }
 
-static void __set_multi_scan_cb(wifi_manager_h wifi,
+static void __set_multi_scan_cb(wifi_manager_handle_s *wifi_handle,
                wifi_manager_scan_finished_cb user_cb, void *user_data)
 {
-       wifi_manager_handle_s *local_handle = (wifi_manager_handle_s *)wifi;
-
-       if (user_cb) {
-               local_handle->multi_scan_cb = user_cb;
-               local_handle->multi_scan_user_data = user_data;
-       }
+       wifi_handle->multi_scan_cb = user_cb;
+       wifi_handle->multi_scan_user_data = user_data;
 }
 
-static void __scan_cb(net_event_info_s *event_cb, bool is_requested)
+static void __scan_cb(wifi_manager_handle_s *wifi_handle,
+               net_event_info_s *event_cb, bool is_requested)
 {
-       GSList *list;
        wifi_manager_error_e error_code = WIFI_MANAGER_ERROR_NONE;
 
-       if (net_check_ref_count() != true) {
-               WIFI_LOG(WIFI_ERROR, "Application is not registered"
-                               "If multi-threaded, thread integrity be broken.");
-               return;
-       }
-
        if (event_cb->Error != NET_ERR_NONE) {
                WIFI_LOG(WIFI_ERROR, "Scan failed[%d]", event_cb->Error);
                error_code = WIFI_MANAGER_ERROR_OPERATION_FAILED;
        }
 
-       if (_wifi_get_callback_count_from_handle_list(WIFI_SCAN_REQUEST_CB)) {
-               for (list = wifi_manager_handle_list; list; list = list->next) {
-                       wifi_manager_handle_s *local_handle = (wifi_manager_handle_s *)list->data;
-                       wifi_manager_scan_finished_cb cb = local_handle->scan_request_cb;
-                       void* user_data = local_handle->scan_request_user_data;
-                       local_handle->scan_request_cb = NULL;
-                       local_handle->scan_request_user_data = NULL;
+       if (wifi_handle->scan_request_cb) {
+               wifi_handle->scan_request_cb(error_code, wifi_handle->scan_request_user_data);
 
-                       if (cb)
-                               cb(error_code, user_data);
+               wifi_handle->scan_request_cb = NULL;
+               wifi_handle->scan_request_user_data = NULL;
 
-               }
                return;
        }
 
-       if (_wifi_get_callback_count_from_handle_list(WIFI_BG_SCAN_CB)) {
-               for (list = wifi_manager_handle_list; list; list = list->next) {
-                       wifi_manager_handle_s *local_handle = (wifi_manager_handle_s *)list->data;
-                       if (local_handle->bg_scan_cb)
-                               local_handle->bg_scan_cb(error_code, local_handle->bg_scan_user_data);
-               }
-       }
+       if (wifi_handle->bg_scan_cb)
+               wifi_handle->bg_scan_cb(error_code, wifi_handle->bg_scan_user_data);
 }
 
-static void __scan_changed_cb(wifi_manager_scan_state_e scan_state)
+static void __scan_changed_cb(wifi_manager_handle_s *wifi_handle, wifi_manager_scan_state_e scan_state)
 {
-       GSList *list;
-
-       if (net_check_ref_count() != true) {
-               WIFI_LOG(WIFI_ERROR, "Application is not registered"
-                               "If multi-threaded, thread integrity be broken.");
-               return;
-       }
-
        if (scan_state == 1)
                WIFI_LOG(WIFI_INFO, "scan state: Scan is in progress");
        else
                WIFI_LOG(WIFI_INFO, "scan state: Scan is not running");
 
-       if (_wifi_get_callback_count_from_handle_list(WIFI_SCAN_CHANGED_CB)) {
-               for (list = wifi_manager_handle_list; list; list = list->next) {
-                       wifi_manager_handle_s *local_handle = (wifi_manager_handle_s *)list->data;
-                       if (local_handle->scan_changed_cb)
-                               local_handle->scan_changed_cb(scan_state, local_handle->scan_changed_user_data);
-               }
-       }
+       if (wifi_handle->scan_changed_cb)
+               wifi_handle->scan_changed_cb(scan_state, wifi_handle->scan_changed_user_data);
 }
 
-static void __specific_scan_cb(net_event_info_s *event_cb)
+static void __specific_scan_cb(wifi_manager_handle_s *wifi_handle, net_event_info_s *event_cb)
 {
-       GSList *list;
        wifi_manager_error_e error_code = WIFI_MANAGER_ERROR_NONE;
 
-       __clear_profile_list(&specific_profile_iterator);
+       __clear_profile_list(&(wifi_handle->specific_profile_iterator));
 
        if (event_cb->Error != NET_ERR_NONE) {
-               WIFI_LOG(WIFI_ERROR, "Specific scan failed!, Error [%d]\n", event_cb->Error);
+               WIFI_LOG(WIFI_ERROR, "Specific scan failed!, Error [%d]", event_cb->Error);
                error_code = WIFI_MANAGER_ERROR_OPERATION_FAILED;
        } else if (event_cb->Data) {
-               __update_specific_iterator((GSList *)event_cb->Data);
-               WIFI_LOG(WIFI_INFO, "Specific AP count : %d\n",
-                               (int)g_slist_length(specific_profile_iterator));
+               __update_specific_iterator(wifi_handle, (GSList *)event_cb->Data);
+               WIFI_LOG(WIFI_INFO, "Specific AP count : %d",
+                               (int)g_slist_length(wifi_handle->specific_profile_iterator));
        }
 
-       if (_wifi_get_callback_count_from_handle_list(WIFI_SPECIFIC_SCAN_CB)) {
-               for (list = wifi_manager_handle_list; list; list = list->next) {
-                       wifi_manager_handle_s *local_handle = (wifi_manager_handle_s *)list->data;
-                       if (local_handle->specific_scan_cb)
-                               local_handle->specific_scan_cb(error_code, local_handle->specific_scan_user_data);
+       if (wifi_handle->specific_scan_cb)
+               wifi_handle->specific_scan_cb(error_code, wifi_handle->specific_scan_user_data);
 
-                       local_handle->specific_scan_cb = NULL;
-                       local_handle->specific_scan_user_data = NULL;
-               }
-       }
+       wifi_handle->specific_scan_cb = NULL;
+       wifi_handle->specific_scan_user_data = NULL;
 }
 
-static void __bssid_scan_cb(net_event_info_s *event_cb)
+static void __bssid_scan_cb(wifi_manager_handle_s *wifi_handle, net_event_info_s *event_cb)
 {
-       GSList *list;
        wifi_manager_error_e error_code = WIFI_MANAGER_ERROR_NONE;
 
-       __clear_profile_list(&bss_profile_iterator);
+       __clear_profile_list(&(wifi_handle->bss_profile_iterator));
 
        if (event_cb->Error != NET_ERR_NONE) {
-               WIFI_LOG(WIFI_ERROR, "BSSID scan failed!, Error [%d]\n",
+               WIFI_LOG(WIFI_ERROR, "BSSID scan failed!, Error [%d]",
                                 event_cb->Error);
                error_code = WIFI_MANAGER_ERROR_OPERATION_FAILED;
        } else if (event_cb->Data) {
-               __update_bss_profile_iterator((GSList *)event_cb->Data);
-               WIFI_LOG(WIFI_INFO, "BSS AP count : %d\n",
-                               (int)g_slist_length(bss_profile_iterator));
+               __update_bss_profile_iterator(wifi_handle, (GSList *)event_cb->Data);
+               WIFI_LOG(WIFI_INFO, "BSS AP count : %d",
+                               (int)g_slist_length(wifi_handle->bss_profile_iterator));
        }
 
-       if (_wifi_get_callback_count_from_handle_list(WIFI_BSSID_SCAN_CB)) {
-               for (list = wifi_manager_handle_list; list; list = list->next) {
-                       wifi_manager_handle_s *local_handle = (wifi_manager_handle_s *)list->data;
-                       if (local_handle->bssid_scan_cb)
-                               local_handle->bssid_scan_cb(error_code, local_handle->bssid_scan_user_data);
+       if (wifi_handle->bssid_scan_cb)
+               wifi_handle->bssid_scan_cb(error_code, wifi_handle->bssid_scan_user_data);
 
-                       local_handle->bssid_scan_cb = NULL;
-                       local_handle->bssid_scan_user_data = NULL;
-               }
-       }
+       wifi_handle->bssid_scan_cb = NULL;
+       wifi_handle->bssid_scan_user_data = NULL;
 }
 
-static void __ip_conflict_cb(net_event_info_s *event_cb)
+static void __ip_conflict_cb(wifi_manager_handle_s *wifi_handle, net_event_info_s *event_cb)
 {
-       GSList *list;
        char *mac = NULL;
        char *state = NULL;
        net_ip_conflict_info_s *conflict_info = NULL;
        wifi_manager_ip_conflict_state_e conflict_state = WIFI_MANAGER_IP_CONFLICT_STATE_UNKNOWN;
 
-       __clear_profile_list(&bss_profile_iterator);
+       __clear_profile_list(&(wifi_handle->bss_profile_iterator));
 
        if (event_cb->Data) {
                conflict_info = (net_ip_conflict_info_s *)event_cb->Data;
@@ -924,15 +884,8 @@ static void __ip_conflict_cb(net_event_info_s *event_cb)
                }
        }
 
-       if (_wifi_get_callback_count_from_handle_list(WIFI_IP_CONFLICT_CB)) {
-               for (list = wifi_manager_handle_list; list; list = list->next) {
-                       wifi_manager_handle_s *local_handle = (wifi_manager_handle_s *)list->data;
-                       if (local_handle->ip_conflict_cb)
-                               local_handle->ip_conflict_cb(mac, conflict_state,
-                                                            local_handle->ip_conflict_user_data);
-
-               }
-       }
+       if (wifi_handle->ip_conflict_cb)
+               wifi_handle->ip_conflict_cb(mac, conflict_state, wifi_handle->ip_conflict_user_data);
 
        if (conflict_info) {
                g_free(conflict_info->mac);
@@ -940,136 +893,83 @@ static void __ip_conflict_cb(net_event_info_s *event_cb)
        }
 }
 
-static void __netlink_scan_cb(net_event_info_s *event_cb)
+static void __netlink_scan_cb(wifi_manager_handle_s *wifi_handle, net_event_info_s *event_cb)
 {
-       GSList *list;
        wifi_manager_error_e error_code = WIFI_MANAGER_ERROR_NONE;
 
-       __clear_profile_list(&bss_profile_iterator);
+       __clear_profile_list(&(wifi_handle->bss_profile_iterator));
 
        if (event_cb->Error != NET_ERR_NONE) {
-               WIFI_LOG(WIFI_ERROR, "NETLINK scan failed!, Error [%d]\n",
+               WIFI_LOG(WIFI_ERROR, "NETLINK scan failed!, Error [%d]",
                                 event_cb->Error);
                error_code = WIFI_MANAGER_ERROR_OPERATION_FAILED;
        } else if (event_cb->Data) {
-               __update_netlink_scan_profile_iterator((GSList *)event_cb->Data);
-               WIFI_LOG(WIFI_INFO, "BSS AP count : %d\n",
-                               (int)g_slist_length(bss_profile_iterator));
+               __update_netlink_scan_profile_iterator(wifi_handle, (GSList *)event_cb->Data);
+               WIFI_LOG(WIFI_INFO, "BSS AP count : %d",
+                               (int)g_slist_length(wifi_handle->bss_profile_iterator));
        }
 
-       if (_wifi_get_callback_count_from_handle_list(WIFI_NETLINK_SCAN_CB)) {
-               for (list = wifi_manager_handle_list; list; list = list->next) {
-                       wifi_manager_handle_s *local_handle = (wifi_manager_handle_s *)list->data;
-                       if (local_handle->netlink_scan_cb)
-                               local_handle->netlink_scan_cb(error_code, local_handle->netlink_scan_user_data);
+       if (wifi_handle->netlink_scan_cb)
+               wifi_handle->netlink_scan_cb(error_code, wifi_handle->netlink_scan_user_data);
 
-                       local_handle->netlink_scan_cb = NULL;
-                       local_handle->netlink_scan_user_data = NULL;
-               }
-       }
+       wifi_handle->netlink_scan_cb = NULL;
+       wifi_handle->netlink_scan_user_data = NULL;
 }
 
-static void __multi_scan_cb(net_event_info_s *event_cb)
+static void __multi_scan_cb(wifi_manager_handle_s *wifi_handle, net_event_info_s *event_cb)
 {
-       GSList *list;
        wifi_manager_error_e error_code = WIFI_MANAGER_ERROR_NONE;
 
-       if (net_check_ref_count() != true) {
-               WIFI_LOG(WIFI_ERROR, "Application is not registered"
-                               "If multi-threaded, thread integrity be broken.");
-               return;
-       }
-
        if (event_cb->Error != NET_ERR_NONE) {
                WIFI_LOG(WIFI_ERROR, "Multi Scan failed[%d]", event_cb->Error);
                error_code = WIFI_MANAGER_ERROR_OPERATION_FAILED;
        }
 
-       if (_wifi_get_callback_count_from_handle_list(WIFI_MULTI_SCAN_CB)) {
-               for (list = wifi_manager_handle_list; list; list = list->next) {
-                       wifi_manager_handle_s *local_handle = (wifi_manager_handle_s *)list->data;
-                       if (local_handle->multi_scan_cb)
-                               local_handle->multi_scan_cb(error_code, local_handle->multi_scan_user_data);
+       if (wifi_handle->multi_scan_cb)
+               wifi_handle->multi_scan_cb(error_code, wifi_handle->multi_scan_user_data);
 
-                       local_handle->multi_scan_cb = NULL;
-                       local_handle->multi_scan_user_data = NULL;
-               }
-               return;
-       }
+       wifi_handle->multi_scan_cb = NULL;
+       wifi_handle->multi_scan_user_data = NULL;
 }
 
-static void __set_connected_cb(wifi_manager_h wifi,
+static void __set_connected_cb(wifi_manager_handle_s *wifi_handle,
                wifi_manager_connected_cb user_cb, void *user_data)
 {
-       wifi_manager_handle_s *local_handle = (wifi_manager_handle_s *)wifi;
-
-       if (user_cb != NULL) {
-               local_handle->connected_cb = user_cb;
-               local_handle->connected_user_data = user_data;
-       }
+       wifi_handle->connected_cb = user_cb;
+       wifi_handle->connected_user_data = user_data;
 }
 
-static void __connected_cb(wifi_manager_error_e result)
+static void __connected_cb(wifi_manager_handle_s *wifi_handle, wifi_manager_error_e result)
 {
-       GSList *list;
+       if (wifi_handle->connected_cb)
+               wifi_handle->connected_cb(result, wifi_handle->connected_user_data);
 
-       if (net_check_ref_count() != true) {
-               WIFI_LOG(WIFI_ERROR, "Application is not registered"
-                               "If multi-threaded, thread integrity be broken.");
-               return;
-       }
-
-       if (_wifi_get_callback_count_from_handle_list(WIFI_CONNECTED_CB)) {
-               for (list = wifi_manager_handle_list; list; list = list->next) {
-                       wifi_manager_handle_s *local_handle = (wifi_manager_handle_s *)list->data;
-                       if (local_handle->connected_cb != NULL)
-                               local_handle->connected_cb(result, local_handle->connected_user_data);
-
-                       local_handle->connected_cb = NULL;
-                       local_handle->connected_user_data = NULL;
-               }
-       }
+       wifi_handle->connected_cb = NULL;
+       wifi_handle->connected_user_data = NULL;
 }
 
-static void __set_disconnected_cb(wifi_manager_h wifi,
+static void __set_disconnected_cb(wifi_manager_handle_s *wifi_handle,
                wifi_manager_disconnected_cb user_cb, void *user_data)
 {
-       wifi_manager_handle_s *local_handle = (wifi_manager_handle_s *)wifi;
-
-       if (user_cb != NULL) {
-               local_handle->disconnected_cb = user_cb;
-               local_handle->disconnected_user_data = user_data;
-       }
+       wifi_handle->disconnected_cb = user_cb;
+       wifi_handle->disconnected_user_data = user_data;
 }
 
-static void __disconnected_cb(wifi_manager_error_e result)
+static void __disconnected_cb(wifi_manager_handle_s *wifi_handle,
+               wifi_manager_error_e result)
 {
-       GSList *list;
-
-       if (net_check_ref_count() != true) {
-               WIFI_LOG(WIFI_ERROR, "Application is not registered"
-                               "If multi-threaded, thread integrity be broken.");
-               return;
-       }
+       if (wifi_handle->disconnected_cb)
+               wifi_handle->disconnected_cb(result, wifi_handle->disconnected_user_data);
 
-       if (_wifi_get_callback_count_from_handle_list(WIFI_DISCONNECTED_CB)) {
-               for (list = wifi_manager_handle_list; list; list = list->next) {
-                       wifi_manager_handle_s *local_handle = (wifi_manager_handle_s *)list->data;
-                       if (local_handle->disconnected_cb != NULL)
-                               local_handle->disconnected_cb(result, local_handle->disconnected_user_data);
-
-                       local_handle->disconnected_cb = NULL;
-                       local_handle->disconnected_user_data = NULL;
-               }
-       }
+       wifi_handle->disconnected_cb = NULL;
+       wifi_handle->disconnected_user_data = NULL;
 }
 
-static void __tdls_discovered_cb(net_event_info_s *event_cb)
+static void __tdls_discovered_cb(wifi_manager_handle_s *wifi_handle,
+               net_event_info_s *event_cb)
 {
-       GSList *list;
        char *peer_mac_add = NULL;
        net_tdls_discover_s *discover_info;
-
        wifi_manager_tdls_discovery_state_e state;
        discover_info = (net_tdls_discover_s*)event_cb->Data;
 
@@ -1080,8 +980,7 @@ static void __tdls_discovered_cb(net_event_info_s *event_cb)
 
        peer_mac_add = discover_info->mac_add;
 
-
-       WIFI_LOG(WIFI_INFO, "Peer Mac Add %s , Type[%d] \n", peer_mac_add, discover_info->type);
+       WIFI_LOG(WIFI_INFO, "Peer Mac Add %s , Type[%d] ", peer_mac_add, discover_info->type);
 
        if (discover_info->type == 0) //TDLS Discovery : Unicast
                state = WIFI_MANAGER_TDLS_DISCOVERY_STATE_FINISHED;
@@ -1094,269 +993,188 @@ static void __tdls_discovered_cb(net_event_info_s *event_cb)
        } else
                state = WIFI_MANAGER_TDLS_DISCOVERY_STATE_ONGOING;
 
-       if (_wifi_get_callback_count_from_handle_list(WIFI_MANAGER_TDLS_DISCOVERED_CB)) {
-               for (list = wifi_manager_handle_list; list; list = list->next) {
-                       wifi_manager_handle_s *local_handle = (wifi_manager_handle_s *)list->data;
-                       if (local_handle->tdls_discovered_cb)
-                               local_handle->tdls_discovered_cb(state, peer_mac_add,
-                                                       local_handle->tdls_discovered_user_data);
-               }
-       }
+       if (wifi_handle->tdls_discovered_cb)
+               wifi_handle->tdls_discovered_cb(state, peer_mac_add,
+                       wifi_handle->tdls_discovered_user_data);
 }
 
 
-static void __tdls_state_changed_cb(wifi_manager_tdls_state_e state,
-                                       net_event_info_s *event_cb)
+static void __tdls_state_changed_cb(wifi_manager_handle_s *wifi_handle,
+               wifi_manager_tdls_state_e state, net_event_info_s *event_cb)
 {
-       GSList *list;
        char *peer_mac_add = NULL;
        peer_mac_add = (char*)event_cb->Data;
 
-       WIFI_LOG(WIFI_INFO, "Peer Mac Add %s \n", peer_mac_add);
+       WIFI_LOG(WIFI_INFO, "Peer Mac Add %s ", peer_mac_add);
 
-       if (_wifi_get_callback_count_from_handle_list(WIFI_MANAGER_TDLS_STATE_CHANGED_CB)) {
-               for (list = wifi_manager_handle_list; list; list = list->next) {
-                       wifi_manager_handle_s *local_handle = (wifi_manager_handle_s *)list->data;
-                       if (local_handle->tdls_state_changed_cb)
-                               local_handle->tdls_state_changed_cb(state, peer_mac_add,
-                                                       local_handle->tdls_state_changed_user_data);
-               }
-       }
+       if (wifi_handle->tdls_state_changed_cb)
+               wifi_handle->tdls_state_changed_cb(state, peer_mac_add,
+                       wifi_handle->tdls_state_changed_user_data);
 }
 //LCOV_EXCL_STOP
 
-static void __set_forget_ap_cb(wifi_manager_h wifi,
+static void __set_forget_ap_cb(wifi_manager_handle_s *wifi_handle,
                wifi_manager_forget_ap_finished_cb user_cb, void *user_data)
 {
-       wifi_manager_handle_s *local_handle = (wifi_manager_handle_s *)wifi;
-
-       if (user_cb != NULL) {
-               local_handle->forget_ap_cb = user_cb;
-               local_handle->forget_ap_user_data = user_data;
-       }
+       wifi_handle->forget_ap_cb = user_cb;
+       wifi_handle->forget_ap_user_data = user_data;
 }
 
-static void __forget_ap_cb(wifi_manager_error_e result)
+static void __forget_ap_cb(wifi_manager_handle_s *wifi_handle, wifi_manager_error_e result)
 {
-       GSList *list;
+       if (wifi_handle->forget_ap_cb)
+               wifi_handle->forget_ap_cb(result, wifi_handle->forget_ap_user_data);
 
-       if (net_check_ref_count() != true) {
-               WIFI_LOG(WIFI_ERROR, "Application is not registered"
-                               "If multi-threaded, thread integrity be broken.");
-               return;
-       }
-
-       if (_wifi_get_callback_count_from_handle_list(WIFI_MANAGER_FORGET_AP_CB)) {
-               for (list = wifi_manager_handle_list; list; list = list->next) {
-                       wifi_manager_handle_s *local_handle = (wifi_manager_handle_s *)list->data;
-                       if (local_handle->forget_ap_cb != NULL)
-                               local_handle->forget_ap_cb(result,
-                                                          local_handle->forget_ap_user_data);
+       wifi_handle->forget_ap_cb = NULL;
+       wifi_handle->forget_ap_user_data = NULL;
+}
 
-                       local_handle->forget_ap_cb = NULL;
-                       local_handle->forget_ap_user_data = NULL;
-               }
+static void __rssi_level_changed_cb(wifi_manager_handle_s *wifi_handle,
+               net_rssi_info_s *rssi_info)
+{
+       if (wifi_handle->rssi_level_changed_cb) {
+               if (!g_strcmp0(wifi_handle->interface_name, rssi_info->ifname))
+                       wifi_handle->rssi_level_changed_cb(rssi_info->rssi_level,
+                               wifi_handle->rssi_level_changed_user_data);
        }
 }
 
-static void __raise_dpp_event_callback(wifi_manager_dpp_event_e event,
-               wifi_manager_dpp_state_e state)
+static void __module_state_changed_cb(wifi_manager_handle_s *wifi_handle,
+               net_module_info_s *module_info)
 {
-       GSList *list;
-       for (list = wifi_manager_handle_list; list; list = list->next) {
-               wifi_manager_handle_s *local_handle = (wifi_manager_handle_s *)list->data;
-               if (!local_handle->dpp_event_cb)
-                       continue;
-               local_handle->dpp_event_cb(event,
-                               state,
-                               g_p_dpp_current,
-                               local_handle->dpp_event_user_data);
+       if (wifi_handle->module_state_changed_cb) {
+               if (!g_strcmp0(wifi_handle->interface_name, module_info->ifname))
+                       wifi_handle->module_state_changed_cb(module_info->status_uevent,
+                               wifi_handle->module_state_changed_user_data);
        }
 }
 
-static void __dpp_uri_generated_cb(net_dpp_event_info_s *dpp_event_info)
+static void __raise_dpp_event_callback(wifi_manager_handle_s *wifi_handle,
+               wifi_manager_dpp_event_e event, wifi_manager_dpp_state_e state)
 {
-       if (net_check_ref_count() != true) {
-               WIFI_LOG(WIFI_ERROR, "Application is not registered"
-                               "If multi-threaded, thread integrity be broken.");
-               return;
-       }
+       if (wifi_handle->dpp_event_cb)
+               wifi_handle->dpp_event_cb(event, state, g_p_dpp_current,
+                       wifi_handle->dpp_event_user_data);
+}
 
+static void __dpp_uri_generated_cb(wifi_manager_handle_s *wifi_handle,
+               net_dpp_event_info_s *dpp_event_info)
+{
        if (g_p_dpp_current) {
                g_p_dpp_current->own_uri = g_strdup(dpp_event_info->own_uri);
                g_p_dpp_current->own_id = dpp_event_info->own_id;
        }
 
-       __raise_dpp_event_callback(WIFI_MANAGER_DPP_EVENT_URI_GENERATED,
+       __raise_dpp_event_callback(wifi_handle, WIFI_MANAGER_DPP_EVENT_URI_GENERATED,
                        WIFI_MANAGER_DPP_STATE_NONE);
 }
 
-static void __dpp_bootstrapped_cb(net_dpp_event_info_s *dpp_event_info)
+static void __dpp_bootstrapped_cb(wifi_manager_handle_s *wifi_handle,
+               net_dpp_event_info_s *dpp_event_info)
 {
-       if (net_check_ref_count() != true) {
-               WIFI_LOG(WIFI_ERROR, "Application is not registered"
-                               "If multi-threaded, thread integrity be broken.");
-               return;
-       }
-
        if (g_p_dpp_current) {
                g_p_dpp_current->peer_id = dpp_event_info->peer_id;
                g_p_dpp_current->state = WIFI_MANAGER_DPP_STATE_BOOTSTRAPPED;
        }
 
-       __raise_dpp_event_callback(WIFI_MANAGER_DPP_EVENT_STATE_CHANGED,
+       __raise_dpp_event_callback(wifi_handle, WIFI_MANAGER_DPP_EVENT_STATE_CHANGED,
                        WIFI_MANAGER_DPP_STATE_BOOTSTRAPPED);
 }
 
-static void __dpp_awaiting_cb(net_dpp_event_info_s *dpp_event_info)
+static void __dpp_awaiting_cb(wifi_manager_handle_s *wifi_handle,
+               net_dpp_event_info_s *dpp_event_info)
 {
-       if (net_check_ref_count() != true) {
-               WIFI_LOG(WIFI_ERROR, "Application is not registered"
-                               "If multi-threaded, thread integrity be broken.");
-               return;
-       }
-
        if (g_p_dpp_current)
                g_p_dpp_current->state = WIFI_MANAGER_DPP_STATE_AWAITING;
 
-       __raise_dpp_event_callback(WIFI_MANAGER_DPP_EVENT_STATE_CHANGED,
+       __raise_dpp_event_callback(wifi_handle, WIFI_MANAGER_DPP_EVENT_STATE_CHANGED,
                        WIFI_MANAGER_DPP_STATE_AWAITING);
 }
 
-static void __dpp_authenticating_cb(net_dpp_event_info_s *dpp_event_info)
+static void __dpp_authenticating_cb(wifi_manager_handle_s *wifi_handle,
+               net_dpp_event_info_s *dpp_event_info)
 {
-       if (net_check_ref_count() != true) {
-               WIFI_LOG(WIFI_ERROR, "Application is not registered"
-                               "If multi-threaded, thread integrity be broken.");
-               return;
-       }
-
        if (g_p_dpp_current)
                g_p_dpp_current->state = WIFI_MANAGER_DPP_STATE_AUTHENTICATING;
 
-       __raise_dpp_event_callback(WIFI_MANAGER_DPP_EVENT_STATE_CHANGED,
+       __raise_dpp_event_callback(wifi_handle, WIFI_MANAGER_DPP_EVENT_STATE_CHANGED,
                        WIFI_MANAGER_DPP_STATE_AUTHENTICATING);
 }
 
-static void __dpp_auth_success_cb(net_dpp_event_info_s *dpp_event_info)
+static void __dpp_auth_success_cb(wifi_manager_handle_s *wifi_handle,
+               net_dpp_event_info_s *dpp_event_info)
 {
-       if (net_check_ref_count() != true) {
-               WIFI_LOG(WIFI_ERROR, "Application is not registered"
-                               "If multi-threaded, thread integrity be broken.");
-               return;
-       }
-
        if (g_p_dpp_current)
                g_p_dpp_current->state = WIFI_MANAGER_DPP_STATE_AUTHENTICATED;
 
-       __raise_dpp_event_callback(WIFI_MANAGER_DPP_EVENT_STATE_CHANGED,
+       __raise_dpp_event_callback(wifi_handle, WIFI_MANAGER_DPP_EVENT_STATE_CHANGED,
                        WIFI_MANAGER_DPP_STATE_AUTHENTICATED);
 }
 
-static void __dpp_auth_failed_cb(net_dpp_event_info_s *dpp_event_info)
+static void __dpp_auth_failed_cb(wifi_manager_handle_s *wifi_handle,
+               net_dpp_event_info_s *dpp_event_info)
 {
-       if (net_check_ref_count() != true) {
-               WIFI_LOG(WIFI_ERROR, "Application is not registered"
-                               "If multi-threaded, thread integrity be broken.");
-               return;
-       }
-
-       __raise_dpp_event_callback(WIFI_MANAGER_DPP_EVENT_AUTH_FAILED,
+       __raise_dpp_event_callback(wifi_handle, WIFI_MANAGER_DPP_EVENT_AUTH_FAILED,
                        WIFI_MANAGER_DPP_STATE_NONE);
 }
 
-static void __dpp_not_compatible_cb(net_dpp_event_info_s *dpp_event_info)
+static void __dpp_not_compatible_cb(wifi_manager_handle_s *wifi_handle,
+               net_dpp_event_info_s *dpp_event_info)
 {
-       if (net_check_ref_count() != true) {
-               WIFI_LOG(WIFI_ERROR, "Application is not registered"
-                               "If multi-threaded, thread integrity be broken.");
-               return;
-       }
-
-       __raise_dpp_event_callback(WIFI_MANAGER_DPP_EVENT_NOT_COMPATIBLE,
+       __raise_dpp_event_callback(wifi_handle, WIFI_MANAGER_DPP_EVENT_NOT_COMPATIBLE,
                        WIFI_MANAGER_DPP_STATE_NONE);
 }
 
-static void __dpp_conf_failed_cb(net_dpp_event_info_s *dpp_event_info)
+static void __dpp_conf_failed_cb(wifi_manager_handle_s *wifi_handle,
+               net_dpp_event_info_s *dpp_event_info)
 {
-       if (net_check_ref_count() != true) {
-               WIFI_LOG(WIFI_ERROR, "Application is not registered"
-                               "If multi-threaded, thread integrity be broken.");
-               return;
-       }
-
-       __raise_dpp_event_callback(WIFI_MANAGER_DPP_EVENT_CONF_FAILED,
+       __raise_dpp_event_callback(wifi_handle, WIFI_MANAGER_DPP_EVENT_CONF_FAILED,
                        WIFI_MANAGER_DPP_STATE_NONE);
 }
 
-static void __dpp_scan_peer_qr_cb(net_dpp_event_info_s *dpp_event_info)
+static void __dpp_scan_peer_qr_cb(wifi_manager_handle_s *wifi_handle,
+               net_dpp_event_info_s *dpp_event_info)
 {
-       if (net_check_ref_count() != true) {
-               WIFI_LOG(WIFI_ERROR, "Application is not registered"
-                               "If multi-threaded, thread integrity be broken.");
-               return;
-       }
-
        if (g_p_dpp_current)
                g_p_dpp_current->state = WIFI_MANAGER_DPP_STATE_URI_REQUESTED;
 
-       __raise_dpp_event_callback(WIFI_MANAGER_DPP_EVENT_STATE_CHANGED,
+       __raise_dpp_event_callback(wifi_handle, WIFI_MANAGER_DPP_EVENT_STATE_CHANGED,
                        WIFI_MANAGER_DPP_STATE_URI_REQUESTED);
 }
 
-static void __dpp_network_id_cb(net_dpp_event_info_s *dpp_event_info)
+static void __dpp_network_id_cb(wifi_manager_handle_s *wifi_handle,
+               net_dpp_event_info_s *dpp_event_info)
 {
-       if (net_check_ref_count() != true) {
-               WIFI_LOG(WIFI_ERROR, "Application is not registered"
-                               "If multi-threaded, thread integrity be broken.");
-               return;
-       }
-
        if (g_p_dpp_current)
                g_p_dpp_current->state = WIFI_MANAGER_DPP_STATE_CONFIGURED;
 
-       __raise_dpp_event_callback(WIFI_MANAGER_DPP_EVENT_STATE_CHANGED,
+       __raise_dpp_event_callback(wifi_handle, WIFI_MANAGER_DPP_EVENT_STATE_CHANGED,
                        WIFI_MANAGER_DPP_STATE_CONFIGURED);
 }
 
-static void __dpp_conf_sent_cb(net_dpp_event_info_s *dpp_event_info)
+static void __dpp_conf_sent_cb(wifi_manager_handle_s *wifi_handle,
+               net_dpp_event_info_s *dpp_event_info)
 {
-       if (net_check_ref_count() != true) {
-               WIFI_LOG(WIFI_ERROR, "Application is not registered"
-                               "If multi-threaded, thread integrity be broken.");
-               return;
-       }
-
        if (g_p_dpp_current)
                g_p_dpp_current->state = WIFI_MANAGER_DPP_STATE_CONFIGURING;
 
-       __raise_dpp_event_callback(WIFI_MANAGER_DPP_EVENT_STATE_CHANGED,
+       __raise_dpp_event_callback(wifi_handle, WIFI_MANAGER_DPP_EVENT_STATE_CHANGED,
                        WIFI_MANAGER_DPP_STATE_CONFIGURING);
 }
 
-static void __dpp_conf_received_cb(net_dpp_event_info_s *dpp_event_info)
+static void __dpp_conf_received_cb(wifi_manager_handle_s *wifi_handle,
+               net_dpp_event_info_s *dpp_event_info)
 {
-       if (net_check_ref_count() != true) {
-               WIFI_LOG(WIFI_ERROR, "Application is not registered"
-                               "If multi-threaded, thread integrity be broken.");
-               return;
-       }
-
        if (g_p_dpp_current)
                g_p_dpp_current->state = WIFI_MANAGER_DPP_STATE_CONFIGURED;
 
-       __raise_dpp_event_callback(WIFI_MANAGER_DPP_EVENT_STATE_CHANGED,
+       __raise_dpp_event_callback(wifi_handle, WIFI_MANAGER_DPP_EVENT_STATE_CHANGED,
                        WIFI_MANAGER_DPP_STATE_CONFIGURED);
 }
 
-static void __dpp_failed_cb(net_dpp_event_info_s *dpp_event_info)
+static void __dpp_failed_cb(wifi_manager_handle_s *wifi_handle,
+               net_dpp_event_info_s *dpp_event_info)
 {
-       if (net_check_ref_count() != true) {
-               WIFI_LOG(WIFI_ERROR, "Application is not registered"
-                               "If multi-threaded, thread integrity be broken.");
-               return;
-       }
-
        if (g_p_dpp_current) {
                g_p_dpp_current->peer_id = 0;
                g_p_dpp_current->own_id = 0;
@@ -1365,20 +1183,15 @@ static void __dpp_failed_cb(net_dpp_event_info_s *dpp_event_info)
                g_p_dpp_current->state = WIFI_MANAGER_DPP_STATE_NONE;
        }
 
-       __raise_dpp_event_callback(WIFI_MANAGER_DPP_EVENT_REQUEST_FAILED,
+       __raise_dpp_event_callback(wifi_handle, WIFI_MANAGER_DPP_EVENT_REQUEST_FAILED,
                        WIFI_MANAGER_DPP_STATE_NONE);
 
        g_p_dpp_current = NULL;
 }
 
-static void __dpp_removed_cb(net_dpp_event_info_s *dpp_event_info)
+static void __dpp_removed_cb(wifi_manager_handle_s *wifi_handle,
+               net_dpp_event_info_s *dpp_event_info)
 {
-       if (net_check_ref_count() != true) {
-               WIFI_LOG(WIFI_ERROR, "Application is not registered"
-                               "If multi-threaded, thread integrity be broken.");
-               return;
-       }
-
        if (g_p_dpp_current) {
                g_p_dpp_current->peer_id = 0;
                g_p_dpp_current->own_id = 0;
@@ -1387,7 +1200,7 @@ static void __dpp_removed_cb(net_dpp_event_info_s *dpp_event_info)
                g_p_dpp_current->state = WIFI_MANAGER_DPP_STATE_NONE;
        }
 
-       __raise_dpp_event_callback(WIFI_MANAGER_DPP_EVENT_STATE_CHANGED,
+       __raise_dpp_event_callback(wifi_handle, WIFI_MANAGER_DPP_EVENT_STATE_CHANGED,
                        WIFI_MANAGER_DPP_STATE_NONE);
 
        g_p_dpp_current = NULL;
@@ -1401,6 +1214,7 @@ static void _wifi_evt_cb(net_event_info_s *event_cb, void *user_data)
        wifi_manager_error_e result = WIFI_MANAGER_ERROR_NONE;
        bool is_profile_exists = false;
        GSList *list = NULL;
+       wifi_manager_handle_s *wifi_handle = user_data;
 
        switch (event_cb->Event) {
        case NET_EVENT_OPEN_RSP:
@@ -1424,14 +1238,14 @@ static void _wifi_evt_cb(net_event_info_s *event_cb, void *user_data)
                                __convert_ap_error_type_to_string(result));
 
                if (is_requested)
-                       __connected_cb(result);
+                       __connected_cb(wifi_handle, result);
 
                switch (event_cb->Error) {
                case NET_ERR_NONE:
                        if (event_cb->Datalength == sizeof(net_profile_info_s))
                                prof_info_p = (net_profile_info_s *)event_cb->Data;
 
-                       __state_changed_cb(event_cb->ProfileName, prof_info_p,
+                       __state_changed_cb(wifi_handle, event_cb->ProfileName, prof_info_p,
                                                        WIFI_MANAGER_CONNECTION_STATE_CONNECTED);
                        return;
                case NET_ERR_ACTIVE_CONNECTION_EXISTS:
@@ -1440,8 +1254,9 @@ static void _wifi_evt_cb(net_event_info_s *event_cb, void *user_data)
                        break;
                }
 
-               if (net_get_profile_info(event_cb->ProfileName, &prof_info) == NET_ERR_NONE) {
-                       __state_changed_cb(event_cb->ProfileName, &prof_info,
+               if (net_get_profile_info(wifi_handle->network_info,
+                               event_cb->ProfileName, &prof_info) == NET_ERR_NONE) {
+                       __state_changed_cb(wifi_handle, event_cb->ProfileName, &prof_info,
                                                WIFI_MANAGER_CONNECTION_STATE_DISCONNECTED);
 
                        /* Free internal GSList */
@@ -1455,7 +1270,7 @@ static void _wifi_evt_cb(net_event_info_s *event_cb, void *user_data)
                                prof_info.bssid_list = NULL;
                        }
                } else
-                       __state_changed_cb(event_cb->ProfileName, NULL,
+                       __state_changed_cb(wifi_handle, event_cb->ProfileName, NULL,
                                                WIFI_MANAGER_CONNECTION_STATE_DISCONNECTED);
 
                break;
@@ -1471,12 +1286,13 @@ static void _wifi_evt_cb(net_event_info_s *event_cb, void *user_data)
                                __convert_ap_error_type_to_string(result));
 
                if (is_requested)
-                       __disconnected_cb(result);
+                       __disconnected_cb(wifi_handle, result);
 
                switch (event_cb->Error) {
                case NET_ERR_NONE:
-                       if (net_get_profile_info(event_cb->ProfileName, &prof_info) == NET_ERR_NONE) {
-                               __state_changed_cb(event_cb->ProfileName, &prof_info,
+                       if (net_get_profile_info(wifi_handle->network_info,
+                                       event_cb->ProfileName, &prof_info) == NET_ERR_NONE) {
+                               __state_changed_cb(wifi_handle, event_cb->ProfileName, &prof_info,
                                                WIFI_MANAGER_CONNECTION_STATE_DISCONNECTED);
 
                                /* Free internal GSList */
@@ -1490,29 +1306,29 @@ static void _wifi_evt_cb(net_event_info_s *event_cb, void *user_data)
                                        prof_info.bssid_list = NULL;
                                }
                        } else
-                               __state_changed_cb(event_cb->ProfileName, NULL,
+                               __state_changed_cb(wifi_handle, event_cb->ProfileName, NULL,
                                                WIFI_MANAGER_CONNECTION_STATE_DISCONNECTED);
 
-                       WIFI_LOG(WIFI_INFO, "Connection close succeeded!\n");
+                       WIFI_LOG(WIFI_INFO, "Connection close succeeded!");
                        /* Checking if disconnection request was sent when WPS PBC connection
                         * was requested, if true then start WPS PBC connection request */
-                       if (is_disconnect_wps_pbc) {
+                       if (wifi_handle->is_disconnect_wps_pbc) {
                                net_wifi_wps_info_s wps_info;
                                memset(&wps_info, 0, sizeof(net_wifi_wps_info_s));
                                wps_info.type = WIFI_WPS_PBC;
-                               if (net_wifi_enroll_wps_without_ssid(&wps_info) != NET_ERR_NONE)
-                                       __connected_cb(WIFI_MANAGER_ERROR_OPERATION_FAILED);
-                               is_disconnect_wps_pbc = false;
+                               if (net_wifi_enroll_wps_without_ssid(wifi_handle->network_info, &wps_info) != NET_ERR_NONE)
+                                       __connected_cb(wifi_handle, WIFI_MANAGER_ERROR_OPERATION_FAILED);
+                               wifi_handle->is_disconnect_wps_pbc = false;
                        }
                        /* Checking if disconnection request was sent when WPS PIN connection
                         * was requested, if true then start WPS PBC connection request */
-                       else if (is_disconnect_wps_pin) {
+                       else if (wifi_handle->is_disconnect_wps_pin) {
                                net_wifi_wps_info_s wps_info;
                                memset(&wps_info, 0, sizeof(net_wifi_wps_info_s));
                                wps_info.type = WIFI_WPS_PIN;
-                               if (net_wifi_enroll_wps_without_ssid(&wps_info) != NET_ERR_NONE)
-                                       __connected_cb(WIFI_MANAGER_ERROR_OPERATION_FAILED);
-                               is_disconnect_wps_pin = false;
+                               if (net_wifi_enroll_wps_without_ssid(wifi_handle->network_info, &wps_info) != NET_ERR_NONE)
+                                       __connected_cb(wifi_handle, WIFI_MANAGER_ERROR_OPERATION_FAILED);
+                               wifi_handle->is_disconnect_wps_pin = false;
                        }
 
                        return;
@@ -1534,8 +1350,9 @@ static void _wifi_evt_cb(net_event_info_s *event_cb, void *user_data)
                WIFI_LOG(WIFI_INFO, "state: %s", __convert_ap_state_to_string(ap_state));
                WIFI_LOG(WIFI_INFO, "profile name: %s", event_cb->ProfileName);
 
-               if (net_get_profile_info(event_cb->ProfileName, &prof_info) == NET_ERR_NONE) {
-                       __state_changed_cb(event_cb->ProfileName, &prof_info, ap_state);
+               if (net_get_profile_info(wifi_handle->network_info,
+                               event_cb->ProfileName, &prof_info) == NET_ERR_NONE) {
+                       __state_changed_cb(wifi_handle, event_cb->ProfileName, &prof_info, ap_state);
 
                        /* Free internal GSList */
                        if (prof_info.vsie_list) {
@@ -1549,7 +1366,7 @@ static void _wifi_evt_cb(net_event_info_s *event_cb, void *user_data)
                        }
                } else if (ap_state == WIFI_MANAGER_CONNECTION_STATE_DISCONNECTED) {
                        net_profile_info_s *profile = NULL;
-                       for (list = profile_iterator; list; list = list->next) {
+                       for (list = wifi_handle->profile_iterator; list; list = list->next) {
                                profile = (net_profile_info_s *)list->data;
                                if (!g_strcmp0(event_cb->ProfileName, profile->ProfileName)) {
                                        is_profile_exists = true;
@@ -1559,151 +1376,163 @@ static void _wifi_evt_cb(net_event_info_s *event_cb, void *user_data)
 
                        if (is_profile_exists == true) {
                                profile->ProfileState = *profile_state;
-                               __state_changed_cb(event_cb->ProfileName, profile, ap_state);
+                               __state_changed_cb(wifi_handle, event_cb->ProfileName, profile, ap_state);
                        } else
-                               __state_changed_cb(event_cb->ProfileName,
-                                                       NULL, ap_state);
+                               __state_changed_cb(wifi_handle, event_cb->ProfileName, NULL, ap_state);
                } else
-                       __state_changed_cb(event_cb->ProfileName, NULL, ap_state);
+                       __state_changed_cb(wifi_handle, event_cb->ProfileName, NULL, ap_state);
 
                break;
        case NET_EVENT_WIFI_SCAN_RSP:
        case NET_EVENT_WIFI_SCAN_IND:
-               __scan_cb(event_cb, is_requested);
+               __scan_cb(wifi_handle, event_cb, is_requested);
                break;
        case NET_EVENT_WIFI_SPECIFIC_SCAN_RSP:
-               WIFI_LOG(WIFI_INFO, "Got Wi-Fi specific scan RSP\n");
-               __specific_scan_cb(event_cb);
+               WIFI_LOG(WIFI_INFO, "Got Wi-Fi specific scan RSP");
+               __specific_scan_cb(wifi_handle, event_cb);
                break;
        case NET_EVENT_WIFI_SPECIFIC_SCAN_IND:
-               WIFI_LOG(WIFI_INFO, "Got Wi-Fi specific scan IND\n");
-               __specific_scan_cb(event_cb);
+               WIFI_LOG(WIFI_INFO, "Got Wi-Fi specific scan IND");
+               __specific_scan_cb(wifi_handle, event_cb);
                break;
        case NET_EVENT_WIFI_BSSID_SCAN_IND:
-               WIFI_LOG(WIFI_INFO, "Got BSSID scan done IND\n");
-               __bssid_scan_cb(event_cb);
+               WIFI_LOG(WIFI_INFO, "Got BSSID scan done IND");
+               __bssid_scan_cb(wifi_handle, event_cb);
                break;
        case NET_EVENT_WIFI_IP_CONFLICT_IND:
-               WIFI_LOG(WIFI_INFO, "Got ip conflict event IND\n"); //LCOV_EXCL_LINE
-               __ip_conflict_cb(event_cb); //LCOV_EXCL_LINE
+               WIFI_LOG(WIFI_INFO, "Got ip conflict event IND"); //LCOV_EXCL_LINE
+               __ip_conflict_cb(wifi_handle, event_cb); //LCOV_EXCL_LINE
                break;
        case NET_EVENT_WIFI_NETLINK_SCAN_IND:
-               WIFI_LOG(WIFI_INFO, "Got NETLINK scan done IND\n"); //LCOV_EXCL_LINE
-               __netlink_scan_cb(event_cb); //LCOV_EXCL_LINE
+               WIFI_LOG(WIFI_INFO, "Got NETLINK scan done IND"); //LCOV_EXCL_LINE
+               __netlink_scan_cb(wifi_handle, event_cb); //LCOV_EXCL_LINE
                break;
        case NET_EVENT_WIFI_SCAN_CHANGED:
-               WIFI_LOG(WIFI_INFO, "Got Wi-Fi ScanChanged event\n");
+               WIFI_LOG(WIFI_INFO, "Got Wi-Fi ScanChanged event");
                wifi_manager_scan_state_e *scan_state = (wifi_manager_scan_state_e *)event_cb->Data;
-               __scan_changed_cb(*scan_state);
+               __scan_changed_cb(wifi_handle, *scan_state);
                break;
        case NET_EVENT_WIFI_POWER_RSP:
                is_requested = true;
                /* fall through */
        case NET_EVENT_WIFI_POWER_IND:
-               __power_on_off_cb(event_cb, is_requested);
+               __power_on_off_cb(wifi_handle, event_cb, is_requested);
                break;
        case NET_EVENT_WIFI_TDLS_DISCOVERED_IND:
                WIFI_LOG(WIFI_INFO, "Received TDLS Discover Ind"); //LCOV_EXCL_LINE
-               __tdls_discovered_cb(event_cb); //LCOV_EXCL_LINE
+               __tdls_discovered_cb(wifi_handle, event_cb); //LCOV_EXCL_LINE
                break;
        case NET_EVENT_WIFI_TDLS_CONNECTED_IND:
                WIFI_LOG(WIFI_INFO, "Received TDLS Connected Ind"); //LCOV_EXCL_LINE
-               __tdls_state_changed_cb(WIFI_MANAGER_TDLS_STATE_CONNECTED, event_cb); //LCOV_EXCL_LINE
+               __tdls_state_changed_cb(wifi_handle, WIFI_MANAGER_TDLS_STATE_CONNECTED, event_cb); //LCOV_EXCL_LINE
                break;
        case NET_EVENT_WIFI_TDLS_DISCONNECTED_IND:
                WIFI_LOG(WIFI_INFO, "Received TDLS Disconnected Ind"); //LCOV_EXCL_LINE
-               __tdls_state_changed_cb(WIFI_MANAGER_TDLS_STATE_DISCONNECTED, event_cb); //LCOV_EXCL_LINE
+               __tdls_state_changed_cb(wifi_handle, WIFI_MANAGER_TDLS_STATE_DISCONNECTED, event_cb); //LCOV_EXCL_LINE
                break;
        case NET_EVENT_WIFI_MULTI_SCAN_RSP:
-               WIFI_LOG(WIFI_INFO, "Got Wi-Fi multi scan RSP\n"); //LCOV_EXCL_LINE
-               __multi_scan_cb(event_cb); //LCOV_EXCL_LINE
+               WIFI_LOG(WIFI_INFO, "Got Wi-Fi multi scan RSP"); //LCOV_EXCL_LINE
+               __multi_scan_cb(wifi_handle, event_cb); //LCOV_EXCL_LINE
                break;
        case NET_EVENT_WIFI_MULTI_SCAN_IND:
-               WIFI_LOG(WIFI_INFO, "Got Wi-Fi multi scan IND\n"); //LCOV_EXCL_LINE
-               __multi_scan_cb(event_cb); //LCOV_EXCL_LINE
+               WIFI_LOG(WIFI_INFO, "Got Wi-Fi multi scan IND"); //LCOV_EXCL_LINE
+               __multi_scan_cb(wifi_handle, event_cb); //LCOV_EXCL_LINE
                break;
        case NET_EVENT_WIFI_FORGET_AP_IND:
-               WIFI_LOG(WIFI_INFO, "Got Wi-Fi forget AP IND\n"); //LCOV_EXCL_LINE
-               __forget_ap_cb(event_cb->Error); //LCOV_EXCL_LINE
+               WIFI_LOG(WIFI_INFO, "Got Wi-Fi forget AP IND"); //LCOV_EXCL_LINE
+               __forget_ap_cb(wifi_handle, event_cb->Error); //LCOV_EXCL_LINE
+               break;
+       case NET_EVENT_WIFI_RSSI_CHANGED:
+       case NET_EVENT_WIFI_RSSI_LEVEL_CHANGED:
+               __rssi_level_changed_cb(wifi_handle, (net_rssi_info_s *)event_cb->Data);
+               break;
+       case NET_EVENT_WIFI_MODULE_STATE_CHANGED:
+               __module_state_changed_cb(wifi_handle, (net_module_info_s *)event_cb->Data);
                break;
        case NET_EVENT_WIFI_DPP_URI_GENERATED:
-               __dpp_uri_generated_cb((net_dpp_event_info_s *)event_cb->Data);
+               __dpp_uri_generated_cb(wifi_handle, (net_dpp_event_info_s *)event_cb->Data);
                break;
        case NET_EVENT_WIFI_DPP_BOOTSTRAPPED:
-               __dpp_bootstrapped_cb((net_dpp_event_info_s *)event_cb->Data);
+               __dpp_bootstrapped_cb(wifi_handle, (net_dpp_event_info_s *)event_cb->Data);
                break;
        case NET_EVENT_WIFI_DPP_AWAITING:
-               __dpp_awaiting_cb((net_dpp_event_info_s *)event_cb->Data);
+               __dpp_awaiting_cb(wifi_handle, (net_dpp_event_info_s *)event_cb->Data);
                break;
        case NET_EVENT_WIFI_DPP_AUTHENTICATING:
-               __dpp_authenticating_cb((net_dpp_event_info_s *)event_cb->Data);
+               __dpp_authenticating_cb(wifi_handle, (net_dpp_event_info_s *)event_cb->Data);
                break;
        case NET_EVENT_WIFI_DPP_AUTH_SUCCESS:
-               __dpp_auth_success_cb((net_dpp_event_info_s *)event_cb->Data);
+               __dpp_auth_success_cb(wifi_handle, (net_dpp_event_info_s *)event_cb->Data);
                break;
        case NET_EVENT_WIFI_DPP_AUTH_FAILED:
-               __dpp_auth_failed_cb((net_dpp_event_info_s *)event_cb->Data);
+               __dpp_auth_failed_cb(wifi_handle, (net_dpp_event_info_s *)event_cb->Data);
                break;
        case NET_EVENT_WIFI_DPP_NOT_COMPATIBLE:
-               __dpp_not_compatible_cb((net_dpp_event_info_s *)event_cb->Data);
+               __dpp_not_compatible_cb(wifi_handle, (net_dpp_event_info_s *)event_cb->Data);
                break;
        case NET_EVENT_WIFI_DPP_CONF_FAILED:
-               __dpp_conf_failed_cb((net_dpp_event_info_s *)event_cb->Data);
+               __dpp_conf_failed_cb(wifi_handle, (net_dpp_event_info_s *)event_cb->Data);
                break;
        case NET_EVENT_WIFI_DPP_SCAN_PEER_QR:
-               __dpp_scan_peer_qr_cb((net_dpp_event_info_s *)event_cb->Data);
+               __dpp_scan_peer_qr_cb(wifi_handle, (net_dpp_event_info_s *)event_cb->Data);
                break;
        case NET_EVENT_WIFI_DPP_NETWORK_ID:
-               __dpp_network_id_cb((net_dpp_event_info_s *)event_cb->Data);
+               __dpp_network_id_cb(wifi_handle, (net_dpp_event_info_s *)event_cb->Data);
                break;
        case NET_EVENT_WIFI_DPP_CONF_SENT:
-               __dpp_conf_sent_cb((net_dpp_event_info_s *)event_cb->Data);
+               __dpp_conf_sent_cb(wifi_handle, (net_dpp_event_info_s *)event_cb->Data);
                break;
        case NET_EVENT_WIFI_DPP_CONF_RECEIVED:
-               __dpp_conf_received_cb((net_dpp_event_info_s *)event_cb->Data);
+               __dpp_conf_received_cb(wifi_handle, (net_dpp_event_info_s *)event_cb->Data);
                break;
        case NET_EVENT_WIFI_DPP_FAILED:
-               __dpp_failed_cb((net_dpp_event_info_s *)event_cb->Data);
+               __dpp_failed_cb(wifi_handle, (net_dpp_event_info_s *)event_cb->Data);
                break;
        case NET_EVENT_WIFI_DPP_REMOVED:
-               __dpp_removed_cb((net_dpp_event_info_s *)event_cb->Data);
+               __dpp_removed_cb(wifi_handle, (net_dpp_event_info_s *)event_cb->Data);
                break;
        default:
                break;
        }
 }
 
-int _wifi_init(void)
+int _wifi_init(wifi_manager_h wifi, const char *ifname)
 {
        int rv;
+       wifi_manager_handle_s *wifi_handle = wifi;
 
-       rv = net_register_client_ext((net_event_cb)_wifi_evt_cb, NULL);
+       rv = net_register_client_ext(&(wifi_handle->network_info),
+                       ifname, (net_event_cb)_wifi_evt_cb, wifi);
        if (rv != NET_ERR_NONE && rv != NET_ERR_APP_ALREADY_REGISTERED) {
                WIFI_LOG(WIFI_ERROR, "Failed to register client [%d]", rv); //LCOV_EXCL_LINE
                return rv; //LCOV_EXCL_LINE
        }
 
-       return NET_ERR_NONE;
+       g_strlcpy(wifi_handle->interface_name,
+               wifi_handle->network_info->interface_name, NET_WLAN_IF_NAME_LEN + 1);
+       wifi_handle->network_info->wifi_handle = wifi_handle;
+
+       return WIFI_MANAGER_ERROR_NONE;
 }
 
 int _wifi_create_handle(wifi_manager_h *wifi)
 {
-       *wifi = g_try_malloc0(sizeof(wifi_manager_handle_s));
-
-       if (*wifi != NULL)
-               WIFI_LOG(WIFI_INFO, "New handle create[%p]", *wifi);
-       else {
+       wifi_manager_handle_s *wifi_handle = g_try_malloc0(sizeof(wifi_manager_handle_s));
+       if (wifi_handle == NULL) {
                WIFI_LOG(WIFI_ERROR, "Failed to create wifi handle"); //LCOV_EXCL_LINE
                return WIFI_MANAGER_ERROR_OUT_OF_MEMORY; //LCOV_EXCL_LINE
        }
 
+       *wifi = wifi_handle;
+
+       WIFI_LOG(WIFI_INFO, "New handle create[%p]", *wifi);
+
        return WIFI_MANAGER_ERROR_NONE;
 }
 
-int _wifi_add_to_handle_list(wifi_manager_h *wifi)
+void _wifi_add_to_handle_list(wifi_manager_h *wifi)
 {
        wifi_manager_handle_list = g_slist_append(wifi_manager_handle_list, *wifi);
-       return WIFI_MANAGER_ERROR_NONE;
 }
 
 void _wifi_remove_from_handle_list(wifi_manager_h wifi)
@@ -1714,6 +1543,11 @@ void _wifi_remove_from_handle_list(wifi_manager_h wifi)
        wifi = NULL;
 }
 
+int _wifi_length_from_handle_list(void)
+{
+       return g_slist_length(wifi_manager_handle_list);
+}
+
 bool _wifi_find_from_handle_list(wifi_manager_h wifi)
 {
        if (g_slist_find(wifi_manager_handle_list, wifi) != NULL)
@@ -1722,103 +1556,6 @@ bool _wifi_find_from_handle_list(wifi_manager_h wifi)
                return false;
 }
 
-int _wifi_get_count_from_handle_list(void)
-{
-       return ((int)g_slist_length(wifi_manager_handle_list));
-}
-
-int _wifi_get_callback_count_from_handle_list(wifi_manager_handle_cb_e e)
-{
-       GSList *list;
-       int count = 0;
-
-       for (list = wifi_manager_handle_list; list; list = list->next) {
-               wifi_manager_handle_s *local_handle = (wifi_manager_handle_s *)list->data;
-               switch (e) {
-               case WIFI_DEVICE_STATE_CB:
-                       if (local_handle->device_state_cb)
-                               ++count;
-                       break;
-               case WIFI_BG_SCAN_CB:
-                       if (local_handle->bg_scan_cb)
-                               ++count;
-                       break;
-               case WIFI_SCAN_CHANGED_CB:
-                       if (local_handle->scan_changed_cb)
-                               ++count;
-                       break;
-               case WIFI_SCAN_REQUEST_CB:
-                       if (local_handle->scan_request_cb)
-                               ++count;
-                       break;
-               case WIFI_SPECIFIC_SCAN_CB:
-                       if (local_handle->specific_scan_cb)
-                               ++count;
-                       break;
-               case WIFI_MANAGER_CONNECTION_STATE_CB:
-                       if (local_handle->connection_state_cb)
-                               ++count;
-                       break;
-               case WIFI_ACTIVATED_CB:
-                       if (local_handle->activated_cb)
-                               ++count;
-                       break;
-               case WIFI_DEACTIVATED_CB:
-                       if (local_handle->deactivated_cb)
-                               ++count;
-                       break;
-               case WIFI_CONNECTED_CB:
-                       if (local_handle->connected_cb)
-                               ++count;
-                       break;
-               case WIFI_DISCONNECTED_CB:
-                       if (local_handle->disconnected_cb)
-                               ++count;
-                       break;
-               case WIFI_MANAGER_RSSI_LEVEL_CHANGED_CB:
-                       if (local_handle->rssi_level_changed_cb)
-                               ++count;
-                       break;
-               case WIFI_MANAGER_TDLS_STATE_CHANGED_CB:
-                       if (local_handle->tdls_state_changed_cb)
-                               ++count;
-                       break;
-               case WIFI_MANAGER_TDLS_DISCOVERED_CB:
-                       if (local_handle->tdls_discovered_cb)
-                               ++count;
-                       break;
-               case WIFI_BSSID_SCAN_CB:
-                       if (local_handle->bssid_scan_cb)
-                               ++count;
-                       break;
-               case WIFI_IP_CONFLICT_CB:
-                       if (local_handle->ip_conflict_cb)
-                               ++count;
-                       break;
-               case WIFI_MULTI_SCAN_CB:
-                       if (local_handle->multi_scan_cb)
-                               ++count;
-                       break;
-               case WIFI_NETLINK_SCAN_CB:
-                       if (local_handle->netlink_scan_cb)
-                               ++count;
-                       break;
-               case WIFI_MANAGER_FORGET_AP_CB:
-                       if (local_handle->forget_ap_cb)
-                               ++count;
-                       break;
-               case WIFI_MANAGER_DPP_EVENT_CB:
-                       if (local_handle->dpp_event_cb)
-                               ++count;
-                       break;
-               default:
-                       break;
-               }
-       }
-
-       return count;
-}
-
 void config_free(gpointer data)
 {
        wifi_config_s *h = (wifi_config_s *)data;
@@ -1856,34 +1593,33 @@ static void __free_dpp(gpointer data)
        g_free(p_dpp);
 }
 
-bool _wifi_deinit(void)
+void _wifi_deinit(wifi_manager_h wifi)
 {
-       int rv = net_deregister_client_ext();
-       if (rv != NET_ERR_NONE && rv != NET_ERR_APP_NOT_REGISTERED)
-               return false;
+       wifi_manager_handle_s *wifi_handle = wifi;
 
-       __clear_profile_list(&profile_iterator);
-       __clear_profile_list(&specific_profile_iterator);
-       __clear_profile_list(&bss_profile_iterator);
+       net_deregister_client_ext(wifi_handle->network_info);
 
-       g_slist_free_full(ap_handle_list, g_free);
-       ap_handle_list = NULL;
+       __clear_profile_list(&(wifi_handle->ap_handle_list));
+       __clear_profile_list(&(wifi_handle->profile_iterator));
+       __clear_profile_list(&(wifi_handle->specific_profile_iterator));
+       __clear_profile_list(&(wifi_handle->bss_profile_iterator));
 
-       g_slist_free_full(config_handle_list, g_free);
-       config_handle_list = NULL;
-
-       __clear_config_list(&config_iterator);
+       __clear_config_list(&(wifi_handle->config_handle_list));
+       __clear_config_list(&(wifi_handle->config_iterator));
+}
 
+void _wifi_clear_profile_list(void)
+{
        g_slist_free_full(dpp_handle_list, __free_dpp);
        g_p_dpp_current = NULL;
-
-       return true;
 }
 
 //LCOV_EXCL_START
-void _wifi_set_cs_tid(int tid)
+void _wifi_set_cs_tid(wifi_manager_h wifi, int tid)
 {
-       net_set_cs_tid(tid);
+       wifi_manager_handle_s *wifi_handle = wifi;
+
+       net_set_cs_tid(wifi_handle->network_info, tid);
 }
 
 void _wifi_unset_cs_tid(int tid)
@@ -1896,32 +1632,81 @@ int _wifi_activate(wifi_manager_h wifi, wifi_manager_activated_cb callback,
                gboolean wifi_picker_test, void *user_data)
 {
        int rv = NET_ERR_NONE;
+       wifi_manager_handle_s *wifi_handle = wifi;
 
-       rv = net_wifi_power_on(wifi_picker_test);
+       rv = net_wifi_power_on(wifi_handle->network_info, wifi_picker_test);
        rv = __convert_to_ap_error_type(rv);
        if (rv == WIFI_MANAGER_ERROR_NONE)
-               __set_activated_cb(wifi, callback, user_data);
+               __set_activated_cb(wifi_handle, callback, user_data);
+
        return rv;
 }
 
 int _wifi_deactivate(wifi_manager_h wifi, wifi_manager_deactivated_cb callback, void *user_data)
 {
        int rv = NET_ERR_NONE;
+       wifi_manager_handle_s *wifi_handle = wifi;
 
-       rv = net_wifi_power_off();
+       rv = net_wifi_power_off(wifi_handle->network_info);
        rv = __convert_to_ap_error_type(rv);
        if (rv == WIFI_MANAGER_ERROR_NONE)
-               __set_deactivated_cb(wifi, callback, user_data);
+               __set_deactivated_cb(wifi_handle, callback, user_data);
 
        return rv;
 }
 
+int _wifi_get_mac_address(wifi_manager_h wifi, char **mac_address)
+{
+       FILE *fp = NULL;
+       char mac_path[WIFI_MAC_ADDR_PATH_LEN];
+       char buf[WIFI_MAC_ADDR_LEN + 1];
+       wifi_manager_handle_s *wifi_handle = wifi;
+
+       g_snprintf(mac_path, WIFI_MAC_ADDR_PATH_LEN, WIFI_MAC_ADDR_PATH, wifi_handle->interface_name);
+
+       if (access(mac_path, F_OK) == 0)
+               fp = fopen(mac_path, "r");
+
+       if (fp) {
+               if (fgets(buf, sizeof(buf), fp) == NULL) {
+                       WIFI_LOG(WIFI_ERROR, "Failed to get MAC info from %s", mac_path); //LCOV_EXCL_LINE
+                       fclose(fp); //LCOV_EXCL_LINE
+                       return WIFI_MANAGER_ERROR_OPERATION_FAILED; //LCOV_EXCL_LINE
+               }
+
+               WIFI_LOG(WIFI_INFO, "%s : %s", mac_path, buf);
+
+               *mac_address = g_strdup(buf);
+               fclose(fp);
+       } else {
+               *mac_address = vconf_get_str(VCONFKEY_WIFI_BSSID_ADDRESS);
+
+               if (*mac_address == NULL) {
+                       WIFI_LOG(WIFI_ERROR, "Failed to get vconf" //LCOV_EXCL_LINE
+                               " from %s", VCONFKEY_WIFI_BSSID_ADDRESS);
+                       __NETWORK_CAPI_FUNC_EXIT__; //LCOV_EXCL_LINE
+                       return WIFI_MANAGER_ERROR_OPERATION_FAILED; //LCOV_EXCL_LINE
+               }
+
+               if (strlen(*mac_address) == 0) {
+                       WIFI_LOG(WIFI_ERROR, "Mac address is invalid" //LCOV_EXCL_LINE
+                               " from %s", VCONFKEY_WIFI_BSSID_ADDRESS);
+                       g_free(*mac_address); //LCOV_EXCL_LINE
+                       *mac_address = NULL; //LCOV_EXCL_LINE
+                       __NETWORK_CAPI_FUNC_EXIT__; //LCOV_EXCL_LINE
+                       return WIFI_MANAGER_ERROR_OPERATION_FAILED; //LCOV_EXCL_LINE
+               }
+       }
+
+       return WIFI_MANAGER_ERROR_NONE;
+}
 
-int _wifi_ip_conflict_detect_enable_set(bool detect)
+int _wifi_ip_conflict_detect_enable_set(wifi_manager_h wifi, bool detect)
 {
        int rv = NET_ERR_NONE;
+       wifi_manager_handle_s *wifi_handle = wifi;
 
-       rv = net_set_ip_conflict_detect_mode(detect);
+       rv = net_set_ip_conflict_detect_mode(wifi_handle->network_info, detect);
        if (rv == NET_ERR_ACCESS_DENIED) {
                WIFI_LOG(WIFI_ERROR, "Access denied"); //LCOV_EXCL_LINE
                return WIFI_MANAGER_ERROR_PERMISSION_DENIED; //LCOV_EXCL_LINE
@@ -1934,37 +1719,70 @@ int _wifi_ip_conflict_detect_enable_set(bool detect)
        return WIFI_MANAGER_ERROR_OPERATION_FAILED; //LCOV_EXCL_LINE
 }
 
-bool _wifi_check_ap_validity(wifi_manager_ap_h ap_h)
+bool _wifi_check_ap_validity(net_profile_info_s *ap_info)
 {
-       GSList *list = NULL;
+       wifi_manager_handle_s *wifi_handle;
+       network_info_s *network_info;
 
-       if (ap_h == NULL)
+       if (ap_info == NULL)
                return false;
 
-       for (list = ap_handle_list; list; list = list->next)
-               if (ap_h == list->data) return true;
+       network_info = ap_info->network_info;
+       if (network_info == NULL)
+               return false;
 
-       for (list = profile_iterator; list; list = list->next)
-               if (ap_h == list->data) return true;
+       wifi_handle = network_info->wifi_handle;
+       if (wifi_handle == NULL)
+               return false;
 
-       for (list = specific_profile_iterator; list; list = list->next)
-               if (ap_h == list->data) return true;
+       if (_wifi_find_from_handle_list(wifi_handle) == false)
+               return false;
 
-       for (list = bss_profile_iterator; list; list = list->next)
-               if (ap_h == list->data) return true;
+       if (g_slist_find(wifi_handle->ap_handle_list, ap_info) != NULL)
+               return true;
+
+       if (g_slist_find(wifi_handle->profile_iterator, ap_info) != NULL)
+               return true;
+
+       if (g_slist_find(wifi_handle->specific_profile_iterator, ap_info) != NULL)
+               return true;
+
+       if (g_slist_find(wifi_handle->bss_profile_iterator, ap_info) != NULL)
+               return true;
 
        return false;
 }
 
-void _wifi_add_to_ap_list(wifi_manager_ap_h ap_h)
+void _wifi_add_to_ap_list(net_profile_info_s *ap_info)
 {
-       ap_handle_list = g_slist_append(ap_handle_list, ap_h);
+       network_info_s *network_info;
+       wifi_manager_handle_s *wifi_handle;
+
+       network_info = ap_info->network_info;
+       if (network_info == NULL)
+               return;
+
+       wifi_handle = network_info->wifi_handle;
+       if (wifi_handle) {
+               wifi_handle->ap_handle_list =
+                       g_slist_append(wifi_handle->ap_handle_list, ap_info);
+       }
 }
 
-void _wifi_remove_from_ap_list(wifi_manager_ap_h ap_h)
+void _wifi_remove_from_ap_list(net_profile_info_s *ap_info)
 {
-       ap_handle_list = g_slist_remove(ap_handle_list, ap_h);
-       g_free(ap_h);
+       network_info_s *network_info;
+       wifi_manager_handle_s *wifi_handle;
+
+       network_info = ap_info->network_info;
+       if (network_info == NULL)
+               return;
+
+       wifi_handle = network_info->wifi_handle;
+       if (wifi_handle) {
+               wifi_handle->ap_handle_list =
+                       g_slist_remove(wifi_handle->ap_handle_list, ap_info);
+       }
 }
 
 bool _wifi_check_profile_name_validity(const char *profile_name)
@@ -2007,12 +1825,13 @@ bool _wifi_check_essid_validity(const char *essid)
        return true;
 }
 
-int _wifi_get_wifi_device_state(wifi_manager_device_state_e *device_state)
+int _wifi_get_wifi_device_state(wifi_manager_h wifi, wifi_manager_device_state_e *device_state)
 {
        net_tech_info_s tech_info;
+       wifi_manager_handle_s *wifi_handle = wifi;
 
        int rv = NET_ERR_NONE;
-       rv = net_get_technology_properties(&tech_info);
+       rv = net_get_technology_properties(wifi_handle->network_info, &tech_info);
        if (rv == NET_ERR_ACCESS_DENIED) {
                WIFI_LOG(WIFI_ERROR, "Access denied"); //LCOV_EXCL_LINE
                return WIFI_MANAGER_ERROR_PERMISSION_DENIED; //LCOV_EXCL_LINE
@@ -2029,13 +1848,14 @@ int _wifi_get_wifi_device_state(wifi_manager_device_state_e *device_state)
        return WIFI_MANAGER_ERROR_NONE;
 }
 
-int _wifi_get_wifi_state(wifi_manager_connection_state_e *connection_state)
+int _wifi_get_wifi_state(wifi_manager_h wifi, wifi_manager_connection_state_e *connection_state)
 {
+       wifi_manager_handle_s *wifi_handle = wifi;
        wifi_tech_state_e tech_state = WIFI_TECH_UNKNOWN;
        wifi_service_state_e service_state = WIFI_SERVICE_STATE_UNKNOWN;
 
-       tech_state = wifi_state_get_technology_state();
-       service_state = _wifi_get_service_state();
+       tech_state = net_get_technology_state(wifi_handle->network_info);
+       service_state = _wifi_get_service_state(wifi_handle);
 
        /* LCOV_EXCL_START */
        if (tech_state == WIFI_TECH_UNKNOWN)
@@ -2068,36 +1888,20 @@ int _wifi_get_wifi_state(wifi_manager_connection_state_e *connection_state)
        return WIFI_MANAGER_ERROR_NONE;
 }
 
-int _wifi_get_intf_name(char** name)
+void _wifi_get_intf_name(wifi_manager_h wifi, char **name)
 {
-       int rv;
+       wifi_manager_handle_s *wifi_handle = wifi;
 
-       if ((int)g_slist_length(profile_iterator) == 0) {
-               rv = __update_profile_iterator();
-               if (rv == NET_ERR_ACCESS_DENIED) {
-                       WIFI_LOG(WIFI_ERROR, "Access denied"); //LCOV_EXCL_LINE
-                       return WIFI_MANAGER_ERROR_PERMISSION_DENIED; //LCOV_EXCL_LINE
-               }
-       }
-
-       if ((int)g_slist_length(profile_iterator) == 0) {
-               WIFI_LOG(WIFI_ERROR, "There is no AP"); //LCOV_EXCL_LINE
-               return WIFI_MANAGER_ERROR_OPERATION_FAILED; //LCOV_EXCL_LINE
-       }
-
-       net_profile_info_s *profile = (net_profile_info_s *)profile_iterator->data;
-       *name = strdup(profile->net_info.DevName);
-       if (*name == NULL)
-               return WIFI_MANAGER_ERROR_OUT_OF_MEMORY;
-
-       return WIFI_MANAGER_ERROR_NONE;
+       *name = g_strdup(wifi_handle->interface_name);
 }
 
-int _wifi_ip_conflict_detect_is_enabled(bool *state)
+int _wifi_ip_conflict_detect_is_enabled(wifi_manager_h wifi, bool *state)
 {
        int rv;
        gboolean is_enabled = FALSE;
-       rv = net_ip_conflict_detect_is_enabled(&is_enabled);
+       wifi_manager_handle_s *wifi_handle = wifi;
+
+       rv = net_ip_conflict_detect_is_enabled(wifi_handle->network_info, &is_enabled);
        if (rv == NET_ERR_ACCESS_DENIED) {
                WIFI_LOG(WIFI_ERROR, "Access denied"); //LCOV_EXCL_LINE
                return WIFI_MANAGER_ERROR_PERMISSION_DENIED; //LCOV_EXCL_LINE
@@ -2113,28 +1917,29 @@ int _wifi_scan_request(wifi_manager_h wifi,
                wifi_manager_scan_finished_cb callback, void *user_data)
 {
        int rv;
-       rv = net_scan_wifi();
+       wifi_manager_handle_s *wifi_handle = wifi;
 
+       rv = net_scan_wifi(wifi_handle->network_info);
        if (rv == NET_ERR_ACCESS_DENIED) {
                WIFI_LOG(WIFI_ERROR, "Access denied"); //LCOV_EXCL_LINE
                return WIFI_MANAGER_ERROR_PERMISSION_DENIED; //LCOV_EXCL_LINE
        } else if (rv == NET_ERR_INVALID_OPERATION) {
                return WIFI_MANAGER_ERROR_INVALID_OPERATION; //LCOV_EXCL_LINE
        } else if (rv == NET_ERR_NONE) {
-               __set_scan_cb(wifi, callback, user_data);
+               __set_scan_cb(wifi_handle, callback, user_data);
                return WIFI_MANAGER_ERROR_NONE;
        }
 
        return WIFI_MANAGER_ERROR_OPERATION_FAILED; //LCOV_EXCL_LINE
 }
 
-int _wifi_get_scan_state(wifi_manager_scan_state_e *scan_state)
+int _wifi_get_scan_state(wifi_manager_h wifi, wifi_manager_scan_state_e *scan_state)
 {
        int rv;
        int state = 0;
+       wifi_manager_handle_s *wifi_handle = wifi;
 
-       rv = net_wifi_get_scan_state(&state);
-
+       rv = net_wifi_get_scan_state(wifi_handle->network_info, &state);
        if (rv == NET_ERR_ACCESS_DENIED) {
                WIFI_LOG(WIFI_ERROR, "Access denied"); //LCOV_EXCL_LINE
                return WIFI_MANAGER_ERROR_PERMISSION_DENIED; //LCOV_EXCL_LINE
@@ -2152,16 +1957,17 @@ int _wifi_scan_specific_ap(wifi_manager_h wifi, const char *essid,
                                                        wifi_manager_scan_finished_cb callback, void *user_data)
 {
        int rv;
-       rv = net_specific_scan_wifi(essid);
+       wifi_manager_handle_s *wifi_handle = wifi;
 
+       rv = net_specific_scan_wifi(wifi_handle->network_info, essid);
        if (rv == NET_ERR_ACCESS_DENIED) {
                WIFI_LOG(WIFI_ERROR, "Access denied"); //LCOV_EXCL_LINE
                return WIFI_MANAGER_ERROR_PERMISSION_DENIED; //LCOV_EXCL_LINE
        } else if (rv == NET_ERR_INVALID_OPERATION) {
                return WIFI_MANAGER_ERROR_INVALID_OPERATION; //LCOV_EXCL_LINE
        } else if (rv == NET_ERR_NONE) {
-               g_strlcpy(specific_profile_essid, essid, NET_WLAN_ESSID_LEN+1);
-               __set_specific_scan_cb(wifi, callback, user_data);
+               g_strlcpy(wifi_handle->specific_scan_essid, essid, NET_WLAN_ESSID_LEN + 1);
+               __set_specific_scan_cb(wifi_handle, callback, user_data);
                return WIFI_MANAGER_ERROR_NONE;
        }
 
@@ -2176,20 +1982,21 @@ int _wifi_get_hidden_aps(wifi_manager_h wifi, const char *essid,
        bool is_available = false;
        wifi_manager_security_type_e type = 0;
        net_profile_info_s *profile_info = NULL;
+       wifi_manager_handle_s *wifi_handle = wifi;
        GSList *list;
 
-       rv = __update_profile_iterator();
+       rv = __update_profile_iterator(wifi_handle);
        if (rv == NET_ERR_ACCESS_DENIED) {
                WIFI_LOG(WIFI_ERROR, "Access denied"); //LCOV_EXCL_LINE
                return WIFI_MANAGER_ERROR_PERMISSION_DENIED; //LCOV_EXCL_LINE
        }
 
-       if ((int)g_slist_length(profile_iterator) == 0) {
+       if ((int)g_slist_length(wifi_handle->profile_iterator) == 0) {
                WIFI_LOG(WIFI_WARN, "There is no AP"); //LCOV_EXCL_LINE
                return WIFI_MANAGER_ERROR_NONE; //LCOV_EXCL_LINE
        }
 
-       for (list = profile_iterator; list; list = list->next) {
+       for (list = wifi_handle->profile_iterator; list; list = list->next) {
                net_profile_info_s *prof_info = (net_profile_info_s *)list->data;
                switch (prof_info->security_info.sec_mode) {
                case WLAN_SEC_MODE_NONE:
@@ -2223,8 +2030,7 @@ int _wifi_get_hidden_aps(wifi_manager_h wifi, const char *essid,
                                is_available = true;
                                profile_info = (wifi_manager_ap_h)prof_info;
                        }
-               } else if (!g_strcmp0(prof_info->essid,
-                                                         essid) && type == sec_type) {
+               } else if (!g_strcmp0(prof_info->essid, essid) && type == sec_type) {
                        WIFI_LOG(WIFI_INFO, "AP %s not hidden", essid);
                        rv = wifi_manager_ap_set_passphrase((wifi_manager_ap_h)prof_info,
                                                                   passphrase);
@@ -2273,6 +2079,7 @@ int _wifi_bssid_scan_request(wifi_manager_h wifi,
 {
        int rv;
        wifi_manager_device_state_e device_state;
+       wifi_manager_handle_s *wifi_handle = wifi;
        int activated = -1;
        int flight_mode = -1;
 
@@ -2281,7 +2088,7 @@ int _wifi_bssid_scan_request(wifi_manager_h wifi,
                return WIFI_MANAGER_ERROR_OPERATION_FAILED;
        }
 
-       rv = _wifi_get_wifi_device_state(&device_state);
+       rv = _wifi_get_wifi_device_state(wifi, &device_state);
        if (rv == WIFI_MANAGER_ERROR_NONE) {
                if (WIFI_MANAGER_DEVICE_STATE_DEACTIVATED == device_state)
                        activated = 0;
@@ -2296,7 +2103,7 @@ int _wifi_bssid_scan_request(wifi_manager_h wifi,
                return WIFI_MANAGER_ERROR_INVALID_OPERATION; //LCOV_EXCL_LINE
        }
 
-       rv = net_bssid_scan_wifi(activated);
+       rv = net_bssid_scan_wifi(wifi_handle->network_info, activated);
 
        if (rv == NET_ERR_ACCESS_DENIED) {
                WIFI_LOG(WIFI_ERROR, "Access denied"); //LCOV_EXCL_LINE
@@ -2304,7 +2111,7 @@ int _wifi_bssid_scan_request(wifi_manager_h wifi,
        } else if (rv == NET_ERR_INVALID_OPERATION) {
                return WIFI_MANAGER_ERROR_INVALID_OPERATION; //LCOV_EXCL_LINE
        } else if (rv == NET_ERR_NONE) {
-               __set_bssid_scan_cb(wifi, callback, user_data);
+               __set_bssid_scan_cb(wifi_handle, callback, user_data);
                return WIFI_MANAGER_ERROR_NONE;
        }
 
@@ -2380,6 +2187,7 @@ int _wifi_netlink_scan_request(wifi_manager_h wifi, wifi_manager_netlink_scan_h
        bool enable;
        int is_on = 0;
        int vconf_type = VCONFKEY_MOBILE_HOTSPOT_MODE_WIFI_AP;
+       wifi_manager_handle_s *wifi_handle = wifi;
        wifi_netlink_scan_s *nl_scan = (wifi_netlink_scan_s *)netlink_scan;
 
        /** When softap mode is enabled wifi device is in deactivated state,
@@ -2397,15 +2205,14 @@ int _wifi_netlink_scan_request(wifi_manager_h wifi, wifi_manager_netlink_scan_h
                return WIFI_MANAGER_ERROR_INVALID_OPERATION;
        }
 
-       rv = net_netlink_scan_wifi(nl_scan->ssids, nl_scan->vsie);
-
+       rv = net_netlink_scan_wifi(wifi_handle->network_info, nl_scan->ssids, nl_scan->vsie);
        if (rv == NET_ERR_ACCESS_DENIED) {
                WIFI_LOG(WIFI_ERROR, "Access denied");
                return WIFI_MANAGER_ERROR_PERMISSION_DENIED;
        } else if (rv == NET_ERR_INVALID_OPERATION) {
                return WIFI_MANAGER_ERROR_INVALID_OPERATION;
        } else if (rv == NET_ERR_NONE) {
-               __set_netlink_scan_cb(wifi, callback, user_data);
+               __set_netlink_scan_cb(wifi_handle, callback, user_data);
                return WIFI_MANAGER_ERROR_NONE;
        }
 
@@ -2413,11 +2220,11 @@ int _wifi_netlink_scan_request(wifi_manager_h wifi, wifi_manager_netlink_scan_h
        return WIFI_MANAGER_ERROR_OPERATION_FAILED;
 }
 
-int _wifi_add_vsie(wifi_manager_h wifi,
-               wifi_manager_vsie_frames_e frame_id, const char *vsie_str)
+int _wifi_add_vsie(wifi_manager_h wifi, wifi_manager_vsie_frames_e frame_id, const char *vsie_str)
 {
        int rv;
        net_vsie_frames_e f_id;
+       wifi_manager_handle_s *wifi_handle = wifi;
 
        switch (frame_id) {
        case WIFI_MANAGER_VSIE_FRAME_ASSOC_REQ:
@@ -2439,8 +2246,8 @@ int _wifi_add_vsie(wifi_manager_h wifi,
                WIFI_LOG(WIFI_ERROR, "Frame ID: [%d] not supported.", frame_id);
                return WIFI_MANAGER_ERROR_NOT_SUPPORTED;
        }
-       rv = net_wifi_add_vsie(f_id, vsie_str);
 
+       rv = net_wifi_add_vsie(wifi_handle->network_info, f_id, vsie_str);
        if (rv == NET_ERR_ACCESS_DENIED) {
                WIFI_LOG(WIFI_ERROR, "Access denied");
                return WIFI_MANAGER_ERROR_PERMISSION_DENIED;
@@ -2454,11 +2261,11 @@ int _wifi_add_vsie(wifi_manager_h wifi,
        return WIFI_MANAGER_ERROR_OPERATION_FAILED;
 }
 
-int _wifi_get_vsie(wifi_manager_h wifi,
-               wifi_manager_vsie_frames_e frame_id, char **vsie_str)
+int _wifi_get_vsie(wifi_manager_h wifi, wifi_manager_vsie_frames_e frame_id, char **vsie_str)
 {
        int rv;
        net_vsie_frames_e f_id;
+       wifi_manager_handle_s *wifi_handle = wifi;
 
        switch (frame_id) {
        case WIFI_MANAGER_VSIE_FRAME_ASSOC_REQ:
@@ -2480,8 +2287,8 @@ int _wifi_get_vsie(wifi_manager_h wifi,
                WIFI_LOG(WIFI_ERROR, "Frame ID: [%d] not supported.", frame_id);
                return WIFI_MANAGER_ERROR_NOT_SUPPORTED;
        }
-       rv = net_wifi_get_vsie(f_id, vsie_str);
 
+       rv = net_wifi_get_vsie(wifi_handle->network_info, f_id, vsie_str);
        if (rv == NET_ERR_ACCESS_DENIED) {
                WIFI_LOG(WIFI_ERROR, "Access denied");
                return WIFI_MANAGER_ERROR_PERMISSION_DENIED;
@@ -2495,11 +2302,11 @@ int _wifi_get_vsie(wifi_manager_h wifi,
        return WIFI_MANAGER_ERROR_OPERATION_FAILED;
 }
 
-int _wifi_remove_vsie(wifi_manager_h wifi,
-               wifi_manager_vsie_frames_e frame_id, const char *vsie_str)
+int _wifi_remove_vsie(wifi_manager_h wifi, wifi_manager_vsie_frames_e frame_id, const char *vsie_str)
 {
        int rv;
        net_vsie_frames_e f_id;
+       wifi_manager_handle_s *wifi_handle = wifi;
 
        switch (frame_id) {
        case WIFI_MANAGER_VSIE_FRAME_ASSOC_REQ:
@@ -2521,8 +2328,8 @@ int _wifi_remove_vsie(wifi_manager_h wifi,
                WIFI_LOG(WIFI_ERROR, "Frame ID: [%d] not supported.", frame_id);
                return WIFI_MANAGER_ERROR_NOT_SUPPORTED;
        }
-       rv = net_wifi_remove_vsie(f_id, vsie_str);
 
+       rv = net_wifi_remove_vsie(wifi_handle->network_info, f_id, vsie_str);
        if (rv == NET_ERR_ACCESS_DENIED) {
                WIFI_LOG(WIFI_ERROR, "Access denied");
                return WIFI_MANAGER_ERROR_PERMISSION_DENIED;
@@ -2536,12 +2343,12 @@ int _wifi_remove_vsie(wifi_manager_h wifi,
        return WIFI_MANAGER_ERROR_OPERATION_FAILED;
 }
 
-int _wifi_flush_bss(void)
+int _wifi_flush_bss(wifi_manager_h wifi)
 {
        int rv;
+       wifi_manager_handle_s *wifi_handle = wifi;
 
-       rv = net_wifi_flush_bss();
-
+       rv = net_wifi_flush_bss(wifi_handle->network_info);
        if (rv != NET_ERR_NONE) {
                WIFI_LOG(WIFI_ERROR, "Failed to flush bss");
                return WIFI_MANAGER_ERROR_OPERATION_FAILED;
@@ -2550,12 +2357,12 @@ int _wifi_flush_bss(void)
        return WIFI_MANAGER_ERROR_NONE;
 }
 
-int _wifi_set_bssid(char *bssid)
+int _wifi_set_bssid(wifi_manager_h wifi, char *bssid)
 {
        int rv;
+       wifi_manager_handle_s *wifi_handle = wifi;
 
-       rv = net_wifi_set_bssid(bssid);
-
+       rv = net_wifi_set_bssid(wifi_handle->network_info, bssid);
        if (rv != NET_ERR_NONE) {
                WIFI_LOG(WIFI_ERROR, "Failed to set bssid");
                return WIFI_MANAGER_ERROR_OPERATION_FAILED;
@@ -2564,11 +2371,12 @@ int _wifi_set_bssid(char *bssid)
        return WIFI_MANAGER_ERROR_NONE;
 }
 
-int _wifi_set_auto_connect(int connect_mode)
+int _wifi_set_auto_connect(wifi_manager_h wifi, int connect_mode)
 {
        int rv;
+       wifi_manager_handle_s *wifi_handle = wifi;
 
-       rv = net_wifi_set_auto_connect_mode(connect_mode);
+       rv = net_wifi_set_auto_connect_mode(wifi_handle->network_info, connect_mode);
 
        if (rv != NET_ERR_NONE)
                WIFI_LOG(WIFI_ERROR, "Failed to set auto connection mode");
@@ -2576,11 +2384,12 @@ int _wifi_set_auto_connect(int connect_mode)
        return rv;
 }
 
-int _wifi_get_auto_connect(int *connect_mode)
+int _wifi_get_auto_connect(wifi_manager_h wifi, int *connect_mode)
 {
        int rv;
+       wifi_manager_handle_s *wifi_handle = wifi;
 
-       rv = net_wifi_get_auto_connect_mode(connect_mode);
+       rv = net_wifi_get_auto_connect_mode(wifi_handle->network_info, connect_mode);
 
        if (rv != NET_ERR_NONE)
                WIFI_LOG(WIFI_ERROR, "Failed to get auto connection mode");
@@ -2588,12 +2397,13 @@ int _wifi_get_auto_connect(int *connect_mode)
        return rv;
 }
 
-int _wifi_get_5ghz_support(bool *supported)
+int _wifi_get_5ghz_support(wifi_manager_h wifi, bool *supported)
 {
        int rv;
+       wifi_manager_handle_s *wifi_handle = wifi;
        gboolean is_supported = FALSE;
 
-       rv = net_wifi_get_5ghz_support(&is_supported);
+       rv = net_wifi_get_5ghz_support(wifi_handle->network_info, &is_supported);
 
        if (rv != NET_ERR_NONE)
                WIFI_LOG(WIFI_ERROR, "Failed to get 5 Ghz supported");
@@ -2608,7 +2418,8 @@ int _wifi_set_ap_auto_connect(wifi_manager_ap_h ap, bool autoconnect)
        int rv = 0;
        net_profile_info_s *ap_info = ap;
 
-       rv = net_wifi_set_ap_auto_connect(ap_info->ProfileName, autoconnect);
+       rv = net_wifi_set_ap_auto_connect(ap_info->network_info,
+                       ap_info->ProfileName, autoconnect);
        if (rv == NET_ERR_ACCESS_DENIED) {
                WIFI_LOG(WIFI_ERROR, "Access denied");
                return WIFI_MANAGER_ERROR_PERMISSION_DENIED;
@@ -2626,7 +2437,8 @@ int _wifi_get_ap_auto_connect(wifi_manager_ap_h ap, bool *autoconnect)
        gboolean auto_connect = FALSE;
        net_profile_info_s *ap_info = ap;
 
-       rv = net_wifi_get_ap_auto_connect(ap_info->ProfileName, &auto_connect);
+       rv = net_wifi_get_ap_auto_connect(ap_info->network_info,
+                       ap_info->ProfileName, &auto_connect);
        if (rv == NET_ERR_ACCESS_DENIED) {
                WIFI_LOG(WIFI_ERROR, "Access denied");
                return WIFI_MANAGER_ERROR_PERMISSION_DENIED;
@@ -2640,60 +2452,130 @@ int _wifi_get_ap_auto_connect(wifi_manager_ap_h ap, bool *autoconnect)
 }
 //LCOV_EXCL_STOP
 
-int _wifi_get_connected_profile(wifi_manager_ap_h *ap)
+int _wifi_get_connected_profile(wifi_manager_h wifi, wifi_manager_ap_h *ap)
 {
        int rv;
-       wifi_manager_ap_h ap_h = NULL;
+       wifi_manager_handle_s *wifi_handle = wifi;
+       net_profile_info_s *ap_info = NULL;
+       net_profile_info_s *connected_ap = NULL;
        GSList *list;
 
-       rv = __update_profile_iterator();
+       rv = __update_profile_iterator(wifi_handle);
        if (rv == NET_ERR_ACCESS_DENIED) {
                WIFI_LOG(WIFI_ERROR, "Access denied"); //LCOV_EXCL_LINE
                return WIFI_MANAGER_ERROR_PERMISSION_DENIED; //LCOV_EXCL_LINE
        }
 
-       for (list = profile_iterator; list; list = list->next) {
+       for (list = wifi_handle->profile_iterator; list; list = list->next) {
                net_profile_info_s *prof_info = (net_profile_info_s *)list->data;
-               if (prof_info->ProfileState == NET_STATE_TYPE_ONLINE ||
-                   prof_info->ProfileState == NET_STATE_TYPE_READY) {
-                       ap_h = (wifi_manager_ap_h)prof_info;
-                       break;
+               if (!g_strcmp0(prof_info->net_info.DevName, wifi_handle->interface_name)) {
+                       if (prof_info->ProfileState == NET_STATE_TYPE_ONLINE ||
+                           prof_info->ProfileState == NET_STATE_TYPE_READY) {
+                               connected_ap = prof_info;
+                               break;
+                       }
                }
        }
 
-       if (ap_h == NULL) {
+       if (connected_ap == NULL) {
                WIFI_LOG(WIFI_ERROR, "There is no connected AP"); //LCOV_EXCL_LINE
                return WIFI_MANAGER_ERROR_NO_CONNECTION; //LCOV_EXCL_LINE
        }
 
-       *ap = g_try_malloc0(sizeof(net_profile_info_s));
-       if (*ap == NULL)
+       ap_info = g_try_malloc0(sizeof(net_profile_info_s));
+       if (ap_info == NULL)
                return WIFI_MANAGER_ERROR_OUT_OF_MEMORY;
 
-       memcpy(*ap, ap_h, sizeof(net_profile_info_s));
+       memcpy(ap_info, connected_ap, sizeof(net_profile_info_s));
+       ap_info->vsie_list = g_slist_copy_deep(connected_ap->vsie_list,
+                                                       _wifi_copy_vsie_list, NULL);
+       ap_info->bssid_list = g_slist_copy_deep(connected_ap->bssid_list,
+                                                       _wifi_copy_bssid_list, NULL);
+
+       _wifi_add_to_ap_list(ap_info);
+       *ap = (wifi_manager_ap_h)ap_info;
+
+       return WIFI_MANAGER_ERROR_NONE;
+}
+
+int _wifi_foreach_available_interface(wifi_manager_h wifi,
+               wifi_manager_interface_cb callback, void *user_data)
+{
+       int rv;
+       GSList *list;
+       wifi_manager_handle_s *wifi_handle = wifi;
+
+       rv = __update_interface_iterator(wifi_handle);
+       if (rv == NET_ERR_ACCESS_DENIED) {
+               WIFI_LOG(WIFI_ERROR, "Access denied"); //LCOV_EXCL_LINE
+               return WIFI_MANAGER_ERROR_PERMISSION_DENIED; //LCOV_EXCL_LINE
+       }
 
-       _wifi_add_to_ap_list(*ap);
+       if ((int)g_slist_length(wifi_handle->interface_iterator) == 0) {
+               WIFI_LOG(WIFI_WARN, "There is no interface"); //LCOV_EXCL_LINE
+               return WIFI_MANAGER_ERROR_NONE; //LCOV_EXCL_LINE
+       }
+
+       for (list = wifi_handle->interface_iterator; list; list = list->next) {
+               char *interface_name = (char *)list->data;
+               rv = callback(interface_name, user_data);
+               if (rv == false) break;
+       }
 
        return WIFI_MANAGER_ERROR_NONE;
 }
 
-int _wifi_foreach_found_ap(wifi_manager_found_ap_cb callback, void *user_data)
+int _wifi_foreach_found_ap(wifi_manager_h wifi,
+               wifi_manager_found_ap_cb callback, void *user_data)
 {
        int rv;
        GSList *list;
+       wifi_manager_handle_s *wifi_handle = wifi;
 
-       rv = __update_profile_iterator();
+       rv = __update_profile_iterator(wifi_handle);
        if (rv == NET_ERR_ACCESS_DENIED) {
                WIFI_LOG(WIFI_ERROR, "Access denied"); //LCOV_EXCL_LINE
                return WIFI_MANAGER_ERROR_PERMISSION_DENIED; //LCOV_EXCL_LINE
        }
 
-       if ((int)g_slist_length(profile_iterator) == 0) {
+       if ((int)g_slist_length(wifi_handle->profile_iterator) == 0) {
                WIFI_LOG(WIFI_WARN, "There is no AP"); //LCOV_EXCL_LINE
                return WIFI_MANAGER_ERROR_NONE; //LCOV_EXCL_LINE
        }
 
-       for (list = profile_iterator; list; list = list->next) {
+       for (list = wifi_handle->profile_iterator; list; list = list->next) {
+               net_profile_info_s *prof_info = (net_profile_info_s *)list->data;
+               if (!g_strcmp0(prof_info->net_info.DevName, wifi_handle->interface_name)) {
+                       if (prof_info->is_hidden == TRUE)
+                               continue;
+
+                       rv = callback((wifi_manager_ap_h)prof_info, user_data);
+                       if (rv == false) break;
+               }
+       }
+
+       return WIFI_MANAGER_ERROR_NONE;
+}
+
+int _wifi_foreach_found_ap_in_all_interfaces(wifi_manager_h wifi,
+               wifi_manager_found_ap_cb callback, void *user_data)
+{
+       int rv;
+       GSList *list;
+       wifi_manager_handle_s *wifi_handle = wifi;
+
+       rv = __update_profile_iterator(wifi_handle);
+       if (rv == NET_ERR_ACCESS_DENIED) {
+               WIFI_LOG(WIFI_ERROR, "Access denied"); //LCOV_EXCL_LINE
+               return WIFI_MANAGER_ERROR_PERMISSION_DENIED; //LCOV_EXCL_LINE
+       }
+
+       if ((int)g_slist_length(wifi_handle->profile_iterator) == 0) {
+               WIFI_LOG(WIFI_WARN, "There is no AP"); //LCOV_EXCL_LINE
+               return WIFI_MANAGER_ERROR_NONE; //LCOV_EXCL_LINE
+       }
+
+       for (list = wifi_handle->profile_iterator; list; list = list->next) {
                net_profile_info_s *prof_info = (net_profile_info_s *)list->data;
                if (prof_info->is_hidden == TRUE)
                        continue;
@@ -2705,28 +2587,30 @@ int _wifi_foreach_found_ap(wifi_manager_found_ap_cb callback, void *user_data)
        return WIFI_MANAGER_ERROR_NONE;
 }
 
-int _wifi_foreach_found_specific_ap(wifi_manager_found_ap_cb callback, void *user_data)
+int _wifi_foreach_found_specific_ap(wifi_manager_h wifi,
+               wifi_manager_found_ap_cb callback, void *user_data)
 {
        int rv;
        GSList *list;
+       wifi_manager_handle_s *wifi_handle = wifi;
 
-       if ((int)g_slist_length(specific_profile_iterator) == 0) {
+       if ((int)g_slist_length(wifi_handle->specific_profile_iterator) == 0) {
                WIFI_LOG(WIFI_WARN, "There is no specific APs");
 
-               rv = __update_profile_iterator();
+               rv = __update_profile_iterator(wifi_handle);
                if (rv == NET_ERR_ACCESS_DENIED) {
                        WIFI_LOG(WIFI_ERROR, "Access denied"); //LCOV_EXCL_LINE
                        return WIFI_MANAGER_ERROR_PERMISSION_DENIED; //LCOV_EXCL_LINE
                }
 
-               if ((int)g_slist_length(profile_iterator) == 0) {
+               if ((int)g_slist_length(wifi_handle->profile_iterator) == 0) {
                        WIFI_LOG(WIFI_WARN, "There is no APs"); //LCOV_EXCL_LINE
                        return WIFI_MANAGER_ERROR_NONE; //LCOV_EXCL_LINE
                }
 
-               for (list = profile_iterator; list; list = list->next) {
+               for (list = wifi_handle->profile_iterator; list; list = list->next) {
                        net_profile_info_s *prof_info = (net_profile_info_s *)list->data;
-                       if (!g_strcmp0(specific_profile_essid, prof_info->essid)) {
+                       if (!g_strcmp0(wifi_handle->specific_scan_essid, prof_info->essid)) {
                                rv = callback((wifi_manager_ap_h)prof_info, user_data);
                                if (rv == false) break;
                        }
@@ -2735,7 +2619,7 @@ int _wifi_foreach_found_specific_ap(wifi_manager_found_ap_cb callback, void *use
                return WIFI_MANAGER_ERROR_NONE;
        }
 
-       for (list = specific_profile_iterator; list; list = list->next) {
+       for (list = wifi_handle->specific_profile_iterator; list; list = list->next) {
                net_profile_info_s *prof_info = (net_profile_info_s *)list->data;
                rv = callback((wifi_manager_ap_h)prof_info, user_data);
                if (rv == false) break;
@@ -2744,12 +2628,14 @@ int _wifi_foreach_found_specific_ap(wifi_manager_found_ap_cb callback, void *use
        return WIFI_MANAGER_ERROR_NONE;
 }
 
-int _wifi_foreach_found_bssid_ap(wifi_manager_found_ap_cb callback, void *user_data)
+int _wifi_foreach_found_bssid_ap(wifi_manager_h wifi,
+               wifi_manager_found_ap_cb callback, void *user_data)
 {
        int rv;
        GSList *list;
+       wifi_manager_handle_s *wifi_handle = wifi;
 
-       for (list = bss_profile_iterator; list; list = list->next) {
+       for (list = wifi_handle->bss_profile_iterator; list; list = list->next) {
                net_profile_info_s *prof_info = (net_profile_info_s *)list->data;
                rv = callback((wifi_manager_ap_h)prof_info, user_data);
                if (rv == false) break;
@@ -2759,23 +2645,26 @@ int _wifi_foreach_found_bssid_ap(wifi_manager_found_ap_cb callback, void *user_d
 }
 
 //LCOV_EXCL_START
-int _wifi_foreach_found_netlink_scan_ap(wifi_manager_found_ap_cb callback, void *user_data)
+int _wifi_foreach_found_netlink_scan_ap(wifi_manager_h wifi,
+               wifi_manager_found_ap_cb callback, void *user_data)
 {
        int rv;
        GSList *list;
+       wifi_manager_handle_s *wifi_handle = wifi;
 
-       if (bss_profile_iterator == NULL) {
+       if (wifi_handle->bss_profile_iterator == NULL) {
                WIFI_LOG(WIFI_ERROR, "Failed to search APs");
                return WIFI_MANAGER_ERROR_OPERATION_FAILED;
        }
 
-       for (list = bss_profile_iterator; list; list = list->next) {
+       for (list = wifi_handle->bss_profile_iterator; list; list = list->next) {
                net_profile_info_s *prof_info = (net_profile_info_s *)list->data;
                rv = callback((wifi_manager_ap_h)prof_info, user_data);
                if (rv == false) break;
        }
 
-       __clear_profile_list(&bss_profile_iterator);
+       __clear_profile_list(&(wifi_handle->bss_profile_iterator));
+
        return WIFI_MANAGER_ERROR_NONE;
 }
 //LCOV_EXCL_STOP
@@ -2786,22 +2675,21 @@ int _wifi_open_profile(wifi_manager_h wifi, wifi_manager_ap_h ap_h,
        int rv;
        bool valid_profile;
        net_profile_info_s *ap_info = ap_h;
+       wifi_manager_handle_s *wifi_handle = wifi;
 
-       valid_profile =
-                       _wifi_check_profile_name_validity(ap_info->ProfileName);
-
+       valid_profile = _wifi_check_profile_name_validity(ap_info->ProfileName);
        if (valid_profile == true && ap_info->Favourite)
-               rv = net_open_connection(ap_info->ProfileName);
+               rv = net_open_connection(wifi_handle->network_info, ap_info->ProfileName);
        else if (valid_profile == true &&
                        ap_info->is_hidden != TRUE &&
                        ap_info->security_info.sec_mode == WLAN_SEC_MODE_NONE)
-               rv = net_open_connection(ap_info->ProfileName);
+               rv = net_open_connection(wifi_handle->network_info, ap_info->ProfileName);
        else
-               rv = __connect_with_wifi_info(ap_info);
+               rv = __connect_with_wifi_info(wifi_handle, ap_info);
 
        rv = __convert_to_ap_error_type(rv);
        if (rv == WIFI_MANAGER_ERROR_NONE)
-               __set_connected_cb(wifi, callback, user_data);
+               __set_connected_cb(wifi_handle, callback, user_data);
 
        return rv;
 }
@@ -2811,8 +2699,9 @@ int _wifi_close_profile(wifi_manager_h wifi, wifi_manager_ap_h ap_h,
 {
        int rv;
        net_profile_info_s *ap_info = ap_h;
+       wifi_manager_handle_s *wifi_handle = wifi;
 
-       rv = net_close_connection(ap_info->ProfileName);
+       rv = net_close_connection(wifi_handle->network_info, ap_info->ProfileName);
        if (rv == NET_ERR_ACCESS_DENIED) {
                WIFI_LOG(WIFI_ERROR, "Access denied"); //LCOV_EXCL_LINE
                return WIFI_MANAGER_ERROR_PERMISSION_DENIED; //LCOV_EXCL_LINE
@@ -2820,7 +2709,7 @@ int _wifi_close_profile(wifi_manager_h wifi, wifi_manager_ap_h ap_h,
                return WIFI_MANAGER_ERROR_OPERATION_FAILED; //LCOV_EXCL_LINE
        }
 
-       __set_disconnected_cb(wifi, callback, user_data);
+       __set_disconnected_cb(wifi_handle, callback, user_data);
 
        return WIFI_MANAGER_ERROR_NONE;
 }
@@ -2830,17 +2719,18 @@ int _wifi_connect_with_wps_pbc(wifi_manager_h wifi, wifi_manager_ap_h ap_h,
                wifi_manager_connected_cb callback, void *user_data)
 {
        int rv;
+       wifi_manager_handle_s *wifi_handle = wifi;
        net_profile_info_s *ap_info = ap_h;
        net_wifi_wps_info_s wps_info;
        memset(&wps_info, 0, sizeof(net_wifi_wps_info_s));
 
        wps_info.type = WIFI_WPS_PBC;
 
-       rv = net_wifi_enroll_wps(ap_info->ProfileName, &wps_info);
+       rv = net_wifi_enroll_wps(wifi_handle->network_info, ap_info->ProfileName, &wps_info);
        if (rv != NET_ERR_NONE)
                return __convert_to_ap_error_type(rv);
 
-       __set_connected_cb(wifi, callback, user_data);
+       __set_connected_cb(wifi_handle, callback, user_data);
 
        return WIFI_MANAGER_ERROR_NONE;
 }
@@ -2849,6 +2739,7 @@ int _wifi_connect_with_wps_pin(wifi_manager_h wifi, wifi_manager_ap_h ap_h,
                const char *pin, wifi_manager_connected_cb callback, void *user_data)
 {
        int rv;
+       wifi_manager_handle_s *wifi_handle = wifi;
        net_profile_info_s *ap_info = ap_h;
        net_wifi_wps_info_s wps_info;
 
@@ -2860,19 +2751,20 @@ int _wifi_connect_with_wps_pin(wifi_manager_h wifi, wifi_manager_ap_h ap_h,
        wps_info.type = WIFI_WPS_PIN;
        g_strlcpy(wps_info.pin, pin, NET_WLAN_MAX_WPSPIN_LEN + 1);
 
-       rv = net_wifi_enroll_wps(ap_info->ProfileName, &wps_info);
+       rv = net_wifi_enroll_wps(wifi_handle->network_info, ap_info->ProfileName, &wps_info);
        if (rv != NET_ERR_NONE)
                return __convert_to_ap_error_type(rv);
 
-       __set_connected_cb(wifi, callback, user_data);
+       __set_connected_cb(wifi_handle, callback, user_data);
 
        return WIFI_MANAGER_ERROR_NONE;
 }
 //LCOV_EXCL_STOP
 
-int _wifi_forget_ap(wifi_manager_ap_h ap)
+int _wifi_forget_ap(wifi_manager_h wifi, wifi_manager_ap_h ap)
 {
        int rv = 0;
+       wifi_manager_handle_s *wifi_handle = wifi;
        net_profile_info_s *ap_info = ap;
 
        if (ap_info == NULL) {
@@ -2880,7 +2772,7 @@ int _wifi_forget_ap(wifi_manager_ap_h ap)
                return WIFI_MANAGER_ERROR_INVALID_PARAMETER; //LCOV_EXCL_LINE
        }
 
-       rv = net_delete_profile(ap_info->ProfileName);
+       rv = net_delete_profile(wifi_handle->network_info, ap_info->ProfileName);
        if (rv == NET_ERR_ACCESS_DENIED) {
                WIFI_LOG(WIFI_ERROR, "Access denied"); //LCOV_EXCL_LINE
                return WIFI_MANAGER_ERROR_PERMISSION_DENIED; //LCOV_EXCL_LINE
@@ -2894,11 +2786,10 @@ int _wifi_forget_ap(wifi_manager_ap_h ap)
 }
 
 int _wifi_forget_ap_async(wifi_manager_h wifi, wifi_manager_ap_h ap,
-                         wifi_manager_forget_ap_finished_cb callback,
-                         void* user_data)
+               wifi_manager_forget_ap_finished_cb callback, void* user_data)
 {
        int rv = 0;
-       GSList *list;
+       wifi_manager_handle_s *wifi_handle = wifi;
        net_profile_info_s *ap_info = ap;
 
        if (ap_info == NULL) {
@@ -2906,17 +2797,7 @@ int _wifi_forget_ap_async(wifi_manager_h wifi, wifi_manager_ap_h ap,
                return WIFI_MANAGER_ERROR_INVALID_PARAMETER; //LCOV_EXCL_LINE
        }
 
-       if (_wifi_get_callback_count_from_handle_list(WIFI_MANAGER_FORGET_AP_CB)) {
-               for (list = wifi_manager_handle_list; list; list = list->next) {
-                       wifi_manager_handle_s *local_handle = (wifi_manager_handle_s *)list->data;
-                       if (local_handle->forget_ap_cb != NULL) {
-                               WIFI_LOG(WIFI_ERROR, "Already in progress"); //LCOV_EXCL_LINE
-                               return WIFI_MANAGER_ERROR_INVALID_OPERATION; //LCOV_EXCL_LINE
-                       }
-               }
-       }
-
-       rv = net_delete_profile_async(ap_info->ProfileName);
+       rv = net_delete_profile_async(wifi_handle->network_info, ap_info->ProfileName);
        if (rv == NET_ERR_ACCESS_DENIED) {
                WIFI_LOG(WIFI_ERROR, "Access denied"); //LCOV_EXCL_LINE
                return WIFI_MANAGER_ERROR_PERMISSION_DENIED; //LCOV_EXCL_LINE
@@ -2925,44 +2806,18 @@ int _wifi_forget_ap_async(wifi_manager_h wifi, wifi_manager_ap_h ap,
        }
 
        ap_info->Favourite = (char)FALSE;
-       __set_forget_ap_cb(wifi, callback, user_data);
+       __set_forget_ap_cb(wifi_handle, callback, user_data);
 
        return WIFI_MANAGER_ERROR_NONE;
 }
 
 //LCOV_EXCL_START
-void _wifi_rssi_level_changed_cb(keynode_t *node, void *user_data)
-{
-       GSList *list;
-       wifi_manager_handle_s *handle;
-       int rssi_level = 0;
-
-       if (net_check_ref_count() != true) {
-               WIFI_LOG(WIFI_ERROR, "Application is not registered"
-                               "If multi-threaded, thread integrity be broken.");
-               return;
-       }
-
-       for (list = wifi_manager_handle_list; list; list = list->next) {
-               handle = (wifi_manager_handle_s *)list->data;
-
-               if (__wifi_check_handle_validity((wifi_manager_h)handle) != true)
-                       return;
-
-               if (vconf_get_int(VCONFKEY_WIFI_STRENGTH, &rssi_level) != 0)
-                       return;
-
-               if (handle->rssi_level_changed_cb)
-                       handle->rssi_level_changed_cb(rssi_level,
-                                       handle->rssi_level_changed_user_data);
-       }
-}
-
-int _wifi_update_ap_info(net_profile_info_s *ap_info)
+int _wifi_update_ap_info(wifi_manager_h wifi, net_profile_info_s *ap_info)
 {
        int rv = NET_ERR_NONE;
-       rv = net_modify_profile(ap_info->ProfileName, ap_info);
+       wifi_manager_handle_s *wifi_handle = wifi;
 
+       rv = net_modify_profile(wifi_handle->network_info, ap_info->ProfileName, ap_info);
        if (rv == NET_ERR_ACCESS_DENIED) {
                WIFI_LOG(WIFI_ERROR, "Access denied"); //LCOV_EXCL_LINE
                return WIFI_MANAGER_ERROR_PERMISSION_DENIED; //LCOV_EXCL_LINE
@@ -2980,6 +2835,7 @@ int _wifi_connect_with_wps_pbc_without_ssid(wifi_manager_h wifi,
                wifi_manager_connected_cb callback, void *user_data)
 {
        int rv;
+       wifi_manager_handle_s *wifi_handle = wifi;
        net_wifi_wps_info_s wps_info;
        net_profile_info_s *profile = NULL;
        GSList *list;
@@ -2988,31 +2844,32 @@ int _wifi_connect_with_wps_pbc_without_ssid(wifi_manager_h wifi,
 
        wps_info.type = WIFI_WPS_PBC;
 
-       WIFI_LOG(WIFI_INFO, "start\n");
+       WIFI_LOG(WIFI_INFO, "start");
 
        /* Disconnect if already connected to an AP */
-       __update_profile_iterator();
+       __update_profile_iterator(wifi_handle);
 
-       for (list = profile_iterator; list; list = list->next) {
+       for (list = wifi_handle->profile_iterator; list; list = list->next) {
                profile = (net_profile_info_s *)list->data;
                if (profile->ProfileState == NET_STATE_TYPE_ASSOCIATION ||
                                profile->ProfileState == NET_STATE_TYPE_CONFIGURATION ||
                                profile->ProfileState == NET_STATE_TYPE_READY ||
                                profile->ProfileState == NET_STATE_TYPE_ONLINE) {
-                       rv = net_close_connection(profile->ProfileName);
+                       rv = net_close_connection(wifi_handle->network_info, profile->ProfileName);
                        if (rv != NET_ERR_NONE)
                                return __convert_to_ap_error_type(rv);
-                       is_disconnect_wps_pbc = true;
+
+                       wifi_handle->is_disconnect_wps_pbc = true;
                }
        }
 
-       if (!is_disconnect_wps_pbc) {
-               rv = net_wifi_enroll_wps_without_ssid(&wps_info);
+       if (!wifi_handle->is_disconnect_wps_pbc) {
+               rv = net_wifi_enroll_wps_without_ssid(wifi_handle->network_info, &wps_info);
                if (rv != NET_ERR_NONE)
                        return __convert_to_ap_error_type(rv);
        }
 
-       __set_connected_cb(wifi, callback, user_data);
+       __set_connected_cb(wifi_handle, callback, user_data);
 
        return WIFI_MANAGER_ERROR_NONE;
 }
@@ -3021,6 +2878,7 @@ int _wifi_connect_with_wps_pin_without_ssid(wifi_manager_h wifi, const char *pin
                wifi_manager_connected_cb callback, void* user_data)
 {
        int rv;
+       wifi_manager_handle_s *wifi_handle = wifi;
        net_wifi_wps_info_s wps_info;
        net_profile_info_s *profile = NULL;
        GSList *list;
@@ -3030,75 +2888,91 @@ int _wifi_connect_with_wps_pin_without_ssid(wifi_manager_h wifi, const char *pin
        wps_info.type = WIFI_WPS_PIN;
        g_strlcpy(wps_info.pin, pin, NET_WLAN_MAX_WPSPIN_LEN + 1);
 
-       WIFI_LOG(WIFI_INFO, "pin: %s\n", pin);
+       WIFI_LOG(WIFI_INFO, "pin: %s", pin);
 
        /* Disconnect if already connected to an AP */
-       __update_profile_iterator();
-
+       __update_profile_iterator(wifi_handle);
 
-       for (list = profile_iterator; list; list = list->next) {
+       for (list = wifi_handle->profile_iterator; list; list = list->next) {
                profile = (net_profile_info_s *)list->data;
                if (profile->ProfileState == NET_STATE_TYPE_ASSOCIATION ||
                                profile->ProfileState == NET_STATE_TYPE_CONFIGURATION ||
                                profile->ProfileState == NET_STATE_TYPE_READY ||
                                profile->ProfileState == NET_STATE_TYPE_ONLINE) {
-                       rv = net_close_connection(profile->ProfileName);
+                       rv = net_close_connection(wifi_handle->network_info, profile->ProfileName);
                        if (rv != NET_ERR_NONE)
                                return __convert_to_ap_error_type(rv);
-                       is_disconnect_wps_pin = true;
+                       wifi_handle->is_disconnect_wps_pin = true;
                }
        }
 
-       if (!is_disconnect_wps_pin) {
-               rv = net_wifi_enroll_wps_without_ssid(&wps_info);
+       if (!wifi_handle->is_disconnect_wps_pin) {
+               rv = net_wifi_enroll_wps_without_ssid(wifi_handle->network_info, &wps_info);
                if (rv != NET_ERR_NONE)
                        return __convert_to_ap_error_type(rv);
        }
 
-       __set_connected_cb(wifi, callback, user_data);
+       __set_connected_cb(wifi_handle, callback, user_data);
 
        return WIFI_MANAGER_ERROR_NONE;
 }
 
-int _wifi_cancel_wps(void)
+int _wifi_cancel_wps(wifi_manager_h wifi)
 {
        int rv;
+       wifi_manager_handle_s *wifi_handle = wifi;
 
-       rv = net_wifi_cancel_wps();
-
+       rv = net_wifi_cancel_wps(wifi_handle->network_info);
        if (rv != NET_ERR_NONE)
                return WIFI_MANAGER_ERROR_OPERATION_FAILED;
 
-       __connected_cb(WIFI_MANAGER_ERROR_OPERATION_ABORTED);
+       __connected_cb(wifi_handle, WIFI_MANAGER_ERROR_OPERATION_ABORTED);
+
        return WIFI_MANAGER_ERROR_NONE;
 }
 //LCOV_EXCL_STOP
 
-bool _wifi_check_config_validity(wifi_manager_config_h config_h)
+bool _wifi_check_config_validity(wifi_config_s *config)
 {
-       GSList *list = NULL;
+       wifi_manager_handle_s *wifi_handle;
 
-       if (config_h == NULL)
+       if (config == NULL)
                return false;
 
-       for (list = config_handle_list; list; list = list->next)
-               if (config_h == list->data) return true;
+       wifi_handle = config->wifi_handle;
+       if (wifi_handle == NULL)
+               return false;
 
-       for (list = config_iterator; list; list = list->next)
-               if (config_h == list->data) return true;
+       if (_wifi_find_from_handle_list(wifi_handle) == false)
+               return false;
+
+       if (g_slist_find(wifi_handle->config_handle_list, config) != NULL)
+               return true;
+
+       if (g_slist_find(wifi_handle->config_iterator, config) != NULL)
+               return true;
 
        return false;
 }
 
-void _wifi_add_to_config_list(wifi_manager_config_h config_h)
+void _wifi_add_to_config_list(wifi_config_s *config)
 {
-       config_handle_list = g_slist_append(config_handle_list, config_h);
+       wifi_manager_handle_s *wifi_handle = config->wifi_handle;
+
+       if (wifi_handle) {
+               wifi_handle->config_handle_list =
+                       g_slist_append(wifi_handle->config_handle_list, config);
+       }
 }
 
-void _wifi_remove_from_config_list(wifi_manager_config_h config_h)
+void _wifi_remove_from_config_list(wifi_config_s *config)
 {
-       config_handle_list = g_slist_remove(config_handle_list, config_h);
-       g_free(config_h);
+       wifi_manager_handle_s *wifi_handle = config->wifi_handle;
+
+       if (wifi_handle) {
+               wifi_handle->config_handle_list =
+                       g_slist_remove(wifi_handle->config_handle_list, config);
+       }
 }
 
 gchar *_wifi_config_get_config_id(const gchar *name, wifi_manager_security_type_e security_type)
@@ -3117,11 +2991,12 @@ gchar *_wifi_config_get_config_id(const gchar *name, wifi_manager_security_type_
        return config_id;
 }
 
-int _wifi_config_get_config_id_list(GSList **list)
+int _wifi_config_get_config_id_list(wifi_manager_h wifi, GSList **list)
 {
        int rv;
+       wifi_manager_handle_s *wifi_handle = wifi;
 
-       rv = net_config_get_id_list(list);
+       rv = net_config_get_id_list(wifi_handle->network_info, list);
        if (rv == NET_ERR_ACCESS_DENIED) {
                WIFI_LOG(WIFI_ERROR, "Access denied"); //LCOV_EXCL_LINE
                return WIFI_MANAGER_ERROR_PERMISSION_DENIED; //LCOV_EXCL_LINE
@@ -3135,11 +3010,13 @@ int _wifi_config_get_config_id_list(GSList **list)
        return WIFI_MANAGER_ERROR_NONE;
 }
 
-int _wifi_save_configuration(const gchar *name, const gchar *passphrase,
+int _wifi_save_configuration(wifi_manager_h wifi,
+               const gchar *name, const gchar *passphrase,
                wifi_manager_security_type_e security_type, const gchar *proxy_address,
                wifi_config_ip_info_s *ip_info, gboolean is_hidden, gboolean is_created)
 {
        int rv;
+       wifi_manager_handle_s *wifi_handle = wifi;
        gchar *config_id = NULL;
        gchar *ssid = NULL;
 
@@ -3160,7 +3037,8 @@ int _wifi_save_configuration(const gchar *name, const gchar *passphrase,
        config_id = _wifi_config_get_config_id(name, security_type);
        ssid = __wifi_change_name_to_hexadecimal(name);
 
-       rv = net_config_save_configurations(config_id, name, ssid, passphrase,
+       rv = net_config_save_configurations(wifi_handle->network_info,
+                       config_id, name, ssid, passphrase,
                        proxy_address, (void *)ip_info, is_hidden, is_created);
        if (rv == NET_ERR_ACCESS_DENIED) {
                WIFI_LOG(WIFI_ERROR, "Access denied"); //LCOV_EXCL_LINE
@@ -3172,15 +3050,16 @@ int _wifi_save_configuration(const gchar *name, const gchar *passphrase,
        return WIFI_MANAGER_ERROR_NONE;
 }
 
-int _wifi_load_configurations(void)
+int _wifi_load_configurations(wifi_manager_h wifi)
 {
        int rv;
-       GSList *config_ids = NULL;
        int i;
+       wifi_manager_handle_s *wifi_handle = wifi;
+       GSList *config_ids = NULL;
 
-       __clear_config_list(&config_iterator);
+       __clear_config_list(&(wifi_handle->config_iterator));
 
-       rv = _wifi_config_get_config_id_list(&config_ids);
+       rv = _wifi_config_get_config_id_list(wifi, &config_ids);
        if (rv != WIFI_MANAGER_ERROR_NONE) {
                WIFI_LOG(WIFI_ERROR, "Fail to load configurations [%d]", rv); //LCOV_EXCL_LINE
                return rv; //LCOV_EXCL_LINE
@@ -3200,13 +3079,15 @@ int _wifi_load_configurations(void)
                if (h == NULL)
                        break;
 
+               h->wifi_handle = wifi_handle;
+
                if (g_str_has_suffix(id, "ieee8021x") == TRUE) {
                        h->eap_config = g_new0(wifi_eap_config_s, 1);
                        if (h->eap_config == NULL) {
                                g_free(h);//LCOV_EXCL_LINE
                                break;//LCOV_EXCL_LINE
                        }
-                       rv = __load_eap_configurations(id, &h->name,
+                       rv = __load_eap_configurations(wifi_handle, id, &h->name,
                                &h->security_type, &h->proxy_address, &h->is_hidden, &h->eap_config, &h->last_error);
                } else {
                        h->ip_info = g_new0(wifi_config_ip_info_s, 1);
@@ -3214,7 +3095,7 @@ int _wifi_load_configurations(void)
                                g_free(h);//LCOV_EXCL_LINE
                                break;//LCOV_EXCL_LINE
                        }
-                       rv = __load_configurations(id, &h->name, &h->passphrase, &h->security_type,
+                       rv = __load_configurations(wifi_handle, id, &h->name, &h->passphrase, &h->security_type,
                                                           &h->proxy_address, &h->is_hidden, &h->ip_info,
                                                           &h->last_error);
                }
@@ -3250,7 +3131,8 @@ int _wifi_load_configurations(void)
                        h->address_family = WIFI_MANAGER_ADDRESS_FAMILY_IPV4;
                        h->is_saved = TRUE;
 
-                       config_iterator = g_slist_append(config_iterator, (wifi_manager_config_h)h);
+                       wifi_handle->config_iterator = g_slist_append(wifi_handle->config_iterator,
+                                       (wifi_manager_config_h)h);
                }
 
                config_ids = config_ids->next;
@@ -3262,12 +3144,14 @@ int _wifi_load_configurations(void)
        return WIFI_MANAGER_ERROR_NONE;
 }
 
-int _wifi_foreach_configuration(wifi_manager_config_list_cb callback, void *user_data)
+int _wifi_foreach_configuration(wifi_manager_h wifi,
+               wifi_manager_config_list_cb callback, void *user_data)
 {
        int rv;
        GSList *list;
+       wifi_manager_handle_s *wifi_handle = wifi;
 
-       for (list = config_iterator; list; list = list->next) {
+       for (list = wifi_handle->config_iterator; list; list = list->next) {
                rv = callback((wifi_manager_config_h)list->data, user_data);
                if (rv == false)
                        break;
@@ -3276,34 +3160,35 @@ int _wifi_foreach_configuration(wifi_manager_config_list_cb callback, void *user
        return WIFI_MANAGER_ERROR_NONE;
 }
 
-int _wifi_remove_configuration(const gchar *config_id)
+int _wifi_remove_configuration(wifi_manager_h wifi, const gchar *config_id)
 {
        int rv;
        GSList *list;
+       wifi_manager_handle_s *wifi_handle = wifi;
 
-       rv = net_config_remove_configurations(config_id);
+       rv = net_config_remove_configurations(wifi_handle->network_info, config_id);
        if (rv == NET_ERR_ACCESS_DENIED) {
                WIFI_LOG(WIFI_ERROR, "Access denied"); //LCOV_EXCL_LINE
                return WIFI_MANAGER_ERROR_PERMISSION_DENIED; //LCOV_EXCL_LINE
        } else if (rv != NET_ERR_NONE)
                return WIFI_MANAGER_ERROR_OPERATION_FAILED; //LCOV_EXCL_LINE
 
-       rv = __update_profile_iterator();
+       rv = __update_profile_iterator(wifi_handle);
        if (rv == NET_ERR_ACCESS_DENIED) {
                WIFI_LOG(WIFI_ERROR, "Access denied"); //LCOV_EXCL_LINE
                return WIFI_MANAGER_ERROR_PERMISSION_DENIED; //LCOV_EXCL_LINE
        }
 
-       if ((int)g_slist_length(profile_iterator) == 0) {
+       if ((int)g_slist_length(wifi_handle->profile_iterator) == 0) {
                WIFI_LOG(WIFI_WARN, "There is no AP"); //LCOV_EXCL_LINE
                return WIFI_MANAGER_ERROR_NONE; //LCOV_EXCL_LINE
        }
 
-       for (list = profile_iterator; list; list = list->next) {
+       for (list = wifi_handle->profile_iterator; list; list = list->next) {
                net_profile_info_s *prof_info = (net_profile_info_s *)list->data;
                if (g_str_has_suffix((gchar*)(prof_info->ProfileName), config_id) == TRUE) {
 
-                       rv = net_delete_profile(prof_info->ProfileName); //LCOV_EXCL_LINE
+                       rv = net_delete_profile(wifi_handle->network_info, prof_info->ProfileName); //LCOV_EXCL_LINE
                        if (rv == NET_ERR_ACCESS_DENIED) {
                                WIFI_LOG(WIFI_ERROR, "Access denied"); //LCOV_EXCL_LINE
                                return WIFI_MANAGER_ERROR_PERMISSION_DENIED; //LCOV_EXCL_LINE
@@ -3320,11 +3205,13 @@ int _wifi_remove_configuration(const gchar *config_id)
 }
 
 //LCOV_EXCL_START
-int _wifi_save_eap_configurations(const gchar *name, const gchar *passphrase,
+int _wifi_save_eap_configurations(wifi_manager_h wifi,
+               const gchar *name, const gchar *passphrase,
                wifi_manager_security_type_e security_type, const gchar *proxy_address,
                wifi_eap_config_s *eap_config, gboolean is_hidden, gboolean is_created)
 {
        int rv;
+       wifi_manager_handle_s *wifi_handle = wifi;
        gchar *config_id = NULL;
        gchar *ssid = NULL;
 
@@ -3348,8 +3235,8 @@ int _wifi_save_eap_configurations(const gchar *name, const gchar *passphrase,
        config_id = _wifi_config_get_config_id(name, security_type);
        ssid = __wifi_change_name_to_hexadecimal(name);
 
-
-       rv = net_config_save_eap_configurations(config_id, name, ssid, passphrase,
+       rv = net_config_save_eap_configurations(wifi_handle->network_info,
+                       config_id, name, ssid, passphrase,
                        proxy_address, (void *)eap_config, is_hidden, is_created);
        if (rv == NET_ERR_ACCESS_DENIED) {
                WIFI_LOG(WIFI_ERROR, "Access denied"); //LCOV_EXCL_LINE
@@ -3360,11 +3247,13 @@ int _wifi_save_eap_configurations(const gchar *name, const gchar *passphrase,
        return WIFI_MANAGER_ERROR_NONE;
 }
 
-int _wifi_configuration_set_field(const gchar *config_id, const gchar *key, const gchar *value)
+int _wifi_configuration_set_field(wifi_manager_h wifi,
+               const gchar *config_id, const gchar *key, const gchar *value)
 {
        int rv;
+       wifi_manager_handle_s *wifi_handle = wifi;
 
-       rv = net_config_set_field(config_id, key, value);
+       rv = net_config_set_field(wifi_handle->network_info, config_id, key, value);
        if (rv == NET_ERR_ACCESS_DENIED) {
                WIFI_LOG(WIFI_ERROR, "Access denied"); //LCOV_EXCL_LINE
                return WIFI_MANAGER_ERROR_PERMISSION_DENIED; //LCOV_EXCL_LINE
@@ -3374,11 +3263,13 @@ int _wifi_configuration_set_field(const gchar *config_id, const gchar *key, cons
        return WIFI_MANAGER_ERROR_NONE;
 }
 
-int _wifi_configuration_get_passphrase(const gchar *config_id, gchar **passphrase)
+int _wifi_configuration_get_passphrase(wifi_manager_h wifi,
+               const gchar *config_id, gchar **passphrase)
 {
        int rv;
+       wifi_manager_handle_s *wifi_handle = wifi;
 
-       rv = net_config_get_passphrase(config_id, passphrase);
+       rv = net_config_get_passphrase(wifi_handle->network_info, config_id, passphrase);
        if (rv == NET_ERR_ACCESS_DENIED) {
                WIFI_LOG(WIFI_ERROR, "Access denied"); //LCOV_EXCL_LINE
                return WIFI_MANAGER_ERROR_PERMISSION_DENIED; //LCOV_EXCL_LINE
@@ -3388,11 +3279,12 @@ int _wifi_configuration_get_passphrase(const gchar *config_id, gchar **passphras
        return WIFI_MANAGER_ERROR_NONE;
 }
 
-int _wifi_check_get_privilege()
+int _wifi_check_get_privilege(wifi_manager_h wifi)
 {
        int rv;
+       wifi_manager_handle_s *wifi_handle = wifi;
 
-       rv = net_check_get_privilege();
+       rv = net_check_get_privilege(wifi_handle->network_info);
        if (rv == NET_ERR_ACCESS_DENIED) {
                WIFI_LOG(WIFI_ERROR, "Access denied"); //LCOV_EXCL_LINE
                return WIFI_MANAGER_ERROR_PERMISSION_DENIED; //LCOV_EXCL_LINE
@@ -3402,9 +3294,12 @@ int _wifi_check_get_privilege()
        return WIFI_MANAGER_ERROR_NONE;
 }
 
-int _wifi_check_profile_privilege()
+int _wifi_check_profile_privilege(wifi_manager_h wifi)
 {
-       int rv = net_check_profile_privilege();
+       int rv;
+       wifi_manager_handle_s *wifi_handle = wifi;
+
+       rv = net_check_profile_privilege(wifi_handle->network_info);
        if (rv == NET_ERR_ACCESS_DENIED) {
                WIFI_LOG(WIFI_ERROR, "Access denied"); //LCOV_EXCL_LINE
                return WIFI_MANAGER_ERROR_PERMISSION_DENIED; //LCOV_EXCL_LINE
@@ -3496,11 +3391,12 @@ tizen_profile_t _get_tizen_profile()
 }
 
 //LCOV_EXCL_START
-int _wifi_set_autoscan(bool autoscan)
+int _wifi_set_autoscan(wifi_manager_h wifi, bool autoscan)
 {
        int rv = 0;
+       wifi_manager_handle_s *wifi_handle = wifi;
 
-       rv = net_wifi_set_autoscan(autoscan);
+       rv = net_wifi_set_autoscan(wifi_handle->network_info, autoscan);
        if (rv == NET_ERR_ACCESS_DENIED) {
                WIFI_LOG(WIFI_ERROR, "Access denied");
                return WIFI_MANAGER_ERROR_PERMISSION_DENIED;
@@ -3510,11 +3406,13 @@ int _wifi_set_autoscan(bool autoscan)
        return WIFI_MANAGER_ERROR_NONE;
 }
 
-int _wifi_set_background_scan_mode(wifi_manager_autoscan_mode_e mode)
+int _wifi_set_background_scan_mode(wifi_manager_h wifi,
+               wifi_manager_autoscan_mode_e mode)
 {
        int rv = 0;
+       wifi_manager_handle_s *wifi_handle = wifi;
 
-       rv = net_wifi_set_background_scan_mode(mode);
+       rv = net_wifi_set_background_scan_mode(wifi_handle->network_info, mode);
        if (rv == NET_ERR_ACCESS_DENIED) {
                WIFI_LOG(WIFI_ERROR, "Access denied");
                return WIFI_MANAGER_ERROR_PERMISSION_DENIED;
@@ -3524,11 +3422,12 @@ int _wifi_set_background_scan_mode(wifi_manager_autoscan_mode_e mode)
        return WIFI_MANAGER_ERROR_NONE;
 }
 
-int _wifi_set_ip_conflict_period(unsigned int initial_time)
+int _wifi_set_ip_conflict_period(wifi_manager_h wifi, unsigned int initial_time)
 {
        int rv = 0;
+       wifi_manager_handle_s *wifi_handle = wifi;
 
-       rv = net_wifi_set_ip_conflict_period(initial_time);
+       rv = net_wifi_set_ip_conflict_period(wifi_handle->network_info, initial_time);
        if (rv == NET_ERR_ACCESS_DENIED) {
                WIFI_LOG(WIFI_ERROR, "Access denied");
                return WIFI_MANAGER_ERROR_PERMISSION_DENIED;
@@ -3538,12 +3437,13 @@ int _wifi_set_ip_conflict_period(unsigned int initial_time)
        return WIFI_MANAGER_ERROR_NONE;
 }
 
-int _wifi_get_autoscan(bool *autoscan)
+int _wifi_get_autoscan(wifi_manager_h wifi, bool *autoscan)
 {
        int rv;
        gboolean auto_scan = 0;
+       wifi_manager_handle_s *wifi_handle = wifi;
 
-       rv = net_wifi_get_autoscan(&auto_scan);
+       rv = net_wifi_get_autoscan(wifi_handle->network_info, &auto_scan);
        if (rv == NET_ERR_ACCESS_DENIED) {
                WIFI_LOG(WIFI_ERROR, "Access denied"); //LCOV_EXCL_LINE
                return WIFI_MANAGER_ERROR_PERMISSION_DENIED; //LCOV_EXCL_LINE
@@ -3556,11 +3456,12 @@ int _wifi_get_autoscan(bool *autoscan)
        return WIFI_MANAGER_ERROR_NONE;
 }
 
-int _wifi_get_autoscanmode(wifi_manager_autoscan_mode_e *autoscanmode)
+int _wifi_get_autoscanmode(wifi_manager_h wifi, wifi_manager_autoscan_mode_e *autoscanmode)
 {
        int rv;
+       wifi_manager_handle_s *wifi_handle = wifi;
 
-       rv = net_wifi_get_autoscanmode(autoscanmode);
+       rv = net_wifi_get_autoscanmode(wifi_handle->network_info, autoscanmode);
        if (rv == NET_ERR_ACCESS_DENIED) {
                WIFI_LOG(WIFI_ERROR, "Access denied"); //LCOV_EXCL_LINE
                return WIFI_MANAGER_ERROR_PERMISSION_DENIED; //LCOV_EXCL_LINE
@@ -3572,35 +3473,36 @@ int _wifi_get_autoscanmode(wifi_manager_autoscan_mode_e *autoscanmode)
        return WIFI_MANAGER_ERROR_NONE;
 }
 
-int _wifi_set_passpoint(int passpoint)
+int _wifi_set_passpoint(wifi_manager_h wifi, int passpoint)
 {
        int rv;
+       wifi_manager_handle_s *wifi_handle = wifi;
 
-       rv = net_wifi_set_passpoint(passpoint);
-
+       rv = net_wifi_set_passpoint(wifi_handle->network_info, passpoint);
        if (rv != NET_ERR_NONE)
                WIFI_LOG(WIFI_ERROR, "Failed to set passpoint");
 
        return rv;
 }
 
-int _wifi_get_passpoint(int *passpoint)
+int _wifi_get_passpoint(wifi_manager_h wifi, int *passpoint)
 {
        int rv;
+       wifi_manager_handle_s *wifi_handle = wifi;
 
-       rv = net_wifi_get_passpoint(passpoint);
-
+       rv = net_wifi_get_passpoint(wifi_handle->network_info, passpoint);
        if (rv != NET_ERR_NONE)
                WIFI_LOG(WIFI_ERROR, "Failed to get passpoint state");
 
        return rv;
 }
 
-int _wifi_get_ip_conflict_period(unsigned int* initial_time)
+int _wifi_get_ip_conflict_period(wifi_manager_h wifi, unsigned int* initial_time)
 {
        int rv;
+       wifi_manager_handle_s *wifi_handle = wifi;
 
-       rv = net_wifi_get_ip_conflict_period(initial_time);
+       rv = net_wifi_get_ip_conflict_period(wifi_handle->network_info, initial_time);
        if (rv == NET_ERR_ACCESS_DENIED) {
                WIFI_LOG(WIFI_ERROR, "Access denied"); //LCOV_EXCL_LINE
                return WIFI_MANAGER_ERROR_PERMISSION_DENIED; //LCOV_EXCL_LINE
@@ -3612,11 +3514,12 @@ int _wifi_get_ip_conflict_period(unsigned int* initial_time)
        return WIFI_MANAGER_ERROR_NONE;
 }
 
-int _wifi_get_ip_conflict_state(wifi_manager_ip_conflict_state_e *state)
+int _wifi_get_ip_conflict_state(wifi_manager_h wifi, wifi_manager_ip_conflict_state_e *state)
 {
        int rv;
+       wifi_manager_handle_s *wifi_handle = wifi;
 
-       rv = net_wifi_get_ip_conflict_state(state);
+       rv = net_wifi_get_ip_conflict_state(wifi_handle->network_info, state);
        if (rv == NET_ERR_ACCESS_DENIED) {
                WIFI_LOG(WIFI_ERROR, "Access denied"); //LCOV_EXCL_LINE
                return WIFI_MANAGER_ERROR_PERMISSION_DENIED; //LCOV_EXCL_LINE
@@ -3628,29 +3531,31 @@ int _wifi_get_ip_conflict_state(wifi_manager_ip_conflict_state_e *state)
        return WIFI_MANAGER_ERROR_NONE;
 }
 
-int _wifi_get_wps_generated_pin(char **wps_pin)
+int _wifi_get_wps_generated_pin(wifi_manager_h wifi, char **wps_pin)
 {
        int rv;
+       wifi_manager_handle_s *wifi_handle = wifi;
 
-       rv = net_get_wps_generated_pin(wps_pin);
-
+       rv = net_get_wps_generated_pin(wifi_handle->network_info, wps_pin);
        if (rv != NET_ERR_NONE)
                WIFI_LOG(WIFI_ERROR, "Failed to get WPS PIN");
 
        return rv;
 }
 
-int _wifi_get_module_state(wifi_manager_module_state_e *state)
+int _wifi_get_module_state(wifi_manager_h wifi, wifi_manager_module_state_e *state)
 {
        int rv = 0;
        int wifi_device_status = 0;
+       wifi_manager_handle_s *wifi_handle = wifi;
 
-       rv = vconf_get_int(VCONFKEY_WIFI_DEVICE_STATUS_UEVENT, &wifi_device_status);
-
-       if (rv < 0) {
-               WIFI_LOG(WIFI_ERROR, "Failed to get vconf value [%s]\n",
-                                               VCONFKEY_WIFI_DEVICE_STATUS_UEVENT);
-               return WIFI_MANAGER_ERROR_OPERATION_FAILED;
+       rv = net_wifi_get_module_state(wifi_handle->network_info, &wifi_device_status);
+       if (rv == NET_ERR_ACCESS_DENIED) {
+               WIFI_LOG(WIFI_ERROR, "Access denied"); //LCOV_EXCL_LINE
+               return WIFI_MANAGER_ERROR_PERMISSION_DENIED; //LCOV_EXCL_LINE
+       } else if (rv != NET_ERR_NONE) {
+               WIFI_LOG(WIFI_ERROR, "Failed to get module state"); //LCOV_EXCL_LINE
+               return WIFI_MANAGER_ERROR_OPERATION_FAILED; //LCOV_EXCL_LINE
        }
 
        if (wifi_device_status == 0) {
@@ -3663,38 +3568,6 @@ int _wifi_get_module_state(wifi_manager_module_state_e *state)
 
        return WIFI_MANAGER_ERROR_NONE;
 }
-
-void _wifi_module_state_changed_cb(keynode_t *node, void *user_data)
-{
-       GSList *list;
-       wifi_manager_handle_s *handle;
-       int wifi_device_status = 0;
-
-       if (net_check_ref_count() != true) {
-               WIFI_LOG(WIFI_ERROR, "Application is not registered"
-                               "If multi-threaded, thread integrity be broken.");
-               return;
-       }
-
-       for (list = wifi_manager_handle_list; list; list = list->next) {
-               handle = (wifi_manager_handle_s *)list->data;
-
-               if (__wifi_check_handle_validity((wifi_manager_h)handle) != true)
-                       return;
-
-               if (vconf_get_int(VCONFKEY_WIFI_DEVICE_STATUS_UEVENT, &wifi_device_status) < 0) {
-                       WIFI_LOG(WIFI_ERROR, "Unable to read status from vconf key\n");
-                       return;
-               }
-
-               WIFI_LOG(WIFI_ERROR, "Wi-Fi Module State [%d]\n", wifi_device_status);
-
-               if (handle->module_state_changed_cb)
-                       handle->module_state_changed_cb(wifi_device_status,
-                                       handle->module_state_changed_user_data);
-       }
-}
-
 //LCOV_EXCL_STOP
 
 bool _wifi_check_multi_scan_validity(wifi_manager_specific_scan_h specific_scan)
@@ -3789,10 +3662,10 @@ int _wifi_start_multi_scan(wifi_manager_h wifi,
                wifi_manager_scan_finished_cb callback, void *user_data)
 {
        int rv = -1;
-
+       wifi_manager_handle_s *wifi_handle = wifi;
        GSList *multi_scan_list = (GSList *)specific_scan;
 
-       rv = net_multi_scan_wifi(multi_scan_list->next, multi_scan_type);
+       rv = net_multi_scan_wifi(wifi_handle->network_info, multi_scan_list->next, multi_scan_type);
        if (rv == NET_ERR_ACCESS_DENIED) {
                WIFI_LOG(WIFI_ERROR, "Access denied"); //LCOV_EXCL_LINE
                return WIFI_MANAGER_ERROR_PERMISSION_DENIED; //LCOV_EXCL_LINE
@@ -3801,26 +3674,27 @@ int _wifi_start_multi_scan(wifi_manager_h wifi,
        } else if (rv == NET_ERR_OUT_OF_MEMORY) {
                return WIFI_MANAGER_ERROR_OUT_OF_MEMORY; //LCOV_EXCL_LINE
        } else if (rv == NET_ERR_NONE) {
-               __set_multi_scan_cb(wifi, callback, user_data);
+               __set_multi_scan_cb(wifi_handle, callback, user_data);
                return WIFI_MANAGER_ERROR_NONE;
        }
 
        return WIFI_MANAGER_ERROR_OPERATION_FAILED; //LCOV_EXCL_LINE
 }
 
-int _wifi_get_connection_mode(wifi_manager_connection_mode_e *mode)
+int _wifi_get_connection_mode(wifi_manager_h wifi, wifi_manager_connection_mode_e *mode)
 {
        int rv;
        GSList *list;
+       wifi_manager_handle_s *wifi_handle = wifi;
        net_profile_info_s *prof_info = NULL;
 
-       rv = __update_profile_iterator();
+       rv = __update_profile_iterator(wifi_handle);
        if (rv == NET_ERR_ACCESS_DENIED) {
                WIFI_LOG(WIFI_ERROR, "Access denied");
                return WIFI_MANAGER_ERROR_PERMISSION_DENIED;
        }
 
-       for (list = profile_iterator; list; list = list->next) {
+       for (list = wifi_handle->profile_iterator; list; list = list->next) {
                prof_info = (net_profile_info_s *)list->data;
                if (prof_info->ProfileState == NET_STATE_TYPE_ONLINE ||
                    prof_info->ProfileState == NET_STATE_TYPE_READY)
@@ -3837,10 +3711,10 @@ int _wifi_get_connection_mode(wifi_manager_connection_mode_e *mode)
        return WIFI_MANAGER_ERROR_NONE;
 }
 
-int _wifi_get_service_state()
+int _wifi_get_service_state(wifi_manager_handle_s *wifi_handle)
 {
        wifi_service_state_e ret = WIFI_SERVICE_STATE_UNKNOWN;
-       net_state_type_e service_state = net_get_service_state();
+       net_state_type_e service_state = net_get_service_state(wifi_handle->network_info);
 
        switch (service_state) {
        case NET_STATE_TYPE_UNKNOWN:
@@ -3870,12 +3744,12 @@ int _wifi_get_service_state()
        return ret;
 }
 
-int _wifi_get_max_scan_ssids(int *max_scan_ssids)
+int _wifi_get_max_scan_ssids(wifi_manager_h wifi, int *max_scan_ssids)
 {
        int rv;
+       wifi_manager_handle_s *wifi_handle = wifi;
 
-       rv = net_wifi_get_max_scan_ssids(max_scan_ssids);
-
+       rv = net_wifi_get_max_scan_ssids(wifi_handle->network_info, max_scan_ssids);
        if (rv == NET_ERR_ACCESS_DENIED) {
                WIFI_LOG(WIFI_ERROR, "Access denied"); //LCOV_EXCL_LINE
                return WIFI_MANAGER_ERROR_PERMISSION_DENIED; //LCOV_EXCL_LINE
@@ -3965,7 +3839,7 @@ int _wifi_dpp_enter_peer_uri(wifi_dpp_s *p_dpp,
        if(g_p_dpp_current != p_dpp)
                return WIFI_MANAGER_ERROR_NOW_IN_PROGRESS;
 
-       rv = net_dpp_enter_peer_uri(p_dpp->peer_id, p_dpp->own_id, uri);
+       rv = net_dpp_enter_peer_uri(p_dpp->network_info, p_dpp->peer_id, p_dpp->own_id, uri);
 
        if (rv != NET_ERR_NONE)
                WIFI_LOG(WIFI_ERROR, "Failed to enter peer URI");
@@ -3985,7 +3859,8 @@ int _wifi_dpp_request_own_uri_gen(wifi_dpp_s *p_dpp, const char *key)
        if(g_p_dpp_current != p_dpp)
                return WIFI_MANAGER_ERROR_NOW_IN_PROGRESS;
 
-       rv = net_dpp_generate_own_uri(p_dpp->peer_id, p_dpp->own_id, p_dpp->is_initiator, key);
+       rv = net_dpp_generate_own_uri(p_dpp->network_info,
+               p_dpp->peer_id, p_dpp->own_id, p_dpp->is_initiator, key);
 
        if (rv != NET_ERR_NONE)
                WIFI_LOG(WIFI_ERROR, "Failed to generate own URI");
@@ -4029,7 +3904,8 @@ int _wifi_dpp_stop(wifi_dpp_s *p_dpp)
        if(g_p_dpp_current != p_dpp)
                return WIFI_MANAGER_ERROR_NOW_IN_PROGRESS;
 
-       rv = net_dpp_stop(p_dpp->peer_id, p_dpp->own_id, p_dpp->is_initiator);
+       rv = net_dpp_stop(p_dpp->network_info,
+               p_dpp->peer_id, p_dpp->own_id, p_dpp->is_initiator);
 
        if (rv != NET_ERR_NONE)
                WIFI_LOG(WIFI_ERROR, "Failed to stop");
index 9900030..c97041c 100755 (executable)
@@ -25,8 +25,6 @@
 #include "network_internal.h"
 #include "wifi_internal.h"
 
-#define WIFI_MAC_ADDR_PATH             "/sys/class/net/wlan0/address"
-
 //LCOV_EXCL_START
 bool __wifi_check_handle_validity(wifi_manager_h wifi)
 {
@@ -38,132 +36,53 @@ bool __wifi_check_handle_validity(wifi_manager_h wifi)
        return _wifi_find_from_handle_list(wifi);
 }
 
-static int __wifi_set_device_state_changed_cb(wifi_manager_h wifi,
+static void __wifi_set_device_state_changed_cb(wifi_manager_handle_s *wifi_handle,
                        void *callback, void *user_data)
 {
-       wifi_manager_handle_s *local_handle = (wifi_manager_handle_s *)wifi;
-
-       local_handle->device_state_cb = callback;
-       local_handle->device_state_user_data = user_data;
-
-       return WIFI_MANAGER_ERROR_NONE;
+       wifi_handle->device_state_cb = callback;
+       wifi_handle->device_state_user_data = user_data;
 }
 
-static int __wifi_set_background_scan_cb(wifi_manager_h wifi,
+static void __wifi_set_background_scan_cb(wifi_manager_handle_s *wifi_handle,
                        void *callback, void *user_data)
 {
-       wifi_manager_handle_s *local_handle = (wifi_manager_handle_s *)wifi;
-
-       local_handle->bg_scan_cb = callback;
-       local_handle->bg_scan_user_data = user_data;
-
-       return WIFI_MANAGER_ERROR_NONE;
+       wifi_handle->bg_scan_cb = callback;
+       wifi_handle->bg_scan_user_data = user_data;
 }
 
-static int __wifi_set_scan_state_changed_cb(wifi_manager_h wifi,
+static void __wifi_set_scan_state_changed_cb(wifi_manager_handle_s *wifi_handle,
                        void *callback, void *user_data)
 {
-       wifi_manager_handle_s *local_handle = (wifi_manager_handle_s *)wifi;
-
-       local_handle->scan_changed_cb = callback;
-       local_handle->scan_changed_user_data = user_data;
-
-       return WIFI_MANAGER_ERROR_NONE;
+       wifi_handle->scan_changed_cb = callback;
+       wifi_handle->scan_changed_user_data = user_data;
 }
 
-static int __wifi_set_connection_state_changed_cb(wifi_manager_h wifi,
+static void __wifi_set_connection_state_changed_cb(wifi_manager_handle_s *wifi_handle,
                        void *callback, void *user_data)
 {
-       wifi_manager_handle_s *local_handle = (wifi_manager_handle_s *)wifi;
-
-       local_handle->connection_state_cb = callback;
-       local_handle->connection_state_user_data = user_data;
-
-       return WIFI_MANAGER_ERROR_NONE;
+       wifi_handle->connection_state_cb = callback;
+       wifi_handle->connection_state_user_data = user_data;
 }
 
-static int __wifi_set_ip_conflict_cb(wifi_manager_h wifi,
+static void __wifi_set_ip_conflict_cb(wifi_manager_handle_s *wifi_handle,
                        void *callback, void *user_data)
 {
-       wifi_manager_handle_s *local_handle = (wifi_manager_handle_s *)wifi;
-
-       local_handle->ip_conflict_cb = callback;
-       local_handle->ip_conflict_user_data = user_data;
-
-       return WIFI_MANAGER_ERROR_NONE;
+       wifi_handle->ip_conflict_cb = callback;
+       wifi_handle->ip_conflict_user_data = user_data;
 }
 
-static int __wifi_set_rssi_level_changed_cb(wifi_manager_h wifi,
+static void __wifi_set_rssi_level_changed_cb(wifi_manager_handle_s *wifi_handle,
                        void *callback, void *user_data)
 {
-       static __thread gint refcount = 0;
-       wifi_manager_handle_s *local_handle;
-
-       local_handle = (wifi_manager_handle_s *)wifi;
-
-       if (callback) {
-               if (refcount == 0)
-                       vconf_notify_key_changed(VCONFKEY_WIFI_STRENGTH,
-                                       _wifi_rssi_level_changed_cb, NULL);
-
-               refcount++;
-               WIFI_LOG(WIFI_INFO, "Successfully registered(%d)", refcount);
-       } else {
-               if (refcount > 0 && local_handle->rssi_level_changed_cb) {
-                       if (--refcount == 0) {
-                               if (vconf_ignore_key_changed(VCONFKEY_WIFI_STRENGTH,
-                                               _wifi_rssi_level_changed_cb) < 0) {
-                                       WIFI_LOG(WIFI_ERROR, "Error to de-register vconf callback(%d)", refcount);
-                               } else {
-                                       WIFI_LOG(WIFI_INFO, "Successfully de-registered(%d)", refcount);
-                               }
-                       }
-               }
-       }
-
-       local_handle->rssi_level_changed_cb = callback;
-       local_handle->rssi_level_changed_user_data = user_data;
-
-       return WIFI_MANAGER_ERROR_NONE;
-}
-
-static int __wifi_get_handle_count(void)
-{
-       return _wifi_get_count_from_handle_list();
+       wifi_handle->rssi_level_changed_cb = callback;
+       wifi_handle->rssi_level_changed_user_data = user_data;
 }
 
-static int __wifi_set_module_state_changed_cb(wifi_manager_h wifi,
+static void __wifi_set_module_state_changed_cb(wifi_manager_handle_s *wifi_handle,
                        void *callback, void *user_data)
 {
-       static __thread gint refcount = 0;
-       wifi_manager_handle_s *local_handle;
-
-       local_handle = (wifi_manager_handle_s *)wifi;
-
-       if (callback) {
-               if (refcount == 0)
-                       vconf_notify_key_changed(VCONFKEY_WIFI_DEVICE_STATUS_UEVENT,
-                                       _wifi_module_state_changed_cb, NULL);
-
-               refcount++;
-               WIFI_LOG(WIFI_INFO, "Successfully registered(%d)", refcount);
-       } else {
-               if (refcount > 0 && local_handle->module_state_changed_cb) {
-                       if (--refcount == 0) {
-                               if (vconf_ignore_key_changed(VCONFKEY_WIFI_DEVICE_STATUS_UEVENT,
-                                               _wifi_module_state_changed_cb) < 0) {
-                                       WIFI_LOG(WIFI_ERROR, "Error to de-register vconf callback(%d)", refcount);
-                               } else {
-                                       WIFI_LOG(WIFI_INFO, "Successfully de-registered(%d)", refcount);
-                               }
-                       }
-               }
-       }
-
-       local_handle->module_state_changed_cb = callback;
-       local_handle->module_state_changed_user_data = user_data;
-
-       return WIFI_MANAGER_ERROR_NONE;
+       wifi_handle->module_state_changed_cb = callback;
+       wifi_handle->module_state_changed_user_data = user_data;
 }
 
 //LCOV_EXCL_STOP
@@ -188,17 +107,60 @@ EXPORT_API int wifi_manager_initialize(wifi_manager_h *wifi)
                return WIFI_MANAGER_ERROR_ALREADY_INITIALIZED; //LCOV_EXCL_LINE
        }
 
-       rv = _wifi_init();
+       rv = _wifi_create_handle(wifi);
+       if (rv != WIFI_MANAGER_ERROR_NONE) {
+               WIFI_LOG(WIFI_ERROR, "Init failed[%d]", rv); //LCOV_EXCL_LINE
+               __NETWORK_CAPI_FUNC_EXIT__; //LCOV_EXCL_LINE
+               return WIFI_MANAGER_ERROR_OUT_OF_MEMORY; //LCOV_EXCL_LINE
+       }
+
+       rv = _wifi_init(*wifi, NULL);
        if (rv == NET_ERR_ACCESS_DENIED) {
                WIFI_LOG(WIFI_ERROR, "Access denied"); //LCOV_EXCL_LINE
+               _wifi_deinit(*wifi); //LCOV_EXCL_LINE
                __NETWORK_CAPI_FUNC_EXIT__; //LCOV_EXCL_LINE
                return WIFI_MANAGER_ERROR_PERMISSION_DENIED; //LCOV_EXCL_LINE
        } else if (rv != NET_ERR_NONE) {
                WIFI_LOG(WIFI_ERROR, "Init failed[%d]", rv); //LCOV_EXCL_LINE
+               _wifi_deinit(*wifi); //LCOV_EXCL_LINE
                __NETWORK_CAPI_FUNC_EXIT__; //LCOV_EXCL_LINE
                return WIFI_MANAGER_ERROR_OPERATION_FAILED; //LCOV_EXCL_LINE
        }
 
+       _wifi_add_to_handle_list(wifi);
+       WIFI_LOG(WIFI_INFO, "Wi-Fi successfully initialized");
+
+       __NETWORK_CAPI_FUNC_EXIT__;
+       return WIFI_MANAGER_ERROR_NONE;
+}
+
+EXPORT_API int wifi_manager_initialize_with_interface_name(wifi_manager_h *wifi,
+               const char *ifname)
+{
+       __NETWORK_CAPI_FUNC_ENTER__;
+
+       int rv;
+
+       CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
+
+       if (wifi == NULL) {
+               WIFI_LOG(WIFI_ERROR, "Invalid parameter"); //LCOV_EXCL_LINE
+               __NETWORK_CAPI_FUNC_EXIT__; //LCOV_EXCL_LINE
+               return WIFI_MANAGER_ERROR_INVALID_PARAMETER; //LCOV_EXCL_LINE
+       }
+
+       if (ifname == NULL) {
+               WIFI_LOG(WIFI_ERROR, "Invalid parameter"); //LCOV_EXCL_LINE
+               __NETWORK_CAPI_FUNC_EXIT__; //LCOV_EXCL_LINE
+               return WIFI_MANAGER_ERROR_INVALID_PARAMETER; //LCOV_EXCL_LINE
+       }
+
+       if (__wifi_check_handle_validity(*wifi)) {
+               WIFI_LOG(WIFI_ERROR, "Already initialized"); //LCOV_EXCL_LINE
+               __NETWORK_CAPI_FUNC_EXIT__; //LCOV_EXCL_LINE
+               return WIFI_MANAGER_ERROR_ALREADY_INITIALIZED; //LCOV_EXCL_LINE
+       }
+
        rv = _wifi_create_handle(wifi);
        if (rv != WIFI_MANAGER_ERROR_NONE) {
                WIFI_LOG(WIFI_ERROR, "Init failed[%d]", rv); //LCOV_EXCL_LINE
@@ -206,8 +168,21 @@ EXPORT_API int wifi_manager_initialize(wifi_manager_h *wifi)
                return WIFI_MANAGER_ERROR_OUT_OF_MEMORY; //LCOV_EXCL_LINE
        }
 
+       rv = _wifi_init(*wifi, ifname);
+       if (rv == NET_ERR_ACCESS_DENIED) {
+               WIFI_LOG(WIFI_ERROR, "Access denied"); //LCOV_EXCL_LINE
+               _wifi_deinit(*wifi); //LCOV_EXCL_LINE
+               __NETWORK_CAPI_FUNC_EXIT__; //LCOV_EXCL_LINE
+               return WIFI_MANAGER_ERROR_PERMISSION_DENIED; //LCOV_EXCL_LINE
+       } else if (rv != NET_ERR_NONE) {
+               WIFI_LOG(WIFI_ERROR, "Init failed[%d]", rv); //LCOV_EXCL_LINE
+               _wifi_deinit(*wifi); //LCOV_EXCL_LINE
+               __NETWORK_CAPI_FUNC_EXIT__; //LCOV_EXCL_LINE
+               return WIFI_MANAGER_ERROR_OPERATION_FAILED; //LCOV_EXCL_LINE
+       }
+
        _wifi_add_to_handle_list(wifi);
-       WIFI_LOG(WIFI_INFO, "Wi-Fi successfully initialized");
+       WIFI_LOG(WIFI_INFO, "Wi-Fi successfully initialized with interface name [%s]", ifname);
 
        __NETWORK_CAPI_FUNC_EXIT__;
        return WIFI_MANAGER_ERROR_NONE;
@@ -225,15 +200,11 @@ EXPORT_API int wifi_manager_deinitialize(wifi_manager_h wifi)
 
        WIFI_LOG(WIFI_INFO, "Destroy handle: %p", wifi);
 
+       _wifi_deinit(wifi);
        _wifi_remove_from_handle_list(wifi);
 
-       if (__wifi_get_handle_count() == 0) {
-               if (_wifi_deinit() == false) {
-                       WIFI_LOG(WIFI_ERROR, "Deinit failed"); //LCOV_EXCL_LINE
-                       __NETWORK_CAPI_FUNC_EXIT__; //LCOV_EXCL_LINE
-                       return WIFI_MANAGER_ERROR_OPERATION_FAILED; //LCOV_EXCL_LINE
-               }
-       }
+       if (_wifi_length_from_handle_list() == 0)
+               _wifi_clear_profile_list();
 
        WIFI_LOG(WIFI_INFO, "Wi-Fi successfully de-initialized");
 
@@ -249,9 +220,8 @@ EXPORT_API int wifi_manager_initialize_cs(int tid, wifi_manager_h *wifi)
        int rv;
 
        rv = wifi_manager_initialize(wifi);
-
        if (rv == WIFI_MANAGER_ERROR_NONE)
-               _wifi_set_cs_tid(tid);
+               _wifi_set_cs_tid(*wifi, tid);
 
        __NETWORK_CAPI_FUNC_EXIT__;
        return rv;
@@ -349,7 +319,7 @@ EXPORT_API int wifi_manager_is_5ghz_band_supported(wifi_manager_h wifi, bool *su
                return WIFI_MANAGER_ERROR_INVALID_PARAMETER; //LCOV_EXCL_LINE
        }
 
-       rv = _wifi_get_5ghz_support(supported);
+       rv = _wifi_get_5ghz_support(wifi, supported);
 
        __NETWORK_CAPI_FUNC_EXIT__;
        return rv;
@@ -372,7 +342,7 @@ EXPORT_API int wifi_manager_is_activated(wifi_manager_h wifi, bool *activated)
                return WIFI_MANAGER_ERROR_INVALID_PARAMETER; //LCOV_EXCL_LINE
        }
 
-       rv = _wifi_get_wifi_device_state(&device_state);
+       rv = _wifi_get_wifi_device_state(wifi, &device_state);
        if (rv == WIFI_MANAGER_ERROR_NONE) {
                if (WIFI_MANAGER_DEVICE_STATE_DEACTIVATED == device_state)
                        *activated = false;
@@ -388,6 +358,8 @@ EXPORT_API int wifi_manager_get_mac_address(wifi_manager_h wifi, char **mac_addr
 {
        __NETWORK_CAPI_FUNC_ENTER__;
 
+       int rv;
+
        CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
 
        RET_ERR_IF_HANDLE_IS_NOT_VALID_OR_NOT_INITIALIZED(wifi, __NETWORK_CAPI_FUNC_EXIT__);
@@ -398,67 +370,15 @@ EXPORT_API int wifi_manager_get_mac_address(wifi_manager_h wifi, char **mac_addr
                return WIFI_MANAGER_ERROR_INVALID_PARAMETER; //LCOV_EXCL_LINE
        }
 
-       if (_get_tizen_profile() == TIZEN_PROFILE_TV) {
-               //LCOV_EXCL_START
-               FILE *fp = NULL;
-               char buf[WIFI_MAC_ADDR_LEN + 1];
-               if (0 == access(WIFI_MAC_ADDR_PATH, F_OK))
-                       fp = fopen(WIFI_MAC_ADDR_PATH, "r");
-
-               if (fp == NULL) {
-                       WIFI_LOG(WIFI_ERROR, "Failed to open file"
-                                       " %s\n", WIFI_MAC_ADDR_PATH);
-                       __NETWORK_CAPI_FUNC_EXIT__;
-                       return WIFI_MANAGER_ERROR_OPERATION_FAILED;
-               }
-
-               if (fgets(buf, sizeof(buf), fp) == NULL) {
-                       WIFI_LOG(WIFI_ERROR, "Failed to get MAC"
-                                       " info from %s\n", WIFI_MAC_ADDR_PATH);
-                       fclose(fp);
-                       __NETWORK_CAPI_FUNC_EXIT__;
-                       return WIFI_MANAGER_ERROR_OPERATION_FAILED;
-               }
-
-               WIFI_LOG(WIFI_INFO, "%s : %s\n", WIFI_MAC_ADDR_PATH, buf);
-
-               *mac_address = strndup(buf, WIFI_MAC_ADDR_LEN + 1);
-               if (*mac_address == NULL) {
-                       WIFI_LOG(WIFI_ERROR, "strndup() failed");
-                       fclose(fp);
-                       __NETWORK_CAPI_FUNC_EXIT__;
-                       return WIFI_MANAGER_ERROR_OUT_OF_MEMORY;
-               }
-
-               fclose(fp);
-               //LCOV_EXCL_STOP
-       } else {
-               *mac_address = vconf_get_str(VCONFKEY_WIFI_BSSID_ADDRESS);
-
-               if (*mac_address == NULL) {
-                       WIFI_LOG(WIFI_ERROR, "Failed to get vconf" //LCOV_EXCL_LINE
-                               " from %s", VCONFKEY_WIFI_BSSID_ADDRESS);
-                       __NETWORK_CAPI_FUNC_EXIT__; //LCOV_EXCL_LINE
-                       return WIFI_MANAGER_ERROR_OPERATION_FAILED; //LCOV_EXCL_LINE
-               }
-
-               if (strlen(*mac_address) == 0) {
-                       WIFI_LOG(WIFI_ERROR, "Mac address is invalid" //LCOV_EXCL_LINE
-                               " from %s", VCONFKEY_WIFI_BSSID_ADDRESS);
-                       g_free(*mac_address); //LCOV_EXCL_LINE
-                       *mac_address = NULL; //LCOV_EXCL_LINE
-                       __NETWORK_CAPI_FUNC_EXIT__; //LCOV_EXCL_LINE
-                       return WIFI_MANAGER_ERROR_OPERATION_FAILED; //LCOV_EXCL_LINE
-               }
-       }
+       rv = _wifi_get_mac_address(wifi, mac_address);
 
        __NETWORK_CAPI_FUNC_EXIT__;
-       return WIFI_MANAGER_ERROR_NONE;
+       return rv;
 }
 
 EXPORT_API int wifi_manager_get_network_interface_name(wifi_manager_h wifi, char **name)
 {
-       __NETWORK_CAPI_FUNC_ENTER__
+       __NETWORK_CAPI_FUNC_ENTER__;
 
        CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
 
@@ -470,8 +390,10 @@ EXPORT_API int wifi_manager_get_network_interface_name(wifi_manager_h wifi, char
                return WIFI_MANAGER_ERROR_INVALID_PARAMETER; //LCOV_EXCL_LINE
        }
 
+       _wifi_get_intf_name(wifi, name);
+
        __NETWORK_CAPI_FUNC_EXIT__;
-       return _wifi_get_intf_name(name);
+       return WIFI_MANAGER_ERROR_NONE;
 }
 
 EXPORT_API int wifi_manager_scan(wifi_manager_h wifi,
@@ -516,7 +438,7 @@ EXPORT_API int wifi_manager_get_scan_state(wifi_manager_h wifi,
                return WIFI_MANAGER_ERROR_INVALID_PARAMETER; //LCOV_EXCL_LINE
        }
 
-       rv = _wifi_get_scan_state(scan_state);
+       rv = _wifi_get_scan_state(wifi, scan_state);
        if (rv != WIFI_MANAGER_ERROR_NONE) {
                WIFI_LOG(WIFI_ERROR, "Failed to get Wi-Fi scan state"); //LCOV_EXCL_LINE
                __NETWORK_CAPI_FUNC_EXIT__; //LCOV_EXCL_LINE
@@ -546,7 +468,7 @@ EXPORT_API int wifi_manager_scan_specific_ap(wifi_manager_h wifi,
 
        rv = _wifi_scan_specific_ap(wifi, essid, callback, user_data);
        if (rv != WIFI_MANAGER_ERROR_NONE)
-               WIFI_LOG(WIFI_ERROR, "Wi-Fi hidden scan failed.\n"); //LCOV_EXCL_LINE
+               WIFI_LOG(WIFI_ERROR, "Wi-Fi hidden scan failed."); //LCOV_EXCL_LINE
 
        __NETWORK_CAPI_FUNC_EXIT__;
        return rv;
@@ -559,6 +481,8 @@ EXPORT_API int wifi_manager_connect_hidden_ap(wifi_manager_h wifi,
 {
        __NETWORK_CAPI_FUNC_ENTER__;
 
+       int rv;
+
        CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
 
        RET_ERR_IF_HANDLE_IS_NOT_VALID_OR_NOT_INITIALIZED(wifi, __NETWORK_CAPI_FUNC_EXIT__);
@@ -575,9 +499,10 @@ EXPORT_API int wifi_manager_connect_hidden_ap(wifi_manager_h wifi,
                return WIFI_MANAGER_ERROR_INVALID_PARAMETER; //LCOV_EXCL_LINE
        }
 
+       rv = _wifi_get_hidden_aps(wifi, essid, sec_type, passphrase, callback, user_data);
+
        __NETWORK_CAPI_FUNC_EXIT__;
-       return _wifi_get_hidden_aps(wifi, essid, sec_type, passphrase, callback,
-                                                                          user_data);
+       return rv;
 }
 
 EXPORT_API int wifi_manager_get_connected_ap(wifi_manager_h wifi, wifi_manager_ap_h *ap)
@@ -596,18 +521,43 @@ EXPORT_API int wifi_manager_get_connected_ap(wifi_manager_h wifi, wifi_manager_a
                return WIFI_MANAGER_ERROR_INVALID_PARAMETER; //LCOV_EXCL_LINE
        }
 
-       rv = _wifi_get_connected_profile(ap);
+       rv = _wifi_get_connected_profile(wifi, ap);
        WIFI_LOG(WIFI_INFO, "Connected AP %p, rv %d", *ap, rv);
 
        __NETWORK_CAPI_FUNC_EXIT__;
        return rv;
 }
 
+EXPORT_API int wifi_manager_foreach_available_interface(wifi_manager_h wifi,
+               wifi_manager_interface_cb callback, void *user_data)
+{
+       __NETWORK_CAPI_FUNC_ENTER__;
+
+       int rv;
+
+       CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
+
+       RET_ERR_IF_HANDLE_IS_NOT_VALID_OR_NOT_INITIALIZED(wifi, __NETWORK_CAPI_FUNC_EXIT__);
+
+       if (callback == NULL) {
+               WIFI_LOG(WIFI_ERROR, "Invalid parameter"); //LCOV_EXCL_LINE
+               __NETWORK_CAPI_FUNC_EXIT__; //LCOV_EXCL_LINE
+               return WIFI_MANAGER_ERROR_INVALID_PARAMETER; //LCOV_EXCL_LINE
+       }
+
+       rv = _wifi_foreach_available_interface(wifi, callback, user_data);
+
+       __NETWORK_CAPI_FUNC_EXIT__;
+       return rv;
+}
+
 EXPORT_API int wifi_manager_foreach_found_ap(wifi_manager_h wifi,
                wifi_manager_found_ap_cb callback, void *user_data)
 {
        __NETWORK_CAPI_FUNC_ENTER__;
 
+       int rv;
+
        CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
 
        RET_ERR_IF_HANDLE_IS_NOT_VALID_OR_NOT_INITIALIZED(wifi, __NETWORK_CAPI_FUNC_EXIT__);
@@ -618,8 +568,33 @@ EXPORT_API int wifi_manager_foreach_found_ap(wifi_manager_h wifi,
                return WIFI_MANAGER_ERROR_INVALID_PARAMETER; //LCOV_EXCL_LINE
        }
 
+       rv = _wifi_foreach_found_ap(wifi, callback, user_data);
+
        __NETWORK_CAPI_FUNC_EXIT__;
-       return _wifi_foreach_found_ap(callback, user_data);
+       return rv;
+}
+
+EXPORT_API int wifi_manager_foreach_found_ap_in_all_interfaces(wifi_manager_h wifi,
+               wifi_manager_found_ap_cb callback, void *user_data)
+{
+       __NETWORK_CAPI_FUNC_ENTER__;
+
+       int rv;
+
+       CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
+
+       RET_ERR_IF_HANDLE_IS_NOT_VALID_OR_NOT_INITIALIZED(wifi, __NETWORK_CAPI_FUNC_EXIT__);
+
+       if (callback == NULL) {
+               WIFI_LOG(WIFI_ERROR, "Invalid parameter"); //LCOV_EXCL_LINE
+               __NETWORK_CAPI_FUNC_EXIT__; //LCOV_EXCL_LINE
+               return WIFI_MANAGER_ERROR_INVALID_PARAMETER; //LCOV_EXCL_LINE
+       }
+
+       rv = _wifi_foreach_found_ap_in_all_interfaces(wifi, callback, user_data);
+
+       __NETWORK_CAPI_FUNC_EXIT__;
+       return rv;
 }
 
 EXPORT_API int wifi_manager_foreach_found_specific_ap(wifi_manager_h wifi,
@@ -627,6 +602,8 @@ EXPORT_API int wifi_manager_foreach_found_specific_ap(wifi_manager_h wifi,
 {
        __NETWORK_CAPI_FUNC_ENTER__;
 
+       int rv;
+
        CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
 
        RET_ERR_IF_HANDLE_IS_NOT_VALID_OR_NOT_INITIALIZED(wifi, __NETWORK_CAPI_FUNC_EXIT__);
@@ -637,8 +614,10 @@ EXPORT_API int wifi_manager_foreach_found_specific_ap(wifi_manager_h wifi,
                return WIFI_MANAGER_ERROR_INVALID_PARAMETER; //LCOV_EXCL_LINE
        }
 
+       rv = _wifi_foreach_found_specific_ap(wifi, callback, user_data);
+
        __NETWORK_CAPI_FUNC_EXIT__;
-       return _wifi_foreach_found_specific_ap(callback, user_data);
+       return rv;
 }
 
 EXPORT_API int wifi_manager_foreach_found_bssid_ap(wifi_manager_h wifi,
@@ -658,15 +637,17 @@ EXPORT_API int wifi_manager_foreach_found_bssid_ap(wifi_manager_h wifi,
                return WIFI_MANAGER_ERROR_INVALID_PARAMETER; //LCOV_EXCL_LINE
        }
 
-       rv = _wifi_check_get_privilege();
+       rv = _wifi_check_get_privilege(wifi);
        if (rv != WIFI_MANAGER_ERROR_NONE) {
                WIFI_LOG(WIFI_ERROR, "Fail to check the privilege"); //LCOV_EXCL_LINE
                __NETWORK_CAPI_FUNC_EXIT__; //LCOV_EXCL_LINE
                return rv; //LCOV_EXCL_LINE
        }
 
+       rv = _wifi_foreach_found_bssid_ap(wifi, callback, user_data);
+
        __NETWORK_CAPI_FUNC_EXIT__;
-       return _wifi_foreach_found_bssid_ap(callback, user_data);
+       return rv;
 }
 
 EXPORT_API int wifi_manager_foreach_found_netlink_scan_ap(wifi_manager_h wifi,
@@ -674,6 +655,8 @@ EXPORT_API int wifi_manager_foreach_found_netlink_scan_ap(wifi_manager_h wifi,
 {
        __NETWORK_CAPI_FUNC_ENTER__;
 
+       int rv;
+
        CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
 
        RET_ERR_IF_HANDLE_IS_NOT_VALID_OR_NOT_INITIALIZED(wifi, __NETWORK_CAPI_FUNC_EXIT__);
@@ -684,8 +667,10 @@ EXPORT_API int wifi_manager_foreach_found_netlink_scan_ap(wifi_manager_h wifi,
                return WIFI_MANAGER_ERROR_INVALID_PARAMETER; //LCOV_EXCL_LINE
        }
 
+       rv = _wifi_foreach_found_netlink_scan_ap(wifi, callback, user_data);
+
        __NETWORK_CAPI_FUNC_EXIT__;
-       return _wifi_foreach_found_netlink_scan_ap(callback, user_data);
+       return rv;
 }
 
 EXPORT_API int wifi_manager_connect(wifi_manager_h wifi,
@@ -693,6 +678,8 @@ EXPORT_API int wifi_manager_connect(wifi_manager_h wifi,
 {
        __NETWORK_CAPI_FUNC_ENTER__;
 
+       int rv;
+
        CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
 
        RET_ERR_IF_HANDLE_IS_NOT_VALID_OR_NOT_INITIALIZED(wifi, __NETWORK_CAPI_FUNC_EXIT__);
@@ -709,8 +696,10 @@ EXPORT_API int wifi_manager_connect(wifi_manager_h wifi,
                return WIFI_MANAGER_ERROR_INVALID_PARAMETER; //LCOV_EXCL_LINE
        }
 
+       rv = _wifi_open_profile(wifi, ap, callback, user_data);
+
        __NETWORK_CAPI_FUNC_EXIT__;
-       return _wifi_open_profile(wifi, ap, callback, user_data);
+       return rv;
 }
 
 EXPORT_API int wifi_manager_disconnect(wifi_manager_h wifi,
@@ -718,6 +707,8 @@ EXPORT_API int wifi_manager_disconnect(wifi_manager_h wifi,
 {
        __NETWORK_CAPI_FUNC_ENTER__;
 
+       int rv;
+
        CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
 
        RET_ERR_IF_HANDLE_IS_NOT_VALID_OR_NOT_INITIALIZED(wifi, __NETWORK_CAPI_FUNC_EXIT__);
@@ -734,8 +725,10 @@ EXPORT_API int wifi_manager_disconnect(wifi_manager_h wifi,
                return WIFI_MANAGER_ERROR_INVALID_PARAMETER; //LCOV_EXCL_LINE
        }
 
+       rv = _wifi_close_profile(wifi, ap, callback, user_data);
+
        __NETWORK_CAPI_FUNC_EXIT__;
-       return _wifi_close_profile(wifi, ap, callback, user_data);
+       return rv;
 }
 
 //LCOV_EXCL_START
@@ -744,6 +737,8 @@ EXPORT_API int wifi_manager_connect_by_wps_pbc(wifi_manager_h wifi,
 {
        __NETWORK_CAPI_FUNC_ENTER__;
 
+       int rv;
+
        CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
 
        RET_ERR_IF_HANDLE_IS_NOT_VALID_OR_NOT_INITIALIZED(wifi, __NETWORK_CAPI_FUNC_EXIT__);
@@ -760,8 +755,10 @@ EXPORT_API int wifi_manager_connect_by_wps_pbc(wifi_manager_h wifi,
                return WIFI_MANAGER_ERROR_INVALID_PARAMETER; //LCOV_EXCL_LINE
        }
 
+       rv = _wifi_connect_with_wps_pbc(wifi, ap, callback, user_data);
+
        __NETWORK_CAPI_FUNC_EXIT__;
-       return _wifi_connect_with_wps_pbc(wifi, ap, callback, user_data);
+       return rv;
 }
 
 EXPORT_API int wifi_manager_connect_by_wps_pin(wifi_manager_h wifi,
@@ -769,6 +766,8 @@ EXPORT_API int wifi_manager_connect_by_wps_pin(wifi_manager_h wifi,
 {
        __NETWORK_CAPI_FUNC_ENTER__;
 
+       int rv;
+
        CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
 
        RET_ERR_IF_HANDLE_IS_NOT_VALID_OR_NOT_INITIALIZED(wifi, __NETWORK_CAPI_FUNC_EXIT__);
@@ -791,8 +790,10 @@ EXPORT_API int wifi_manager_connect_by_wps_pin(wifi_manager_h wifi,
                return WIFI_MANAGER_ERROR_INVALID_PARAMETER; //LCOV_EXCL_LINE
        }
 
+       rv = _wifi_connect_with_wps_pin(wifi, ap, pin, callback, user_data);
+
        __NETWORK_CAPI_FUNC_EXIT__;
-       return _wifi_connect_with_wps_pin(wifi, ap, pin, callback, user_data);
+       return rv;
 }
 //LCOV_EXCL_STOP
 
@@ -800,6 +801,8 @@ EXPORT_API int wifi_manager_forget_ap(wifi_manager_h wifi, wifi_manager_ap_h ap)
 {
        __NETWORK_CAPI_FUNC_ENTER__;
 
+       int rv;
+
        CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
 
        RET_ERR_IF_HANDLE_IS_NOT_VALID_OR_NOT_INITIALIZED(wifi, __NETWORK_CAPI_FUNC_EXIT__);
@@ -810,8 +813,10 @@ EXPORT_API int wifi_manager_forget_ap(wifi_manager_h wifi, wifi_manager_ap_h ap)
                return WIFI_MANAGER_ERROR_INVALID_PARAMETER; //LCOV_EXCL_LINE
        }
 
+       rv = _wifi_forget_ap(wifi, ap);
+
        __NETWORK_CAPI_FUNC_EXIT__;
-       return _wifi_forget_ap(ap);
+       return rv;
 }
 
 EXPORT_API int wifi_manager_forget_ap_async(wifi_manager_h wifi, wifi_manager_ap_h ap,
@@ -821,6 +826,8 @@ EXPORT_API int wifi_manager_forget_ap_async(wifi_manager_h wifi, wifi_manager_ap
 {
        __NETWORK_CAPI_FUNC_ENTER__;
 
+       int rv;
+
        CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
 
        RET_ERR_IF_HANDLE_IS_NOT_VALID_OR_NOT_INITIALIZED(wifi, __NETWORK_CAPI_FUNC_EXIT__);
@@ -831,14 +838,18 @@ EXPORT_API int wifi_manager_forget_ap_async(wifi_manager_h wifi, wifi_manager_ap
                return WIFI_MANAGER_ERROR_INVALID_PARAMETER; //LCOV_EXCL_LINE
        }
 
+       rv = _wifi_forget_ap_async(wifi, ap, callback, user_data);
+
        __NETWORK_CAPI_FUNC_EXIT__;
-       return _wifi_forget_ap_async(wifi, ap, callback, user_data);
+       return rv;
 }
 
 EXPORT_API int wifi_manager_update_ap(wifi_manager_h wifi, wifi_manager_ap_h ap)
 {
        __NETWORK_CAPI_FUNC_ENTER__;
 
+       int rv;
+
        CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
 
        RET_ERR_IF_HANDLE_IS_NOT_VALID_OR_NOT_INITIALIZED(wifi, __NETWORK_CAPI_FUNC_EXIT__);
@@ -856,8 +867,10 @@ EXPORT_API int wifi_manager_update_ap(wifi_manager_h wifi, wifi_manager_ap_h ap)
                return WIFI_MANAGER_ERROR_NONE;
        }
 
+       rv = _wifi_update_ap_info(wifi, profile_info);
+
        __NETWORK_CAPI_FUNC_EXIT__;
-       return _wifi_update_ap_info(profile_info);
+       return rv;
 }
 
 EXPORT_API int wifi_manager_get_connection_state(wifi_manager_h wifi,
@@ -865,6 +878,8 @@ EXPORT_API int wifi_manager_get_connection_state(wifi_manager_h wifi,
 {
        __NETWORK_CAPI_FUNC_ENTER__;
 
+       int rv;
+
        CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
 
        RET_ERR_IF_HANDLE_IS_NOT_VALID_OR_NOT_INITIALIZED(wifi, __NETWORK_CAPI_FUNC_EXIT__);
@@ -875,8 +890,10 @@ EXPORT_API int wifi_manager_get_connection_state(wifi_manager_h wifi,
                return WIFI_MANAGER_ERROR_INVALID_PARAMETER; //LCOV_EXCL_LINE
        }
 
+       rv = _wifi_get_wifi_state(wifi, connection_state);
+
        __NETWORK_CAPI_FUNC_EXIT__; //LCOV_EXCL_LINE
-       return _wifi_get_wifi_state(connection_state);
+       return rv;
 }
 
 EXPORT_API int wifi_manager_set_device_state_changed_cb(wifi_manager_h wifi,
@@ -894,8 +911,10 @@ EXPORT_API int wifi_manager_set_device_state_changed_cb(wifi_manager_h wifi,
                return WIFI_MANAGER_ERROR_INVALID_PARAMETER; //LCOV_EXCL_LINE
        }
 
+       __wifi_set_device_state_changed_cb(wifi, callback, user_data);
+
        __NETWORK_CAPI_FUNC_EXIT__;
-       return __wifi_set_device_state_changed_cb(wifi, callback, user_data);
+       return WIFI_MANAGER_ERROR_NONE;
 }
 
 EXPORT_API int wifi_manager_unset_device_state_changed_cb(wifi_manager_h wifi)
@@ -906,8 +925,10 @@ EXPORT_API int wifi_manager_unset_device_state_changed_cb(wifi_manager_h wifi)
 
        RET_ERR_IF_HANDLE_IS_NOT_VALID_OR_NOT_INITIALIZED(wifi, __NETWORK_CAPI_FUNC_EXIT__);
 
+       __wifi_set_device_state_changed_cb(wifi, NULL, NULL);
+
        __NETWORK_CAPI_FUNC_EXIT__;
-       return __wifi_set_device_state_changed_cb(wifi, NULL, NULL);
+       return WIFI_MANAGER_ERROR_NONE;
 }
 
 EXPORT_API int wifi_manager_set_background_scan_cb(wifi_manager_h wifi,
@@ -925,8 +946,10 @@ EXPORT_API int wifi_manager_set_background_scan_cb(wifi_manager_h wifi,
                return WIFI_MANAGER_ERROR_INVALID_PARAMETER; //LCOV_EXCL_LINE
        }
 
+       __wifi_set_background_scan_cb(wifi, callback, user_data);
+
        __NETWORK_CAPI_FUNC_EXIT__;
-       return __wifi_set_background_scan_cb(wifi, callback, user_data);
+       return WIFI_MANAGER_ERROR_NONE;
 }
 
 EXPORT_API int wifi_manager_unset_background_scan_cb(wifi_manager_h wifi)
@@ -937,8 +960,10 @@ EXPORT_API int wifi_manager_unset_background_scan_cb(wifi_manager_h wifi)
 
        RET_ERR_IF_HANDLE_IS_NOT_VALID_OR_NOT_INITIALIZED(wifi, __NETWORK_CAPI_FUNC_EXIT__);
 
+       __wifi_set_background_scan_cb(wifi, NULL, NULL);
+
        __NETWORK_CAPI_FUNC_EXIT__;
-       return __wifi_set_background_scan_cb(wifi, NULL, NULL);
+       return WIFI_MANAGER_ERROR_NONE;
 }
 
 EXPORT_API int wifi_manager_set_scan_state_changed_cb(wifi_manager_h wifi,
@@ -956,8 +981,10 @@ EXPORT_API int wifi_manager_set_scan_state_changed_cb(wifi_manager_h wifi,
                return WIFI_MANAGER_ERROR_INVALID_PARAMETER; //LCOV_EXCL_LINE
        }
 
+       __wifi_set_scan_state_changed_cb(wifi, callback, user_data);
+
        __NETWORK_CAPI_FUNC_EXIT__;
-       return __wifi_set_scan_state_changed_cb(wifi, callback, user_data);
+       return WIFI_MANAGER_ERROR_NONE;
 }
 
 EXPORT_API int wifi_manager_unset_scan_state_changed_cb(wifi_manager_h wifi)
@@ -968,8 +995,10 @@ EXPORT_API int wifi_manager_unset_scan_state_changed_cb(wifi_manager_h wifi)
 
        RET_ERR_IF_HANDLE_IS_NOT_VALID_OR_NOT_INITIALIZED(wifi, __NETWORK_CAPI_FUNC_EXIT__);
 
+       __wifi_set_scan_state_changed_cb(wifi, NULL, NULL);
+
        __NETWORK_CAPI_FUNC_EXIT__;
-       return __wifi_set_scan_state_changed_cb(wifi, NULL, NULL);
+       return WIFI_MANAGER_ERROR_NONE;
 }
 
 EXPORT_API int wifi_manager_set_connection_state_changed_cb(wifi_manager_h wifi,
@@ -987,8 +1016,10 @@ EXPORT_API int wifi_manager_set_connection_state_changed_cb(wifi_manager_h wifi,
                return WIFI_MANAGER_ERROR_INVALID_PARAMETER; //LCOV_EXCL_LINE
        }
 
+       __wifi_set_connection_state_changed_cb(wifi, callback, user_data);
+
        __NETWORK_CAPI_FUNC_EXIT__;
-       return __wifi_set_connection_state_changed_cb(wifi, callback, user_data);
+       return WIFI_MANAGER_ERROR_NONE;
 }
 
 EXPORT_API int wifi_manager_unset_connection_state_changed_cb(wifi_manager_h wifi)
@@ -999,13 +1030,17 @@ EXPORT_API int wifi_manager_unset_connection_state_changed_cb(wifi_manager_h wif
 
        RET_ERR_IF_HANDLE_IS_NOT_VALID_OR_NOT_INITIALIZED(wifi, __NETWORK_CAPI_FUNC_EXIT__);
 
+       __wifi_set_connection_state_changed_cb(wifi, NULL, NULL);
+
        __NETWORK_CAPI_FUNC_EXIT__;
-       return __wifi_set_connection_state_changed_cb(wifi, NULL, NULL);
+       return WIFI_MANAGER_ERROR_NONE;
 }
 
 EXPORT_API int wifi_manager_set_ip_conflict_cb(wifi_manager_h wifi,
                wifi_manager_ip_conflict_cb callback, void *user_data)
 {
+       __NETWORK_CAPI_FUNC_ENTER__;
+
        CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
 
        RET_ERR_IF_HANDLE_IS_NOT_VALID_OR_NOT_INITIALIZED(wifi, __NETWORK_CAPI_FUNC_EXIT__);
@@ -1015,34 +1050,50 @@ EXPORT_API int wifi_manager_set_ip_conflict_cb(wifi_manager_h wifi,
                return WIFI_MANAGER_ERROR_INVALID_PARAMETER; //LCOV_EXCL_LINE
        }
 
-       return __wifi_set_ip_conflict_cb(wifi, callback, user_data);
+       __wifi_set_ip_conflict_cb(wifi, callback, user_data);
+
+       __NETWORK_CAPI_FUNC_EXIT__;
+       return WIFI_MANAGER_ERROR_NONE;
 }
 
 EXPORT_API int wifi_manager_unset_ip_conflict_cb(wifi_manager_h wifi)
 {
+       __NETWORK_CAPI_FUNC_ENTER__;
+
        CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
 
        RET_ERR_IF_HANDLE_IS_NOT_VALID_OR_NOT_INITIALIZED(wifi, __NETWORK_CAPI_FUNC_EXIT__);
-       return __wifi_set_ip_conflict_cb(wifi, NULL, NULL);
+
+       __wifi_set_ip_conflict_cb(wifi, NULL, NULL);
+
+       __NETWORK_CAPI_FUNC_EXIT__;
+       return WIFI_MANAGER_ERROR_NONE;
 }
 
 EXPORT_API int wifi_manager_set_ip_conflict_detect_enable(wifi_manager_h wifi,
                bool detect)
 {
+       __NETWORK_CAPI_FUNC_ENTER__;
+
        int rv;
 
        CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
 
        RET_ERR_IF_HANDLE_IS_NOT_VALID_OR_NOT_INITIALIZED(wifi, __NETWORK_CAPI_FUNC_EXIT__);
-       rv = _wifi_ip_conflict_detect_enable_set(detect);
+       rv = _wifi_ip_conflict_detect_enable_set(wifi, detect);
        if (rv != WIFI_MANAGER_ERROR_NONE)
                WIFI_LOG(WIFI_ERROR, "Failed to change ip conflict detect mode"); //LCOV_EXCL_LINE
 
+       __NETWORK_CAPI_FUNC_EXIT__;
        return rv;
 }
 
 EXPORT_API int wifi_manager_ip_conflict_detect_is_enabled(wifi_manager_h wifi, bool *state)
 {
+       __NETWORK_CAPI_FUNC_ENTER__;
+
+       int rv;
+
        CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
 
        RET_ERR_IF_HANDLE_IS_NOT_VALID_OR_NOT_INITIALIZED(wifi, __NETWORK_CAPI_FUNC_EXIT__);
@@ -1052,23 +1103,38 @@ EXPORT_API int wifi_manager_ip_conflict_detect_is_enabled(wifi_manager_h wifi, b
                return WIFI_MANAGER_ERROR_INVALID_PARAMETER; //LCOV_EXCL_LINE
        }
 
-       return _wifi_ip_conflict_detect_is_enabled(state);
+       rv = _wifi_ip_conflict_detect_is_enabled(wifi, state);
+
+       __NETWORK_CAPI_FUNC_EXIT__;
+       return rv;
 }
 
 //LCOV_EXCL_START
 EXPORT_API int wifi_manager_set_ip_conflict_period(wifi_manager_h wifi,
                unsigned int initial_time)
 {
+       __NETWORK_CAPI_FUNC_ENTER__;
+
+       int rv;
+
        CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
 
        RET_ERR_IF_HANDLE_IS_NOT_VALID_OR_NOT_INITIALIZED(wifi, __NETWORK_CAPI_FUNC_EXIT__);
-       return _wifi_set_ip_conflict_period(initial_time);
+
+       rv = _wifi_set_ip_conflict_period(wifi, initial_time);
+
+       __NETWORK_CAPI_FUNC_EXIT__;
+       return rv;
 }
 
 EXPORT_API int wifi_manager_get_ip_conflict_period(wifi_manager_h wifi,
                unsigned int *initial_time)
 
 {
+       __NETWORK_CAPI_FUNC_ENTER__;
+
+       int rv;
+
        CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
        RET_ERR_IF_HANDLE_IS_NOT_VALID_OR_NOT_INITIALIZED(wifi, __NETWORK_CAPI_FUNC_EXIT__);
 
@@ -1077,13 +1143,20 @@ EXPORT_API int wifi_manager_get_ip_conflict_period(wifi_manager_h wifi,
                return WIFI_MANAGER_ERROR_INVALID_PARAMETER;
        }
 
-       return _wifi_get_ip_conflict_period(initial_time);
+       rv = _wifi_get_ip_conflict_period(wifi, initial_time);
+
+       __NETWORK_CAPI_FUNC_EXIT__;
+       return rv;
 }
 //LCOV_EXCL_STOP
 
 EXPORT_API int wifi_manager_get_ip_conflict_state(wifi_manager_h wifi,
                wifi_manager_ip_conflict_state_e *state)
 {
+       __NETWORK_CAPI_FUNC_ENTER__;
+
+       int rv;
+
        CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
        RET_ERR_IF_HANDLE_IS_NOT_VALID_OR_NOT_INITIALIZED(wifi, __NETWORK_CAPI_FUNC_EXIT__);
 
@@ -1092,7 +1165,10 @@ EXPORT_API int wifi_manager_get_ip_conflict_state(wifi_manager_h wifi,
                return WIFI_MANAGER_ERROR_INVALID_PARAMETER; //LCOV_EXCL_LINE
        }
 
-       return _wifi_get_ip_conflict_state(state);
+       rv = _wifi_get_ip_conflict_state(wifi, state);
+
+       __NETWORK_CAPI_FUNC_EXIT__;
+       return rv;
 }
 
 EXPORT_API int wifi_manager_set_rssi_level_changed_cb(wifi_manager_h wifi,
@@ -1110,8 +1186,10 @@ EXPORT_API int wifi_manager_set_rssi_level_changed_cb(wifi_manager_h wifi,
                return WIFI_MANAGER_ERROR_INVALID_PARAMETER; //LCOV_EXCL_LINE
        }
 
+       __wifi_set_rssi_level_changed_cb(wifi, callback, user_data);
+
        __NETWORK_CAPI_FUNC_EXIT__;
-       return __wifi_set_rssi_level_changed_cb(wifi, callback, user_data);
+       return WIFI_MANAGER_ERROR_NONE;
 }
 
 EXPORT_API int wifi_manager_unset_rssi_level_changed_cb(wifi_manager_h wifi)
@@ -1122,8 +1200,10 @@ EXPORT_API int wifi_manager_unset_rssi_level_changed_cb(wifi_manager_h wifi)
 
        RET_ERR_IF_HANDLE_IS_NOT_VALID_OR_NOT_INITIALIZED(wifi, __NETWORK_CAPI_FUNC_EXIT__);
 
+       __wifi_set_rssi_level_changed_cb(wifi, NULL, NULL);
+
        __NETWORK_CAPI_FUNC_EXIT__;
-       return __wifi_set_rssi_level_changed_cb(wifi, NULL, NULL);
+       return WIFI_MANAGER_ERROR_NONE;
 }
 
 EXPORT_API int wifi_manager_connect_by_wps_pbc_without_ssid(wifi_manager_h wifi,
@@ -1131,20 +1211,24 @@ EXPORT_API int wifi_manager_connect_by_wps_pbc_without_ssid(wifi_manager_h wifi,
 {
        __NETWORK_CAPI_FUNC_ENTER__;
 
-       CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
+       int rv;
 
-       WIFI_LOG(WIFI_INFO, "[App-->TizenMW] WiFi Connect by WPS_PBC without SSID\n");
+       CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
 
        RET_ERR_IF_HANDLE_IS_NOT_VALID_OR_NOT_INITIALIZED(wifi, __NETWORK_CAPI_FUNC_EXIT__);
 
+       WIFI_LOG(WIFI_INFO, "[App-->TizenMW] WiFi Connect by WPS_PBC without SSID");
+
        if (callback == NULL) { //LCOV_EXCL_LINE
-               WIFI_LOG(WIFI_ERROR, "[App<--TizenMW] Wrong Parameter Passed\n"); //LCOV_EXCL_LINE
+               WIFI_LOG(WIFI_ERROR, "[App<--TizenMW] Wrong Parameter Passed"); //LCOV_EXCL_LINE
                __NETWORK_CAPI_FUNC_EXIT__; //LCOV_EXCL_LINE
                return WIFI_MANAGER_ERROR_INVALID_PARAMETER; //LCOV_EXCL_LINE
        }
 
+       rv = _wifi_connect_with_wps_pbc_without_ssid(wifi, callback, user_data);
+
        __NETWORK_CAPI_FUNC_EXIT__;
-       return _wifi_connect_with_wps_pbc_without_ssid(wifi, callback, user_data);
+       return rv;
 }
 
 EXPORT_API int wifi_manager_connect_by_wps_pin_without_ssid(wifi_manager_h wifi, const char *pin,
@@ -1152,44 +1236,49 @@ EXPORT_API int wifi_manager_connect_by_wps_pin_without_ssid(wifi_manager_h wifi,
 {
        __NETWORK_CAPI_FUNC_ENTER__;
 
-       CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
+       int rv;
 
-       WIFI_LOG(WIFI_INFO, "[App-->TizenMW] WiFi Connect by WPS_PIN without SSID\n");
+       CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
 
        RET_ERR_IF_HANDLE_IS_NOT_VALID_OR_NOT_INITIALIZED(wifi, __NETWORK_CAPI_FUNC_EXIT__);
 
+       WIFI_LOG(WIFI_INFO, "[App-->TizenMW] WiFi Connect by WPS_PIN without SSID");
+
        if (callback == NULL) { //LCOV_EXCL_LINE
-               WIFI_LOG(WIFI_ERROR, "[App<--TizenMW] Wrong Parameter Passed\n"); //LCOV_EXCL_LINE
+               WIFI_LOG(WIFI_ERROR, "[App<--TizenMW] Wrong Parameter Passed"); //LCOV_EXCL_LINE
                __NETWORK_CAPI_FUNC_EXIT__; //LCOV_EXCL_LINE
                return WIFI_MANAGER_ERROR_INVALID_PARAMETER; //LCOV_EXCL_LINE
        }
 
        if ((NULL == pin) || ((strlen(pin) != 4) &&
                                (strlen(pin) != NET_WLAN_MAX_WPSPIN_LEN))) {
-               WIFI_LOG(WIFI_ERROR, "[App<--TizenMW] Wrong Parameter Passed\n"); //LCOV_EXCL_LINE
+               WIFI_LOG(WIFI_ERROR, "[App<--TizenMW] Wrong Parameter Passed"); //LCOV_EXCL_LINE
                __NETWORK_CAPI_FUNC_EXIT__; //LCOV_EXCL_LINE
                return WIFI_MANAGER_ERROR_INVALID_PARAMETER; //LCOV_EXCL_LINE
        }
 
+       rv = _wifi_connect_with_wps_pin_without_ssid(wifi, pin, callback, user_data);
+
        __NETWORK_CAPI_FUNC_EXIT__;
-       return _wifi_connect_with_wps_pin_without_ssid(wifi, pin, callback, user_data);
+       return rv;
 }
 
 EXPORT_API int wifi_manager_cancel_wps(wifi_manager_h wifi)
 {
        __NETWORK_CAPI_FUNC_ENTER__;
 
-       CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
-       WIFI_LOG(WIFI_INFO, "[App-->TizenMW] cancel wps request\n");
-
        int rv;
 
+       CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
+
        RET_ERR_IF_HANDLE_IS_NOT_VALID_OR_NOT_INITIALIZED(wifi, __NETWORK_CAPI_FUNC_EXIT__);
 
-       rv = _wifi_cancel_wps();
+       WIFI_LOG(WIFI_INFO, "[App-->TizenMW] cancel wps request");
+
+       rv = _wifi_cancel_wps(wifi);
 
        if (rv != WIFI_MANAGER_ERROR_NONE)
-               WIFI_LOG(WIFI_ERROR, "[App<--TizenMW] Error!! WPS Cancel Request failed. rv[%d]\n", rv); //LCOV_EXCL_LINE
+               WIFI_LOG(WIFI_ERROR, "[App<--TizenMW] Error!! WPS Cancel Request failed. rv[%d]", rv); //LCOV_EXCL_LINE
 
        __NETWORK_CAPI_FUNC_EXIT__;
        return rv;
@@ -1197,11 +1286,15 @@ EXPORT_API int wifi_manager_cancel_wps(wifi_manager_h wifi)
 
 EXPORT_API int wifi_manager_get_wps_generated_pin(wifi_manager_h wifi, char **wps_pin)
 {
-       CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
+       __NETWORK_CAPI_FUNC_ENTER__;
+
        int rv;
 
+       CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
+
        RET_ERR_IF_HANDLE_IS_NOT_VALID_OR_NOT_INITIALIZED(wifi, __NETWORK_CAPI_FUNC_EXIT__);
-       rv = _wifi_get_wps_generated_pin(wps_pin);
+
+       rv = _wifi_get_wps_generated_pin(wifi, wps_pin);
        if (rv == NET_ERR_ACCESS_DENIED) {
                WIFI_LOG(WIFI_ERROR, "Access denied"); //LCOV_EXCL_LINE
                __NETWORK_CAPI_FUNC_EXIT__; //LCOV_EXCL_LINE
@@ -1212,6 +1305,7 @@ EXPORT_API int wifi_manager_get_wps_generated_pin(wifi_manager_h wifi, char **wp
                return WIFI_MANAGER_ERROR_OPERATION_FAILED; //LCOV_EXCL_LINE
        }
 
+       __NETWORK_CAPI_FUNC_EXIT__;
        return rv;
 }
 
@@ -1225,17 +1319,18 @@ EXPORT_API int wifi_manager_set_autoscan(wifi_manager_h wifi, bool autoscan)
        RET_ERR_IF_HANDLE_IS_NOT_VALID_OR_NOT_INITIALIZED(wifi, __NETWORK_CAPI_FUNC_EXIT__);
 
        __NETWORK_CAPI_FUNC_EXIT__;
-       return _wifi_set_autoscan(autoscan);
+       return _wifi_set_autoscan(wifi, autoscan);
 }
 
-EXPORT_API int wifi_manager_set_autoscan_mode(wifi_manager_h wifi, wifi_manager_autoscan_mode_e mode)
+EXPORT_API int wifi_manager_set_autoscan_mode(wifi_manager_h wifi,
+               wifi_manager_autoscan_mode_e mode)
 {
+       int rv;
+
        __NETWORK_CAPI_FUNC_ENTER__;
 
        CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
 
-       int rv;
-
        RET_ERR_IF_HANDLE_IS_NOT_VALID_OR_NOT_INITIALIZED(wifi, __NETWORK_CAPI_FUNC_EXIT__);
 
 
@@ -1245,7 +1340,7 @@ EXPORT_API int wifi_manager_set_autoscan_mode(wifi_manager_h wifi, wifi_manager_
                return WIFI_MANAGER_ERROR_INVALID_PARAMETER; //LCOV_EXCL_LINE
        }
 
-       rv = _wifi_set_background_scan_mode(mode);
+       rv = _wifi_set_background_scan_mode(wifi, mode);
        if (rv != WIFI_MANAGER_ERROR_NONE)
                WIFI_LOG(WIFI_ERROR, "Set background scan mode failed");
 
@@ -1256,6 +1351,8 @@ EXPORT_API int wifi_manager_set_autoscan_mode(wifi_manager_h wifi, wifi_manager_
 EXPORT_API int wifi_manager_get_autoscan(wifi_manager_h wifi,
                bool *autoscan)
 {
+       int rv;
+
        __NETWORK_CAPI_FUNC_ENTER__;
 
        CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
@@ -1268,13 +1365,17 @@ EXPORT_API int wifi_manager_get_autoscan(wifi_manager_h wifi,
                return WIFI_MANAGER_ERROR_INVALID_PARAMETER; //LCOV_EXCL_LINE
        }
 
+       rv = _wifi_get_autoscan(wifi, autoscan);
+
        __NETWORK_CAPI_FUNC_EXIT__;
-       return _wifi_get_autoscan(autoscan);
+       return rv;
 }
 
 EXPORT_API int wifi_manager_get_autoscan_mode(wifi_manager_h wifi,
                wifi_manager_autoscan_mode_e *mode)
 {
+       int rv;
+
        __NETWORK_CAPI_FUNC_ENTER__;
 
        CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
@@ -1287,8 +1388,10 @@ EXPORT_API int wifi_manager_get_autoscan_mode(wifi_manager_h wifi,
                return WIFI_MANAGER_ERROR_INVALID_PARAMETER; //LCOV_EXCL_LINE
        }
 
+       rv = _wifi_get_autoscanmode(wifi, mode);
+
        __NETWORK_CAPI_FUNC_EXIT__;
-       return _wifi_get_autoscanmode(mode);
+       return rv;
 }
 
 EXPORT_API int wifi_manager_set_passpoint(wifi_manager_h wifi, int passpoint)
@@ -1301,7 +1404,7 @@ EXPORT_API int wifi_manager_set_passpoint(wifi_manager_h wifi, int passpoint)
 
        RET_ERR_IF_HANDLE_IS_NOT_VALID_OR_NOT_INITIALIZED(wifi, __NETWORK_CAPI_FUNC_EXIT__);
 
-       rv = _wifi_set_passpoint(passpoint);
+       rv = _wifi_set_passpoint(wifi, passpoint);
 
        __NETWORK_CAPI_FUNC_EXIT__;
        return rv;
@@ -1323,7 +1426,7 @@ EXPORT_API int wifi_manager_get_passpoint(wifi_manager_h wifi, int *passpoint)
                return WIFI_MANAGER_ERROR_INVALID_PARAMETER;
        }
 
-       rv = _wifi_get_passpoint(passpoint);
+       rv = _wifi_get_passpoint(wifi, passpoint);
 
        __NETWORK_CAPI_FUNC_EXIT__;
        return rv;
@@ -1345,8 +1448,10 @@ EXPORT_API int wifi_manager_set_module_state_changed_cb(wifi_manager_h wifi,
                return WIFI_MANAGER_ERROR_INVALID_PARAMETER; //LCOV_EXCL_LINE
        }
 
+       __wifi_set_module_state_changed_cb(wifi, callback, user_data);
+
        __NETWORK_CAPI_FUNC_EXIT__;
-       return __wifi_set_module_state_changed_cb(wifi, callback, user_data);
+       return WIFI_MANAGER_ERROR_NONE;
 
 }
 
@@ -1358,8 +1463,10 @@ EXPORT_API int wifi_manager_unset_module_state_changed_cb(wifi_manager_h wifi)
 
        RET_ERR_IF_HANDLE_IS_NOT_VALID_OR_NOT_INITIALIZED(wifi, __NETWORK_CAPI_FUNC_EXIT__);
 
+       __wifi_set_module_state_changed_cb(wifi, NULL, NULL);
+
        __NETWORK_CAPI_FUNC_EXIT__;
-       return __wifi_set_module_state_changed_cb(wifi, NULL, NULL);
+       return WIFI_MANAGER_ERROR_NONE;
 }
 
 EXPORT_API int wifi_manager_get_module_state(wifi_manager_h wifi,
@@ -1367,6 +1474,8 @@ EXPORT_API int wifi_manager_get_module_state(wifi_manager_h wifi,
 {
        __NETWORK_CAPI_FUNC_ENTER__;
 
+       int rv;
+
        CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
 
        RET_ERR_IF_HANDLE_IS_NOT_VALID_OR_NOT_INITIALIZED(wifi, __NETWORK_CAPI_FUNC_EXIT__);
@@ -1377,8 +1486,10 @@ EXPORT_API int wifi_manager_get_module_state(wifi_manager_h wifi,
                return WIFI_MANAGER_ERROR_INVALID_PARAMETER; //LCOV_EXCL_LINE
        }
 
+       rv = _wifi_get_module_state(wifi, state);
+
        __NETWORK_CAPI_FUNC_EXIT__;
-       return _wifi_get_module_state(state);
+       return rv;
 
 }
 
@@ -1402,8 +1513,9 @@ EXPORT_API int wifi_manager_bssid_scan(wifi_manager_h wifi,
 }
 
 //LCOV_EXCL_START
-EXPORT_API int wifi_manager_netlink_scan(wifi_manager_h wifi, wifi_manager_netlink_scan_h netlink_scan,
-                                wifi_manager_netlink_scan_finished_cb callback, void *user_data)
+EXPORT_API int wifi_manager_netlink_scan(wifi_manager_h wifi,
+               wifi_manager_netlink_scan_h netlink_scan,
+               wifi_manager_netlink_scan_finished_cb callback, void *user_data)
 {
        __NETWORK_CAPI_FUNC_ENTER__;
 
@@ -1500,10 +1612,9 @@ EXPORT_API int wifi_manager_flush_bss(wifi_manager_h wifi)
 
        RET_ERR_IF_HANDLE_IS_NOT_VALID_OR_NOT_INITIALIZED(wifi, __NETWORK_CAPI_FUNC_EXIT__);
 
-       rv = _wifi_flush_bss();
-
+       rv = _wifi_flush_bss(wifi);
        if (rv != WIFI_MANAGER_ERROR_NONE)
-               WIFI_LOG(WIFI_ERROR, "[App-->TizenMW] Error!! bss flush Request failed. rv[%d]\n", rv);
+               WIFI_LOG(WIFI_ERROR, "[App-->TizenMW] Error!! bss flush Request failed. rv[%d]", rv);
 
        __NETWORK_CAPI_FUNC_EXIT__;
        return rv;
@@ -1527,8 +1638,7 @@ EXPORT_API int wifi_manager_set_bssid(wifi_manager_h wifi, char *bssid)
 
        RET_ERR_IF_HANDLE_IS_NOT_VALID_OR_NOT_INITIALIZED(wifi, __NETWORK_CAPI_FUNC_EXIT__);
 
-       rv = _wifi_set_bssid(bssid);
-
+       rv = _wifi_set_bssid(wifi, bssid);
        if (rv != WIFI_MANAGER_ERROR_NONE) {
                WIFI_LOG(WIFI_ERROR, "Error!! wifi set bssid failed.[%d]", rv);
                __NETWORK_CAPI_FUNC_EXIT__;
@@ -1552,7 +1662,7 @@ EXPORT_API int wifi_manager_get_auto_connect(wifi_manager_h wifi, int *connect_m
 
        RET_ERR_IF_HANDLE_IS_NOT_VALID_OR_NOT_INITIALIZED(wifi, __NETWORK_CAPI_FUNC_EXIT__);
 
-       rv = _wifi_get_auto_connect(connect_mode);
+       rv = _wifi_get_auto_connect(wifi, connect_mode);
 
        __NETWORK_CAPI_FUNC_EXIT__;
        return rv;
@@ -1567,7 +1677,7 @@ EXPORT_API int wifi_manager_set_auto_connect(wifi_manager_h wifi, int connect_mo
 
        int rv;
 
-       rv = _wifi_set_auto_connect(connect_mode);
+       rv = _wifi_set_auto_connect(wifi, connect_mode);
 
        __NETWORK_CAPI_FUNC_EXIT__;
        return rv;
@@ -1734,9 +1844,10 @@ EXPORT_API int wifi_manager_specific_scan_get_max_ssids(wifi_manager_h wifi, int
 {
        __NETWORK_CAPI_FUNC_ENTER__;
 
-       CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
        int rv;
 
+       CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
+
        RET_ERR_IF_HANDLE_IS_NOT_VALID_OR_NOT_INITIALIZED(wifi, __NETWORK_CAPI_FUNC_EXIT__);
 
        if (max_scan_ssids == NULL) {
@@ -1745,7 +1856,7 @@ EXPORT_API int wifi_manager_specific_scan_get_max_ssids(wifi_manager_h wifi, int
                return WIFI_MANAGER_ERROR_INVALID_PARAMETER; //LCOV_EXCL_LINE
        }
 
-       rv = _wifi_get_max_scan_ssids(max_scan_ssids);
+       rv = _wifi_get_max_scan_ssids(wifi, max_scan_ssids);
 
        __NETWORK_CAPI_FUNC_EXIT__;
        return rv;
@@ -1756,6 +1867,8 @@ EXPORT_API int wifi_manager_specific_scan_set_ssid(wifi_manager_specific_scan_h
 {
        __NETWORK_CAPI_FUNC_ENTER__;
 
+       int rv;
+
        CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
 
        if (!(_wifi_check_multi_scan_validity(specific_scan)) ||
@@ -1765,8 +1878,10 @@ EXPORT_API int wifi_manager_specific_scan_set_ssid(wifi_manager_specific_scan_h
                return WIFI_MANAGER_ERROR_INVALID_PARAMETER; //LCOV_EXCL_LINE
        }
 
+       rv = _wifi_specific_scan_set_ssid(specific_scan, essid);
+
        __NETWORK_CAPI_FUNC_EXIT__;
-       return _wifi_specific_scan_set_ssid(specific_scan, essid);
+       return rv;
 }
 
 EXPORT_API int wifi_manager_specific_scan_set_freq(wifi_manager_specific_scan_h specific_scan,
@@ -1774,6 +1889,8 @@ EXPORT_API int wifi_manager_specific_scan_set_freq(wifi_manager_specific_scan_h
 {
        __NETWORK_CAPI_FUNC_ENTER__;
 
+       int rv;
+
        CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
 
        if (!_wifi_check_multi_scan_validity(specific_scan)) {
@@ -1782,8 +1899,10 @@ EXPORT_API int wifi_manager_specific_scan_set_freq(wifi_manager_specific_scan_h
                return WIFI_MANAGER_ERROR_INVALID_PARAMETER; //LCOV_EXCL_LINE
        }
 
+       rv = _wifi_specific_scan_set_freq(specific_scan, freq);
+
        __NETWORK_CAPI_FUNC_EXIT__;
-       return _wifi_specific_scan_set_freq(specific_scan, freq);
+       return rv;
 }
 
 EXPORT_API int wifi_manager_specific_ap_start_multi_scan(wifi_manager_h wifi,
@@ -1792,6 +1911,8 @@ EXPORT_API int wifi_manager_specific_ap_start_multi_scan(wifi_manager_h wifi,
 {
        __NETWORK_CAPI_FUNC_ENTER__;
 
+       int rv;
+
        CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
        WIFI_LOG(WIFI_ERROR, "specific scan handle %p", specific_scan);
 
@@ -1803,8 +1924,10 @@ EXPORT_API int wifi_manager_specific_ap_start_multi_scan(wifi_manager_h wifi,
                return WIFI_MANAGER_ERROR_INVALID_PARAMETER; //LCOV_EXCL_LINE
        }
 
+       rv = _wifi_start_multi_scan(wifi, specific_scan, callback, user_data);
+
        __NETWORK_CAPI_FUNC_EXIT__;
-       return _wifi_start_multi_scan(wifi, specific_scan, callback, user_data);
+       return rv;
 }
 
 EXPORT_API int wifi_manager_get_connection_mode(wifi_manager_h wifi,
@@ -1824,7 +1947,7 @@ EXPORT_API int wifi_manager_get_connection_mode(wifi_manager_h wifi,
                return WIFI_MANAGER_ERROR_INVALID_PARAMETER;
        }
 
-       rv = _wifi_get_connection_mode(mode);
+       rv = _wifi_get_connection_mode(wifi, mode);
        WIFI_LOG(WIFI_INFO, "Connection mode %d", *mode);
 
        __NETWORK_CAPI_FUNC_EXIT__;
index 74a415c..115544f 100755 (executable)
@@ -85,6 +85,8 @@ EXPORT_API int wifi_manager_tdls_start_discovery(wifi_manager_h wifi, const char
 {
        __NETWORK_CAPI_FUNC_ENTER__;
 
+       wifi_manager_handle_s *wifi_handle = wifi;
+
        CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
        CHECK_FEATURE_SUPPORTED(WIFI_TDLS_FEATURE);
        WIFI_LOG(WIFI_INFO, "WiFi TDLS Discover Request");
@@ -98,7 +100,7 @@ EXPORT_API int wifi_manager_tdls_start_discovery(wifi_manager_h wifi, const char
        }
 
        int rv = 0;
-       rv = net_wifi_tdls_discover(peer_mac_addr);
+       rv = net_wifi_tdls_discover(wifi_handle->network_info, peer_mac_addr);
 
        if (rv == NET_ERR_IN_PROGRESS) {
                WIFI_LOG(WIFI_ERROR, "In Progress"); //LCOV_EXCL_LINE
@@ -122,6 +124,8 @@ EXPORT_API int wifi_manager_tdls_connect(wifi_manager_h wifi, const char* peer_m
 {
        __NETWORK_CAPI_FUNC_ENTER__;
 
+       wifi_manager_handle_s *wifi_handle = wifi;
+
        CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
        CHECK_FEATURE_SUPPORTED(WIFI_TDLS_FEATURE);
        WIFI_LOG(WIFI_INFO, "[App-->TizenMW] WiFi TDLS Connect Request");
@@ -134,7 +138,7 @@ EXPORT_API int wifi_manager_tdls_connect(wifi_manager_h wifi, const char* peer_m
        }
 
        int rv = 0;
-       rv = net_wifi_tdls_connect(peer_mac_addr);
+       rv = net_wifi_tdls_connect(wifi_handle->network_info, peer_mac_addr);
 
        if (rv != NET_ERR_NONE) {
                WIFI_LOG(WIFI_ERROR, "[App<--TizenMW] WIFI_MANAGER_ERROR_OPERATION_FAILED\n");
@@ -154,6 +158,8 @@ EXPORT_API int wifi_manager_tdls_disconnect(wifi_manager_h wifi, const char *pee
 {
        __NETWORK_CAPI_FUNC_ENTER__;
 
+       wifi_manager_handle_s *wifi_handle = wifi;
+
        CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
        CHECK_FEATURE_SUPPORTED(WIFI_TDLS_FEATURE);
 
@@ -166,7 +172,7 @@ EXPORT_API int wifi_manager_tdls_disconnect(wifi_manager_h wifi, const char *pee
        }
 
        int rv = 0;
-       rv = net_wifi_tdls_disconnect(peer_mac_addr);
+       rv = net_wifi_tdls_disconnect(wifi_handle->network_info, peer_mac_addr);
 
        if (rv != NET_ERR_NONE) {
                WIFI_LOG(WIFI_ERROR, "Failed to disconnect tdls");
@@ -183,6 +189,8 @@ EXPORT_API int wifi_manager_tdls_get_connected_peer(wifi_manager_h wifi, char **
 {
        __NETWORK_CAPI_FUNC_ENTER__;
 
+       wifi_manager_handle_s *wifi_handle = wifi;
+
        CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
        CHECK_FEATURE_SUPPORTED(WIFI_TDLS_FEATURE);
 
@@ -195,7 +203,7 @@ EXPORT_API int wifi_manager_tdls_get_connected_peer(wifi_manager_h wifi, char **
        }
 
        int rv = 0;
-       rv = net_wifi_tdls_connected_peer(peer_mac_addr);
+       rv = net_wifi_tdls_connected_peer(wifi_handle->network_info, peer_mac_addr);
 
        if (rv != NET_ERR_NONE) {
                WIFI_LOG(WIFI_ERROR, "Failed to get connected peer");
@@ -254,6 +262,8 @@ EXPORT_API int wifi_manager_tdls_enable_channel_switching(wifi_manager_h wifi,
 {
        __NETWORK_CAPI_FUNC_ENTER__;
 
+       wifi_manager_handle_s *wifi_handle = wifi;
+
        CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
        CHECK_FEATURE_SUPPORTED(WIFI_TDLS_FEATURE);
 
@@ -266,7 +276,7 @@ EXPORT_API int wifi_manager_tdls_enable_channel_switching(wifi_manager_h wifi,
        }
        int rv = 0;
 
-       rv = net_wifi_tdls_enable_channel_switch(peer_mac_addr, freq);
+       rv = net_wifi_tdls_enable_channel_switch(wifi_handle->network_info, peer_mac_addr, freq);
 
        if (rv != NET_ERR_NONE) {
                WIFI_LOG(WIFI_ERROR, "Failed to enable TDLS Channel Switching Request");
@@ -284,6 +294,8 @@ EXPORT_API int wifi_manager_tdls_disable_channel_switching(wifi_manager_h wifi,
 {
        __NETWORK_CAPI_FUNC_ENTER__;
 
+       wifi_manager_handle_s *wifi_handle = wifi;
+
        CHECK_FEATURE_SUPPORTED(WIFI_FEATURE);
        CHECK_FEATURE_SUPPORTED(WIFI_TDLS_FEATURE);
 
@@ -297,7 +309,7 @@ EXPORT_API int wifi_manager_tdls_disable_channel_switching(wifi_manager_h wifi,
 
        int rv = 0;
 
-       rv = net_wifi_tdls_disbale_channel_switch(peer_mac_addr);
+       rv = net_wifi_tdls_disbale_channel_switch(wifi_handle->network_info, peer_mac_addr);
        if (rv != NET_ERR_NONE) {
                WIFI_LOG(WIFI_ERROR, "Failed to disable TDLS channel switching request");
                __NETWORK_CAPI_FUNC_EXIT__;
index da6abcb..fa1dc38 100755 (executable)
@@ -377,9 +377,9 @@ static int _test_public_config_remove(MManager *mm, struct menu_data *menu)
        msg(HR_SINGLE);
 
        if (ret == WIFI_MANAGER_ERROR_NONE)
-               msg(LOG_GREEN "Load config list finished" LOG_END);
+               msg(LOG_GREEN "Remove config list finished" LOG_END);
        else
-               msg("Fail to load config list " LOG_RED "[%s]" LOG_END,
+               msg("Fail to remove config list " LOG_RED "[%s]" LOG_END,
                        test_wifi_mgr_convert_error_to_string(ret));
 
        msg(HR_SINGLE);
index b6c9e5e..2c12518 100755 (executable)
@@ -33,6 +33,8 @@ wifi_manager_h g_wifi2_h = NULL;
 wifi_manager_device_state_e g_device_state = WIFI_MANAGER_DEVICE_STATE_DEACTIVATED;
 static int cs_tid = 0;
 
+static char g_ifname[MENU_DATA_SIZE] = "wlan1";
+
 extern struct menu_data menu_public[];
 extern struct menu_data menu_extension[];
 
@@ -44,26 +46,47 @@ static struct menu_data menu_main[] = {
 
 static void __test_device_state_cb(wifi_manager_device_state_e state, void *user_data)
 {
+       wifi_manager_h wifi_h = NULL;
+       char *if_name = NULL;
+
        g_device_state = state;
 
-       msg("[%s] Device state changed callback, State [%s]",
-               (char *)user_data, test_wifi_mgr_device_state_to_string(g_device_state));
+       wifi_h = GPOINTER_TO_INT(user_data) == 1 ? g_wifi_h : g_wifi2_h;
+       wifi_manager_get_network_interface_name(wifi_h, &if_name);
+
+       msg("[%d:%s] Device state changed callback, State [%s]",
+               GPOINTER_TO_INT(user_data), if_name, test_wifi_mgr_device_state_to_string(g_device_state));
+
+       FREE(if_name);
 }
 
 static void __test_scan_changed_cb(wifi_manager_scan_state_e state, void* user_data)
 {
-       msg("[%s] Scan changed, Scan state [%s]", (char *)user_data,
-                       test_wifi_mgr_scan_state_to_string(state));
+       wifi_manager_h wifi_h = NULL;
+       char *if_name = NULL;
+
+       wifi_h = GPOINTER_TO_INT(user_data) == 1 ? g_wifi_h : g_wifi2_h;
+       wifi_manager_get_network_interface_name(wifi_h, &if_name);
+
+       msg("[%d:%s] Scan changed, Scan state [%s]", GPOINTER_TO_INT(user_data),
+               if_name, test_wifi_mgr_scan_state_to_string(state));
+
+       FREE(if_name);
 }
 
 static void __test_connection_state_cb(wifi_manager_connection_state_e state,
                        wifi_manager_ap_h ap, void* user_data)
 {
        int ret = WIFI_MANAGER_ERROR_NONE;
+       wifi_manager_h wifi_h = NULL;
+       char *if_name = NULL;
        char *ap_name = NULL;
 
-       msgn("[%s] Connection state changed callback, State [%s]",
-               (char *)user_data, test_wifi_mgr_conn_state_to_string(state));
+       wifi_h = GPOINTER_TO_INT(user_data) == 1 ? g_wifi_h : g_wifi2_h;
+       wifi_manager_get_network_interface_name(wifi_h, &if_name);
+
+       msgn("[%d:%s] Connection state changed callback, State [%s]",
+               GPOINTER_TO_INT(user_data), if_name, test_wifi_mgr_conn_state_to_string(state));
 
        ret = wifi_manager_ap_get_essid(ap, &ap_name);
        if (ret != WIFI_MANAGER_ERROR_NONE) {
@@ -73,22 +96,47 @@ static void __test_connection_state_cb(wifi_manager_connection_state_e state,
                msg(", AP name " LOG_CYAN "[%s]" LOG_END, ap_name);
                FREE(ap_name);
        }
+
+       FREE(if_name);
 }
 
 static void __test_rssi_level_cb(wifi_manager_rssi_level_e rssi_level, void* user_data)
 {
-       msg("[%s] RSSI level changed callback, level [%d]", (char *)user_data, rssi_level);
+       wifi_manager_h wifi_h = NULL;
+       char *if_name = NULL;
+
+       wifi_h = GPOINTER_TO_INT(user_data) == 1 ? g_wifi_h : g_wifi2_h;
+       wifi_manager_get_network_interface_name(wifi_h, &if_name);
+
+       msg("[%d:%s] RSSI level changed callback, level [%d]",
+               GPOINTER_TO_INT(user_data), if_name, rssi_level);
+
+       FREE(if_name);
 }
 
 static void __test_bg_scan_completed_cb(wifi_manager_error_e error_code, void* user_data)
 {
-       msg("[%s] Background scan completed, error code [%s]",
-                       (char *)user_data, test_wifi_mgr_convert_error_to_string(error_code));
+       wifi_manager_h wifi_h = NULL;
+       char *if_name = NULL;
+
+       wifi_h = GPOINTER_TO_INT(user_data) == 1 ? g_wifi_h : g_wifi2_h;
+       wifi_manager_get_network_interface_name(wifi_h, &if_name);
+
+       msg("[%d:%s] Background scan completed, error code [%s]",
+               GPOINTER_TO_INT(user_data), if_name, test_wifi_mgr_convert_error_to_string(error_code));
+
+       FREE(if_name);
 }
 
 static void __test_ip_conflict_cb(char *mac, wifi_manager_ip_conflict_state_e state, void *user_data)
 {
-       msgn("[%s] Ip conflict", (char *)user_data);
+       wifi_manager_h wifi_h = NULL;
+       char *if_name = NULL;
+
+       wifi_h = GPOINTER_TO_INT(user_data) == 1 ? g_wifi_h : g_wifi2_h;
+       wifi_manager_get_network_interface_name(wifi_h, &if_name);
+
+       msgn("[%d:%s] Ip conflict", GPOINTER_TO_INT(user_data), if_name);
 
        if (state == WIFI_MANAGER_IP_CONFLICT_STATE_CONFLICT_DETECTED)
                msg(" detected [%s]", mac);
@@ -96,105 +144,154 @@ static void __test_ip_conflict_cb(char *mac, wifi_manager_ip_conflict_state_e st
                msg(" removed");
        else
                msg(" state unknown");
+
+       FREE(if_name);
 }
 
 static void __test_get_wifi_module_state_cb(wifi_manager_module_state_e state, void *user_data)
 {
-       msgn("[%s] Wi-Fi module state changed callback", (char *)user_data);
+       wifi_manager_h wifi_h = NULL;
+       char *if_name = NULL;
+
+       wifi_h = GPOINTER_TO_INT(user_data) == 1 ? g_wifi_h : g_wifi2_h;
+       wifi_manager_get_network_interface_name(wifi_h, &if_name);
+
+       msgn("[%d%s] Wi-Fi module state changed callback", GPOINTER_TO_INT(user_data), if_name);
        msg(", Wi-Fi module [%s]", test_wifi_mgr_module_state_to_string(state));
+
+       FREE(if_name);
 }
 
 static void __test_tdls_state_cb(wifi_manager_tdls_state_e state, char *peer_mac_add, void *user_data)
 {
-       msgn("[%s] TDLS state changed callback", (char *)user_data);
+       wifi_manager_h wifi_h = NULL;
+       char *if_name = NULL;
+
+       wifi_h = GPOINTER_TO_INT(user_data) == 1 ? g_wifi_h : g_wifi2_h;
+       wifi_manager_get_network_interface_name(wifi_h, &if_name);
+
+       msgn("[%d:%s] TDLS state changed callback", GPOINTER_TO_INT(user_data), if_name);
 
        if (state == WIFI_MANAGER_TDLS_STATE_CONNECTED)
                msg(", state : TDLS connected, Peer MAC address [%s]", peer_mac_add);
        else
                msg(", state : TDLS disconnected, Peer MAC address [%s]", peer_mac_add);
+
+       FREE(if_name);
 }
 
 static void __test_tdls_discover_cb(wifi_manager_tdls_discovery_state_e state,
                        char *peer_mac_add, void *user_data)
 {
-       msgn("[%s] TDLS discover callback", (char *)user_data);
+       wifi_manager_h wifi_h = NULL;
+       char *if_name = NULL;
+
+       wifi_h = GPOINTER_TO_INT(user_data) == 1 ? g_wifi_h : g_wifi2_h;
+       wifi_manager_get_network_interface_name(wifi_h, &if_name);
+
+       msgn("[%d:%s] TDLS discover callback", GPOINTER_TO_INT(user_data), if_name);
 
        msgn(", Peer MAC address [%s], state [%d]", peer_mac_add, state);
        if (state == WIFI_MANAGER_TDLS_DISCOVERY_STATE_ONGOING)
                msg(", Discovery is ongoing");
        else
                msg(", Discovery is finished");
+
+       FREE(if_name);
 }
 
 static void __test_dpp_event_cb(wifi_manager_dpp_event_e event,
                wifi_manager_dpp_state_e state, wifi_manager_dpp_h handle, void *user_data)
 {
-       msgn("[%s] DPP event callback", (char *)user_data);
+       wifi_manager_h wifi_h = NULL;
+       char *if_name = NULL;
+
+       wifi_h = GPOINTER_TO_INT(user_data) == 1 ? g_wifi_h : g_wifi2_h;
+       wifi_manager_get_network_interface_name(wifi_h, &if_name);
+
+       msgn("[%d:%s] DPP event callback", GPOINTER_TO_INT(user_data), if_name);
 
        msg(", event [%s]", test_wifi_mgr_dpp_event_to_string(event));
        if (event == WIFI_MANAGER_DPP_EVENT_STATE_CHANGED)
                msg("state [%s]", test_wifi_mgr_dpp_state_to_string(state));
+
+       FREE(if_name);
 }
 
 static int _test_wifi_mgr_initialize(MManager *mm, struct menu_data *menu)
 {
        int ret = WIFI_MANAGER_ERROR_NONE;
        bool state = FALSE;
+       char *if_name = NULL;
 
-       if (!g_wifi_h) {
-               ret = wifi_manager_initialize(&g_wifi_h);
-               if (ret == WIFI_MANAGER_ERROR_NONE) {
-                       wifi_manager_set_device_state_changed_cb(g_wifi_h, __test_device_state_cb, "1");
-                       wifi_manager_set_scan_state_changed_cb(g_wifi_h, __test_scan_changed_cb, "1");
-                       wifi_manager_set_connection_state_changed_cb(g_wifi_h, __test_connection_state_cb, "1");
-                       wifi_manager_set_rssi_level_changed_cb(g_wifi_h, __test_rssi_level_cb, "1");
-                       wifi_manager_set_background_scan_cb(g_wifi_h, __test_bg_scan_completed_cb, "1");
-                       wifi_manager_set_ip_conflict_cb(g_wifi_h, __test_ip_conflict_cb, "1");
-                       wifi_manager_set_module_state_changed_cb(g_wifi_h, __test_get_wifi_module_state_cb, "1");
+       if (g_wifi_h) {
+               wifi_manager_deinitialize(g_wifi_h);
+               g_wifi_h = NULL;
+       }
 
-                       wifi_manager_tdls_set_state_changed_cb(g_wifi_h, __test_tdls_state_cb, "1");
-                       wifi_manager_tdls_set_discovered_cb(g_wifi_h, __test_tdls_discover_cb, "1");
+       if (g_wifi2_h) {
+               wifi_manager_deinitialize(g_wifi2_h);
+               g_wifi2_h = NULL;
+       }
 
-                       wifi_manager_dpp_set_event_cb(g_wifi_h, __test_dpp_event_cb, "1");
+       ret = wifi_manager_initialize(&g_wifi_h);
+       if (ret == WIFI_MANAGER_ERROR_NONE) {
+               wifi_manager_set_device_state_changed_cb(g_wifi_h, __test_device_state_cb, GINT_TO_POINTER(1));
+               wifi_manager_set_scan_state_changed_cb(g_wifi_h, __test_scan_changed_cb, GINT_TO_POINTER(1));
+               wifi_manager_set_connection_state_changed_cb(g_wifi_h, __test_connection_state_cb, GINT_TO_POINTER(1));
+               wifi_manager_set_rssi_level_changed_cb(g_wifi_h, __test_rssi_level_cb, GINT_TO_POINTER(1));
+               wifi_manager_set_background_scan_cb(g_wifi_h, __test_bg_scan_completed_cb, GINT_TO_POINTER(1));
+               wifi_manager_set_ip_conflict_cb(g_wifi_h, __test_ip_conflict_cb, GINT_TO_POINTER(1));
+               wifi_manager_set_module_state_changed_cb(g_wifi_h, __test_get_wifi_module_state_cb, GINT_TO_POINTER(1));
+
+               wifi_manager_tdls_set_state_changed_cb(g_wifi_h, __test_tdls_state_cb, GINT_TO_POINTER(1));
+               wifi_manager_tdls_set_discovered_cb(g_wifi_h, __test_tdls_discover_cb, GINT_TO_POINTER(1));
+
+               wifi_manager_dpp_set_event_cb(g_wifi_h, __test_dpp_event_cb, GINT_TO_POINTER(1));
+
+               wifi_manager_get_network_interface_name(g_wifi_h, &if_name);
+               msg(LOG_GREEN "[1:%s] Success to initialize wifi handle [%p]" LOG_END, if_name, g_wifi_h);
+               FREE(if_name);
+       } else {
+               msg("[1] Failed to initialize wifi handle " LOG_RED "[%s]" LOG_END,
+                       test_wifi_mgr_convert_error_to_string(ret));
+       }
 
-                       msg(LOG_GREEN "Success to initialize wifi [1] handle [%p]" LOG_END, g_wifi_h);
-               } else {
-                       msg("Failed to initialize wifi handle " LOG_RED "[%s]" LOG_END,
-                               test_wifi_mgr_convert_error_to_string(ret));
-               }
+       ret = wifi_manager_initialize(&g_wifi2_h);
+       if (ret == WIFI_MANAGER_ERROR_NONE) {
+               wifi_manager_set_device_state_changed_cb(g_wifi2_h, __test_device_state_cb, GINT_TO_POINTER(2));
+               wifi_manager_set_scan_state_changed_cb(g_wifi2_h, __test_scan_changed_cb, GINT_TO_POINTER(2));
+               wifi_manager_set_connection_state_changed_cb(g_wifi2_h, __test_connection_state_cb, GINT_TO_POINTER(2));
+               wifi_manager_set_rssi_level_changed_cb(g_wifi2_h, __test_rssi_level_cb, GINT_TO_POINTER(2));
+               wifi_manager_set_background_scan_cb(g_wifi2_h, __test_bg_scan_completed_cb, GINT_TO_POINTER(2));
+               wifi_manager_set_ip_conflict_cb(g_wifi2_h, __test_ip_conflict_cb, GINT_TO_POINTER(2));
+               wifi_manager_set_module_state_changed_cb(g_wifi2_h, __test_get_wifi_module_state_cb, GINT_TO_POINTER(2));
+
+               wifi_manager_tdls_set_state_changed_cb(g_wifi2_h, __test_tdls_state_cb, GINT_TO_POINTER(2));
+               wifi_manager_tdls_set_discovered_cb(g_wifi2_h, __test_tdls_discover_cb, GINT_TO_POINTER(2));
+
+               wifi_manager_dpp_set_event_cb(g_wifi2_h, __test_dpp_event_cb, GINT_TO_POINTER(2));
+
+               wifi_manager_get_network_interface_name(g_wifi2_h, &if_name);
+               msg(LOG_GREEN "[2:%s] Success to initialize wifi handle [%p]" LOG_END, if_name, g_wifi2_h);
+               FREE(if_name);
+       } else {
+               msg("[2] Failed to initialize wifi handle " LOG_RED "[%s]" LOG_END,
+                       test_wifi_mgr_convert_error_to_string(ret));
        }
 
-       if (!g_wifi2_h) {
-               ret = wifi_manager_initialize(&g_wifi2_h);
+       if (ret == WIFI_MANAGER_ERROR_NONE) {
+               ret = wifi_manager_is_activated(g_wifi_h, &state);
+               wifi_manager_get_network_interface_name(g_wifi_h, &if_name);
                if (ret == WIFI_MANAGER_ERROR_NONE) {
-                       wifi_manager_set_device_state_changed_cb(g_wifi2_h, __test_device_state_cb, "2");
-                       wifi_manager_set_scan_state_changed_cb(g_wifi2_h, __test_scan_changed_cb, "2");
-                       wifi_manager_set_connection_state_changed_cb(g_wifi2_h, __test_connection_state_cb, "2");
-                       wifi_manager_set_rssi_level_changed_cb(g_wifi2_h, __test_rssi_level_cb, "2");
-                       wifi_manager_set_background_scan_cb(g_wifi2_h, __test_bg_scan_completed_cb, "2");
-                       wifi_manager_set_ip_conflict_cb(g_wifi2_h, __test_ip_conflict_cb, "2");
-                       wifi_manager_set_module_state_changed_cb(g_wifi2_h, __test_get_wifi_module_state_cb, "2");
-
-                       wifi_manager_tdls_set_state_changed_cb(g_wifi2_h, __test_tdls_state_cb, "2");
-                       wifi_manager_tdls_set_discovered_cb(g_wifi2_h, __test_tdls_discover_cb, "2");
-
-                       wifi_manager_dpp_set_event_cb(g_wifi2_h, __test_dpp_event_cb, "2");
-
-                       msg(LOG_GREEN "Success to initialize wifi [2] handle [%p]" LOG_END, g_wifi2_h);
+                       g_device_state = state;
+                       msg("[1:%s] Wi-Fi device state " LOG_CYAN "[%s]" LOG_END, if_name,
+                               test_wifi_mgr_device_state_to_string(g_device_state));
                } else {
-                       msg("Failed to initialize wifi [2] handle " LOG_RED "[%s]" LOG_END,
+                       msg("[1] Failed to get Wi-Fi device state " LOG_RED "[%s]" LOG_END,
                                test_wifi_mgr_convert_error_to_string(ret));
                }
-       }
-
-       ret = wifi_manager_is_activated(g_wifi_h, &state);
-       if (ret == WIFI_MANAGER_ERROR_NONE) {
-               g_device_state = state;
-               msg("Wi-Fi device state " LOG_CYAN "[%s]" LOG_END,
-                       test_wifi_mgr_device_state_to_string(g_device_state));
-       } else {
-               msg("Failed to get Wi-Fi device state " LOG_RED "[%s]" LOG_END,
-                       test_wifi_mgr_convert_error_to_string(ret));
+               FREE(if_name);
        }
 
        return ret;
@@ -204,71 +301,166 @@ static int _test_wifi_mgr_initialize_cs(MManager *mm, struct menu_data *menu)
 {
        int ret = WIFI_MANAGER_ERROR_NONE;
        bool state = FALSE;
+       char *if_name = NULL;
 
        cs_tid = get_tid();
 
-       if (!g_wifi_h) {
-               ret = wifi_manager_initialize_cs(cs_tid, &g_wifi_h);
-               if (ret == WIFI_MANAGER_ERROR_NONE) {
-                       wifi_manager_set_device_state_changed_cb(g_wifi_h, __test_device_state_cb, "1");
-                       wifi_manager_set_scan_state_changed_cb(g_wifi_h, __test_scan_changed_cb, "1");
-                       wifi_manager_set_connection_state_changed_cb(g_wifi_h, __test_connection_state_cb, "1");
-                       wifi_manager_set_rssi_level_changed_cb(g_wifi_h, __test_rssi_level_cb, "1");
-                       wifi_manager_set_background_scan_cb(g_wifi_h, __test_bg_scan_completed_cb, "1");
-                       wifi_manager_set_ip_conflict_cb(g_wifi_h, __test_ip_conflict_cb, "1");
-                       wifi_manager_set_module_state_changed_cb(g_wifi_h, __test_get_wifi_module_state_cb, "1");
+       if (g_wifi_h) {
+               wifi_manager_deinitialize(g_wifi_h);
+               g_wifi_h = NULL;
+       }
 
-                       wifi_manager_tdls_set_state_changed_cb(g_wifi_h, __test_tdls_state_cb, "1");
-                       wifi_manager_tdls_set_discovered_cb(g_wifi_h, __test_tdls_discover_cb, "1");
+       if (g_wifi2_h) {
+               wifi_manager_deinitialize(g_wifi2_h);
+               g_wifi2_h = NULL;
+       }
 
-                       wifi_manager_dpp_set_event_cb(g_wifi_h, __test_dpp_event_cb, "1");
+       ret = wifi_manager_initialize_cs(cs_tid, &g_wifi_h);
+       if (ret == WIFI_MANAGER_ERROR_NONE) {
+               wifi_manager_set_device_state_changed_cb(g_wifi_h, __test_device_state_cb, GINT_TO_POINTER(1));
+               wifi_manager_set_scan_state_changed_cb(g_wifi_h, __test_scan_changed_cb, GINT_TO_POINTER(1));
+               wifi_manager_set_connection_state_changed_cb(g_wifi_h, __test_connection_state_cb, GINT_TO_POINTER(1));
+               wifi_manager_set_rssi_level_changed_cb(g_wifi_h, __test_rssi_level_cb, GINT_TO_POINTER(1));
+               wifi_manager_set_background_scan_cb(g_wifi_h, __test_bg_scan_completed_cb, GINT_TO_POINTER(1));
+               wifi_manager_set_ip_conflict_cb(g_wifi_h, __test_ip_conflict_cb, GINT_TO_POINTER(1));
+               wifi_manager_set_module_state_changed_cb(g_wifi_h, __test_get_wifi_module_state_cb, GINT_TO_POINTER(1));
+
+               wifi_manager_tdls_set_state_changed_cb(g_wifi_h, __test_tdls_state_cb, GINT_TO_POINTER(1));
+               wifi_manager_tdls_set_discovered_cb(g_wifi_h, __test_tdls_discover_cb, GINT_TO_POINTER(1));
+
+               wifi_manager_dpp_set_event_cb(g_wifi_h, __test_dpp_event_cb, GINT_TO_POINTER(1));
+
+               wifi_manager_get_network_interface_name(g_wifi_h, &if_name);
+               msg(LOG_GREEN "[1:%s] Success to initialize wifi handle [%p]" LOG_END, if_name, g_wifi_h);
+               FREE(if_name);
+       } else {
+               msg("[1] Failed to initialize wifi handle " LOG_RED "[%s]" LOG_END,
+                       test_wifi_mgr_convert_error_to_string(ret));
+       }
 
-                       msg(LOG_GREEN "Success to initialize wifi [1] handle [%p]" LOG_END, g_wifi_h);
+       ret = wifi_manager_initialize_cs(cs_tid, &g_wifi2_h);
+       if (ret == WIFI_MANAGER_ERROR_NONE) {
+               wifi_manager_set_device_state_changed_cb(g_wifi2_h, __test_device_state_cb, GINT_TO_POINTER(2));
+               wifi_manager_set_scan_state_changed_cb(g_wifi2_h, __test_scan_changed_cb, GINT_TO_POINTER(2));
+               wifi_manager_set_connection_state_changed_cb(g_wifi2_h, __test_connection_state_cb, GINT_TO_POINTER(2));
+               wifi_manager_set_rssi_level_changed_cb(g_wifi2_h, __test_rssi_level_cb, GINT_TO_POINTER(2));
+               wifi_manager_set_background_scan_cb(g_wifi2_h, __test_bg_scan_completed_cb, GINT_TO_POINTER(2));
+               wifi_manager_set_ip_conflict_cb(g_wifi2_h, __test_ip_conflict_cb, GINT_TO_POINTER(2));
+               wifi_manager_set_module_state_changed_cb(g_wifi2_h, __test_get_wifi_module_state_cb, GINT_TO_POINTER(2));
+
+               wifi_manager_tdls_set_state_changed_cb(g_wifi2_h, __test_tdls_state_cb, GINT_TO_POINTER(2));
+               wifi_manager_tdls_set_discovered_cb(g_wifi2_h, __test_tdls_discover_cb, GINT_TO_POINTER(2));
+
+               wifi_manager_dpp_set_event_cb(g_wifi2_h, __test_dpp_event_cb, GINT_TO_POINTER(2));
+
+               wifi_manager_get_network_interface_name(g_wifi2_h, &if_name);
+               msg(LOG_GREEN "[2:%s] Success to initialize wifi handle [%p]" LOG_END, if_name, g_wifi2_h);
+               FREE(if_name);
+       } else {
+               msg("[2] Failed to initialize wifi handle " LOG_RED "[%s]" LOG_END,
+                       test_wifi_mgr_convert_error_to_string(ret));
+       }
+
+       if (ret == WIFI_MANAGER_ERROR_NONE) {
+               ret = wifi_manager_is_activated(g_wifi_h, &state);
+               wifi_manager_get_network_interface_name(g_wifi_h, &if_name);
+               if (ret == WIFI_MANAGER_ERROR_NONE) {
+                       g_device_state = state;
+                       msg("[1:%s] Wi-Fi device state " LOG_CYAN "[%s]" LOG_END, if_name,
+                               test_wifi_mgr_device_state_to_string(g_device_state));
                } else {
-                       msg("Failed to initialize wifi handle " LOG_RED "[%s]" LOG_END,
+                       msg("[1] Failed to get Wi-Fi device state " LOG_RED "[%s]" LOG_END,
                                test_wifi_mgr_convert_error_to_string(ret));
                }
+               FREE(if_name);
        }
 
-       if (!g_wifi2_h) {
-               ret = wifi_manager_initialize_cs(cs_tid, &g_wifi2_h);
-               if (ret == WIFI_MANAGER_ERROR_NONE) {
-                       wifi_manager_set_device_state_changed_cb(g_wifi2_h, __test_device_state_cb, "2");
-                       wifi_manager_set_scan_state_changed_cb(g_wifi2_h, __test_scan_changed_cb, "2");
-                       wifi_manager_set_connection_state_changed_cb(g_wifi2_h, __test_connection_state_cb, "2");
-                       wifi_manager_set_rssi_level_changed_cb(g_wifi2_h, __test_rssi_level_cb, "2");
-                       wifi_manager_set_background_scan_cb(g_wifi2_h, __test_bg_scan_completed_cb, "2");
-                       wifi_manager_set_ip_conflict_cb(g_wifi2_h, __test_ip_conflict_cb, "2");
-                       wifi_manager_set_module_state_changed_cb(g_wifi2_h, __test_get_wifi_module_state_cb, "2");
+       return ret;
+}
+
+static int _test_wifi_mgr_initialize_with_ifname(MManager *mm, struct menu_data *menu)
+{
+       int ret = WIFI_MANAGER_ERROR_NONE;
+       bool state = FALSE;
+       char *if_name = NULL;
 
-                       wifi_manager_tdls_set_state_changed_cb(g_wifi2_h, __test_tdls_state_cb, "2");
-                       wifi_manager_tdls_set_discovered_cb(g_wifi2_h, __test_tdls_discover_cb, "2");
+       if (g_wifi_h) {
+               wifi_manager_deinitialize(g_wifi_h);
+               g_wifi_h = NULL;
+       }
 
-                       wifi_manager_dpp_set_event_cb(g_wifi2_h, __test_dpp_event_cb, "2");
+       if (g_wifi2_h) {
+               wifi_manager_deinitialize(g_wifi2_h);
+               g_wifi2_h = NULL;
+       }
 
-                       msg(LOG_GREEN "Success to initialize wifi [2] handle [%p]" LOG_END, g_wifi2_h);
-               } else {
-                       msg("Failed to initialize wifi [2] handle " LOG_RED "[%s]" LOG_END,
-                               test_wifi_mgr_convert_error_to_string(ret));
-               }
+       ret = wifi_manager_initialize_with_interface_name(&g_wifi_h, g_ifname);
+       if (ret == WIFI_MANAGER_ERROR_NONE) {
+               wifi_manager_set_device_state_changed_cb(g_wifi_h, __test_device_state_cb, GINT_TO_POINTER(1));
+               wifi_manager_set_scan_state_changed_cb(g_wifi_h, __test_scan_changed_cb, GINT_TO_POINTER(1));
+               wifi_manager_set_connection_state_changed_cb(g_wifi_h, __test_connection_state_cb, GINT_TO_POINTER(1));
+               wifi_manager_set_rssi_level_changed_cb(g_wifi_h, __test_rssi_level_cb, GINT_TO_POINTER(1));
+               wifi_manager_set_background_scan_cb(g_wifi_h, __test_bg_scan_completed_cb, GINT_TO_POINTER(1));
+               wifi_manager_set_ip_conflict_cb(g_wifi_h, __test_ip_conflict_cb, GINT_TO_POINTER(1));
+               wifi_manager_set_module_state_changed_cb(g_wifi_h, __test_get_wifi_module_state_cb, GINT_TO_POINTER(1));
+
+               wifi_manager_tdls_set_state_changed_cb(g_wifi_h, __test_tdls_state_cb, GINT_TO_POINTER(1));
+               wifi_manager_tdls_set_discovered_cb(g_wifi_h, __test_tdls_discover_cb, GINT_TO_POINTER(1));
+
+               wifi_manager_dpp_set_event_cb(g_wifi_h, __test_dpp_event_cb, GINT_TO_POINTER(1));
+
+               wifi_manager_get_network_interface_name(g_wifi_h, &if_name);
+               msg(LOG_GREEN "[1:%s] Success to initialize wifi handle [%p]" LOG_END, if_name, g_wifi_h);
+               FREE(if_name);
+       } else {
+               msg("[1] Failed to initialize wifi handle " LOG_RED "[%s]" LOG_END,
+                       test_wifi_mgr_convert_error_to_string(ret));
        }
 
-       ret = wifi_manager_is_activated(g_wifi_h, &state);
+       ret = wifi_manager_initialize_with_interface_name(&g_wifi2_h, g_ifname);
        if (ret == WIFI_MANAGER_ERROR_NONE) {
-               g_device_state = state;
-               msg("Wi-Fi device state " LOG_CYAN "[%s]" LOG_END,
-                       test_wifi_mgr_device_state_to_string(g_device_state));
+               wifi_manager_set_device_state_changed_cb(g_wifi2_h, __test_device_state_cb, GINT_TO_POINTER(2));
+               wifi_manager_set_scan_state_changed_cb(g_wifi2_h, __test_scan_changed_cb, GINT_TO_POINTER(2));
+               wifi_manager_set_connection_state_changed_cb(g_wifi2_h, __test_connection_state_cb, GINT_TO_POINTER(2));
+               wifi_manager_set_rssi_level_changed_cb(g_wifi2_h, __test_rssi_level_cb, GINT_TO_POINTER(2));
+               wifi_manager_set_background_scan_cb(g_wifi2_h, __test_bg_scan_completed_cb, GINT_TO_POINTER(2));
+               wifi_manager_set_ip_conflict_cb(g_wifi2_h, __test_ip_conflict_cb, GINT_TO_POINTER(2));
+               wifi_manager_set_module_state_changed_cb(g_wifi2_h, __test_get_wifi_module_state_cb, GINT_TO_POINTER(2));
+
+               wifi_manager_tdls_set_state_changed_cb(g_wifi2_h, __test_tdls_state_cb, GINT_TO_POINTER(2));
+               wifi_manager_tdls_set_discovered_cb(g_wifi2_h, __test_tdls_discover_cb, GINT_TO_POINTER(2));
+
+               wifi_manager_dpp_set_event_cb(g_wifi2_h, __test_dpp_event_cb, GINT_TO_POINTER(2));
+
+               wifi_manager_get_network_interface_name(g_wifi2_h, &if_name);
+               msg(LOG_GREEN "[2:%s] Success to initialize wifi handle [%p]" LOG_END, if_name, g_wifi2_h);
+               FREE(if_name);
        } else {
-               msg("Failed to get Wi-Fi device state " LOG_RED "[%s]" LOG_END,
+               msg("[2] Failed to initialize wifi handle " LOG_RED "[%s]" LOG_END,
                        test_wifi_mgr_convert_error_to_string(ret));
        }
 
+       if (ret == WIFI_MANAGER_ERROR_NONE) {
+               ret = wifi_manager_is_activated(g_wifi_h, &state);
+               wifi_manager_get_network_interface_name(g_wifi_h, &if_name);
+               if (ret == WIFI_MANAGER_ERROR_NONE) {
+                       g_device_state = state;
+                       msg("[1:%s] Wi-Fi device state " LOG_CYAN "[%s]" LOG_END, if_name,
+                               test_wifi_mgr_device_state_to_string(g_device_state));
+               } else {
+                       msg("[1] Failed to get Wi-Fi device state " LOG_RED "[%s]" LOG_END,
+                               test_wifi_mgr_convert_error_to_string(ret));
+               }
+               FREE(if_name);
+       }
+
        return ret;
 }
 
 static int _test_wifi_mgr_deinitialize(void)
 {
        int ret = WIFI_MANAGER_ERROR_NONE;
+       char *if_name = NULL;
 
        if (g_wifi_h) {
                if (cs_tid)
@@ -276,10 +468,12 @@ static int _test_wifi_mgr_deinitialize(void)
                else
                        ret = wifi_manager_deinitialize(g_wifi_h);
 
-               if (ret == WIFI_MANAGER_ERROR_NONE)
-                       msg(LOG_GREEN "Succeeded to deinitialize wifi handle" LOG_END);
-               else
-                       msg("Failed to deinitialize wifi [1] handle " LOG_RED "[%s]" LOG_END,
+               if (ret == WIFI_MANAGER_ERROR_NONE) {
+                       wifi_manager_get_network_interface_name(g_wifi_h, &if_name);
+                       msg(LOG_GREEN "[1:%s] Succeeded to deinitialize wifi handle" LOG_END, if_name);
+                       FREE(if_name);
+               } else
+                       msg("[1] Failed to deinitialize wifi handle " LOG_RED "[%s]" LOG_END,
                                test_wifi_mgr_convert_error_to_string(ret));
        }
 
@@ -289,10 +483,12 @@ static int _test_wifi_mgr_deinitialize(void)
                else
                        ret = wifi_manager_deinitialize(g_wifi2_h);
 
-               if (ret == WIFI_MANAGER_ERROR_NONE)
-                       msg(LOG_GREEN "Succeeded to deinitialize wifi2 handle" LOG_END);
-               else
-                       msg("Failed to deinitialize wifi [2] handle " LOG_RED "[%s]" LOG_END,
+               if (ret == WIFI_MANAGER_ERROR_NONE) {
+                       wifi_manager_get_network_interface_name(g_wifi_h, &if_name);
+                       msg(LOG_GREEN "[2:%s] Succeeded to deinitialize wifi handle" LOG_END, if_name);
+                       FREE(if_name);
+               } else
+                       msg("[2] Failed to deinitialize wifi handle " LOG_RED "[%s]" LOG_END,
                                test_wifi_mgr_convert_error_to_string(ret));
        }
 
@@ -301,20 +497,32 @@ static int _test_wifi_mgr_deinitialize(void)
        return ret;
 }
 
-static gboolean _test_wifi_mgr_create_init_menu(struct menu_data init_menu[2])
+static gboolean _test_wifi_mgr_create_init_menu(struct menu_data init_menu[5])
 {
-       init_menu[0].key = "1";
-       init_menu[0].title = LOG_YELLOW "Wifi Mgr Init" LOG_END;
-       init_menu[0].sub_menu = menu_main;
-       init_menu[0].callback = _test_wifi_mgr_initialize;
-       init_menu[0].data = NULL;
+       init_menu[0].key = "0";
+       init_menu[0].title = LOG_LIGHTGREEN "[Interface Name]" LOG_END;
+       init_menu[0].sub_menu = NULL;
+       init_menu[0].callback = NULL;
+       init_menu[0].data = g_ifname;
 
-       init_menu[1].key = "2";
-       init_menu[1].title = LOG_YELLOW "Wifi Mgr Init for C#" LOG_END;
+       init_menu[1].key = "1";
+       init_menu[1].title = LOG_YELLOW "Wifi Mgr Init" LOG_END;
        init_menu[1].sub_menu = menu_main;
-       init_menu[1].callback = _test_wifi_mgr_initialize_cs;
+       init_menu[1].callback = _test_wifi_mgr_initialize;
        init_menu[1].data = NULL;
 
+       init_menu[2].key = "2";
+       init_menu[2].title = LOG_YELLOW "Wifi Mgr Init for C#" LOG_END;
+       init_menu[2].sub_menu = menu_main;
+       init_menu[2].callback = _test_wifi_mgr_initialize_cs;
+       init_menu[2].data = NULL;
+
+       init_menu[3].key = "3";
+       init_menu[3].title = LOG_YELLOW "Wifi Mgr Init with ifname" LOG_END;
+       init_menu[3].sub_menu = menu_main;
+       init_menu[3].callback = _test_wifi_mgr_initialize_with_ifname;
+       init_menu[3].data = NULL;
+
        return TRUE;
 }
 
@@ -700,7 +908,7 @@ int main(int arg, char **argv)
        GMainLoop *mainloop = NULL;
        GIOChannel *channel = g_io_channel_unix_new(STDIN_FILENO);
        MManager *manager;
-       struct menu_data init_menu[2+1] = { {NULL, NULL, NULL, } };
+       struct menu_data init_menu[5] = { {NULL, NULL, NULL, } };
 
 #if !GLIB_CHECK_VERSION(2, 35, 0)
        g_type_init();