qcacld-3.0: Add INI item to control BPF feature configuration
Add INI item to control BPF feature configuration. Change-Id: Ia110916f5d657db6970f988dab5c3be55074c3bf CRs-Fixed: 1055033
This commit is contained in:
@@ -2828,6 +2828,15 @@ typedef enum {
|
||||
#define CFG_ACTIVE_MODE_OFFLOAD_DEFAULT (0)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* 0: Disable BPF packet filter
|
||||
* 1: Enable BPF packet filter
|
||||
*/
|
||||
#define CFG_BPF_PACKET_FILTER_OFFLOAD "gBpfFilterEnable"
|
||||
#define CFG_BPF_PACKET_FILTER_OFFLOAD_MIN (0)
|
||||
#define CFG_BPF_PACKET_FILTER_OFFLOAD_MAX (1)
|
||||
#define CFG_BPF_PACKET_FILTER_OFFLOAD_DEFAULT (1)
|
||||
|
||||
/*
|
||||
* 0: disable the cck tx chain mask (default)
|
||||
* 1: enable the cck tx chain mask
|
||||
@@ -4044,6 +4053,7 @@ struct hdd_config {
|
||||
bool tso_enable;
|
||||
bool lro_enable;
|
||||
bool active_mode_offload;
|
||||
bool bpf_packet_filter_enable;
|
||||
uint32_t fine_time_meas_cap;
|
||||
uint8_t max_scan_count;
|
||||
#ifdef WLAN_FEATURE_FASTPATH
|
||||
|
@@ -3525,6 +3525,13 @@ REG_TABLE_ENTRY g_registry_table[] = {
|
||||
CFG_LRO_ENABLED_MIN,
|
||||
CFG_LRO_ENABLED_MAX),
|
||||
|
||||
REG_VARIABLE(CFG_BPF_PACKET_FILTER_OFFLOAD, WLAN_PARAM_Integer,
|
||||
struct hdd_config, bpf_packet_filter_enable,
|
||||
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
|
||||
CFG_BPF_PACKET_FILTER_OFFLOAD_DEFAULT,
|
||||
CFG_BPF_PACKET_FILTER_OFFLOAD_MIN,
|
||||
CFG_BPF_PACKET_FILTER_OFFLOAD_MAX),
|
||||
|
||||
REG_VARIABLE(CFG_ACTIVE_MODE_OFFLOAD, WLAN_PARAM_Integer,
|
||||
struct hdd_config, active_mode_offload,
|
||||
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
|
||||
@@ -5668,6 +5675,9 @@ void hdd_cfg_print(hdd_context_t *pHddCtx)
|
||||
hdd_info("Name = [%s] Value = [%s]",
|
||||
CFG_RM_CAPABILITY_NAME,
|
||||
pHddCtx->config->rm_capability);
|
||||
hdd_info("Name = [%s] Value = [%d]",
|
||||
CFG_BPF_PACKET_FILTER_OFFLOAD,
|
||||
pHddCtx->config->bpf_packet_filter_enable);
|
||||
}
|
||||
|
||||
|
||||
|
@@ -6191,7 +6191,7 @@ __wlan_hdd_cfg80211_bpf_offload(struct wiphy *wiphy,
|
||||
}
|
||||
|
||||
if (!hdd_ctx->bpf_enabled) {
|
||||
hdd_err("BPF offload is not supported by firmware");
|
||||
hdd_err("BPF offload is not supported/enabled");
|
||||
return -ENOTSUPP;
|
||||
}
|
||||
|
||||
|
@@ -1492,7 +1492,10 @@ void hdd_update_tgt_cfg(void *context, void *param)
|
||||
hdd_info("Init current antenna mode: %d",
|
||||
hdd_ctx->current_antenna_mode);
|
||||
|
||||
hdd_ctx->bpf_enabled = cfg->bpf_enabled;
|
||||
hdd_info("Target BPF %d Host BPF %d",
|
||||
cfg->bpf_enabled, hdd_ctx->config->bpf_packet_filter_enable);
|
||||
hdd_ctx->bpf_enabled = (cfg->bpf_enabled &&
|
||||
hdd_ctx->config->bpf_packet_filter_enable);
|
||||
/* Configure NAN datapath features */
|
||||
hdd_nan_datapath_target_config(hdd_ctx, cfg);
|
||||
}
|
||||
|
Reference in New Issue
Block a user