diff options
Diffstat (limited to 'plugins/wifi.c')
-rwxr-xr-x | plugins/wifi.c | 157 |
1 files changed, 157 insertions, 0 deletions
diff --git a/plugins/wifi.c b/plugins/wifi.c index bce1424f..cbc6b152 100755 --- a/plugins/wifi.c +++ b/plugins/wifi.c @@ -3905,6 +3905,15 @@ static void interface_added(GSupplicantInterface *interface) { const char *ifname = g_supplicant_interface_get_ifname(interface); const char *driver = g_supplicant_interface_get_driver(interface); +#if defined TIZEN_EXT && defined TIZEN_EXT_EAP_ON_ETHERNET + /* + * Note: If supplicant interface's driver is wired then skip it, + * because it meanti only for ethernet not Wi-Fi. + */ + if (!g_strcmp0("wired", g_supplicant_interface_get_driver(interface))) + return; +#endif /* defined TIZEN_EXT && defined TIZEN_EXT_EAP_ON_ETHERNET */ + #if defined TIZEN_EXT bool is_5_0_ghz_supported = g_supplicant_interface_get_is_5_0_ghz_supported(interface); #endif @@ -4179,6 +4188,15 @@ static void interface_state(GSupplicantInterface *interface) struct connman_device *device; struct wifi_data *wifi; GSupplicantState state = g_supplicant_interface_get_state(interface); +#if defined TIZEN_EXT && defined TIZEN_EXT_EAP_ON_ETHERNET + /* + * Note: If supplicant interface's driver is wired then skip it, + * because it meanti only for ethernet not Wi-Fi. + */ + if (!g_strcmp0("wired", g_supplicant_interface_get_driver(interface))) + return; +#endif /* defined TIZEN_EXT && defined TIZEN_EXT_EAP_ON_ETHERNET */ + bool wps; bool old_connected; @@ -4442,6 +4460,15 @@ static void interface_removed(GSupplicantInterface *interface) { const char *ifname = g_supplicant_interface_get_ifname(interface); struct wifi_data *wifi; +#if defined TIZEN_EXT && defined TIZEN_EXT_EAP_ON_ETHERNET + /* + * Note: If supplicant interface's driver is wired then skip it, + * because it meanti only for ethernet not Wi-Fi. + */ + if (!g_strcmp0("wired", g_supplicant_interface_get_driver(interface))) + return; +#endif /* defined TIZEN_EXT && defined TIZEN_EXT_EAP_ON_ETHERNET */ + DBG("ifname %s", ifname); @@ -4510,6 +4537,15 @@ static void p2p_support(GSupplicantInterface *interface) { char dev_type[17] = {}; const char *hostname; +#if defined TIZEN_EXT && defined TIZEN_EXT_EAP_ON_ETHERNET + /* + * Note: If supplicant interface's driver is wired then skip it, + * because it meanti only for ethernet not Wi-Fi. + */ + if (!g_strcmp0("wired", g_supplicant_interface_get_driver(interface))) + return; +#endif /* defined TIZEN_EXT && defined TIZEN_EXT_EAP_ON_ETHERNET */ + DBG(""); @@ -4536,11 +4572,29 @@ static void p2p_support(GSupplicantInterface *interface) static void scan_started(GSupplicantInterface *interface) { +#if defined TIZEN_EXT && defined TIZEN_EXT_EAP_ON_ETHERNET + /* + * Note: If supplicant interface's driver is wired then skip it, + * because it meanti only for ethernet not Wi-Fi. + */ + if (!g_strcmp0("wired", g_supplicant_interface_get_driver(interface))) + return; +#endif /* defined TIZEN_EXT && defined TIZEN_EXT_EAP_ON_ETHERNET */ + DBG(""); } static void scan_finished(GSupplicantInterface *interface) { +#if defined TIZEN_EXT && defined TIZEN_EXT_EAP_ON_ETHERNET + /* + * Note: If supplicant interface's driver is wired then skip it, + * because it meanti only for ethernet not Wi-Fi. + */ + if (!g_strcmp0("wired", g_supplicant_interface_get_driver(interface))) + return; +#endif /* defined TIZEN_EXT && defined TIZEN_EXT_EAP_ON_ETHERNET */ + #if defined TIZEN_EXT struct wifi_data *wifi; bool is_associating = false; @@ -4577,6 +4631,15 @@ static void scan_finished(GSupplicantInterface *interface) static void ap_create_fail(GSupplicantInterface *interface) { +#if defined TIZEN_EXT && defined TIZEN_EXT_EAP_ON_ETHERNET + /* + * Note: If supplicant interface's driver is wired then skip it, + * because it meanti only for ethernet not Wi-Fi. + */ + if (!g_strcmp0("wired", g_supplicant_interface_get_driver(interface))) + return; +#endif /* defined TIZEN_EXT && defined TIZEN_EXT_EAP_ON_ETHERNET */ + struct wifi_data *wifi = g_supplicant_interface_get_data(interface); int ret; @@ -4742,6 +4805,15 @@ static void network_added(GSupplicantNetwork *supplicant_network) #endif interface = g_supplicant_network_get_interface(supplicant_network); +#if defined TIZEN_EXT && defined TIZEN_EXT_EAP_ON_ETHERNET + /* + * Note: If supplicant interface's driver is wired then skip it, + * because it meanti only for ethernet not Wi-Fi. + */ + if (!g_strcmp0("wired", g_supplicant_interface_get_driver(interface))) + return; +#endif /* defined TIZEN_EXT && defined TIZEN_EXT_EAP_ON_ETHERNET */ + wifi = g_supplicant_interface_get_data(interface); name = g_supplicant_network_get_name(supplicant_network); security = g_supplicant_network_get_security(supplicant_network); @@ -4890,6 +4962,15 @@ static void network_removed(GSupplicantNetwork *network) #endif interface = g_supplicant_network_get_interface(network); +#if defined TIZEN_EXT && defined TIZEN_EXT_EAP_ON_ETHERNET + /* + * Note: If supplicant interface's driver is wired then skip it, + * because it meanti only for ethernet not Wi-Fi. + */ + if (!g_strcmp0("wired", g_supplicant_interface_get_driver(interface))) + return; +#endif /* defined TIZEN_EXT && defined TIZEN_EXT_EAP_ON_ETHERNET */ + wifi = g_supplicant_interface_get_data(interface); identifier = g_supplicant_network_get_identifier(network); name = g_supplicant_network_get_name(network); @@ -4940,6 +5021,15 @@ static void network_changed(GSupplicantNetwork *network, const char *property) #endif interface = g_supplicant_network_get_interface(network); +#if defined TIZEN_EXT && defined TIZEN_EXT_EAP_ON_ETHERNET + /* + * Note: If supplicant interface's driver is wired then skip it, + * because it meanti only for ethernet not Wi-Fi. + */ + if (!g_strcmp0("wired", g_supplicant_interface_get_driver(interface))) + return; +#endif /* defined TIZEN_EXT && defined TIZEN_EXT_EAP_ON_ETHERNET */ + wifi = g_supplicant_interface_get_data(interface); identifier = g_supplicant_network_get_identifier(network); name = g_supplicant_network_get_name(network); @@ -5057,6 +5147,15 @@ static void network_associated(GSupplicantNetwork *network) interface = g_supplicant_network_get_interface(network); if (!interface) return; +#if defined TIZEN_EXT && defined TIZEN_EXT_EAP_ON_ETHERNET + /* + * Note: If supplicant interface's driver is wired then skip it, + * because it meanti only for ethernet not Wi-Fi. + */ + if (!g_strcmp0("wired", g_supplicant_interface_get_driver(interface))) + return; +#endif /* defined TIZEN_EXT && defined TIZEN_EXT_EAP_ON_ETHERNET */ + wifi = g_supplicant_interface_get_data(interface); if (!wifi) @@ -5103,6 +5202,15 @@ static void network_associated(GSupplicantNetwork *network) static void sta_authorized(GSupplicantInterface *interface, const char *addr) { +#if defined TIZEN_EXT && defined TIZEN_EXT_EAP_ON_ETHERNET + /* + * Note: If supplicant interface's driver is wired then skip it, + * because it meanti only for ethernet not Wi-Fi. + */ + if (!g_strcmp0("wired", g_supplicant_interface_get_driver(interface))) + return; +#endif /* defined TIZEN_EXT && defined TIZEN_EXT_EAP_ON_ETHERNET */ + struct wifi_data *wifi = g_supplicant_interface_get_data(interface); DBG("wifi %p station %s authorized", wifi, addr); @@ -5116,6 +5224,15 @@ static void sta_authorized(GSupplicantInterface *interface, static void sta_deauthorized(GSupplicantInterface *interface, const char *addr) { +#if defined TIZEN_EXT && defined TIZEN_EXT_EAP_ON_ETHERNET + /* + * Note: If supplicant interface's driver is wired then skip it, + * because it meanti only for ethernet not Wi-Fi. + */ + if (!g_strcmp0("wired", g_supplicant_interface_get_driver(interface))) + return; +#endif /* defined TIZEN_EXT && defined TIZEN_EXT_EAP_ON_ETHERNET */ + struct wifi_data *wifi = g_supplicant_interface_get_data(interface); DBG("wifi %p station %s deauthorized", wifi, addr); @@ -5351,6 +5468,15 @@ static void network_merged(GSupplicantNetwork *network) if (!interface) return; +#if defined TIZEN_EXT && defined TIZEN_EXT_EAP_ON_ETHERNET + /* + * Note: If supplicant interface's driver is wired then skip it, + * because it meanti only for ethernet not Wi-Fi. + */ + if (!g_strcmp0("wired", g_supplicant_interface_get_driver(interface))) + return; +#endif /* defined TIZEN_EXT && defined TIZEN_EXT_EAP_ON_ETHERNET */ + state = g_supplicant_interface_get_state(interface); if (state < G_SUPPLICANT_STATE_AUTHENTICATING) return; @@ -5411,6 +5537,15 @@ static void assoc_failed(void *user_data) static void scan_done(GSupplicantInterface *interface) { +#if defined TIZEN_EXT && defined TIZEN_EXT_EAP_ON_ETHERNET + /* + * Note: If supplicant interface's driver is wired then skip it, + * because it meanti only for ethernet not Wi-Fi. + */ + if (!g_strcmp0("wired", g_supplicant_interface_get_driver(interface))) + return; +#endif /* defined TIZEN_EXT && defined TIZEN_EXT_EAP_ON_ETHERNET */ + GList *list; int scan_type = CONNMAN_SCAN_TYPE_WPA_SUPPLICANT; struct wifi_data *wifi; @@ -5443,6 +5578,15 @@ static void debug(const char *str) static void disconnect_reasoncode(GSupplicantInterface *interface, int reasoncode) { +#if defined TIZEN_EXT && defined TIZEN_EXT_EAP_ON_ETHERNET + /* + * Note: If supplicant interface's driver is wired then skip it, + * because it meanti only for ethernet not Wi-Fi. + */ + if (!g_strcmp0("wired", g_supplicant_interface_get_driver(interface))) + return; +#endif /* defined TIZEN_EXT && defined TIZEN_EXT_EAP_ON_ETHERNET */ + struct wifi_data *wifi = g_supplicant_interface_get_data(interface); if (wifi != NULL) { @@ -5452,6 +5596,15 @@ static void disconnect_reasoncode(GSupplicantInterface *interface, static void assoc_status_code(GSupplicantInterface *interface, int status_code) { +#if defined TIZEN_EXT && defined TIZEN_EXT_EAP_ON_ETHERNET + /* + * Note: If supplicant interface's driver is wired then skip it, + * because it meanti only for ethernet not Wi-Fi. + */ + if (!g_strcmp0("wired", g_supplicant_interface_get_driver(interface))) + return; +#endif /* defined TIZEN_EXT && defined TIZEN_EXT_EAP_ON_ETHERNET */ + struct wifi_data *wifi = g_supplicant_interface_get_data(interface); if (wifi != NULL) { @@ -5459,7 +5612,11 @@ static void assoc_status_code(GSupplicantInterface *interface, int status_code) } } +#if defined TIZEN_EXT && defined TIZEN_EXT_EAP_ON_ETHERNET +static GSupplicantCallbacks callbacks = { +#else /* defined TIZEN_EXT && defined TIZEN_EXT_EAP_ON_ETHERNET */ static const GSupplicantCallbacks callbacks = { +#endif /* defined TIZEN_EXT && defined TIZEN_EXT_EAP_ON_ETHERNET */ .system_ready = system_ready, .system_killed = system_killed, .interface_added = interface_added, |