summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortaesub kim <taesub.kim@samsung.com>2016-06-14 04:30:50 (GMT)
committerGerrit Code Review <gerrit@review.vlan103.tizen.org>2016-06-14 04:30:50 (GMT)
commit6f5ffa18c1f8cf226313d9a8c9accb8781bf4a8c (patch)
tree3e54e92bcb13aa4d0fcced59c3eaba8b0b330beb
parentf64ceea943f1ff3b9ccc025a1cac7ada2d8daa91 (diff)
parent0e83b35474b8e01ccbaff484665a6f525ecd67fa (diff)
downloadconnman-6f5ffa18c1f8cf226313d9a8c9accb8781bf4a8c.zip
connman-6f5ffa18c1f8cf226313d9a8c9accb8781bf4a8c.tar.gz
connman-6f5ffa18c1f8cf226313d9a8c9accb8781bf4a8c.tar.bz2
-rwxr-xr-xgsupplicant/gsupplicant.h1
-rwxr-xr-xgsupplicant/supplicant.c12
-rwxr-xr-xinclude/network.h3
-rwxr-xr-xplugins/wifi.c2
-rwxr-xr-xsrc/agent-connman.c6
-rwxr-xr-xsrc/config.c3
-rwxr-xr-xsrc/network.c17
-rwxr-xr-xsrc/service.c15
8 files changed, 59 insertions, 0 deletions
diff --git a/gsupplicant/gsupplicant.h b/gsupplicant/gsupplicant.h
index ad78c29..e47421a 100755
--- a/gsupplicant/gsupplicant.h
+++ b/gsupplicant/gsupplicant.h
@@ -359,6 +359,7 @@ const unsigned char *g_supplicant_network_get_bssid(
GSupplicantNetwork *network);
unsigned int g_supplicant_network_get_maxrate(GSupplicantNetwork *network);
const char *g_supplicant_network_get_enc_mode(GSupplicantNetwork *network);
+bool g_supplicant_network_get_rsn_selected(GSupplicantNetwork *network);
unsigned int g_supplicant_network_is_hs20AP(GSupplicantNetwork *network);
const char *g_supplicant_network_get_eap(GSupplicantNetwork *network);
const char *g_supplicant_network_get_identity(GSupplicantNetwork *network);
diff --git a/gsupplicant/supplicant.c b/gsupplicant/supplicant.c
index fc8fd3d..806b4bd 100755
--- a/gsupplicant/supplicant.c
+++ b/gsupplicant/supplicant.c
@@ -1292,6 +1292,18 @@ const char *g_supplicant_network_get_enc_mode(GSupplicantNetwork *network)
return NULL;
}
+
+bool g_supplicant_network_get_rsn_selected(GSupplicantNetwork *network)
+{
+ if (network == NULL || network->best_bss == NULL)
+ return 0;
+
+ if (network->best_bss->rsn_selected)
+ return true;
+ else
+ return false;
+}
+
#endif
static void merge_network(GSupplicantNetwork *network)
diff --git a/include/network.h b/include/network.h
index 97b76e5..db25ae0 100755
--- a/include/network.h
+++ b/include/network.h
@@ -132,6 +132,9 @@ int connman_network_set_enc_mode(struct connman_network *network,
const char *encryption_mode);
const char *connman_network_get_enc_mode(struct connman_network *network);
+int connman_network_set_rsn_selected(struct connman_network *network,
+ bool rsn_selected);
+
int connman_network_set_proxy(struct connman_network *network,
const char *proxies);
diff --git a/plugins/wifi.c b/plugins/wifi.c
index e8c7ae5..66e6bd1 100755
--- a/plugins/wifi.c
+++ b/plugins/wifi.c
@@ -2960,6 +2960,8 @@ static void network_added(GSupplicantNetwork *supplicant_network)
g_supplicant_network_get_maxrate(supplicant_network));
connman_network_set_enc_mode(network,
g_supplicant_network_get_enc_mode(supplicant_network));
+ connman_network_set_rsn_selected(network,
+ g_supplicant_network_get_rsn_selected(supplicant_network));
#endif
connman_network_set_available(network, true);
connman_network_set_string(network, "WiFi.Mode", mode);
diff --git a/src/agent-connman.c b/src/agent-connman.c
index d9502a7..177cbe0 100755
--- a/src/agent-connman.c
+++ b/src/agent-connman.c
@@ -225,6 +225,9 @@ static void request_input_append_passphrase(DBusMessageIter *iter,
value = "wep";
break;
case CONNMAN_SERVICE_SECURITY_PSK:
+#if defined TIZEN_EXT
+ case CONNMAN_SERVICE_SECURITY_RSN:
+#endif
value = "psk";
break;
case CONNMAN_SERVICE_SECURITY_8021X:
@@ -358,6 +361,9 @@ static void previous_passphrase_handler(DBusMessageIter *iter,
data.type = "wep";
break;
case CONNMAN_SERVICE_SECURITY_PSK:
+#if defined TIZEN_EXT
+ case CONNMAN_SERVICE_SECURITY_RSN:
+#endif
data.type = "psk";
break;
/*
diff --git a/src/config.c b/src/config.c
index 8ae1764..778e57c 100755
--- a/src/config.c
+++ b/src/config.c
@@ -685,6 +685,9 @@ static bool load_service(GKeyFile *keyfile, const char *group,
if (str) {
if (security == CONNMAN_SERVICE_SECURITY_PSK ||
+#if defined TIZEN_EXT
+ security == CONNMAN_SERVICE_SECURITY_RSN ||
+#endif
security == CONNMAN_SERVICE_SECURITY_WEP) {
service->security = security;
} else {
diff --git a/src/network.c b/src/network.c
index 4b2ae11..0d6b442 100755
--- a/src/network.c
+++ b/src/network.c
@@ -97,6 +97,7 @@ struct connman_network {
unsigned char bssid[WIFI_BSSID_LEN_MAX];
unsigned int maxrate;
unsigned int isHS20AP;
+ bool rsn_selected;
#endif
} wifi;
@@ -1875,6 +1876,14 @@ const char *connman_network_get_enc_mode(struct connman_network *network)
return (const char *)network->wifi.encryption_mode;
}
+int connman_network_set_rsn_selected(struct connman_network *network,
+ bool rsn_selected)
+{
+ network->wifi.rsn_selected = rsn_selected;
+
+ return 0;
+}
+
int connman_network_set_proxy(struct connman_network *network,
const char *proxies)
{
@@ -2125,7 +2134,15 @@ const char *connman_network_get_string(struct connman_network *network,
else if (g_str_equal(key, "WiFi.Mode"))
return network->wifi.mode;
else if (g_str_equal(key, "WiFi.Security"))
+#if defined TIZEN_EXT
+ if (network->wifi.rsn_selected != true ||
+ g_str_equal(network->wifi.security, "ieee8021x"))
+ return network->wifi.security;
+ else
+ return "rsn";
+#else
return network->wifi.security;
+#endif
else if (g_str_equal(key, "WiFi.Passphrase"))
return network->wifi.passphrase;
else if (g_str_equal(key, "WiFi.EAP"))
diff --git a/src/service.c b/src/service.c
index ca29119..b424bd5 100755
--- a/src/service.c
+++ b/src/service.c
@@ -327,6 +327,10 @@ enum connman_service_security __connman_service_string2security(const char *str)
return CONNMAN_SERVICE_SECURITY_NONE;
if (!strcmp(str, "wep"))
return CONNMAN_SERVICE_SECURITY_WEP;
+#if defined TIZEN_EXT
+ if (!strcmp(str, "rsn"))
+ return CONNMAN_SERVICE_SECURITY_RSN;
+#endif
return CONNMAN_SERVICE_SECURITY_UNKNOWN;
}
@@ -342,8 +346,14 @@ static const char *security2string(enum connman_service_security security)
return "wep";
case CONNMAN_SERVICE_SECURITY_PSK:
case CONNMAN_SERVICE_SECURITY_WPA:
+#if defined TIZEN_EXT
+ return "psk";
+ case CONNMAN_SERVICE_SECURITY_RSN:
+ return "rsn";
+#else
case CONNMAN_SERVICE_SECURITY_RSN:
return "psk";
+#endif
case CONNMAN_SERVICE_SECURITY_8021X:
return "ieee8021x";
}
@@ -3377,7 +3387,9 @@ static int check_passphrase(enum connman_service_security security,
case CONNMAN_SERVICE_SECURITY_UNKNOWN:
case CONNMAN_SERVICE_SECURITY_NONE:
case CONNMAN_SERVICE_SECURITY_WPA:
+#if !defined TIZEN_EXT
case CONNMAN_SERVICE_SECURITY_RSN:
+#endif
DBG("service security '%s' (%d) not handled",
security2string(security), security);
@@ -3385,6 +3397,9 @@ static int check_passphrase(enum connman_service_security security,
return -EOPNOTSUPP;
case CONNMAN_SERVICE_SECURITY_PSK:
+#if defined TIZEN_EXT
+ case CONNMAN_SERVICE_SECURITY_RSN:
+#endif
/* A raw key is always 64 bytes length,
* its content is in hex representation.
* A PSK key must be between [8..63].