diff options
Diffstat (limited to 'plugins/wifi.c')
-rwxr-xr-x | plugins/wifi.c | 106 |
1 files changed, 54 insertions, 52 deletions
diff --git a/plugins/wifi.c b/plugins/wifi.c index f19dd8f3..68f34313 100755 --- a/plugins/wifi.c +++ b/plugins/wifi.c @@ -5012,19 +5012,19 @@ static void interface_state(GSupplicantInterface *interface) GSList *bssid_list = NULL; guint bssid_length = 0; -#if defined TIZEN_EXT_INS - const char *group = connman_network_get_group(network); - GSupplicantNetwork *supplicant_network; + if (TIZEN_INS_ENABLED) { + const char *group = connman_network_get_group(network); + GSupplicantNetwork *supplicant_network; - if (group) { - supplicant_network = g_supplicant_interface_get_network(interface, group); + if (group) { + supplicant_network = g_supplicant_interface_get_network(interface, group); - connman_network_set_assoc_reject_table(network, - g_supplicant_network_clone_assoc_reject_table(supplicant_network)); + connman_network_set_assoc_reject_table(network, + g_supplicant_network_clone_assoc_reject_table(supplicant_network)); - g_supplicant_network_update_assoc_reject(interface, supplicant_network); + g_supplicant_network_update_assoc_reject(interface, supplicant_network); + } } -#endif bssid_list = (GSList *)connman_network_get_bssid_list(network); if (bssid_list) @@ -5686,12 +5686,13 @@ static void network_added(GSupplicantNetwork *supplicant_network) g_supplicant_network_is_hs20AP(supplicant_network)); connman_network_set_bssid_list(network, (GSList *)g_supplicant_network_get_bssid_list(supplicant_network)); -#endif -#if defined TIZEN_EXT_INS - connman_network_set_last_connected_bssid(network, - g_supplicant_network_get_last_connected_bssid(supplicant_network)); - connman_network_set_assoc_reject_table(network, - g_supplicant_network_clone_assoc_reject_table(supplicant_network)); + + if (TIZEN_INS_ENABLED) { + connman_network_set_last_connected_bssid(network, + g_supplicant_network_get_last_connected_bssid(supplicant_network)); + connman_network_set_assoc_reject_table(network, + g_supplicant_network_clone_assoc_reject_table(supplicant_network)); + } #endif connman_network_set_available(network, true); @@ -5704,12 +5705,11 @@ static void network_added(GSupplicantNetwork *supplicant_network) #endif connman_network_set_group(network, group); -#if defined TIZEN_EXT_INS - g_supplicant_network_set_last_connected_bssid(supplicant_network, - connman_network_get_last_connected_bssid(network)); -#endif - #if defined TIZEN_EXT + if (TIZEN_INS_ENABLED) + g_supplicant_network_set_last_connected_bssid(supplicant_network, + connman_network_get_last_connected_bssid(network)); + if (wifi_first_scan == true) found_with_first_scan = true; #endif @@ -5870,35 +5870,39 @@ static void network_changed(GSupplicantNetwork *network, const char *property) calculate_strength(network)); update_needed = true; } -#if defined TIZEN_EXT && defined TIZEN_EXT_INS - else if (g_str_equal(property, "LastConnectedBSSID")) { - const char *ident, *group; - char *service_ident; - bool need_save; - - ident = connman_device_get_ident(wifi->device); - group = connman_network_get_group(connman_network); - if (ident && group) { - service_ident = g_strdup_printf("%s_%s_%s", - __connman_network_get_type(connman_network), ident, group); - - need_save = connman_device_set_last_connected_ident(wifi->device, service_ident); - if (need_save) - connman_device_save_last_connected(wifi->device); - - g_free(service_ident); - } +#if defined TIZEN_EXT + else if (TIZEN_INS_ENABLED) { + if (g_str_equal(property, "LastConnectedBSSID")) { + const char *ident, *group; + char *service_ident; + bool need_save; + + ident = connman_device_get_ident(wifi->device); + group = connman_network_get_group(connman_network); + if (ident && group) { + service_ident = g_strdup_printf("%s_%s_%s", + __connman_network_get_type(connman_network), ident, group); + + need_save = connman_device_set_last_connected_ident(wifi->device, service_ident); + if (need_save) + connman_device_save_last_connected(wifi->device); + + g_free(service_ident); + } - connman_network_set_last_connected_bssid(connman_network, + connman_network_set_last_connected_bssid(connman_network, g_supplicant_network_get_last_connected_bssid(network)); - update_needed = true; - } else if (g_str_equal(property, "UpdateAssocReject")) { - connman_network_set_assoc_reject_table(connman_network, - g_supplicant_network_clone_assoc_reject_table(network)); - update_needed = true; + update_needed = true; + } else if (g_str_equal(property, "UpdateAssocReject")) { + connman_network_set_assoc_reject_table(connman_network, + g_supplicant_network_clone_assoc_reject_table(network)); + update_needed = true; + } else { + update_needed = false; + } } -#endif /* defined TIZEN_EXT && defined TIZEN_EXT_INS */ +#endif /* defined TIZEN_EXT */ else update_needed = false; @@ -6778,7 +6782,7 @@ static int tech_set_regdom(struct connman_technology *technology, const char *al return g_supplicant_set_country(alpha2, regdom_callback, NULL); } -#if defined TIZEN_EXT && defined TIZEN_EXT_INS +#if defined TIZEN_EXT static void supp_ins_init(void) { const char *string; @@ -6803,7 +6807,7 @@ static void supp_ins_init(void) connman_setting_get_int("INSSignalLevel3_2_4GHz") ); } -#endif /* defined TIZEN_EXT && defined TIZEN_EXT_INS */ +#endif /* defined TIZEN_EXT */ static struct connman_technology_driver tech_driver = { .name = "wifi", @@ -6855,11 +6859,9 @@ static int wifi_init(void) DBG("Min SNR: %d, Min RSSI: %d(2.4GHz), %d(5GHz), %d(6GHz)", min_snr, min_rssi_2_4GHz, min_rssi_5GHz, min_rssi_6GHz); -#endif - -#if defined TIZEN_EXT && defined TIZEN_EXT_INS - supp_ins_init(); -#endif /* defined TIZEN_EXT && defined TIZEN_EXT_INS */ + if (TIZEN_INS_ENABLED) + supp_ins_init(); +#endif /* defined TIZEN_EXT */ return 0; } |