diff options
-rwxr-xr-x | gsupplicant/gsupplicant.h | 2 | ||||
-rwxr-xr-x | gsupplicant/supplicant.c | 13 | ||||
-rwxr-xr-x | include/network.h | 4 | ||||
-rwxr-xr-x | packaging/connman.spec | 2 | ||||
-rwxr-xr-x | plugins/wifi.c | 4 | ||||
-rwxr-xr-x | src/network.c | 10 |
6 files changed, 20 insertions, 15 deletions
diff --git a/gsupplicant/gsupplicant.h b/gsupplicant/gsupplicant.h index 8efa202b..ffd07b25 100755 --- a/gsupplicant/gsupplicant.h +++ b/gsupplicant/gsupplicant.h @@ -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); diff --git a/gsupplicant/supplicant.c b/gsupplicant/supplicant.c index 89591fee..dc2232fc 100755 --- a/gsupplicant/supplicant.c +++ b/gsupplicant/supplicant.c @@ -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; } diff --git a/include/network.h b/include/network.h index 91abe515..a6095224 100755 --- a/include/network.h +++ b/include/network.h @@ -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); diff --git a/packaging/connman.spec b/packaging/connman.spec index c66307fb..d0b2b2c4 100755 --- a/packaging/connman.spec +++ b/packaging/connman.spec @@ -4,7 +4,7 @@ Name: connman Version: 1.29 -Release: 12 +Release: 13 License: GPL-2.0+ Summary: Connection Manager Url: http://connman.net diff --git a/plugins/wifi.c b/plugins/wifi.c index 2e9d1eb2..cc5f2424 100755 --- a/plugins/wifi.c +++ b/plugins/wifi.c @@ -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 diff --git a/src/network.c b/src/network.c index c3976040..d20385f2 100755 --- a/src/network.c +++ b/src/network.c @@ -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 |