wlbt: return SUCCESS when num_bssid is 0
authorkw0619.kim <kw0619.kim@samsung.com>
Thu, 7 Nov 2019 10:19:28 +0000 (19:19 +0900)
committerkw0619.kim <kw0619.kim@samsung.com>
Tue, 28 Jul 2020 11:34:25 +0000 (20:34 +0900)
VTS is failed when maximum blacklist is zero.
If max blacklist is zero, return SUCCESS

SCSC-Bug-Id: HOST-11403
Change-Id: Ic9c56570c947df87cd6d37b3697a65cbcb41fa6e
Signed-off-by: kw0619.kim <kw0619.kim@samsung.com>
roam.cpp

index 0993ec772d4b4bf4ec991f89799617b1a3e1e43c..1d79b9d59f170cbd6e03090904eae3539e14ee00 100755 (executable)
--- a/roam.cpp
+++ b/roam.cpp
@@ -205,13 +205,17 @@ wifi_error wifi_configure_roaming(wifi_interface_handle iface, wifi_roaming_conf
     if (!roaming_config) {\r
         ALOGE("%s: Invalid Buffer provided. Exit", __FUNCTION__);\r
         return WIFI_ERROR_INVALID_ARGS;\r
-   }\r
+    }\r
 \r
     /* Generate request id randomly*/\r
-   requestId = get_requestid();\r
-   bssid_params.num_bssid = roaming_config->num_blacklist_bssid;\r
+    requestId = get_requestid();\r
+    bssid_params.num_bssid = roaming_config->num_blacklist_bssid;\r
+\r
+    if (bssid_params.num_bssid == 0) {\r
+        return WIFI_SUCCESS;\r
+    }\r
 \r
-   memcpy(bssid_params.bssids, roaming_config->blacklist_bssid,\r
+    memcpy(bssid_params.bssids, roaming_config->blacklist_bssid,\r
            (bssid_params.num_bssid * sizeof(mac_addr)));\r
 \r
     ret = wifi_set_bssid_blacklist(requestId, iface, bssid_params);\r