Kaynağa Gözat

qcacmn: Replace blacklist/whitelist with denylist/allowlist

Replace blacklist/whitelist with denylist/allowlist

Change-Id: Ic10f0bb187f44c00f07752cd859a08342a945628
CRs-Fixed: 3087605
chunquan 3 yıl önce
ebeveyn
işleme
be297ae0ae

+ 2 - 2
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,

+ 2 - 2
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,

+ 3 - 3
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,

+ 13 - 13
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),

+ 3 - 3
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;
 }

+ 3 - 3
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

+ 21 - 21
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
 

+ 2 - 2
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

+ 2 - 1
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.

+ 2 - 1
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)

+ 6 - 5
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: