qcacld-3.0: Replace blacklist/whitelist for denylist/allowlist

Replace blacklist/whitelist with denylist/allowlist in
qcacld3.0. and replace blm with dlm.

Change-Id: I9ba61dde3b3ea008ca3777448d1f8dab83d33ec1
CRs-Fixed: 3091211
This commit is contained in:
chunquan
2022-01-17 15:31:24 +08:00
committed by Madan Koyyalamudi
parent 1d3d395705
commit f07969a044
35 changed files with 359 additions and 335 deletions

View File

@@ -138,8 +138,8 @@ struct wlan_fwol_thermal_temp {
};
/**
* struct wlan_fwol_ie_whitelist - Probe request IE whitelist config items
* @ie_whitelist: IE whitelist flag
* struct wlan_fwol_ie_allowlist - Probe request IE allowlist config items
* @ie_allowlist: IE allowlist flag
* @ie_bitmap_0: IE bitmap 0
* @ie_bitmap_1: IE bitmap 1
* @ie_bitmap_2: IE bitmap 2
@@ -151,8 +151,8 @@ struct wlan_fwol_thermal_temp {
* @no_of_probe_req_ouis: Total number of ouis present in probe req
* @probe_req_voui: Stores oui values after parsing probe req ouis
*/
struct wlan_fwol_ie_whitelist {
bool ie_whitelist;
struct wlan_fwol_ie_allowlist {
bool ie_allowlist;
uint32_t ie_bitmap_0;
uint32_t ie_bitmap_1;
uint32_t ie_bitmap_2;
@@ -191,7 +191,7 @@ struct wlan_fwol_neighbor_report_cfg {
* struct wlan_fwol_cfg - fwol config items
* @coex_config: coex config items
* @thermal_temp_cfg: Thermal temperature related config items
* @ie_whitelist_cfg: IE Whitelist related config items
* @ie_allowlist_cfg: IE Allowlist related config items
* @neighbor_report_cfg: 11K neighbor report config
* @ani_enabled: ANI enable/disable
* @enable_rts_sifsbursting: Enable RTS SIFS Bursting
@@ -233,7 +233,7 @@ struct wlan_fwol_cfg {
/* Add CFG and INI items here */
struct wlan_fwol_coex_config coex_config;
struct wlan_fwol_thermal_temp thermal_temp_cfg;
struct wlan_fwol_ie_whitelist ie_whitelist_cfg;
struct wlan_fwol_ie_allowlist ie_allowlist_cfg;
struct wlan_fwol_neighbor_report_cfg neighbor_report_cfg;
bool ani_enabled;
bool enable_rts_sifsbursting;

View File

@@ -290,7 +290,7 @@ fwol_set_adaptive_dwelltime_config(
/**
* fwol_parse_probe_req_ouis - form ouis from ini gProbeReqOUIs
* @psoc: Pointer to struct wlan_objmgr_psoc context
* @whitelist: Pointer to struct wlan_fwol_ie_whitelist
* @allowlist: Pointer to struct wlan_fwol_ie_allowlist
*
* This function parses the ini string gProbeReqOUIs which needs be to in the
* following format:
@@ -302,10 +302,10 @@ fwol_set_adaptive_dwelltime_config(
* Return: None
*/
static void fwol_parse_probe_req_ouis(struct wlan_objmgr_psoc *psoc,
struct wlan_fwol_ie_whitelist *whitelist)
struct wlan_fwol_ie_allowlist *allowlist)
{
uint8_t probe_req_ouis[MAX_PRB_REQ_VENDOR_OUI_INI_LEN] = {0};
uint32_t *voui = whitelist->probe_req_voui;
uint32_t *voui = allowlist->probe_req_voui;
char *str;
uint8_t *token;
uint32_t oui_indx = 0;
@@ -315,7 +315,7 @@ static void fwol_parse_probe_req_ouis(struct wlan_objmgr_psoc *psoc,
qdf_str_lcopy(probe_req_ouis, cfg_get(psoc, CFG_PROBE_REQ_OUI),
MAX_PRB_REQ_VENDOR_OUI_INI_LEN);
str = probe_req_ouis;
whitelist->no_of_probe_req_ouis = 0;
allowlist->no_of_probe_req_ouis = 0;
if (!qdf_str_len(str)) {
fwol_debug("NO OUIs to parse");
@@ -339,27 +339,27 @@ next_token:
}
if (!oui_indx) {
whitelist->ie_whitelist = false;
allowlist->ie_allowlist = false;
return;
}
whitelist->no_of_probe_req_ouis = oui_indx;
allowlist->no_of_probe_req_ouis = oui_indx;
}
/**
* fwol_validate_ie_bitmaps() - Validate all IE whitelist bitmap param values
* fwol_validate_ie_bitmaps() - Validate all IE allowlist bitmap param values
* @psoc: Pointer to struct wlan_objmgr_psoc
* @whitelist: Pointer to struct wlan_fwol_ie_whitelist
* @allowlist: Pointer to struct wlan_fwol_ie_allowlist
*
* Return: True if all bitmap values are valid, else false
*/
static bool fwol_validate_ie_bitmaps(struct wlan_objmgr_psoc *psoc,
struct wlan_fwol_ie_whitelist *whitelist)
struct wlan_fwol_ie_allowlist *allowlist)
{
if (!(whitelist->ie_bitmap_0 || whitelist->ie_bitmap_1 ||
whitelist->ie_bitmap_2 || whitelist->ie_bitmap_3 ||
whitelist->ie_bitmap_4 || whitelist->ie_bitmap_5 ||
whitelist->ie_bitmap_6 || whitelist->ie_bitmap_7))
if (!(allowlist->ie_bitmap_0 || allowlist->ie_bitmap_1 ||
allowlist->ie_bitmap_2 || allowlist->ie_bitmap_3 ||
allowlist->ie_bitmap_4 || allowlist->ie_bitmap_5 ||
allowlist->ie_bitmap_6 || allowlist->ie_bitmap_7))
return false;
/*
@@ -368,12 +368,12 @@ static bool fwol_validate_ie_bitmaps(struct wlan_objmgr_psoc *psoc,
* for atleast one OUI, minimum length is 8 and hence this string length
* is checked for minimum of 8
*/
if ((whitelist->ie_bitmap_6 & VENDOR_SPECIFIC_IE_BITMAP) &&
if ((allowlist->ie_bitmap_6 & VENDOR_SPECIFIC_IE_BITMAP) &&
(qdf_str_len(cfg_get(psoc, CFG_PROBE_REQ_OUI)) < 8))
return false;
/* check whether vendor oui IE is not set but OUIs are present */
if (!(whitelist->ie_bitmap_6 & VENDOR_SPECIFIC_IE_BITMAP) &&
if (!(allowlist->ie_bitmap_6 & VENDOR_SPECIFIC_IE_BITMAP) &&
(qdf_str_len(cfg_get(psoc, CFG_PROBE_REQ_OUI)) > 0))
return false;
@@ -382,20 +382,20 @@ static bool fwol_validate_ie_bitmaps(struct wlan_objmgr_psoc *psoc,
static void
fwol_init_ie_whiltelist_in_cfg(struct wlan_objmgr_psoc *psoc,
struct wlan_fwol_ie_whitelist *whitelist)
struct wlan_fwol_ie_allowlist *allowlist)
{
whitelist->ie_whitelist = cfg_get(psoc, CFG_PROBE_REQ_IE_WHITELIST);
whitelist->ie_bitmap_0 = cfg_get(psoc, CFG_PROBE_REQ_IE_BIT_MAP0);
whitelist->ie_bitmap_1 = cfg_get(psoc, CFG_PROBE_REQ_IE_BIT_MAP1);
whitelist->ie_bitmap_2 = cfg_get(psoc, CFG_PROBE_REQ_IE_BIT_MAP2);
whitelist->ie_bitmap_3 = cfg_get(psoc, CFG_PROBE_REQ_IE_BIT_MAP3);
whitelist->ie_bitmap_4 = cfg_get(psoc, CFG_PROBE_REQ_IE_BIT_MAP4);
whitelist->ie_bitmap_5 = cfg_get(psoc, CFG_PROBE_REQ_IE_BIT_MAP5);
whitelist->ie_bitmap_6 = cfg_get(psoc, CFG_PROBE_REQ_IE_BIT_MAP6);
whitelist->ie_bitmap_7 = cfg_get(psoc, CFG_PROBE_REQ_IE_BIT_MAP7);
if (!fwol_validate_ie_bitmaps(psoc, whitelist))
whitelist->ie_whitelist = false;
fwol_parse_probe_req_ouis(psoc, whitelist);
allowlist->ie_allowlist = cfg_get(psoc, CFG_PROBE_REQ_IE_ALLOWLIST);
allowlist->ie_bitmap_0 = cfg_get(psoc, CFG_PROBE_REQ_IE_BIT_MAP0);
allowlist->ie_bitmap_1 = cfg_get(psoc, CFG_PROBE_REQ_IE_BIT_MAP1);
allowlist->ie_bitmap_2 = cfg_get(psoc, CFG_PROBE_REQ_IE_BIT_MAP2);
allowlist->ie_bitmap_3 = cfg_get(psoc, CFG_PROBE_REQ_IE_BIT_MAP3);
allowlist->ie_bitmap_4 = cfg_get(psoc, CFG_PROBE_REQ_IE_BIT_MAP4);
allowlist->ie_bitmap_5 = cfg_get(psoc, CFG_PROBE_REQ_IE_BIT_MAP5);
allowlist->ie_bitmap_6 = cfg_get(psoc, CFG_PROBE_REQ_IE_BIT_MAP6);
allowlist->ie_bitmap_7 = cfg_get(psoc, CFG_PROBE_REQ_IE_BIT_MAP7);
if (!fwol_validate_ie_bitmaps(psoc, allowlist))
allowlist->ie_allowlist = false;
fwol_parse_probe_req_ouis(psoc, allowlist);
}
/**
@@ -600,7 +600,7 @@ QDF_STATUS fwol_cfg_on_psoc_enable(struct wlan_objmgr_psoc *psoc)
fwol_init_coex_config_in_cfg(psoc, &fwol_cfg->coex_config);
fwol_init_thermal_temp_in_cfg(psoc, &fwol_cfg->thermal_temp_cfg);
fwol_init_ie_whiltelist_in_cfg(psoc, &fwol_cfg->ie_whitelist_cfg);
fwol_init_ie_whiltelist_in_cfg(psoc, &fwol_cfg->ie_allowlist_cfg);
fwol_init_neighbor_report_cfg(psoc, &fwol_cfg->neighbor_report_cfg);
fwol_cfg->ani_enabled = cfg_get(psoc, CFG_ENABLE_ANI);
fwol_cfg->enable_rts_sifsbursting =

View File

@@ -1,5 +1,6 @@
/*
* Copyright (c) 2012 - 2019 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
@@ -35,7 +36,7 @@
CFG_11K_ALL \
CFG_COEX_ALL \
CFG_FWOL_GENERIC_ALL \
CFG_IE_WHITELIST \
CFG_IE_ALLOWLIST \
CFG_THERMAL_TEMP_ALL
#else
#define CFG_FWOL_ALL

View File

@@ -1,5 +1,6 @@
/*
* Copyright (c) 2012-2018 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
@@ -25,30 +26,30 @@
/*
* <ini>
* g_enable_probereq_whitelist_ies - Enable IE white listing
* g_enable_probereq_whitelist_ies - Enable IE allow listing
* @Min: 0
* @Max: 1
* @Default: 0
*
* This ini is used to enable/disable probe request IE white listing feature.
* This ini is used to enable/disable probe request IE allow listing feature.
* Values 0 and 1 are used to disable and enable respectively, by default this
* feature is disabled.
*
* Related: None
*
* Supported Feature: Probe request IE whitelisting
* Supported Feature: Probe request IE allowlisting
*
* Usage: Internal/External
*
* </ini>
*/
#define CFG_PROBE_REQ_IE_WHITELIST CFG_INI_BOOL( \
#define CFG_PROBE_REQ_IE_ALLOWLIST CFG_INI_BOOL( \
"g_enable_probereq_whitelist_ies", \
0, \
"Enable IE whitelisting")
"Enable IE allowlisting")
/*
* For IE white listing in Probe Req, following ini parameters from
* For IE allow listing in Probe Req, following ini parameters from
* g_probe_req_ie_bitmap_0 to g_probe_req_ie_bitmap_7 are used. User needs to
* input this values in hexa decimal format, when bit is set in bitmap,
* corresponding IE needs to be included in probe request.
@@ -78,7 +79,7 @@
*
* Related: Need to enable g_enable_probereq_whitelist_ies.
*
* Supported Feature: Probe request ie whitelisting
* Supported Feature: Probe request ie allowlisting
*
* Usage: Internal/External
*
@@ -104,7 +105,7 @@
*
* Related: Need to enable g_enable_probereq_whitelist_ies.
*
* Supported Feature: Probe request ie whitelisting
* Supported Feature: Probe request ie allowlisting
*
* Usage: Internal/External
*
@@ -130,7 +131,7 @@
*
* Related: Need to enable g_enable_probereq_whitelist_ies.
*
* Supported Feature: Probe request ie whitelisting
* Supported Feature: Probe request ie allowlisting
*
* Usage: Internal/External
*
@@ -156,7 +157,7 @@
*
* Related: Need to enable g_enable_probereq_whitelist_ies.
*
* Supported Feature: Probe request ie whitelisting
* Supported Feature: Probe request ie allowlisting
*
* Usage: Internal/External
*
@@ -182,7 +183,7 @@
*
* Related: Need to enable g_enable_probereq_whitelist_ies.
*
* Supported Feature: Probe request ie whitelisting
* Supported Feature: Probe request ie allowlisting
*
* Usage: Internal/External
*
@@ -208,7 +209,7 @@
*
* Related: Need to enable g_enable_probereq_whitelist_ies.
*
* Supported Feature: Probe request ie whitelisting
* Supported Feature: Probe request ie allowlisting
*
* Usage: Internal/External
*
@@ -234,7 +235,7 @@
*
* Related: Need to enable g_enable_probereq_whitelist_ies.
*
* Supported Feature: Probe request ie whitelisting
* Supported Feature: Probe request ie allowlisting
*
* Usage: Internal/External
*
@@ -260,7 +261,7 @@
*
* Related: Need to enable g_enable_probereq_whitelist_ies.
*
* Supported Feature: Probe request ie whitelisting
* Supported Feature: Probe request ie allowlisting
*
* Usage: Internal/External
*
@@ -278,7 +279,7 @@
#define VENDOR_SPECIFIC_IE_BITMAP 0x20000000
/*
* For vendor specific IE, Probe Req OUI types and sub types which are
* to be white listed are specified in gProbeReqOUIs in the following
* to be allow listed are specified in gProbeReqOUIs in the following
* example format - gProbeReqOUIs=AABBCCDD EEFF1122
*/
@@ -293,7 +294,7 @@
* Related: Need to enable g_enable_probereq_whitelist_ies and
* vendor specific IE should be set in g_probe_req_ie_bitmap_6.
*
* Supported Feature: Probe request ie whitelisting
* Supported Feature: Probe request ie allowlisting
*
* Usage: Internal/External
*
@@ -306,8 +307,8 @@
"", \
"Probe Req OUIs")
#define CFG_IE_WHITELIST \
CFG(CFG_PROBE_REQ_IE_WHITELIST) \
#define CFG_IE_ALLOWLIST \
CFG(CFG_PROBE_REQ_IE_ALLOWLIST) \
CFG(CFG_PROBE_REQ_IE_BIT_MAP0) \
CFG(CFG_PROBE_REQ_IE_BIT_MAP1) \
CFG(CFG_PROBE_REQ_IE_BIT_MAP2) \

View File

@@ -178,35 +178,35 @@ ucfg_fwol_is_neighbor_report_req_supported(struct wlan_objmgr_psoc *psoc,
bool *neighbor_report_req);
/**
* ucfg_fwol_get_ie_whitelist() - Get IE whitelist param value
* ucfg_fwol_get_ie_allowlist() - Get IE allowlist param value
* @psoc: Pointer to psoc object
* @ie_whitelist: Pointer to return the IE whitelist param value
* @ie_allowlist: Pointer to return the IE allowlist param value
*
* Return: QDF Status
*/
QDF_STATUS
ucfg_fwol_get_ie_whitelist(struct wlan_objmgr_psoc *psoc, bool *ie_whitelist);
ucfg_fwol_get_ie_allowlist(struct wlan_objmgr_psoc *psoc, bool *ie_allowlist);
/**
* ucfg_fwol_set_ie_whitelist() - Set IE whitelist param value
* ucfg_fwol_set_ie_allowlist() - Set IE allowlist param value
* @psoc: Pointer to psoc object
* @ie_whitelist: Value to set IE whitelist param
* @ie_allowlist: Value to set IE allowlist param
*
* Return: QDF Status
*/
QDF_STATUS
ucfg_fwol_set_ie_whitelist(struct wlan_objmgr_psoc *psoc, bool ie_whitelist);
ucfg_fwol_set_ie_allowlist(struct wlan_objmgr_psoc *psoc, bool ie_allowlist);
/**
* ucfg_fwol_get_all_whitelist_params() - Get all IE whitelist param values
* ucfg_fwol_get_all_allowlist_params() - Get all IE allowlist param values
* @psoc: Pointer to psoc object
* @whitelist: Pointer to struct wlan_fwol_ie_whitelist
* @allowlist: Pointer to struct wlan_fwol_ie_allowlist
*
* Return: QDF Status
*/
QDF_STATUS
ucfg_fwol_get_all_whitelist_params(struct wlan_objmgr_psoc *psoc,
struct wlan_fwol_ie_whitelist *whitelist);
ucfg_fwol_get_all_allowlist_params(struct wlan_objmgr_psoc *psoc,
struct wlan_fwol_ie_allowlist *allowlist);
/** ucfg_fwol_get_ani_enabled() - Assigns the ani_enabled value
* @psoc: pointer to the psoc object
@@ -809,20 +809,20 @@ ucfg_fwol_is_neighbor_report_req_supported(struct wlan_objmgr_psoc *psoc,
}
static inline QDF_STATUS
ucfg_fwol_get_ie_whitelist(struct wlan_objmgr_psoc *psoc, bool *ie_whitelist)
ucfg_fwol_get_ie_allowlist(struct wlan_objmgr_psoc *psoc, bool *ie_allowlist)
{
return QDF_STATUS_E_FAILURE;
}
static inline QDF_STATUS
ucfg_fwol_set_ie_whitelist(struct wlan_objmgr_psoc *psoc, bool ie_whitelist)
ucfg_fwol_set_ie_allowlist(struct wlan_objmgr_psoc *psoc, bool ie_allowlist)
{
return QDF_STATUS_E_FAILURE;
}
static inline QDF_STATUS
ucfg_fwol_get_all_whitelist_params(struct wlan_objmgr_psoc *psoc,
struct wlan_fwol_ie_whitelist *whitelist)
ucfg_fwol_get_all_allowlist_params(struct wlan_objmgr_psoc *psoc,
struct wlan_fwol_ie_allowlist *allowlist)
{
return QDF_STATUS_E_FAILURE;
}

View File

@@ -276,7 +276,7 @@ ucfg_fwol_is_neighbor_report_req_supported(struct wlan_objmgr_psoc *psoc,
}
QDF_STATUS
ucfg_fwol_get_ie_whitelist(struct wlan_objmgr_psoc *psoc, bool *ie_whitelist)
ucfg_fwol_get_ie_allowlist(struct wlan_objmgr_psoc *psoc, bool *ie_allowlist)
{
struct wlan_fwol_psoc_obj *fwol_obj;
@@ -286,13 +286,13 @@ ucfg_fwol_get_ie_whitelist(struct wlan_objmgr_psoc *psoc, bool *ie_whitelist)
return QDF_STATUS_E_FAILURE;
}
*ie_whitelist = fwol_obj->cfg.ie_whitelist_cfg.ie_whitelist;
*ie_allowlist = fwol_obj->cfg.ie_allowlist_cfg.ie_allowlist;
return QDF_STATUS_SUCCESS;
}
QDF_STATUS
ucfg_fwol_set_ie_whitelist(struct wlan_objmgr_psoc *psoc, bool ie_whitelist)
ucfg_fwol_set_ie_allowlist(struct wlan_objmgr_psoc *psoc, bool ie_allowlist)
{
struct wlan_fwol_psoc_obj *fwol_obj;
@@ -302,7 +302,7 @@ ucfg_fwol_set_ie_whitelist(struct wlan_objmgr_psoc *psoc, bool ie_whitelist)
return QDF_STATUS_E_FAILURE;
}
fwol_obj->cfg.ie_whitelist_cfg.ie_whitelist = ie_whitelist;
fwol_obj->cfg.ie_allowlist_cfg.ie_allowlist = ie_allowlist;
return QDF_STATUS_SUCCESS;
}
@@ -428,8 +428,8 @@ QDF_STATUS ucfg_get_enable_phy_reg_retention(struct wlan_objmgr_psoc *psoc,
}
QDF_STATUS
ucfg_fwol_get_all_whitelist_params(struct wlan_objmgr_psoc *psoc,
struct wlan_fwol_ie_whitelist *whitelist)
ucfg_fwol_get_all_allowlist_params(struct wlan_objmgr_psoc *psoc,
struct wlan_fwol_ie_allowlist *allowlist)
{
struct wlan_fwol_psoc_obj *fwol_obj;
@@ -439,7 +439,7 @@ ucfg_fwol_get_all_whitelist_params(struct wlan_objmgr_psoc *psoc,
return QDF_STATUS_E_FAILURE;
}
*whitelist = fwol_obj->cfg.ie_whitelist_cfg;
*allowlist = fwol_obj->cfg.ie_allowlist_cfg;
return QDF_STATUS_SUCCESS;
}