Modify to get rsn mode using pairwise 89/76989/1 accepted/tizen/common/20160628.141818 accepted/tizen/ivi/20160629.021304 accepted/tizen/mobile/20160629.021329 accepted/tizen/tv/20160629.021220 accepted/tizen/wearable/20160629.021326 submit/tizen/20160628.112647
authorhyunuktak <hyunuk.tak@samsung.com>
Tue, 28 Jun 2016 07:55:17 +0000 (16:55 +0900)
committerhyunuktak <hyunuk.tak@samsung.com>
Tue, 28 Jun 2016 07:55:21 +0000 (16:55 +0900)
Change-Id: Icb3942835130528c4d61d427ee1891d88cc1ac3b
Signed-off-by: hyunuktak <hyunuk.tak@samsung.com>
gsupplicant/gsupplicant.h
gsupplicant/supplicant.c
include/network.h
packaging/connman.spec
plugins/wifi.c
src/network.c

index 8efa202..ffd07b2 100755 (executable)
@@ -372,7 +372,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);
+bool g_supplicant_network_get_rsn_mode(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);
index 89591fe..dc2232f 100755 (executable)
@@ -1315,14 +1315,19 @@ const char *g_supplicant_network_get_enc_mode(GSupplicantNetwork *network)
        return NULL;
 }
 
-bool g_supplicant_network_get_rsn_selected(GSupplicantNetwork *network)
+bool g_supplicant_network_get_rsn_mode(GSupplicantNetwork *network)
 {
        if (network == NULL || network->best_bss == NULL)
                return 0;
 
-       if (network->best_bss->rsn_selected)
-               return true;
-       else
+       if (network->best_bss->rsn_selected) {
+               const char *mode = g_supplicant_network_get_enc_mode(network);
+               if (g_strcmp0(mode, "aes") == 0 ||
+                               g_strcmp0(mode, "mixed") == 0)
+                       return true;
+               else
+                       return false;
+       } else
                return false;
 }
 
index 91abe51..a609522 100755 (executable)
@@ -138,8 +138,8 @@ 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_rsn_mode(struct connman_network *network,
+                               bool rsn_mode);
 
 int connman_network_set_proxy(struct connman_network *network,
                                const char *proxies);
index c66307f..d0b2b2c 100755 (executable)
@@ -4,7 +4,7 @@
 
 Name:           connman
 Version:        1.29
-Release:        12
+Release:        13
 License:        GPL-2.0+
 Summary:        Connection Manager
 Url:            http://connman.net
index 2e9d1eb..cc5f242 100755 (executable)
@@ -2970,8 +2970,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));
+       connman_network_set_rsn_mode(network,
+                       g_supplicant_network_get_rsn_mode(supplicant_network));
        connman_network_set_keymgmt(network,
                        g_supplicant_network_get_keymgmt(supplicant_network));
 #endif
index c397604..d20385f 100755 (executable)
@@ -99,7 +99,7 @@ struct connman_network {
                unsigned int isHS20AP;
                unsigned int keymgmt;
                char *keymgmt_type;
-               bool rsn_selected;
+               bool rsn_mode;
                int disconnect_reason;
 #endif
        } wifi;
@@ -1913,10 +1913,10 @@ 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)
+int connman_network_set_rsn_mode(struct connman_network *network,
+                               bool rsn_mode)
 {
-       network->wifi.rsn_selected = rsn_selected;
+       network->wifi.rsn_mode = rsn_mode;
 
        return 0;
 }
@@ -2210,7 +2210,7 @@ const char *connman_network_get_string(struct connman_network *network,
                return network->wifi.mode;
        else if (g_str_equal(key, "WiFi.Security"))
 #if defined TIZEN_EXT
-               if (network->wifi.rsn_selected != true ||
+               if (network->wifi.rsn_mode != true ||
                    g_str_equal(network->wifi.security, "ieee8021x"))
                        return network->wifi.security;
                else