summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaehyun Kim <jeik01.kim@samsung.com>2013-04-16 17:43:48 +0900
committerZhang zhengguang <zhengguang.zhang@intel.com>2013-07-01 11:20:23 +0800
commit74aa0e84aeb9c42960b4ffd095516c9ac0673aa5 (patch)
tree3ad549b5b6b35a7c873bf1e51a9718f7eb9bf2f4
parent936ec03de949ffa457b3ee778c369a9a4fc2e42f (diff)
downloadconnman-74aa0e84aeb9c42960b4ffd095516c9ac0673aa5.tar.gz
connman-74aa0e84aeb9c42960b4ffd095516c9ac0673aa5.tar.bz2
connman-74aa0e84aeb9c42960b4ffd095516c9ac0673aa5.zip
Fix Wi-Fi WEP OPEN and WEP SHARED
Unable to connect with the WEP(open key) mode AP again with correct password if connecting the AP with wrong password before. Fix this issue.
-rw-r--r--gsupplicant/supplicant.c17
-rw-r--r--plugins/wifi.c19
-rw-r--r--src/service.c6
3 files changed, 42 insertions, 0 deletions
diff --git a/gsupplicant/supplicant.c b/gsupplicant/supplicant.c
index 79bad7d5..0f625bcb 100644
--- a/gsupplicant/supplicant.c
+++ b/gsupplicant/supplicant.c
@@ -3430,6 +3430,17 @@ static void add_network_security_proto(DBusMessageIter *dict,
g_free(proto);
}
+#if defined TIZEN_EXT
+static void add_network_security_none(DBusMessageIter *dict,
+ GSupplicantSSID *ssid)
+{
+ const char *auth_alg = "OPEN";
+
+ supplicant_dbus_dict_append_basic(dict, "auth_alg",
+ DBUS_TYPE_STRING, &auth_alg);
+}
+#endif
+
static void add_network_security(DBusMessageIter *dict, GSupplicantSSID *ssid)
{
char *key_mgmt;
@@ -3437,6 +3448,12 @@ static void add_network_security(DBusMessageIter *dict, GSupplicantSSID *ssid)
switch (ssid->security) {
case G_SUPPLICANT_SECURITY_UNKNOWN:
case G_SUPPLICANT_SECURITY_NONE:
+#if defined TIZEN_EXT
+ key_mgmt = "NONE";
+ add_network_security_none(dict, ssid);
+ add_network_security_ciphers(dict, ssid);
+ break;
+#endif
case G_SUPPLICANT_SECURITY_WEP:
key_mgmt = "NONE";
add_network_security_wep(dict, ssid);
diff --git a/plugins/wifi.c b/plugins/wifi.c
index 7a334cc6..c50945b8 100644
--- a/plugins/wifi.c
+++ b/plugins/wifi.c
@@ -1367,6 +1367,9 @@ static int network_disconnect(struct connman_network *network)
struct connman_device *device = connman_network_get_device(network);
struct wifi_data *wifi;
int err;
+#if defined TIZEN_EXT
+ struct connman_service *service;
+#endif
DBG("network %p", network);
@@ -1374,6 +1377,22 @@ static int network_disconnect(struct connman_network *network)
if (wifi == NULL || wifi->interface == NULL)
return -ENODEV;
+#if defined TIZEN_EXT
+ if (connman_network_get_associating(network) == TRUE)
+ connman_network_set_error(network,
+ CONNMAN_NETWORK_ERROR_ASSOCIATE_FAIL);
+ else {
+ service = connman_service_lookup_from_network(network);
+
+ if (service != NULL &&
+ (__connman_service_is_connected_state(service,
+ CONNMAN_IPCONFIG_TYPE_IPV4) == FALSE &&
+ __connman_service_is_connected_state(service,
+ CONNMAN_IPCONFIG_TYPE_IPV6) == FALSE) &&
+ (connman_service_get_favorite(service) == FALSE))
+ __connman_service_set_passphrase(service, NULL);
+ }
+#endif
connman_network_set_associating(network, FALSE);
if (wifi->disconnecting == TRUE)
diff --git a/src/service.c b/src/service.c
index 3f6f12c9..0bb77afc 100644
--- a/src/service.c
+++ b/src/service.c
@@ -5430,7 +5430,13 @@ int __connman_service_indicate_error(struct connman_service *service,
set_error(service, error);
+#if defined TIZEN_EXT
+ if (service->favorite == FALSE &&
+ (service->error == CONNMAN_SERVICE_ERROR_INVALID_KEY ||
+ service->error == CONNMAN_SERVICE_ERROR_CONNECT_FAILED))
+#else
if (service->error == CONNMAN_SERVICE_ERROR_INVALID_KEY)
+#endif
__connman_service_set_passphrase(service, NULL);
__connman_service_ipconfig_indicate_state(service,