diff options
Diffstat (limited to 'gsupplicant/supplicant.c')
-rw-r--r-- | gsupplicant/supplicant.c | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/gsupplicant/supplicant.c b/gsupplicant/supplicant.c index 909a6178..d2e4a649 100644 --- a/gsupplicant/supplicant.c +++ b/gsupplicant/supplicant.c @@ -1169,6 +1169,55 @@ bool g_supplicant_peer_has_requested_connection(GSupplicantPeer *peer) return peer->connection_requested; } +#if defined TIZEN_EXT +/* + * Description: Network client requires additional wifi specific info + */ +const unsigned char *g_supplicant_network_get_bssid(GSupplicantNetwork *network) +{ + if (network == NULL || network->best_bss == NULL) + return NULL; + + return (const unsigned char *)network->best_bss->bssid; +} + +unsigned int g_supplicant_network_get_maxrate(GSupplicantNetwork *network) +{ + if (network == NULL || network->best_bss == NULL) + return 0; + + return network->best_bss->maxrate; +} + +const char *g_supplicant_network_get_enc_mode(GSupplicantNetwork *network) +{ + if (network == NULL || network->best_bss == NULL) + return NULL; + + if (network->best_bss->security == G_SUPPLICANT_SECURITY_PSK || + network->best_bss->security == G_SUPPLICANT_SECURITY_IEEE8021X) { + unsigned int pairwise; + + pairwise = network->best_bss->rsn_pairwise | + network->best_bss->wpa_pairwise; + + if ((pairwise & G_SUPPLICANT_PAIRWISE_CCMP) && + (pairwise & G_SUPPLICANT_PAIRWISE_TKIP)) + return "mixed"; + else if (pairwise & G_SUPPLICANT_PAIRWISE_CCMP) + return "aes"; + else if (pairwise & G_SUPPLICANT_PAIRWISE_TKIP) + return "tkip"; + + } else if (network->best_bss->security == G_SUPPLICANT_SECURITY_WEP) + return "wep"; + else if (network->best_bss->security == G_SUPPLICANT_SECURITY_NONE) + return "none"; + + return NULL; +} +#endif + static void merge_network(GSupplicantNetwork *network) { GString *str; |