diff options
| -rw-r--r-- | CORE/HDD/inc/wlan_hdd_tgt_cfg.h | 3 | ||||
| -rw-r--r-- | CORE/HDD/src/wlan_hdd_main.c | 14 | ||||
| -rw-r--r-- | CORE/MAC/inc/aniGlobal.h | 1 | ||||
| -rw-r--r-- | CORE/SERVICES/WMA/wma.c | 35 | ||||
| -rw-r--r-- | CORE/SERVICES/WMA/wma.h | 1 | ||||
| -rw-r--r-- | CORE/VOSS/src/vos_api.c | 2 |
6 files changed, 54 insertions, 2 deletions
diff --git a/CORE/HDD/inc/wlan_hdd_tgt_cfg.h b/CORE/HDD/inc/wlan_hdd_tgt_cfg.h index 15948d32e8db..72a6a683c4d1 100644 --- a/CORE/HDD/inc/wlan_hdd_tgt_cfg.h +++ b/CORE/HDD/inc/wlan_hdd_tgt_cfg.h @@ -110,6 +110,9 @@ struct hdd_tgt_cfg { #endif uint32_t fine_time_measurement_cap; bool bpf_enabled; +#ifdef FEATURE_WLAN_RA_FILTERING + bool is_ra_rate_limit_enabled; +#endif uint16_t wmi_max_len; #ifdef WLAN_FEATURE_NAN_DATAPATH bool nan_datapath_enabled; diff --git a/CORE/HDD/src/wlan_hdd_main.c b/CORE/HDD/src/wlan_hdd_main.c index 08f0d4978c45..ec6a35af3e5d 100644 --- a/CORE/HDD/src/wlan_hdd_main.c +++ b/CORE/HDD/src/wlan_hdd_main.c @@ -8766,6 +8766,19 @@ static void hdd_update_tgt_vht_cap(hdd_context_t *hdd_ctx, } #endif /* #ifdef WLAN_FEATURE_11AC */ +#ifdef FEATURE_WLAN_RA_FILTERING +static void hdd_update_ra_rate_limit(hdd_context_t *hdd_ctx, + struct hdd_tgt_cfg *cfg) +{ + hdd_ctx->cfg_ini->IsRArateLimitEnabled = cfg->is_ra_rate_limit_enabled; +} +#else +static void hdd_update_ra_rate_limit(hdd_context_t *hdd_ctx, + struct hdd_tgt_cfg *cfg) +{ +} +#endif + void hdd_update_tgt_cfg(void *context, void *param) { hdd_context_t *hdd_ctx = (hdd_context_t *)context; @@ -8845,6 +8858,7 @@ void hdd_update_tgt_cfg(void *context, void *param) cfg->bpf_enabled, hdd_ctx->cfg_ini->bpf_packet_filter_enable); hdd_ctx->bpf_enabled = (cfg->bpf_enabled && hdd_ctx->cfg_ini->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 diff --git a/CORE/MAC/inc/aniGlobal.h b/CORE/MAC/inc/aniGlobal.h index 20c66aac5408..9ec0c282ef1d 100644 --- a/CORE/MAC/inc/aniGlobal.h +++ b/CORE/MAC/inc/aniGlobal.h @@ -1142,6 +1142,7 @@ typedef struct sMacOpenParameters bool force_target_assert_enabled; uint16_t pkt_bundle_timer_value; uint16_t pkt_bundle_size; + bool bpf_packet_filter_enable; struct ol_tx_sched_wrr_ac_specs_t ac_specs[OL_TX_NUM_WMM_AC]; } tMacOpenParameters; diff --git a/CORE/SERVICES/WMA/wma.c b/CORE/SERVICES/WMA/wma.c index 5024994d3d16..c592bcb55c07 100644 --- a/CORE/SERVICES/WMA/wma.c +++ b/CORE/SERVICES/WMA/wma.c @@ -7353,6 +7353,8 @@ VOS_STATUS WDA_open(v_VOID_t *vos_context, v_VOID_t *os_ctx, wma_handle->ssdp = mac_params->ssdp; wma_handle->enable_mc_list = mac_params->enable_mc_list; wma_handle->enable_bcst_ptrn = mac_params->enable_bcst_ptrn; + wma_handle->bpf_packet_filter_enable = + mac_params->bpf_packet_filter_enable; #ifdef FEATURE_WLAN_RA_FILTERING wma_handle->IsRArateLimitEnabled = mac_params->IsRArateLimitEnabled; wma_handle->RArateLimitInterval = mac_params->RArateLimitInterval; @@ -33674,6 +33676,20 @@ static inline void wma_update_target_vht_cap(tp_wma_handle wh, } #endif /* #ifdef WLAN_FEATURE_11AC */ +#ifdef FEATURE_WLAN_RA_FILTERING +static void wma_update_ra_rate_limit(tp_wma_handle wma_handle, + struct hdd_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 hdd_tgt_cfg *cfg) +{ +} +#endif + + static void wma_update_hdd_cfg(tp_wma_handle wma_handle) { struct hdd_tgt_cfg hdd_tgt_cfg; @@ -33720,6 +33736,7 @@ static void wma_update_hdd_cfg(tp_wma_handle wma_handle) hdd_tgt_cfg.wmi_max_len = wmi_get_max_msg_len(wma_handle->wmi_handle) - WMI_TLV_HEADROOM; hdd_tgt_cfg.bpf_enabled = wma_handle->bpf_enabled; + wma_update_ra_rate_limit(wma_handle, &hdd_tgt_cfg); wma_update_hdd_cfg_ndp(wma_handle, &hdd_tgt_cfg); wma_setup_egap_support(&hdd_tgt_cfg, wma_handle); hdd_tgt_cfg.max_mc_addr_list = @@ -33901,6 +33918,19 @@ static void wma_send_time_stamp_sync_cmd(void *data) WMA_LOGE("Failed to start the firmware time sync timer"); } +#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 + + /* Process service ready event and send wmi_init command */ v_VOID_t wma_rx_service_ready_event(WMA_HANDLE handle, void *cmd_param_info) { @@ -33991,9 +34021,10 @@ v_VOID_t wma_rx_service_ready_event(WMA_HANDLE handle, void *cmd_param_info) wma_handle->ap_arpns_support = 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__); diff --git a/CORE/SERVICES/WMA/wma.h b/CORE/SERVICES/WMA/wma.h index 0304f1ce2d2f..7dc0f3f325bb 100644 --- a/CORE/SERVICES/WMA/wma.h +++ b/CORE/SERVICES/WMA/wma.h @@ -922,6 +922,7 @@ typedef struct wma_handle { struct wma_runtime_pm_context runtime_context; uint32_t fine_time_measurement_cap; bool bpf_enabled; + bool bpf_packet_filter_enable; bool pause_other_vdev_on_mcc_start; /* NAN datapath support enabled in firmware */ diff --git a/CORE/VOSS/src/vos_api.c b/CORE/VOSS/src/vos_api.c index 037bc755fbd6..5e8450e13169 100644 --- a/CORE/VOSS/src/vos_api.c +++ b/CORE/VOSS/src/vos_api.c @@ -573,6 +573,8 @@ VOS_STATUS vos_open( v_CONTEXT_t *pVosContext, v_SIZE_t hddContextSize ) macOpenParms.enable_bcst_ptrn = pHddCtx->cfg_ini->bcastptrn; macOpenParms.enable_mc_list = pHddCtx->cfg_ini->fEnableMCAddrList; + macOpenParms.bpf_packet_filter_enable = + pHddCtx->cfg_ini->bpf_packet_filter_enable; #ifdef FEATURE_WLAN_RA_FILTERING macOpenParms.RArateLimitInterval = pHddCtx->cfg_ini->RArateLimitInterval; macOpenParms.IsRArateLimitEnabled = pHddCtx->cfg_ini->IsRArateLimitEnabled; |
