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