int servicing;
#if defined TIZEN_EXT
int assoc_retry_count;
- struct connman_network *interface_disconnected_network;
struct connman_network *scan_pending_network;
#endif
};
#if defined TIZEN_EXT
#include "connman.h"
-#define TIZEN_ASSOC_RETRY_COUNT 3
+#define TIZEN_ASSOC_RETRY_COUNT 4
static gboolean wifi_first_scan = false;
static gboolean found_with_first_scan = false;
connman_device_unref(device);
#if defined TIZEN_EXT
- if (wifi && wifi->scan_pending_network) {
+ if (wifi && wifi->scan_pending_network && result != -EIO) {
network_connect(wifi->scan_pending_network);
wifi->scan_pending_network = NULL;
+ connman_network_set_connecting(wifi->network);
}
if (is_wifi_notifier_registered != true &&
#if defined TIZEN_EXT
wifi->scan_pending_network = NULL;
- wifi->interface_disconnected_network = NULL;
if (is_wifi_notifier_registered == true) {
connman_notifier_unregister(¬ifier);
if (wifi->scan_pending_network == network)
wifi->scan_pending_network = NULL;
-
- if (wifi->interface_disconnected_network == network)
- wifi->interface_disconnected_network = NULL;
#endif
}
return;
found:
- wifi->interface_disconnected_network = NULL;
#endif
if (result == -ENOKEY) {
connman_network_set_error(network,
return G_SUPPLICANT_SECURITY_PSK;
else if (g_str_equal(security, "ieee8021x"))
return G_SUPPLICANT_SECURITY_IEEE8021X;
+#if defined TIZEN_EXT
+ else if (g_str_equal(security, "ft_psk") == TRUE)
+ return G_SUPPLICANT_SECURITY_FT_PSK;
+ else if (g_str_equal(security, "ft_ieee8021x") == TRUE)
+ return G_SUPPLICANT_SECURITY_FT_IEEE8021X;
+#endif
return G_SUPPLICANT_SECURITY_UNKNOWN;
}
ssid_init(ssid, network);
-#if defined TIZEN_EXT
- if (wifi->interface_disconnected_network == network) {
- g_free(ssid);
- throw_wifi_scan(device, scan_callback);
-
- if (wifi->disconnecting != TRUE) {
- wifi->scan_pending_network = network;
- wifi->interface_disconnected_network = NULL;
- }
-
- return -EINPROGRESS;
- }
-#endif
-
if (wifi->disconnecting) {
wifi->pending_network = network;
g_free(ssid);
wifi->network = connman_network_ref(network);
wifi->retries = 0;
#if defined TIZEN_EXT
- wifi->interface_disconnected_network = NULL;
wifi->scan_pending_network = NULL;
#endif
if (wifi->scan_pending_network == network)
wifi->scan_pending_network = NULL;
- if (wifi->interface_disconnected_network == network)
- wifi->interface_disconnected_network = NULL;
#endif
connman_network_set_associating(network, false);
* however QA team recommends that the invalid-key error
* might be better to display for user experience.
*/
- connman_network_set_error(network, CONNMAN_NETWORK_ERROR_INVALID_KEY);
+ connman_network_set_error(network, CONNMAN_NETWORK_ERROR_ASSOCIATE_FAIL);
return false;
}
reset_autoscan(device);
wifi->assoc_retry_count = 0;
+
+ wifi->scan_pending_network = NULL;
#else
/* though it should be already stopped: */
stop_autoscan(device);
DBG("Could not disables selected network");
#if defined TIZEN_EXT
+ int err;
+ int reason_code = 0;
+
+ err = g_supplicant_interface_remove_network(wifi->interface);
+ if (err < 0)
+ DBG("Failed to remove network(%d)", err);
+
+ reason_code = g_supplicant_interface_get_disconnect_reason(wifi->interface);
+
/* Some of Wi-Fi networks are not comply Wi-Fi specification.
* Retry association until its retry count is expired */
if (handle_wifi_assoc_retry(network, wifi) == true) {
break;
}
+ if(reason_code > 0){
+ DBG("Set disconnect reason code(%d)", reason_code);
+ connman_network_set_disconnect_reason(network, reason_code);
+ }
+
/* To avoid unnecessary repeated association in wpa_supplicant,
* "RemoveNetwork" should be made when Wi-Fi is disconnected */
if (wps != true && wifi->network && wifi->disconnecting == false) {
-#if 0 /* temporary disabled */
- int err;
-
wifi->disconnecting = true;
err = g_supplicant_interface_disconnect(wifi->interface,
disconnect_callback, wifi->network);
if (err < 0)
wifi->disconnecting = false;
-#endif
-
- if (wifi->connected)
- wifi->interface_disconnected_network = wifi->network;
- else
- wifi->interface_disconnected_network = NULL;
connman_network_set_connected(network, false);
connman_network_set_associating(network, false);
{
#if defined TIZEN_EXT
struct wifi_data *wifi;
+ bool is_associating = false;
+ static bool is_scanning = true;
#endif
DBG("");
network_connect(wifi->scan_pending_network);
wifi->scan_pending_network = NULL;
}
+
+ //service state - associating
+ if(!wifi || !wifi->network)
+ return;
+
+ is_associating = connman_network_get_associating(wifi->network);
+ if(is_associating && is_scanning){
+ is_scanning = false;
+ DBG("send scan for connecting");
+ throw_wifi_scan(wifi->device, scan_callback);
+
+ return;
+ }
+ is_scanning = true;
+
+ //go scan
+
#endif
}
g_supplicant_network_get_enc_mode(supplicant_network));
connman_network_set_rsn_selected(network,
g_supplicant_network_get_rsn_selected(supplicant_network));
+ connman_network_set_keymgmt(network,
+ g_supplicant_network_get_keymgmt(supplicant_network));
#endif
connman_network_set_available(network, true);
connman_network_set_string(network, "WiFi.Mode", mode);
if (connman_network == wifi->scan_pending_network)
wifi->scan_pending_network = NULL;
- if (connman_network == wifi->interface_disconnected_network)
- wifi->interface_disconnected_network = NULL;
-
if (connman_network == wifi->pending_network)
wifi->pending_network = NULL;