From: Mayank Haarit Date: Tue, 18 Sep 2018 14:50:34 +0000 (+0530) Subject: [wifi-manager][Get max speed of connected AP] X-Git-Tag: submit/tizen/20181106.114249~1^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=91f77c68d4e30921d749d1c41bbdab4fcc581eaa;p=platform%2Fcore%2Fapi%2Fwifi-manager.git [wifi-manager][Get max speed of connected AP] This patch contains changes to get the max speed of connected AP. Change-Id: Id11940a84cf197475431ca47759d2133a5bc8c16 Signed-off-by: Mayank Haarit --- diff --git a/include/network_interface.h b/include/network_interface.h index 88df089..4061724 100755 --- a/include/network_interface.h +++ b/include/network_interface.h @@ -161,7 +161,7 @@ typedef struct { char bssid[NET_MAX_MAC_ADDR_LEN+1]; /** Basic service set identification */ unsigned char Strength; /** Strength : between 0 and 100 */ unsigned int frequency; /** Frequency band(MHz) */ - unsigned int max_rate; /** Maximum speed of the line(bps) */ + int max_rate; /** Maximum speed of the line(Mbps) */ char PassphraseRequired; /** If a passphrase has been set already or if no passphrase is needed, then this property will be set to FALSE. */ diff --git a/packaging/capi-network-wifi-manager.spec b/packaging/capi-network-wifi-manager.spec index c115057..45ad4b4 100755 --- a/packaging/capi-network-wifi-manager.spec +++ b/packaging/capi-network-wifi-manager.spec @@ -1,6 +1,6 @@ Name: capi-network-wifi-manager Summary: Network Wi-Fi library in TIZEN C API -Version: 1.0.39 +Version: 1.0.40 Release: 1 Group: System/Network License: Apache-2.0 diff --git a/src/network_interface.c b/src/network_interface.c index 141fbca..cce9a72 100755 --- a/src/network_interface.c +++ b/src/network_interface.c @@ -972,8 +972,8 @@ static int __net_extract_wifi_info(GVariantIter *array, net_profile_info_s* Prof if (value != NULL) g_strlcpy(ProfInfo->bssid, value, NET_MAX_MAC_ADDR_LEN); - } else if (g_strcmp0(key, "MaxRate") == 0) { - ProfInfo->max_rate = (unsigned int)g_variant_get_uint32(var); + } else if (g_strcmp0(key, "MaxSpeed") == 0) { + ProfInfo->max_rate = g_variant_get_int32(var); } else if (g_strcmp0(key, "Frequency") == 0) { ProfInfo->frequency = (unsigned int)g_variant_get_uint16(var); diff --git a/src/wifi_ap.c b/src/wifi_ap.c index dcdaebe..4f5b086 100755 --- a/src/wifi_ap.c +++ b/src/wifi_ap.c @@ -593,7 +593,7 @@ EXPORT_API int wifi_manager_ap_get_max_speed(wifi_manager_ap_h ap, int *max_spee } net_profile_info_s *profile_info = ap; - *max_speed = (int)profile_info->max_rate / 1000000; + *max_speed = profile_info->max_rate; __NETWORK_CAPI_FUNC_EXIT__;