summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xgsupplicant/gsupplicant.h1
-rwxr-xr-xgsupplicant/supplicant.c12
-rwxr-xr-xinclude/network.h3
-rwxr-xr-xpackaging/connman.spec2
-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
9 files changed, 60 insertions, 1 deletions
diff --git a/gsupplicant/gsupplicant.h b/gsupplicant/gsupplicant.h
index ad78c29d..e47421a4 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 834be592..f558afb3 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 97b76e5b..db25ae02 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/packaging/connman.spec b/packaging/connman.spec
index 4bf2d1a0..fd58f953 100755
--- a/packaging/connman.spec
+++ b/packaging/connman.spec
@@ -4,7 +4,7 @@
Name: connman
Version: 1.29
-Release: 11
+Release: 12
License: GPL-2.0+
Summary: Connection Manager
Url: http://connman.net
diff --git a/plugins/wifi.c b/plugins/wifi.c
index e8c7ae57..66e6bd17 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 d9502a7a..177cbe0a 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 8ae1764d..778e57cf 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 ad677467..3552056a 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;
@@ -1882,6 +1883,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)
{
@@ -2132,7 +2141,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 5dab82c8..ca326980 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";
}
@@ -3371,7 +3381,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);
@@ -3379,6 +3391,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].