[wifi-manager][Get max speed of connected AP] 64/189564/1
authorMayank Haarit <mayank.h@samsung.com>
Tue, 18 Sep 2018 14:50:34 +0000 (20:20 +0530)
committerMayank Haarit <mayank.h@samsung.com>
Tue, 18 Sep 2018 14:50:34 +0000 (20:20 +0530)
This patch contains changes to get the max
speed of connected AP.

Change-Id: Id11940a84cf197475431ca47759d2133a5bc8c16
Signed-off-by: Mayank Haarit <mayank.h@samsung.com>
include/network_interface.h
packaging/capi-network-wifi-manager.spec
src/network_interface.c
src/wifi_ap.c

index 88df089..4061724 100755 (executable)
@@ -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. */
index c115057..45ad4b4 100755 (executable)
@@ -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
index 141fbca..cce9a72 100755 (executable)
@@ -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);
index dcdaebe..4f5b086 100755 (executable)
@@ -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__;