From 469c90d6324e2f3341f3f363ff1cd2f84b0d2457 Mon Sep 17 00:00:00 2001 From: Mohit Ghuley Date: Tue, 15 Dec 2020 11:50:46 +0530 Subject: [PATCH] [APR-6609]wlbt: HAL changes for Blacklist reset Blacklist Reset changes in HAL SCSC-Bug-Id: HOST-13860 Signed-off-by: Mohit Ghuley Change-Id: I4a74e5d99f10e0259791f51ab74c7d8099061f33 --- roam.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/roam.cpp b/roam.cpp index d3b8f41..83c9155 100755 --- a/roam.cpp +++ b/roam.cpp @@ -57,10 +57,12 @@ public: return result; } - for (int i = 0; i < mParams->num_bssid; i++) { - result = request.put_addr(GSCAN_ATTRIBUTE_BLACKLIST_BSSID, mParams->bssids[i]); - if (result < 0) { - return result; + if (mParams->num_bssid > 0) { + for (int i = 0; i < mParams->num_bssid; i++) { + result = request.put_addr(GSCAN_ATTRIBUTE_BLACKLIST_BSSID, mParams->bssids[i]); + if (result < 0) { + return result; + } } } request.attr_end(data); @@ -212,9 +214,6 @@ wifi_error wifi_configure_roaming(wifi_interface_handle iface, wifi_roaming_conf requestId = get_requestid(); bssid_params.num_bssid = roaming_config->num_blacklist_bssid; - if (bssid_params.num_bssid == 0) { - return WIFI_SUCCESS; - } memcpy(bssid_params.bssids, roaming_config->blacklist_bssid, (bssid_params.num_bssid * sizeof(mac_addr))); -- 2.20.1