qcacld-3.0: Drop the blacklist event if no APs are present

Currently, target_if forwards the blacklist event to upper layers
even if there is no AP info present. This event can be dropped in
target_if to avoid accessing unallocated memory.

Change-Id: Icfaabb0a8e3304882979ffde7f5cd27fd4c8a067
CRs-Fixed: 3057424
This commit is contained in:
Srinivas Dasari
2021-10-21 17:31:29 +05:30
committed by Madan Koyyalamudi
parent a3828df476
commit b0b8c6afb5
2 changed files with 7 additions and 4 deletions

View File

@@ -259,6 +259,12 @@ target_if_cm_btm_blacklist_event(ol_scn_t scn, uint8_t *event, uint32_t len)
return -EINVAL; return -EINVAL;
} }
if (!dst_list) {
/* No APs to blacklist, just return */
target_if_err_rl("No APs in blacklist received");
return 0;
}
roam_rx_ops = target_if_cm_get_roam_rx_ops(psoc); roam_rx_ops = target_if_cm_get_roam_rx_ops(psoc);
if (!roam_rx_ops || !roam_rx_ops->btm_blacklist_event) { if (!roam_rx_ops || !roam_rx_ops->btm_blacklist_event) {
target_if_err("No valid roam rx ops"); target_if_err("No valid roam rx ops");

View File

@@ -2711,11 +2711,8 @@ extract_btm_blacklist_event(wmi_unified_t wmi_handle,
} }
num_entries = param_buf->num_blacklist_with_timeout; num_entries = param_buf->num_blacklist_with_timeout;
if (num_entries == 0) { if (num_entries == 0)
/* no aps to blacklist just return*/
wmi_err("No APs in blacklist received");
return QDF_STATUS_SUCCESS; return QDF_STATUS_SUCCESS;
}
if (num_entries > MAX_RSSI_AVOID_BSSID_LIST) { if (num_entries > MAX_RSSI_AVOID_BSSID_LIST) {
wmi_err("num blacklist entries:%d exceeds maximum value", wmi_err("num blacklist entries:%d exceeds maximum value",