From be297ae0aeb67fd5d1d349bd59b2bae132ec487f Mon Sep 17 00:00:00 2001 From: chunquan Date: Thu, 16 Dec 2021 15:02:49 +0800 Subject: [PATCH] qcacmn: Replace blacklist/whitelist with denylist/allowlist Replace blacklist/whitelist with denylist/allowlist Change-Id: Ic10f0bb187f44c00f07752cd859a08342a945628 CRs-Fixed: 3087605 --- qdf/inc/qdf_types.h | 4 +- qdf/linux/src/qdf_trace.c | 4 +- umac/cmn_services/inc/wlan_cmn.h | 6 +-- .../core/src/wlan_cm_bss_scoring.c | 26 ++++++------ .../connection_mgr/core/src/wlan_cm_connect.c | 6 +-- .../core/src/wlan_cm_disconnect.c | 6 +-- .../dispatcher/inc/wlan_cm_bss_score_param.h | 42 +++++++++---------- wmi/inc/wmi_unified_priv.h | 4 +- wmi/inc/wmi_unified_sta_api.h | 3 +- wmi/src/wmi_unified_sta_api.c | 3 +- wmi/src/wmi_unified_sta_tlv.c | 11 ++--- 11 files changed, 59 insertions(+), 56 deletions(-) diff --git a/qdf/inc/qdf_types.h b/qdf/inc/qdf_types.h index d07e65e56a..16df117cd4 100644 --- a/qdf/inc/qdf_types.h +++ b/qdf/inc/qdf_types.h @@ -380,7 +380,7 @@ typedef bool (*qdf_irqlocked_func_t)(void *); * @QDF_MODULE_ID_CFR: CFR module ID * @QDF_MODULE_ID_DP_TX_CAPTURE: Tx capture enhancement feature ID * @QDF_MODULE_ID_INTEROP_ISSUES_AP: interop issues ap module ID - * @QDF_MODULE_ID_BLACKLIST_MGR: Blacklist Manager module + * @QDF_MODULE_ID_DENYLIST_MGR: Denylist Manager module * @QDF_MODULE_ID_QLD: QCA Live Debug module ID * @QDF_MODULE_ID_DYNAMIC_MODE_CHG: Dynamic mode change module ID * @QDF_MODULE_ID_COEX: Coex related config module ID @@ -538,7 +538,7 @@ typedef enum { QDF_MODULE_ID_CFR, QDF_MODULE_ID_DP_TX_CAPTURE, QDF_MODULE_ID_INTEROP_ISSUES_AP, - QDF_MODULE_ID_BLACKLIST_MGR, + QDF_MODULE_ID_DENYLIST_MGR, QDF_MODULE_ID_QLD, QDF_MODULE_ID_DYNAMIC_MODE_CHG, QDF_MODULE_ID_COEX, diff --git a/qdf/linux/src/qdf_trace.c b/qdf/linux/src/qdf_trace.c index 9f34c3c799..ff862b5d86 100644 --- a/qdf/linux/src/qdf_trace.c +++ b/qdf/linux/src/qdf_trace.c @@ -3357,7 +3357,7 @@ struct category_name_info g_qdf_category_name[MAX_SUPPORTED_CATEGORY] = { [QDF_MODULE_ID_CFR] = {"CFR"}, [QDF_MODULE_ID_DP_TX_CAPTURE] = {"TX_CAPTURE_ENHANCE"}, [QDF_MODULE_ID_INTEROP_ISSUES_AP] = {"INTEROP_ISSUES_AP"}, - [QDF_MODULE_ID_BLACKLIST_MGR] = {"blm"}, + [QDF_MODULE_ID_DENYLIST_MGR] = {"dlm"}, [QDF_MODULE_ID_QLD] = {"QLD"}, [QDF_MODULE_ID_DYNAMIC_MODE_CHG] = {"Dynamic Mode Change"}, [QDF_MODULE_ID_COEX] = {"COEX"}, @@ -3932,7 +3932,7 @@ static void set_default_trace_levels(struct category_info *cinfo) [QDF_MODULE_ID_CFR] = QDF_TRACE_LEVEL_ERROR, [QDF_MODULE_ID_DP_TX_CAPTURE] = QDF_TRACE_LEVEL_FATAL, [QDF_MODULE_ID_INTEROP_ISSUES_AP] = QDF_TRACE_LEVEL_NONE, - [QDF_MODULE_ID_BLACKLIST_MGR] = QDF_TRACE_LEVEL_NONE, + [QDF_MODULE_ID_DENYLIST_MGR] = QDF_TRACE_LEVEL_NONE, [QDF_MODULE_ID_QLD] = QDF_TRACE_LEVEL_ERROR, [QDF_MODULE_ID_DYNAMIC_MODE_CHG] = QDF_TRACE_LEVEL_INFO, [QDF_MODULE_ID_COEX] = QDF_TRACE_LEVEL_ERROR, diff --git a/umac/cmn_services/inc/wlan_cmn.h b/umac/cmn_services/inc/wlan_cmn.h index cbb734819b..e675b6b2ac 100644 --- a/umac/cmn_services/inc/wlan_cmn.h +++ b/umac/cmn_services/inc/wlan_cmn.h @@ -1,6 +1,6 @@ /* * Copyright (c) 2016-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 @@ -280,7 +280,7 @@ * @WLAN_UMAC_COMP_ACTION_OUI: ACTION OUI * @WLAN_UMAC_COMP_FWOL FW Offload * @WLAN_UMAC_COMP_INTEROP_ISSUES_AP interop issues ap component - * @WLAN_UMAC_COMP_BLACKLIST_MGR: Blacklist mgr component + * @WLAN_UMAC_COMP_DENYLIST_MGR: Denylist mgr component * @WLAN_UMAC_COMP_COEX: Coex config component * @WLAN_UMAC_COMP_FTM_TIME_SYNC: WLAN FTM TIMESYNC * @WLAN_UMAC_COMP_PKT_CAPTURE: Packet capture component @@ -331,7 +331,7 @@ enum wlan_umac_comp_id { WLAN_UMAC_COMP_FWOL = 29, WLAN_UMAC_COMP_CFR = 30, WLAN_UMAC_COMP_INTEROP_ISSUES_AP = 31, - WLAN_UMAC_COMP_BLACKLIST_MGR = 32, + WLAN_UMAC_COMP_DENYLIST_MGR = 32, WLAN_UMAC_COMP_COEX = 33, WLAN_UMAC_COMP_FTM_TIME_SYNC = 34, WLAN_UMAC_COMP_PKT_CAPTURE = 35, diff --git a/umac/mlme/connection_mgr/core/src/wlan_cm_bss_scoring.c b/umac/mlme/connection_mgr/core/src/wlan_cm_bss_scoring.c index 00060c5458..77bf9d777a 100644 --- a/umac/mlme/connection_mgr/core/src/wlan_cm_bss_scoring.c +++ b/umac/mlme/connection_mgr/core/src/wlan_cm_bss_scoring.c @@ -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), diff --git a/umac/mlme/connection_mgr/core/src/wlan_cm_connect.c b/umac/mlme/connection_mgr/core/src/wlan_cm_connect.c index a3882e80c5..60449bb9ee 100644 --- a/umac/mlme/connection_mgr/core/src/wlan_cm_connect.c +++ b/umac/mlme/connection_mgr/core/src/wlan_cm_connect.c @@ -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; } diff --git a/umac/mlme/connection_mgr/core/src/wlan_cm_disconnect.c b/umac/mlme/connection_mgr/core/src/wlan_cm_disconnect.c index cb236ecb36..88e40de4a9 100644 --- a/umac/mlme/connection_mgr/core/src/wlan_cm_disconnect.c +++ b/umac/mlme/connection_mgr/core/src/wlan_cm_disconnect.c @@ -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 diff --git a/umac/mlme/connection_mgr/dispatcher/inc/wlan_cm_bss_score_param.h b/umac/mlme/connection_mgr/dispatcher/inc/wlan_cm_bss_score_param.h index d2d1d5f67d..bf029f0bd3 100644 --- a/umac/mlme/connection_mgr/dispatcher/inc/wlan_cm_bss_score_param.h +++ b/umac/mlme/connection_mgr/dispatcher/inc/wlan_cm_bss_score_param.h @@ -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 diff --git a/wmi/inc/wmi_unified_priv.h b/wmi/inc/wmi_unified_priv.h index 42cc4ba13d..d409bc2ee0 100644 --- a/wmi/inc/wmi_unified_priv.h +++ b/wmi/inc/wmi_unified_priv.h @@ -546,7 +546,7 @@ QDF_STATUS (*send_d0wow_disable_cmd)(wmi_unified_t wmi_handle, uint8_t mac_id); #endif -#if defined(WLAN_FEATURE_ROAM_OFFLOAD) && defined(FEATURE_BLACKLIST_MGR) +#if defined(WLAN_FEATURE_ROAM_OFFLOAD) && defined(FEATURE_DENYLIST_MGR) QDF_STATUS (*send_reject_ap_list_cmd)(struct wmi_unified *wmi_handle, struct reject_ap_params *reject_params); @@ -3232,7 +3232,7 @@ void wmi_policy_mgr_attach_tlv(struct wmi_unified *wmi_handle) } #endif -#if defined(WLAN_FEATURE_ROAM_OFFLOAD) && defined(FEATURE_BLACKLIST_MGR) +#if defined(WLAN_FEATURE_ROAM_OFFLOAD) && defined(FEATURE_DENYLIST_MGR) void wmi_blacklist_mgr_attach_tlv(struct wmi_unified *wmi_handle); #else static inline diff --git a/wmi/inc/wmi_unified_sta_api.h b/wmi/inc/wmi_unified_sta_api.h index 98710c2c6e..da94c0e221 100644 --- a/wmi/inc/wmi_unified_sta_api.h +++ b/wmi/inc/wmi_unified_sta_api.h @@ -1,5 +1,6 @@ /* * Copyright (c) 2013-2020 The Linux Foundation. All rights reserved. + * Copyright (c) 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 @@ -72,7 +73,7 @@ QDF_STATUS wmi_unified_vdev_set_gtx_cfg_cmd(wmi_unified_t wmi_handle, uint32_t if_id, struct wmi_gtx_config *gtx_info); -#if defined(WLAN_FEATURE_ROAM_OFFLOAD) && defined(FEATURE_BLACKLIST_MGR) +#if defined(WLAN_FEATURE_ROAM_OFFLOAD) && defined(FEATURE_DENYLIST_MGR) /** * wmi_unified_send_reject_ap_list() - send the reject ap list maintained by * BLM to FW for roaming cases. diff --git a/wmi/src/wmi_unified_sta_api.c b/wmi/src/wmi_unified_sta_api.c index aeb98b9bec..d251ea49cd 100644 --- a/wmi/src/wmi_unified_sta_api.c +++ b/wmi/src/wmi_unified_sta_api.c @@ -1,5 +1,6 @@ /* * Copyright (c) 2013-2020 The Linux Foundation. All rights reserved. + * Copyright (c) 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 @@ -181,7 +182,7 @@ QDF_STATUS wmi_extract_vdev_tdls_ev_param(wmi_unified_t wmi_handle, } #endif /* FEATURE_WLAN_TDLS */ -#if defined(WLAN_FEATURE_ROAM_OFFLOAD) && defined(FEATURE_BLACKLIST_MGR) +#if defined(WLAN_FEATURE_ROAM_OFFLOAD) && defined(FEATURE_DENYLIST_MGR) QDF_STATUS wmi_unified_send_reject_ap_list(struct wmi_unified *wmi_handle, struct reject_ap_params *reject_params) diff --git a/wmi/src/wmi_unified_sta_tlv.c b/wmi/src/wmi_unified_sta_tlv.c index 6c3a94c2d3..4982e11b33 100644 --- a/wmi/src/wmi_unified_sta_tlv.c +++ b/wmi/src/wmi_unified_sta_tlv.c @@ -1,5 +1,6 @@ /* * Copyright (c) 2013-2020 The Linux Foundation. All rights reserved. + * Copyright (c) 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 @@ -1097,19 +1098,19 @@ static QDF_STATUS send_set_base_macaddr_indicate_cmd_tlv(wmi_unified_t wmi_handl return 0; } -#if defined(WLAN_FEATURE_ROAM_OFFLOAD) && defined(FEATURE_BLACKLIST_MGR) +#if defined(WLAN_FEATURE_ROAM_OFFLOAD) && defined(FEATURE_DENYLIST_MGR) static WMI_BSSID_DISALLOW_LIST_TYPE -wmi_get_wmi_reject_ap_type(enum blm_reject_ap_type reject_ap_type) +wmi_get_wmi_reject_ap_type(enum dlm_reject_ap_type reject_ap_type) { switch (reject_ap_type) { case USERSPACE_AVOID_TYPE: return WMI_BSSID_DISALLOW_USER_SPACE_AVOID_LIST; case DRIVER_AVOID_TYPE: return WMI_BSSID_DISALLOW_DRIVER_AVOID_LIST; - case USERSPACE_BLACKLIST_TYPE: + case USERSPACE_DENYLIST_TYPE: return WMI_BSSID_DISALLOW_USER_SPACE_BLACK_LIST; - case DRIVER_BLACKLIST_TYPE: + case DRIVER_DENYLIST_TYPE: return WMI_BSSID_DISALLOW_DRIVER_BLACK_LIST; case DRIVER_RSSI_REJECT_TYPE: return WMI_BSSID_DISALLOW_RSSI_REJECT_LIST; @@ -1119,7 +1120,7 @@ wmi_get_wmi_reject_ap_type(enum blm_reject_ap_type reject_ap_type) } static WMI_BLACKLIST_REASON_ID -wmi_get_reject_reason(enum blm_reject_ap_reason reject_reason) +wmi_get_reject_reason(enum dlm_reject_ap_reason reject_reason) { switch(reject_reason) { case REASON_NUD_FAILURE: