qcacld-3.0: Disable RA filter when BPF is enabled
qcacld-2.0 to qcacld-3.0 propagation. In current implementation, RA filter is enabled irrespective of the BPF filter status. This change checks if BPF configuration in ini as well as in target config is enabled, then RA will be disabled. Change-Id: I85df0828af665d2bcc13c865b0ba40ebf882fffe CRs-Fixed: 1058884 (cherry picked from commit 8dda6e83eb85ef9f0342ab23954e093c6dfebe2e)
This commit is contained in:
parent
c40929266c
commit
04dbf6de4d
@ -91,6 +91,7 @@ enum cfg_sub_20_channel_width {
|
||||
* @tx_flow_start_queue_offset: Start queue offset in percentage
|
||||
* @is_lpass_enabled: Indicate whether LPASS is enabled or not
|
||||
* @is_nan_enabled: Indicate whether NAN is enabled or not
|
||||
* @bool bpf_packet_filter_enable; Indicate bpf filter enabled or not
|
||||
* @tx_chain_mask_cck: Tx chain mask enabled or not
|
||||
* @self_gen_frm_pwr: Self gen from power
|
||||
* @sub_20_channel_width: Sub 20 MHz ch width, ini intersected with fw cap
|
||||
@ -140,6 +141,7 @@ struct cds_config_info {
|
||||
#ifdef WLAN_FEATURE_NAN
|
||||
bool is_nan_enabled;
|
||||
#endif
|
||||
bool bpf_packet_filter_enable;
|
||||
bool tx_chain_mask_cck;
|
||||
uint16_t self_gen_frm_pwr;
|
||||
enum cfg_sub_20_channel_width sub_20_channel_width;
|
||||
|
@ -1358,6 +1358,27 @@ static int hdd_generate_macaddr_auto(hdd_context_t *hdd_ctx)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* hdd_update_ra_rate_limit() - Update RA rate limit from target
|
||||
* configuration to cfg_ini in HDD
|
||||
* @hdd_ctx: Pointer to hdd_ctx
|
||||
* @cfg: target configuration
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
#ifdef FEATURE_WLAN_RA_FILTERING
|
||||
static void hdd_update_ra_rate_limit(hdd_context_t *hdd_ctx,
|
||||
struct wma_tgt_cfg *cfg)
|
||||
{
|
||||
hdd_ctx->config->IsRArateLimitEnabled = cfg->is_ra_rate_limit_enabled;
|
||||
}
|
||||
#else
|
||||
static void hdd_update_ra_rate_limit(hdd_context_t *hdd_ctx,
|
||||
struct wma_tgt_cfg *cfg)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
void hdd_update_tgt_cfg(void *context, void *param)
|
||||
{
|
||||
hdd_context_t *hdd_ctx = (hdd_context_t *) context;
|
||||
@ -1456,6 +1477,7 @@ void hdd_update_tgt_cfg(void *context, void *param)
|
||||
cfg->bpf_enabled, hdd_ctx->config->bpf_packet_filter_enable);
|
||||
hdd_ctx->bpf_enabled = (cfg->bpf_enabled &&
|
||||
hdd_ctx->config->bpf_packet_filter_enable);
|
||||
hdd_update_ra_rate_limit(hdd_ctx, cfg);
|
||||
|
||||
/*
|
||||
* If BPF is enabled, maxWowFilters set to WMA_STA_WOW_DEFAULT_PTRN_MAX
|
||||
|
@ -1275,6 +1275,7 @@ struct extended_caps {
|
||||
* It contains global wma module parameters and
|
||||
* handle of other modules.
|
||||
* @saved_wmi_init_cmd: Saved WMI INIT command
|
||||
* @bool bpf_packet_filter_enable: BPF filter enabled or not
|
||||
* @service_ready_ext_evt: Wait event for service ready ext
|
||||
* @wmi_cmd_rsp_wake_lock: wmi command response wake lock
|
||||
* @wmi_cmd_rsp_runtime_lock: wmi command response bus lock
|
||||
@ -1470,6 +1471,7 @@ typedef struct {
|
||||
qdf_runtime_lock_t wma_runtime_resume_lock;
|
||||
uint32_t fine_time_measurement_cap;
|
||||
bool bpf_enabled;
|
||||
bool bpf_packet_filter_enable;
|
||||
struct wma_ini_config ini_config;
|
||||
struct wma_valid_channels saved_chan;
|
||||
/* NAN datapath support enabled in firmware */
|
||||
|
@ -149,6 +149,7 @@ struct wma_dfs_radar_ind {
|
||||
* @lpss_support: lpass support
|
||||
* @egap_support: enhanced green ap support
|
||||
* @nan_datapath_enabled: nan data path support
|
||||
* @bool is_ra_rate_limit_enabled: RA filter support
|
||||
*/
|
||||
struct wma_tgt_cfg {
|
||||
uint32_t target_fw_version;
|
||||
@ -169,6 +170,9 @@ struct wma_tgt_cfg {
|
||||
#endif
|
||||
uint32_t fine_time_measurement_cap;
|
||||
bool bpf_enabled;
|
||||
#ifdef FEATURE_WLAN_RA_FILTERING
|
||||
bool is_ra_rate_limit_enabled;
|
||||
#endif
|
||||
#ifdef WLAN_FEATURE_NAN_DATAPATH
|
||||
bool nan_datapath_enabled;
|
||||
#endif
|
||||
|
@ -1824,6 +1824,8 @@ QDF_STATUS wma_open(void *cds_context,
|
||||
wma_handle->driver_type = cds_cfg->driver_type;
|
||||
wma_handle->ssdp = cds_cfg->ssdp;
|
||||
wma_handle->enable_mc_list = cds_cfg->enable_mc_list;
|
||||
wma_handle->bpf_packet_filter_enable =
|
||||
cds_cfg->bpf_packet_filter_enable;
|
||||
#ifdef FEATURE_WLAN_RA_FILTERING
|
||||
wma_handle->IsRArateLimitEnabled = cds_cfg->is_ra_ratelimit_enabled;
|
||||
wma_handle->RArateLimitInterval = cds_cfg->ra_ratelimit_interval;
|
||||
@ -3907,6 +3909,26 @@ static void wma_update_target_ext_vht_cap(t_wma_handle *wma_handle,
|
||||
vht_cap->vht_mu_bformee, vht_cap->vht_max_ampdu_len_exp);
|
||||
}
|
||||
|
||||
/**
|
||||
* wma_update_ra_rate_limit() - update wma config
|
||||
* @wma_handle: wma handle
|
||||
* @cfg: target config
|
||||
*
|
||||
* Return: none
|
||||
*/
|
||||
#ifdef FEATURE_WLAN_RA_FILTERING
|
||||
static void wma_update_ra_rate_limit(tp_wma_handle wma_handle,
|
||||
struct wma_tgt_cfg *cfg)
|
||||
{
|
||||
cfg->is_ra_rate_limit_enabled = wma_handle->IsRArateLimitEnabled;
|
||||
}
|
||||
#else
|
||||
static void wma_update_ra_rate_limit(tp_wma_handle wma_handle,
|
||||
struct wma_tgt_cfg *cfg)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* wma_update_hdd_cfg() - update HDD config
|
||||
* @wma_handle: wma handle
|
||||
@ -3961,6 +3983,7 @@ static void wma_update_hdd_cfg(tp_wma_handle wma_handle)
|
||||
#endif /* WLAN_FEATURE_LPSS */
|
||||
tgt_cfg.ap_arpns_support = wma_handle->ap_arpns_support;
|
||||
tgt_cfg.bpf_enabled = wma_handle->bpf_enabled;
|
||||
wma_update_ra_rate_limit(wma_handle, &tgt_cfg);
|
||||
tgt_cfg.fine_time_measurement_cap =
|
||||
wma_handle->fine_time_measurement_cap;
|
||||
wma_setup_egap_support(&tgt_cfg, wma_handle);
|
||||
@ -4149,6 +4172,25 @@ done:
|
||||
wma_handle->dual_mac_cfg.cur_fw_mode_config);
|
||||
}
|
||||
|
||||
/**
|
||||
* wma_update_ra_limit() - update ra limit based on bpf filter
|
||||
* enabled or not
|
||||
* @handle: wma handle
|
||||
*
|
||||
* Return: none
|
||||
*/
|
||||
#ifdef FEATURE_WLAN_RA_FILTERING
|
||||
static void wma_update_ra_limit(tp_wma_handle wma_handle)
|
||||
{
|
||||
if (wma_handle->bpf_enabled)
|
||||
wma_handle->IsRArateLimitEnabled = false;
|
||||
}
|
||||
#else
|
||||
static void wma_update_ra__limit(tp_wma_handle handle)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* wma_rx_service_ready_event() - event handler to process
|
||||
* wmi rx sevice ready event.
|
||||
@ -4280,10 +4322,10 @@ int wma_rx_service_ready_event(void *handle, uint8_t *cmd_param_info,
|
||||
WMI_SERVICE_IS_ENABLED(wma_handle->wmi_service_bitmap,
|
||||
WMI_SERVICE_AP_ARPNS_OFFLOAD);
|
||||
|
||||
wma_handle->bpf_enabled =
|
||||
wma_handle->bpf_enabled = (wma_handle->bpf_packet_filter_enable &&
|
||||
WMI_SERVICE_IS_ENABLED(wma_handle->wmi_service_bitmap,
|
||||
WMI_SERVICE_BPF_OFFLOAD);
|
||||
|
||||
WMI_SERVICE_BPF_OFFLOAD));
|
||||
wma_update_ra_limit(wma_handle);
|
||||
if (WMI_SERVICE_IS_ENABLED(wma_handle->wmi_service_bitmap,
|
||||
WMI_SERVICE_CSA_OFFLOAD)) {
|
||||
WMA_LOGD("%s: FW support CSA offload capability", __func__);
|
||||
|
Loading…
Reference in New Issue
Block a user