qcacmn: Replace blacklist/whitelist with denylist/allowlist

Replace blacklist/whitelist with denylist/allowlist
in qca-wifi-host-cmn.

Change-Id: I1a27d025ccb9d5fcc3c573d47a84f9667a229c9b
CRs-Fixed: 3098934
This commit is contained in:
chunquan
2022-01-17 16:51:01 +08:00
committed by Madan Koyyalamudi
parent 24174b7be8
commit 19cc13911c
19 changed files with 243 additions and 230 deletions

View File

@@ -1,5 +1,6 @@
/*
* Copyright (c) 2017-2021 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
@@ -367,7 +368,7 @@ struct extscan_def_config {
* @scan_f_add_ds_ie_in_probe: add DS ie in probe req frame
* @scan_f_add_spoofed_mac_in_probe: use random mac address for TA in probe
* @scan_f_add_rand_seq_in_probe: use random sequence number in probe
* @scan_f_en_ie_whitelist_in_probe: enable ie whitelist in probe
* @scan_f_en_ie_allowlist_in_probe: enable ie allowlist in probe
* @scan_f_forced: force scan even in presence of data traffic
* @scan_f_2ghz: scan 2.4 GHz channels
* @scan_f_5ghz: scan 5 GHz channels
@@ -461,7 +462,7 @@ struct scan_default_params {
scan_f_add_ds_ie_in_probe:1,
scan_f_add_spoofed_mac_in_probe:1,
scan_f_add_rand_seq_in_probe:1,
scan_f_en_ie_whitelist_in_probe:1,
scan_f_en_ie_allowlist_in_probe:1,
scan_f_forced:1,
scan_f_2ghz:1,
scan_f_5ghz:1,
@@ -516,7 +517,7 @@ struct scan_cb {
* @pdev_info: pointer to pdev info
* @pno_cfg: default pno configuration
* @extscan_cfg: default extscan configuration
* @ie_whitelist: default ie whitelist attrs
* @ie_allowlist: default ie allowlist attrs
* @bt_a2dp_enabled: if bt a2dp is enabled
* @miracast_enabled: miracast enabled
* @disable_timeout: command timeout disabled
@@ -549,7 +550,7 @@ struct wlan_scan_obj {
#ifdef FEATURE_WLAN_EXTSCAN
struct extscan_def_config extscan_cfg;
#endif
struct probe_req_whitelist_attr ie_whitelist;
struct probe_req_allowlist_attr ie_allowlist;
bool bt_a2dp_enabled;
bool miracast_enabled;
bool disable_timeout;

View File

@@ -889,14 +889,14 @@ struct scan_random_attr {
};
/**
* struct probe_req_whitelist_attr - holds probe req ie whitelist attrs
* @white_list: enable/disable whitelist
* struct probe_req_allowlist_attr - holds probe req ie allowlist attrs
* @allow_list: enable/disable allowlist
* @ie_bitmap: bitmap of IEs to be enabled
* @num_vendor_oui: number of vendor OUIs
* @voui: vendor oui buffer
*/
struct probe_req_whitelist_attr {
bool white_list;
struct probe_req_allowlist_attr {
bool allow_list;
uint32_t ie_bitmap[PROBE_REQ_BITMAP_LEN];
uint32_t num_vendor_oui;
uint32_t voui[MAX_PROBE_REQ_OUIS];
@@ -1032,7 +1032,7 @@ enum scan_request_type {
* @scan_f_add_ds_ie_in_probe: add DS ie in probe req frame
* @scan_f_add_spoofed_mac_in_probe: use random mac address for TA in probe
* @scan_f_add_rand_seq_in_probe: use random sequence number in probe
* @scan_f_en_ie_whitelist_in_probe: enable ie whitelist in probe
* @scan_f_en_ie_allowlist_in_probe: enable ie allowlist in probe
* @scan_f_forced: force scan even in presence of data traffic
* @scan_f_2ghz: scan 2.4 GHz channels
* @scan_f_5ghz: scan 5 GHz channels
@@ -1047,7 +1047,7 @@ enum scan_request_type {
* @ssid: ssid list
* @bssid_list: Lisst of bssid to scan
* @scan_random: scan randomization params
* @ie_whitelist: probe req IE whitelist attrs
* @ie_allowlist: probe req IE allowlist attrs
* @extraie: list of optional/vendor specific ie's to be added in probe requests
* @htcap: htcap ie
* @vhtcap: vhtcap ie
@@ -1119,7 +1119,7 @@ struct scan_req_params {
scan_f_add_ds_ie_in_probe:1,
scan_f_add_spoofed_mac_in_probe:1,
scan_f_add_rand_seq_in_probe:1,
scan_f_en_ie_whitelist_in_probe:1,
scan_f_en_ie_allowlist_in_probe:1,
scan_f_forced:1,
scan_f_2ghz:1,
scan_f_5ghz:1,
@@ -1146,7 +1146,7 @@ struct scan_req_params {
struct wlan_ssid ssid[WLAN_SCAN_MAX_NUM_SSID];
struct qdf_mac_addr bssid_list[WLAN_SCAN_MAX_NUM_BSSID];
struct scan_random_attr scan_random;
struct probe_req_whitelist_attr ie_whitelist;
struct probe_req_allowlist_attr ie_allowlist;
struct element_info extraie;
struct element_info htcap;
struct element_info vhtcap;
@@ -1456,7 +1456,7 @@ struct nlo_mawc_params {
* to be triggered.
* @networks_list: Preferred network list
* @scan_random: scan randomization params
* @ie_whitelist: probe req IE whitelist attrs
* @ie_allowlist: probe req IE allowlist attrs
* @relative_rssi_set: Flag to check whether realtive_rssi is set or not
* @relative_rssi: Relative rssi threshold, used for connected pno
* @band_rssi_pref: Band and RSSI preference that can be given to one BSS
@@ -1488,7 +1488,7 @@ struct pno_scan_req_params {
uint32_t channel_prediction_full_scan;
struct pno_nw_type networks_list[SCAN_PNO_MAX_SUPP_NETWORKS];
struct scan_random_attr scan_random;
struct probe_req_whitelist_attr ie_whitelist;
struct probe_req_allowlist_attr ie_allowlist;
bool relative_rssi_set;
int8_t relative_rssi;
struct cpno_band_rssi_pref band_rssi_pref;
@@ -1498,11 +1498,11 @@ struct pno_scan_req_params {
/**
* struct scan_user_cfg - user configuration required for for scan
* @ie_whitelist: probe req IE whitelist attrs
* @ie_allowlist: probe req IE allowlist attrs
* @sta_miracast_mcc_rest_time: sta miracast mcc rest time
*/
struct scan_user_cfg {
struct probe_req_whitelist_attr ie_whitelist;
struct probe_req_allowlist_attr ie_allowlist;
uint32_t sta_miracast_mcc_rest_time;
};

View File

@@ -643,30 +643,31 @@ QDF_STATUS ucfg_scan_psoc_close(struct wlan_objmgr_psoc *psoc);
uint32_t ucfg_scan_get_max_active_scans(struct wlan_objmgr_psoc *psoc);
/**
* ucfg_ie_whitelist_enabled() - Checks for IE whitelisting enable
* ucfg_ie_allowlist_enabled() - Checks for IE allowlisting enable
* @psoc: pointer to psoc object
* @vdev: pointer to vdev
*
* This function is used to check whether IE whitelisting is enabled or not
* This function is used to check whether IE allowlisting is enabled or not
*
* Return: If enabled returns true else returns false
*/
bool ucfg_ie_whitelist_enabled(struct wlan_objmgr_psoc *psoc,
bool ucfg_ie_allowlist_enabled(struct wlan_objmgr_psoc *psoc,
struct wlan_objmgr_vdev *vdev);
/**
* ucfg_copy_ie_whitelist_attrs() - Populate probe req IE whitelist attrs
* ucfg_copy_ie_allowlist_attrs() - Populate probe req IE allowlist attrs
* @psoc: pointer to psoc object
* @ie_whitelist: output parameter to hold ie whitelist attrs
* @ie_allowlist: output parameter to hold ie allowlist attrs
*
* If IE whitelisting is enabled then invoke this function to copy
* IE whitelisting attrs from wlan scan object
* If IE allowlisting is enabled then invoke this function to copy
* IE allowlisting attrs from wlan scan object
*
* Return: true - successful copy
* false - copy failed
*/
bool ucfg_copy_ie_whitelist_attrs(struct wlan_objmgr_psoc *psoc,
struct probe_req_whitelist_attr *ie_whitelist);
bool
ucfg_copy_ie_allowlist_attrs(struct wlan_objmgr_psoc *psoc,
struct probe_req_allowlist_attr *ie_allowlist);
/**
* ucfg_scan_set_bt_activity() - API to set bt activity

View File

@@ -1201,7 +1201,7 @@ QDF_STATUS ucfg_scan_update_user_config(struct wlan_objmgr_psoc *psoc,
}
scan_def = &scan_obj->scan_def;
scan_obj->ie_whitelist = scan_cfg->ie_whitelist;
scan_obj->ie_allowlist = scan_cfg->ie_allowlist;
scan_def->sta_miracast_mcc_rest_time =
scan_cfg->sta_miracast_mcc_rest_time;
@@ -1450,8 +1450,8 @@ ucfg_scan_get_max_active_scans(struct wlan_objmgr_psoc *psoc)
return scan_params->max_active_scans_allowed;
}
bool ucfg_copy_ie_whitelist_attrs(struct wlan_objmgr_psoc *psoc,
struct probe_req_whitelist_attr *ie_whitelist)
bool ucfg_copy_ie_allowlist_attrs(struct wlan_objmgr_psoc *psoc,
struct probe_req_allowlist_attr *ie_allowlist)
{
struct wlan_scan_obj *scan_obj = NULL;
@@ -1459,13 +1459,13 @@ bool ucfg_copy_ie_whitelist_attrs(struct wlan_objmgr_psoc *psoc,
if (!scan_obj)
return false;
qdf_mem_copy(ie_whitelist, &scan_obj->ie_whitelist,
sizeof(*ie_whitelist));
qdf_mem_copy(ie_allowlist, &scan_obj->ie_allowlist,
sizeof(*ie_allowlist));
return true;
}
bool ucfg_ie_whitelist_enabled(struct wlan_objmgr_psoc *psoc,
bool ucfg_ie_allowlist_enabled(struct wlan_objmgr_psoc *psoc,
struct wlan_objmgr_vdev *vdev)
{
struct wlan_scan_obj *scan_obj = NULL;
@@ -1478,7 +1478,7 @@ bool ucfg_ie_whitelist_enabled(struct wlan_objmgr_psoc *psoc,
wlan_vdev_is_up(vdev) == QDF_STATUS_SUCCESS)
return false;
if (!scan_obj->ie_whitelist.white_list)
if (!scan_obj->ie_allowlist.allow_list)
return false;
return true;