qcacmn: Replace blacklist/whitelist with denylist/allowlist

Replace blacklist/whitelist with denylist/allowlist

Change-Id: Ic10f0bb187f44c00f07752cd859a08342a945628
CRs-Fixed: 3087605
This commit is contained in:
chunquan
2021-12-16 15:02:49 +08:00
committed by Madan Koyyalamudi
vanhempi 037561c0a4
commit be297ae0ae
11 muutettua tiedostoa jossa 59 lisäystä ja 56 poistoa

Näytä tiedosto

@@ -1816,7 +1816,7 @@ void wlan_cm_calculate_bss_score(struct wlan_objmgr_pdev *pdev,
int pcl_chan_weight;
QDF_STATUS status;
struct psoc_phy_config *config;
enum cm_blacklist_action blacklist_action;
enum cm_denylist_action blacklist_action;
struct wlan_objmgr_psoc *psoc;
bool assoc_allowed;
struct scan_cache_node *force_connect_candidate = NULL;
@@ -1863,16 +1863,16 @@ void wlan_cm_calculate_bss_score(struct wlan_objmgr_pdev *pdev,
scan_entry->entry);
if (assoc_allowed)
blacklist_action = wlan_blacklist_action_on_bssid(pdev,
blacklist_action = wlan_denylist_action_on_bssid(pdev,
scan_entry->entry);
else
blacklist_action = CM_BLM_FORCE_REMOVE;
blacklist_action = CM_DLM_FORCE_REMOVE;
if (blacklist_action == CM_BLM_NO_ACTION ||
blacklist_action == CM_BLM_AVOID)
if (blacklist_action == CM_DLM_NO_ACTION ||
blacklist_action == CM_DLM_AVOID)
are_all_candidate_blacklisted = false;
if (blacklist_action == CM_BLM_NO_ACTION &&
if (blacklist_action == CM_DLM_NO_ACTION &&
pcl_lst && pcl_lst->num_of_pcl_channels &&
scan_entry->entry->rssi_raw > CM_PCL_RSSI_THRESHOLD &&
score_config->weight_config.pcl_weightage) {
@@ -1885,11 +1885,11 @@ void wlan_cm_calculate_bss_score(struct wlan_objmgr_pdev *pdev,
}
}
if (blacklist_action == CM_BLM_NO_ACTION ||
(are_all_candidate_blacklisted && blacklist_action == CM_BLM_REMOVE)) {
if (blacklist_action == CM_DLM_NO_ACTION ||
(are_all_candidate_blacklisted && blacklist_action == CM_DLM_REMOVE)) {
cm_calculate_bss_score(psoc, scan_entry->entry,
pcl_chan_weight, bssid_hint);
} else if (blacklist_action == CM_BLM_AVOID) {
} else if (blacklist_action == CM_DLM_AVOID) {
/* add min score so that it is added back in the end */
scan_entry->entry->bss_score =
CM_AVOID_CANDIDATE_MIN_SCORE;
@@ -1909,7 +1909,7 @@ void wlan_cm_calculate_bss_score(struct wlan_objmgr_pdev *pdev,
* then we keep a backup node and restore the candidate
* list.
*/
if (blacklist_action == CM_BLM_REMOVE &&
if (blacklist_action == CM_DLM_REMOVE &&
are_all_candidate_blacklisted) {
if (!force_connect_candidate) {
force_connect_candidate =
@@ -1942,11 +1942,11 @@ void wlan_cm_calculate_bss_score(struct wlan_objmgr_pdev *pdev,
}
/*
* If CM_BLM_REMOVE ie blacklisted or assoc not allowed then
* If CM_DLM_REMOVE ie blacklisted or assoc not allowed then
* free the entry else add back to the list sorted
*/
if (blacklist_action == CM_BLM_REMOVE ||
blacklist_action == CM_BLM_FORCE_REMOVE) {
if (blacklist_action == CM_DLM_REMOVE ||
blacklist_action == CM_DLM_FORCE_REMOVE) {
if (assoc_allowed)
mlme_nofl_debug("Candidate("QDF_MAC_ADDR_FMT" freq %d): rssi %d, blm action %d is in Blacklist, remove entry",
QDF_MAC_ADDR_REF(scan_entry->entry->bssid.bytes),

Näytä tiedosto

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2012-2015, 2020-2021 The Linux Foundation. All rights reserved.
* Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -799,8 +799,8 @@ cm_inform_blm_connect_complete(struct wlan_objmgr_vdev *vdev,
}
if (QDF_IS_STATUS_SUCCESS(resp->connect_status))
wlan_blm_update_bssid_connect_params(pdev, resp->bssid,
BLM_AP_CONNECTED);
wlan_dlm_update_bssid_connect_params(pdev, resp->bssid,
DLM_AP_CONNECTED);
return QDF_STATUS_SUCCESS;
}

Näytä tiedosto

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2012-2015,2020-2021 The Linux Foundation. All rights reserved.
* Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -440,8 +440,8 @@ cm_inform_blm_disconnect_complete(struct wlan_objmgr_vdev *vdev,
return;
}
wlan_blm_update_bssid_connect_params(pdev, resp->req.req.bssid,
BLM_AP_DISCONNECTED);
wlan_dlm_update_bssid_connect_params(pdev, resp->req.req.bssid,
DLM_AP_DISCONNECTED);
}
#else

Näytä tiedosto

@@ -255,24 +255,24 @@ struct pcl_freq_weight_list {
};
/**
* enum cm_blacklist_action - action taken by blacklist manager for the bssid
* @CM_BLM_NO_ACTION: No operation to be taken for the BSSID in the scan list.
* @CM_BLM_REMOVE: Remove the BSSID from the scan list (AP is blacklisted)
* This param is a way to inform the caller that this BSSID is blacklisted
* but it is a driver blacklist and we can connect to them if required.
* @CM_BLM_FORCE_REMOVE: Forcefully remove the BSSID from scan list.
* enum cm_denylist_action - action taken by denylist manager for the bssid
* @CM_DLM_NO_ACTION: No operation to be taken for the BSSID in the scan list.
* @CM_DLM_REMOVE: Remove the BSSID from the scan list (AP is denylisted)
* This param is a way to inform the caller that this BSSID is denylisted
* but it is a driver denylist and we can connect to them if required.
* @CM_DLM_FORCE_REMOVE: Forcefully remove the BSSID from scan list.
* This param is introduced as we want to differentiate between optional
* mandatory blacklisting. Driver blacklisting is optional and won't
* mandatory denylisting. Driver denylisting is optional and won't
* fail any CERT or protocol violations as it is internal implementation.
* hence FORCE_REMOVE will mean that driver cannot connect to this BSSID
* in any situation.
* @CM_BLM_AVOID: Add the Ap at last of the scan list (AP to Avoid)
* @CM_DLM_AVOID: Add the Ap at last of the scan list (AP to Avoid)
*/
enum cm_blacklist_action {
CM_BLM_NO_ACTION,
CM_BLM_REMOVE,
CM_BLM_FORCE_REMOVE,
CM_BLM_AVOID,
enum cm_denylist_action {
CM_DLM_NO_ACTION,
CM_DLM_REMOVE,
CM_DLM_FORCE_REMOVE,
CM_DLM_AVOID,
};
/**
@@ -287,16 +287,16 @@ struct etp_params {
uint32_t ba_window_size;
};
#ifdef FEATURE_BLACKLIST_MGR
enum cm_blacklist_action
wlan_blacklist_action_on_bssid(struct wlan_objmgr_pdev *pdev,
struct scan_cache_entry *entry);
#ifdef FEATURE_DENYLIST_MGR
enum cm_denylist_action
wlan_denylist_action_on_bssid(struct wlan_objmgr_pdev *pdev,
struct scan_cache_entry *entry);
#else
static inline enum cm_blacklist_action
wlan_blacklist_action_on_bssid(struct wlan_objmgr_pdev *pdev,
struct scan_cache_entry *entry)
static inline enum cm_denylist_action
wlan_denylist_action_on_bssid(struct wlan_objmgr_pdev *pdev,
struct scan_cache_entry *entry)
{
return CM_BLM_NO_ACTION;
return CM_DLM_NO_ACTION;
}
#endif