diff --git a/components/pmo/core/inc/wlan_pmo_main.h b/components/pmo/core/inc/wlan_pmo_main.h index 8f478aebbd..f7afb4f7fb 100644 --- a/components/pmo/core/inc/wlan_pmo_main.h +++ b/components/pmo/core/inc/wlan_pmo_main.h @@ -352,7 +352,7 @@ pmo_intersect_arp_ns_offload(struct pmo_psoc_priv_obj *psoc_ctx) /** * pmo_intersect_apf() - intersect config and firmware capability for - * the BPF feature + * the APF feature * @psoc_ctx: A PMO psoc context * * Note: The caller is expected to grab the PMO context lock. @@ -366,7 +366,7 @@ static inline bool pmo_intersect_apf(struct pmo_psoc_priv_obj *psoc_ctx) /** * pmo_intersect_packet_filter() - intersect config and firmware capability for - * the BPF feature + * the APF feature * @psoc_ctx: A PMO psoc context * * Note: The caller is expected to grab the PMO context lock. diff --git a/components/pmo/core/inc/wlan_pmo_static_config.h b/components/pmo/core/inc/wlan_pmo_static_config.h index 90a339c3bf..9265ea6b1d 100644 --- a/components/pmo/core/inc/wlan_pmo_static_config.h +++ b/components/pmo/core/inc/wlan_pmo_static_config.h @@ -76,14 +76,14 @@ void pmo_update_target_service(struct wlan_objmgr_psoc *psoc, WMI_SERVICE service, bool value); /** - * pmo_update_ra_limit() - update ra limit based on bpf filter + * pmo_update_ra_limit() - update ra limit based on apf filter * enabled or not * @psoc: objmgr psoc - * @bpf_enabled: true when bpf service is enabled else false + * @apf_enabled: true when apf service is enabled else false * * Return: none */ -void pmo_update_ra_limit(struct wlan_objmgr_psoc *psoc, bool bpf_enabled); +void pmo_update_ra_limit(struct wlan_objmgr_psoc *psoc, bool apf_enabled); /** * pmo_set_wow_event_bitmap() - Assign bitmask with wow event diff --git a/components/pmo/dispatcher/inc/wlan_pmo_common_public_struct.h b/components/pmo/dispatcher/inc/wlan_pmo_common_public_struct.h index 5c842c0f8f..e7ffa19857 100644 --- a/components/pmo/dispatcher/inc/wlan_pmo_common_public_struct.h +++ b/components/pmo/dispatcher/inc/wlan_pmo_common_public_struct.h @@ -260,7 +260,7 @@ enum pmo_auto_pwr_detect_failure_mode { /** * struct pmo_psoc_cfg - user configuration required for pmo * @ptrn_match_enable_all_vdev: true when pattern match is enable for all vdev - * @apf_enable: true if psoc supports bpf else false + * @apf_enable: true if psoc supports apf else false * @arp_offload_enable: true if arp offload is supported for psoc else false * @hw_filter_mode: which mode the hardware filter should use during DTIM * @ns_offload_enable_static: true if psoc supports ns offload in ini else false diff --git a/core/cds/inc/cds_config.h b/core/cds/inc/cds_config.h index 3452e0a3cd..69212d061e 100644 --- a/core/cds/inc/cds_config.h +++ b/core/cds/inc/cds_config.h @@ -43,17 +43,17 @@ enum cfg_sub_20_channel_width { }; /** - * enum active_bpf_mode - the modes active BPF can operate in - * @ACTIVE_BPF_DISABLED: BPF is disabled in active mode - * @ACTIVE_BPF_ENABLED: BPF is enabled for all packets - * @ACTIVE_BPF_ADAPTIVE: BPF is enabled for packets up to some threshold - * @ACTIVE_BPF_MODE_COUNT: The number of active BPF modes + * enum active_apf_mode - the modes active APF can operate in + * @ACTIVE_APF_DISABLED: APF is disabled in active mode + * @ACTIVE_APF_ENABLED: APF is enabled for all packets + * @ACTIVE_APF_ADAPTIVE: APF is enabled for packets up to some threshold + * @ACTIVE_APF_MODE_COUNT: The number of active APF modes */ -enum active_bpf_mode { - ACTIVE_BPF_DISABLED = 0, - ACTIVE_BPF_ENABLED, - ACTIVE_BPF_ADAPTIVE, - ACTIVE_BPF_MODE_COUNT +enum active_apf_mode { + ACTIVE_APF_DISABLED = 0, + ACTIVE_APF_ENABLED, + ACTIVE_APF_ADAPTIVE, + ACTIVE_APF_MODE_COUNT }; /** @@ -93,15 +93,15 @@ enum active_bpf_mode { * @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 + * @bool apf_packet_filter_enable; Indicate apf 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 * @flow_steering_enabled: Receive flow steering. * @is_fw_timeout: Indicate whether crash host when fw timesout or not - * @active_uc_bpf_mode: Setting that determines how BPF is applied in active + * @active_uc_apf_mode: Setting that determines how APF is applied in active * mode for uc packets - * @active_mc_bc_bpf_mode: Setting that determines how BPF is applied in + * @active_mc_bc_apf_mode: Setting that determines how APF is applied in * active mode for MC/BC packets * @auto_power_save_fail_mode: auto detect power save failure mode * @ito_repeat_count: Indicates ito repeated count @@ -153,7 +153,7 @@ struct cds_config_info { #ifdef WLAN_FEATURE_NAN bool is_nan_enabled; #endif - bool bpf_packet_filter_enable; + bool apf_packet_filter_enable; bool tx_chain_mask_cck; uint16_t self_gen_frm_pwr; enum cfg_sub_20_channel_width sub_20_channel_width; @@ -162,8 +162,8 @@ struct cds_config_info { bool self_recovery_enabled; bool fw_timeout_crash; struct ol_tx_sched_wrr_ac_specs_t ac_specs[TX_WMM_AC_NUM]; - enum active_bpf_mode active_uc_bpf_mode; - enum active_bpf_mode active_mc_bc_bpf_mode; + enum active_apf_mode active_uc_apf_mode; + enum active_apf_mode active_mc_bc_apf_mode; enum pmo_auto_pwr_detect_failure_mode auto_power_save_fail_mode; uint8_t ito_repeat_count; bool force_target_assert_enabled; diff --git a/core/hdd/inc/wlan_hdd_apf.h b/core/hdd/inc/wlan_hdd_apf.h index e5a8fe995a..e7bd5a15f8 100644 --- a/core/hdd/inc/wlan_hdd_apf.h +++ b/core/hdd/inc/wlan_hdd_apf.h @@ -35,7 +35,7 @@ #include "wlan_hdd_main.h" /** - * wlan_hdd_cfg80211_bpf_offload() - SSR Wrapper to BPF Offload + * wlan_hdd_cfg80211_apf_offload() - SSR Wrapper to APF Offload * @wiphy: wiphy structure pointer * @wdev: Wireless device structure pointer * @data: Pointer to the data received @@ -44,7 +44,7 @@ * Return: 0 on success; errno on failure */ -int wlan_hdd_cfg80211_bpf_offload(struct wiphy *wiphy, +int wlan_hdd_cfg80211_apf_offload(struct wiphy *wiphy, struct wireless_dev *wdev, const void *data, int data_len); #endif /* WLAN_HDD_APF_H */ diff --git a/core/hdd/inc/wlan_hdd_cfg.h b/core/hdd/inc/wlan_hdd_cfg.h index 03f9a7d1bc..2ac3f31aeb 100644 --- a/core/hdd/inc/wlan_hdd_cfg.h +++ b/core/hdd/inc/wlan_hdd_cfg.h @@ -8640,13 +8640,13 @@ enum hdd_link_speed_rpt_type { #define CFG_ACTIVE_MODE_OFFLOAD_DEFAULT (1) /* - * 0: Disable BPF packet filter - * 1: Enable BPF packet filter + * 0: Disable APF packet filter + * 1: Enable APF 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) +#define CFG_APF_PACKET_FILTER_OFFLOAD "gBpfFilterEnable" +#define CFG_APF_PACKET_FILTER_OFFLOAD_MIN (0) +#define CFG_APF_PACKET_FILTER_OFFLOAD_MAX (1) +#define CFG_APF_PACKET_FILTER_OFFLOAD_DEFAULT (1) /* * @@ -11205,51 +11205,51 @@ enum hdd_wext_control { /* * - * gActiveUcBpfMode - Control UC active BPF mode + * gActiveUcBpfMode - Control UC active APF mode * @Min: 0 (disabled) * @Max: 2 (adaptive) * @Default: 0 (disabled) * - * This config item controls UC BPF in active mode. There are 3 modes: - * 0) disabled - BPF is disabled in active mode - * 1) enabled - BPF is enabled for all packets in active mode - * 2) adaptive - BPF is enabled for packets up to some throughput threshold + * This config item controls UC APF in active mode. There are 3 modes: + * 0) disabled - APF is disabled in active mode + * 1) enabled - APF is enabled for all packets in active mode + * 2) adaptive - APF is enabled for packets up to some throughput threshold * * Related: gActiveMcBcBpfMode * - * Supported Feature: Active Mode BPF + * Supported Feature: Active Mode APF * * Usage: Internal/External * */ -#define CFG_ACTIVE_UC_BPF_MODE_NAME "gActiveUcBpfMode" -#define CFG_ACTIVE_UC_BPF_MODE_MIN (ACTIVE_BPF_DISABLED) -#define CFG_ACTIVE_UC_BPF_MODE_MAX (ACTIVE_BPF_MODE_COUNT - 1) -#define CFG_ACTIVE_UC_BPF_MODE_DEFAULT (ACTIVE_BPF_DISABLED) +#define CFG_ACTIVE_UC_APF_MODE_NAME "gActiveUcBpfMode" +#define CFG_ACTIVE_UC_APF_MODE_MIN (ACTIVE_APF_DISABLED) +#define CFG_ACTIVE_UC_APF_MODE_MAX (ACTIVE_APF_MODE_COUNT - 1) +#define CFG_ACTIVE_UC_APF_MODE_DEFAULT (ACTIVE_APF_DISABLED) /* * - * gActiveMcBcBpfMode - Control MC/BC active BPF mode + * gActiveMcBcBpfMode - Control MC/BC active APF mode * @Min: 0 (disabled) * @Max: 1 (enabled) * @Default: 0 (disabled) * - * This config item controls MC/BC BPF in active mode. There are 3 modes: - * 0) disabled - BPF is disabled in active mode - * 1) enabled - BPF is enabled for all packets in active mode - * 2) adaptive - BPF is enabled for packets up to some throughput threshold + * This config item controls MC/BC APF in active mode. There are 3 modes: + * 0) disabled - APF is disabled in active mode + * 1) enabled - APF is enabled for all packets in active mode + * 2) adaptive - APF is enabled for packets up to some throughput threshold * * Related: gActiveUcBpfMode * - * Supported Feature: Active Mode BPF + * Supported Feature: Active Mode APF * * Usage: Internal/External * */ -#define CFG_ACTIVE_MC_BC_BPF_MODE_NAME "gActiveMcBcBpfMode" -#define CFG_ACTIVE_MC_BC_BPF_MODE_MIN (ACTIVE_BPF_DISABLED) -#define CFG_ACTIVE_MC_BC_BPF_MODE_MAX (ACTIVE_BPF_ENABLED) -#define CFG_ACTIVE_MC_BC_BPF_MODE_DEFAULT (ACTIVE_BPF_DISABLED) +#define CFG_ACTIVE_MC_BC_APF_MODE_NAME "gActiveMcBcBpfMode" +#define CFG_ACTIVE_MC_BC_APF_MODE_MIN (ACTIVE_APF_DISABLED) +#define CFG_ACTIVE_MC_BC_APF_MODE_MAX (ACTIVE_APF_ENABLED) +#define CFG_ACTIVE_MC_BC_APF_MODE_DEFAULT (ACTIVE_APF_DISABLED) /* * @@ -14770,7 +14770,7 @@ struct hdd_config { bool flow_steering_enable; uint8_t max_msdus_per_rxinorderind; bool active_mode_offload; - bool bpf_packet_filter_enable; + bool apf_packet_filter_enable; /* parameter for defer timer for enabling TDLS on p2p listen */ uint16_t tdls_enable_defer_time; uint32_t fine_time_meas_cap; @@ -14858,7 +14858,7 @@ struct hdd_config { uint8_t tx_sched_wrr_bk[TX_SCHED_WRR_PARAM_STRING_LENGTH]; bool enable_fatal_event; - bool bpf_enabled; + bool apf_enabled; #ifdef CONFIG_DP_TRACE bool enable_dp_trace; uint8_t dp_trace_config[DP_TRACE_CONFIG_STRING_LENGTH]; @@ -14931,8 +14931,8 @@ struct hdd_config { uint32_t per_roam_rest_time; uint32_t per_roam_mon_time; uint32_t min_candidate_rssi; - enum active_bpf_mode active_uc_bpf_mode; - enum active_bpf_mode active_mc_bc_bpf_mode; + enum active_apf_mode active_uc_apf_mode; + enum active_apf_mode active_mc_bc_apf_mode; bool enable_bcast_probe_rsp; uint8_t he_dynamic_frag_support; #ifdef WLAN_FEATURE_11AX diff --git a/core/hdd/inc/wlan_hdd_main.h b/core/hdd/inc/wlan_hdd_main.h index baae4df4cd..378b6bab6c 100644 --- a/core/hdd/inc/wlan_hdd_main.h +++ b/core/hdd/inc/wlan_hdd_main.h @@ -209,7 +209,7 @@ static inline bool in_compat_syscall(void) { return is_compat_task(); } #define WLAN_WAIT_TIME_ANTENNA_MODE_REQ 3000 #define WLAN_WAIT_TIME_SET_DUAL_MAC_CFG 1500 -#define WLAN_WAIT_TIME_BPF 1000 +#define WLAN_WAIT_TIME_APF 1000 /* Maximum time(ms) to wait for RSO CMD status event */ #define WAIT_TIME_RSO_CMD_STATUS 2000 @@ -1823,7 +1823,7 @@ struct hdd_context { struct completion set_antenna_mode_cmpl; /* Current number of TX X RX chains being used */ enum antenna_mode current_antenna_mode; - bool bpf_enabled; + bool apf_enabled; /* the radio index assigned by cnss_logger */ int radio_index; diff --git a/core/hdd/src/wlan_hdd_apf.c b/core/hdd/src/wlan_hdd_apf.c index 9a1c724654..432114677d 100644 --- a/core/hdd/src/wlan_hdd_apf.c +++ b/core/hdd/src/wlan_hdd_apf.c @@ -28,44 +28,44 @@ /* * define short names for the global vendor params - * used by __wlan_hdd_cfg80211_bpf_offload() + * used by __wlan_hdd_cfg80211_apf_offload() */ -#define BPF_INVALID \ +#define APF_INVALID \ QCA_WLAN_VENDOR_ATTR_PACKET_FILTER_INVALID -#define BPF_SET_RESET \ +#define APF_SET_RESET \ QCA_WLAN_VENDOR_ATTR_SET_RESET_PACKET_FILTER -#define BPF_VERSION \ +#define APF_VERSION \ QCA_WLAN_VENDOR_ATTR_PACKET_FILTER_VERSION -#define BPF_FILTER_ID \ +#define APF_FILTER_ID \ QCA_WLAN_VENDOR_ATTR_PACKET_FILTER_ID -#define BPF_PACKET_SIZE \ +#define APF_PACKET_SIZE \ QCA_WLAN_VENDOR_ATTR_PACKET_FILTER_SIZE -#define BPF_CURRENT_OFFSET \ +#define APF_CURRENT_OFFSET \ QCA_WLAN_VENDOR_ATTR_PACKET_FILTER_CURRENT_OFFSET -#define BPF_PROGRAM \ +#define APF_PROGRAM \ QCA_WLAN_VENDOR_ATTR_PACKET_FILTER_PROGRAM -#define BPF_MAX \ +#define APF_MAX \ QCA_WLAN_VENDOR_ATTR_PACKET_FILTER_MAX static const struct nla_policy -wlan_hdd_bpf_offload_policy[BPF_MAX + 1] = { - [BPF_SET_RESET] = {.type = NLA_U32}, - [BPF_VERSION] = {.type = NLA_U32}, - [BPF_FILTER_ID] = {.type = NLA_U32}, - [BPF_PACKET_SIZE] = {.type = NLA_U32}, - [BPF_CURRENT_OFFSET] = {.type = NLA_U32}, - [BPF_PROGRAM] = {.type = NLA_U8}, +wlan_hdd_apf_offload_policy[APF_MAX + 1] = { + [APF_SET_RESET] = {.type = NLA_U32}, + [APF_VERSION] = {.type = NLA_U32}, + [APF_FILTER_ID] = {.type = NLA_U32}, + [APF_PACKET_SIZE] = {.type = NLA_U32}, + [APF_CURRENT_OFFSET] = {.type = NLA_U32}, + [APF_PROGRAM] = {.type = NLA_U8}, }; -struct bpf_offload_priv { - struct sir_bpf_get_offload bpf_get_offload; +struct apf_offload_priv { + struct sir_apf_get_offload apf_get_offload; }; -static void hdd_get_bpf_offload_cb(void *context, - struct sir_bpf_get_offload *data) +static void hdd_get_apf_offload_cb(void *context, + struct sir_apf_get_offload *data) { struct hdd_request *request; - struct bpf_offload_priv *priv; + struct apf_offload_priv *priv; hdd_enter(); @@ -76,20 +76,21 @@ static void hdd_get_bpf_offload_cb(void *context, } priv = hdd_request_priv(request); - priv->bpf_get_offload = *data; + priv->apf_get_offload = *data; hdd_request_complete(request); hdd_request_put(request); } /** - * hdd_post_get_bpf_capabilities_rsp() - Callback function to BPF Offload + * hdd_post_get_apf_capabilities_rsp() - Callback function to APF Offload * @hdd_context: hdd_context - * @bpf_get_offload: struct for get offload + * @apf_get_offload: struct for get offload * * Return: 0 on success, error number otherwise. */ -static int hdd_post_get_bpf_capabilities_rsp(struct hdd_context *hdd_ctx, - struct sir_bpf_get_offload *bpf_get_offload) +static int +hdd_post_get_apf_capabilities_rsp(struct hdd_context *hdd_ctx, + struct sir_apf_get_offload *apf_get_offload) { struct sk_buff *skb; uint32_t nl_buf_len; @@ -98,8 +99,8 @@ static int hdd_post_get_bpf_capabilities_rsp(struct hdd_context *hdd_ctx, nl_buf_len = NLMSG_HDRLEN; nl_buf_len += - (sizeof(bpf_get_offload->max_bytes_for_bpf_inst) + NLA_HDRLEN) + - (sizeof(bpf_get_offload->bpf_version) + NLA_HDRLEN); + (sizeof(apf_get_offload->max_bytes_for_apf_inst) + NLA_HDRLEN) + + (sizeof(apf_get_offload->apf_version) + NLA_HDRLEN); skb = cfg80211_vendor_cmd_alloc_reply_skb(hdd_ctx->wiphy, nl_buf_len); if (!skb) { @@ -107,13 +108,13 @@ static int hdd_post_get_bpf_capabilities_rsp(struct hdd_context *hdd_ctx, return -ENOMEM; } - hdd_debug("BPF Version: %u BPF max bytes: %u", - bpf_get_offload->bpf_version, - bpf_get_offload->max_bytes_for_bpf_inst); + hdd_debug("APF Version: %u APF max bytes: %u", + apf_get_offload->apf_version, + apf_get_offload->max_bytes_for_apf_inst); - if (nla_put_u32(skb, BPF_PACKET_SIZE, - bpf_get_offload->max_bytes_for_bpf_inst) || - nla_put_u32(skb, BPF_VERSION, bpf_get_offload->bpf_version)) { + if (nla_put_u32(skb, APF_PACKET_SIZE, + apf_get_offload->max_bytes_for_apf_inst) || + nla_put_u32(skb, APF_VERSION, apf_get_offload->apf_version)) { hdd_err("nla put failure"); goto nla_put_failure; } @@ -128,21 +129,21 @@ nla_put_failure: } /** - * hdd_get_bpf_offload - Get BPF offload Capabilities + * hdd_get_apf_offload - Get APF offload Capabilities * @hdd_ctx: Hdd context * * Return: 0 on success, errno on failure */ -static int hdd_get_bpf_offload(struct hdd_context *hdd_ctx) +static int hdd_get_apf_offload(struct hdd_context *hdd_ctx) { QDF_STATUS status; int ret; void *cookie; struct hdd_request *request; - struct bpf_offload_priv *priv; + struct apf_offload_priv *priv; static const struct hdd_request_params params = { .priv_size = sizeof(*priv), - .timeout_ms = WLAN_WAIT_TIME_BPF, + .timeout_ms = WLAN_WAIT_TIME_APF, }; hdd_enter(); @@ -154,11 +155,11 @@ static int hdd_get_bpf_offload(struct hdd_context *hdd_ctx) } cookie = hdd_request_cookie(request); - status = sme_get_bpf_offload_capabilities(hdd_ctx->hHal, - hdd_get_bpf_offload_cb, + status = sme_get_apf_offload_capabilities(hdd_ctx->hHal, + hdd_get_apf_offload_cb, cookie); if (!QDF_IS_STATUS_SUCCESS(status)) { - hdd_err("Unable to retrieve BPF caps"); + hdd_err("Unable to retrieve APF caps"); ret = qdf_status_to_os_return(status); goto cleanup; } @@ -168,10 +169,10 @@ static int hdd_get_bpf_offload(struct hdd_context *hdd_ctx) goto cleanup; } priv = hdd_request_priv(request); - ret = hdd_post_get_bpf_capabilities_rsp(hdd_ctx, - &priv->bpf_get_offload); + ret = hdd_post_get_apf_capabilities_rsp(hdd_ctx, + &priv->apf_get_offload); if (ret) - hdd_err("Failed to post get bpf capabilities"); + hdd_err("Failed to post get apf capabilities"); cleanup: /* @@ -187,18 +188,18 @@ cleanup: } /** - * hdd_set_reset_bpf_offload - Post set/reset bpf to SME + * hdd_set_reset_apf_offload - Post set/reset apf to SME * @hdd_ctx: Hdd context * @tb: Length of @data * @adapter: pointer to adapter struct * * Return: 0 on success; errno on failure */ -static int hdd_set_reset_bpf_offload(struct hdd_context *hdd_ctx, +static int hdd_set_reset_apf_offload(struct hdd_context *hdd_ctx, struct nlattr **tb, struct hdd_adapter *adapter) { - struct sir_bpf_set_offload *bpf_set_offload; + struct sir_apf_set_offload *apf_set_offload; QDF_STATUS status; int prog_len; int ret = 0; @@ -214,91 +215,89 @@ static int hdd_set_reset_bpf_offload(struct hdd_context *hdd_ctx, } } - bpf_set_offload = qdf_mem_malloc(sizeof(*bpf_set_offload)); - if (bpf_set_offload == NULL) { - hdd_err("qdf_mem_malloc failed for bpf_set_offload"); + apf_set_offload = qdf_mem_malloc(sizeof(*apf_set_offload)); + if (!apf_set_offload) { + hdd_err("qdf_mem_malloc failed for apf_set_offload"); return -ENOMEM; } - /* Parse and fetch bpf packet size */ - if (!tb[BPF_PACKET_SIZE]) { - hdd_err("attr bpf packet size failed"); + /* Parse and fetch apf packet size */ + if (!tb[APF_PACKET_SIZE]) { + hdd_err("attr apf packet size failed"); ret = -EINVAL; goto fail; } - bpf_set_offload->total_length = nla_get_u32(tb[BPF_PACKET_SIZE]); + apf_set_offload->total_length = nla_get_u32(tb[APF_PACKET_SIZE]); - if (!bpf_set_offload->total_length) { - hdd_debug("BPF reset packet filter received"); + if (!apf_set_offload->total_length) { + hdd_debug("APF reset packet filter received"); goto post_sme; } - /* Parse and fetch bpf program */ - if (!tb[BPF_PROGRAM]) { - hdd_err("attr bpf program failed"); + /* Parse and fetch apf program */ + if (!tb[APF_PROGRAM]) { + hdd_err("attr apf program failed"); ret = -EINVAL; goto fail; } - prog_len = nla_len(tb[BPF_PROGRAM]); - bpf_set_offload->program = qdf_mem_malloc(sizeof(uint8_t) * prog_len); + prog_len = nla_len(tb[APF_PROGRAM]); + apf_set_offload->program = qdf_mem_malloc(sizeof(uint8_t) * prog_len); - if (bpf_set_offload->program == NULL) { - hdd_err("qdf_mem_malloc failed for bpf offload program"); + if (!apf_set_offload->program) { + hdd_err("qdf_mem_malloc failed for apf offload program"); ret = -ENOMEM; goto fail; } - bpf_set_offload->current_length = prog_len; - nla_memcpy(bpf_set_offload->program, tb[BPF_PROGRAM], prog_len); - bpf_set_offload->session_id = adapter->session_id; + apf_set_offload->current_length = prog_len; + nla_memcpy(apf_set_offload->program, tb[APF_PROGRAM], prog_len); + apf_set_offload->session_id = adapter->session_id; - hdd_debug("BPF set instructions"); + hdd_debug("APF set instructions"); QDF_TRACE_HEX_DUMP(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_DEBUG, - bpf_set_offload->program, prog_len); + apf_set_offload->program, prog_len); /* Parse and fetch filter Id */ - if (!tb[BPF_FILTER_ID]) { + if (!tb[APF_FILTER_ID]) { hdd_err("attr filter id failed"); ret = -EINVAL; goto fail; } - bpf_set_offload->filter_id = nla_get_u32(tb[BPF_FILTER_ID]); + apf_set_offload->filter_id = nla_get_u32(tb[APF_FILTER_ID]); /* Parse and fetch current offset */ - if (!tb[BPF_CURRENT_OFFSET]) { + if (!tb[APF_CURRENT_OFFSET]) { hdd_err("attr current offset failed"); ret = -EINVAL; goto fail; } - bpf_set_offload->current_offset = nla_get_u32(tb[BPF_CURRENT_OFFSET]); + apf_set_offload->current_offset = nla_get_u32(tb[APF_CURRENT_OFFSET]); post_sme: - hdd_debug("Posting BPF SET/RESET to SME, session_id: %d Bpf Version: %d filter ID: %d total_length: %d current_length: %d current offset: %d", - bpf_set_offload->session_id, - bpf_set_offload->version, - bpf_set_offload->filter_id, - bpf_set_offload->total_length, - bpf_set_offload->current_length, - bpf_set_offload->current_offset); + hdd_debug("Posting APF SET/RESET to SME, session_id: %d APF Version: %d filter ID: %d total_length: %d current_length: %d current offset: %d", + apf_set_offload->session_id, apf_set_offload->version, + apf_set_offload->filter_id, apf_set_offload->total_length, + apf_set_offload->current_length, + apf_set_offload->current_offset); - status = sme_set_bpf_instructions(hdd_ctx->hHal, bpf_set_offload); + status = sme_set_apf_instructions(hdd_ctx->hHal, apf_set_offload); if (!QDF_IS_STATUS_SUCCESS(status)) { - hdd_err("sme_set_bpf_instructions failed(err=%d)", status); + hdd_err("sme_set_apf_instructions failed(err=%d)", status); ret = -EINVAL; goto fail; } hdd_exit(); fail: - if (bpf_set_offload->current_length) - qdf_mem_free(bpf_set_offload->program); - qdf_mem_free(bpf_set_offload); + if (apf_set_offload->current_length) + qdf_mem_free(apf_set_offload->program); + qdf_mem_free(apf_set_offload); return ret; } /** - * wlan_hdd_cfg80211_bpf_offload() - Set/Reset to BPF Offload + * wlan_hdd_cfg80211_apf_offload() - Set/Reset to APF Offload * @wiphy: wiphy structure pointer * @wdev: Wireless device structure pointer * @data: Pointer to the data received @@ -307,14 +306,14 @@ fail: * Return: 0 on success; errno on failure */ static int -__wlan_hdd_cfg80211_bpf_offload(struct wiphy *wiphy, +__wlan_hdd_cfg80211_apf_offload(struct wiphy *wiphy, struct wireless_dev *wdev, const void *data, int data_len) { struct hdd_context *hdd_ctx = wiphy_priv(wiphy); struct net_device *dev = wdev->netdev; struct hdd_adapter *adapter = WLAN_HDD_GET_PRIV_PTR(dev); - struct nlattr *tb[BPF_MAX + 1]; + struct nlattr *tb[APF_MAX + 1]; int ret_val, packet_filter_subcmd; hdd_enter(); @@ -328,39 +327,39 @@ __wlan_hdd_cfg80211_bpf_offload(struct wiphy *wiphy, return -EINVAL; } - if (!hdd_ctx->bpf_enabled) { - hdd_err("BPF offload is not supported/enabled"); + if (!hdd_ctx->apf_enabled) { + hdd_err("APF offload is not supported/enabled"); return -ENOTSUPP; } - if (wlan_cfg80211_nla_parse(tb, BPF_MAX, data, data_len, - wlan_hdd_bpf_offload_policy)) { + if (wlan_cfg80211_nla_parse(tb, APF_MAX, data, data_len, + wlan_hdd_apf_offload_policy)) { hdd_err("Invalid ATTR"); return -EINVAL; } - if (!tb[BPF_SET_RESET]) { - hdd_err("attr bpf set reset failed"); + if (!tb[APF_SET_RESET]) { + hdd_err("attr apf set reset failed"); return -EINVAL; } - packet_filter_subcmd = nla_get_u32(tb[BPF_SET_RESET]); + packet_filter_subcmd = nla_get_u32(tb[APF_SET_RESET]); if (packet_filter_subcmd == QCA_WLAN_GET_PACKET_FILTER) - return hdd_get_bpf_offload(hdd_ctx); + return hdd_get_apf_offload(hdd_ctx); else - return hdd_set_reset_bpf_offload(hdd_ctx, tb, + return hdd_set_reset_apf_offload(hdd_ctx, tb, adapter); } -int wlan_hdd_cfg80211_bpf_offload(struct wiphy *wiphy, - struct wireless_dev *wdev, - const void *data, int data_len) +int +wlan_hdd_cfg80211_apf_offload(struct wiphy *wiphy, struct wireless_dev *wdev, + const void *data, int data_len) { int ret; cds_ssr_protect(__func__); - ret = __wlan_hdd_cfg80211_bpf_offload(wiphy, wdev, data, data_len); + ret = __wlan_hdd_cfg80211_apf_offload(wiphy, wdev, data, data_len); cds_ssr_unprotect(__func__); return ret; diff --git a/core/hdd/src/wlan_hdd_cfg.c b/core/hdd/src/wlan_hdd_cfg.c index 7fa92b9e13..228903df51 100644 --- a/core/hdd/src/wlan_hdd_cfg.c +++ b/core/hdd/src/wlan_hdd_cfg.c @@ -3436,12 +3436,12 @@ struct reg_table_entry g_registry_table[] = { CFG_GRO_ENABLED_MIN, CFG_GRO_ENABLED_MAX), - REG_VARIABLE(CFG_BPF_PACKET_FILTER_OFFLOAD, WLAN_PARAM_Integer, - struct hdd_config, bpf_packet_filter_enable, + REG_VARIABLE(CFG_APF_PACKET_FILTER_OFFLOAD, WLAN_PARAM_Integer, + struct hdd_config, apf_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), + CFG_APF_PACKET_FILTER_OFFLOAD_DEFAULT, + CFG_APF_PACKET_FILTER_OFFLOAD_MIN, + CFG_APF_PACKET_FILTER_OFFLOAD_MAX), REG_VARIABLE(CFG_TDLS_ENABLE_DEFER_TIMER, WLAN_PARAM_Integer, struct hdd_config, tdls_enable_defer_time, @@ -4397,19 +4397,19 @@ struct reg_table_entry g_registry_table[] = { CFG_PER_ROAM_MIN_CANDIDATE_RSSI_MIN, CFG_PER_ROAM_MIN_CANDIDATE_RSSI_MAX), - REG_VARIABLE(CFG_ACTIVE_UC_BPF_MODE_NAME, WLAN_PARAM_Integer, - struct hdd_config, active_uc_bpf_mode, - VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, - CFG_ACTIVE_UC_BPF_MODE_DEFAULT, - CFG_ACTIVE_UC_BPF_MODE_MIN, - CFG_ACTIVE_UC_BPF_MODE_MAX), + REG_VARIABLE(CFG_ACTIVE_UC_APF_MODE_NAME, WLAN_PARAM_Integer, + struct hdd_config, active_uc_apf_mode, + VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, + CFG_ACTIVE_UC_APF_MODE_DEFAULT, + CFG_ACTIVE_UC_APF_MODE_MIN, + CFG_ACTIVE_UC_APF_MODE_MAX), - REG_VARIABLE(CFG_ACTIVE_MC_BC_BPF_MODE_NAME, WLAN_PARAM_Integer, - struct hdd_config, active_mc_bc_bpf_mode, - VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, - CFG_ACTIVE_MC_BC_BPF_MODE_DEFAULT, - CFG_ACTIVE_MC_BC_BPF_MODE_MIN, - CFG_ACTIVE_MC_BC_BPF_MODE_MAX), + REG_VARIABLE(CFG_ACTIVE_MC_BC_APF_MODE_NAME, WLAN_PARAM_Integer, + struct hdd_config, active_mc_bc_apf_mode, + VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, + CFG_ACTIVE_MC_BC_APF_MODE_DEFAULT, + CFG_ACTIVE_MC_BC_APF_MODE_MIN, + CFG_ACTIVE_MC_BC_APF_MODE_MAX), REG_VARIABLE(CFG_ENABLE_BCAST_PROBE_RESP_NAME, WLAN_PARAM_Integer, struct hdd_config, enable_bcast_probe_rsp, @@ -7065,8 +7065,8 @@ void hdd_cfg_print(struct hdd_context *hdd_ctx) CFG_GO_FORCE_11N_FOR_11AC_NAME, hdd_ctx->config->go_force_11n_for_11ac); hdd_debug("Name = [%s] Value = [%d]", - CFG_BPF_PACKET_FILTER_OFFLOAD, - hdd_ctx->config->bpf_packet_filter_enable); + CFG_APF_PACKET_FILTER_OFFLOAD, + hdd_ctx->config->apf_packet_filter_enable); hdd_debug("Name = [%s] Value = [%u]", CFG_TDLS_ENABLE_DEFER_TIMER, hdd_ctx->config->tdls_enable_defer_time); @@ -7080,11 +7080,11 @@ void hdd_cfg_print(struct hdd_context *hdd_ctx) CFG_CRASH_FW_TIMEOUT_NAME, hdd_ctx->config->fw_timeout_crash); hdd_debug("Name = [%s] Value = [%u]", - CFG_ACTIVE_UC_BPF_MODE_NAME, - hdd_ctx->config->active_uc_bpf_mode); + CFG_ACTIVE_UC_APF_MODE_NAME, + hdd_ctx->config->active_uc_apf_mode); hdd_debug("Name = [%s] Value = [%u]", - CFG_ACTIVE_MC_BC_BPF_MODE_NAME, - hdd_ctx->config->active_mc_bc_bpf_mode); + CFG_ACTIVE_MC_BC_APF_MODE_NAME, + hdd_ctx->config->active_mc_bc_apf_mode); hdd_debug("Name = [%s] Value = [%d]", CFG_SAP_INTERNAL_RESTART_NAME, hdd_ctx->config->sap_internal_restart); diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index 8fafa198f4..6038864974 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -10597,14 +10597,14 @@ static int wlan_hdd_cfg80211_sap_configuration_set(struct wiphy *wiphy, return ret; } -#undef BPF_INVALID -#undef BPF_SET_RESET -#undef BPF_VERSION -#undef BPF_ID -#undef BPF_PACKET_SIZE -#undef BPF_CURRENT_OFFSET -#undef BPF_PROGRAM -#undef BPF_MAX +#undef APF_INVALID +#undef APF_SET_RESET +#undef APF_VERSION +#undef APF_ID +#undef APF_PACKET_SIZE +#undef APF_CURRENT_OFFSET +#undef APF_PROGRAM +#undef APF_MAX #ifndef QCA_SUPPORT_CP_STATS /** @@ -14418,7 +14418,7 @@ const struct wiphy_vendor_command hdd_wiphy_vendor_commands[] = { .flags = WIPHY_VENDOR_CMD_NEED_WDEV | WIPHY_VENDOR_CMD_NEED_NETDEV | WIPHY_VENDOR_CMD_NEED_RUNNING, - .doit = wlan_hdd_cfg80211_bpf_offload + .doit = wlan_hdd_cfg80211_apf_offload }, #endif /* FEATURE_WLAN_APF */ { diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 5397f91f59..f3e4581dba 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -2021,8 +2021,8 @@ void hdd_update_tgt_cfg(hdd_handle_t hdd_handle, struct wma_tgt_cfg *cfg) hdd_debug("Init current antenna mode: %d", hdd_ctx->current_antenna_mode); - hdd_ctx->bpf_enabled = (cfg->bpf_enabled && - hdd_ctx->config->bpf_packet_filter_enable); + hdd_ctx->apf_enabled = (cfg->apf_enabled && + hdd_ctx->config->apf_packet_filter_enable); hdd_ctx->rcpi_enabled = cfg->rcpi_enabled; hdd_update_ra_rate_limit(hdd_ctx, cfg); @@ -2039,8 +2039,8 @@ void hdd_update_tgt_cfg(hdd_handle_t hdd_handle, struct wma_tgt_cfg *cfg) hdd_err("fw update WNI_CFG_VHT_CSN_BEAMFORMEE_ANT_SUPPORTED to CFG fails"); - hdd_debug("Target BPF %d Host BPF %d 8ss fw support %d txBFCsnValue %d", - cfg->bpf_enabled, hdd_ctx->config->bpf_packet_filter_enable, + hdd_debug("Target APF %d Host APF %d 8ss fw support %d txBFCsnValue %d", + cfg->apf_enabled, hdd_ctx->config->apf_packet_filter_enable, cfg->tx_bfee_8ss_enabled, hdd_ctx->config->txBFCsnValue); /* @@ -9287,8 +9287,8 @@ static int hdd_update_cds_config(struct hdd_context *hdd_ctx) cds_cfg->enable_rxthread = hdd_ctx->enable_rxthread; cds_cfg->ce_classify_enabled = hdd_ctx->config->ce_classify_enabled; - cds_cfg->bpf_packet_filter_enable = - hdd_ctx->config->bpf_packet_filter_enable; + cds_cfg->apf_packet_filter_enable = + hdd_ctx->config->apf_packet_filter_enable; cds_cfg->tx_chain_mask_cck = hdd_ctx->config->tx_chain_mask_cck; cds_cfg->self_gen_frm_pwr = hdd_ctx->config->self_gen_frm_pwr; cds_cfg->max_station = hdd_ctx->config->maxNumberOfPeers; @@ -9298,8 +9298,8 @@ static int hdd_update_cds_config(struct hdd_context *hdd_ctx) hdd_ctx->config->max_msdus_per_rxinorderind; cds_cfg->self_recovery_enabled = hdd_ctx->config->enableSelfRecovery; cds_cfg->fw_timeout_crash = hdd_ctx->config->fw_timeout_crash; - cds_cfg->active_uc_bpf_mode = hdd_ctx->config->active_uc_bpf_mode; - cds_cfg->active_mc_bc_bpf_mode = hdd_ctx->config->active_mc_bc_bpf_mode; + cds_cfg->active_uc_apf_mode = hdd_ctx->config->active_uc_apf_mode; + cds_cfg->active_mc_bc_apf_mode = hdd_ctx->config->active_mc_bc_apf_mode; cds_cfg->auto_power_save_fail_mode = hdd_ctx->config->auto_pwr_save_fail_mode; @@ -13052,7 +13052,7 @@ static int hdd_update_pmo_config(struct hdd_context *hdd_ctx) (hdd_ctx->config->wowEnable & 0x01) ? true : false; psoc_cfg.ptrn_match_enable_all_vdev = (hdd_ctx->config->wowEnable & 0x02) ? true : false; - psoc_cfg.apf_enable = hdd_ctx->config->bpf_packet_filter_enable; + psoc_cfg.apf_enable = hdd_ctx->config->apf_packet_filter_enable; psoc_cfg.arp_offload_enable = hdd_ctx->config->fhostArpOffload; psoc_cfg.hw_filter_mode = hdd_ctx->config->hw_filter_mode; psoc_cfg.ns_offload_enable_dynamic = hdd_ctx->config->fhostNSOffload; diff --git a/core/mac/inc/sir_api.h b/core/mac/inc/sir_api.h index b9429c5eb2..613f345d6d 100644 --- a/core/mac/inc/sir_api.h +++ b/core/mac/inc/sir_api.h @@ -6163,17 +6163,17 @@ struct obss_scanparam { }; /** - * struct sir_bpf_set_offload - set bpf filter instructions + * struct sir_apf_set_offload - set apf filter instructions * @session_id: session identifier - * @version: host bpf version - * @filter_id: Filter ID for BPF filter + * @version: host apf version + * @filter_id: Filter ID for APF filter * @total_length: The total length of the full instruction * total_length equal to 0 means reset * @current_offset: current offset, 0 means start a new setting * @current_length: Length of current @program - * @program: BPF instructions + * @program: APF instructions */ -struct sir_bpf_set_offload { +struct sir_apf_set_offload { uint8_t session_id; uint32_t version; uint32_t filter_id; @@ -6184,18 +6184,18 @@ struct sir_bpf_set_offload { }; /** - * struct sir_bpf_offload_capabilities - get bpf Capabilities - * @bpf_version: fw's implement version - * @max_bpf_filters: max filters that fw supports - * @max_bytes_for_bpf_inst: the max bytes that can be used as bpf instructions - * @remaining_bytes_for_bpf_inst: remaining bytes for bpf instructions + * struct sir_apf_offload_capabilities - get apf Capabilities + * @apf_version: fw's implement version + * @max_apf_filters: max filters that fw supports + * @max_bytes_for_apf_inst: the max bytes that can be used as apf instructions + * @remaining_bytes_for_apf_inst: remaining bytes for apf instructions * */ -struct sir_bpf_get_offload { - uint32_t bpf_version; - uint32_t max_bpf_filters; - uint32_t max_bytes_for_bpf_inst; - uint32_t remaining_bytes_for_bpf_inst; +struct sir_apf_get_offload { + uint32_t apf_version; + uint32_t max_apf_filters; + uint32_t max_bytes_for_apf_inst; + uint32_t remaining_bytes_for_apf_inst; }; #ifndef QCA_SUPPORT_CP_STATS diff --git a/core/mac/src/include/sir_params.h b/core/mac/src/include/sir_params.h index ef477662e9..604e06bcad 100644 --- a/core/mac/src/include/sir_params.h +++ b/core/mac/src/include/sir_params.h @@ -619,8 +619,8 @@ struct sir_mgmt_msg { #define SIR_HAL_REMOVE_BCN_FILTER_CMDID (SIR_HAL_ITC_MSG_TYPES_BEGIN + 340) -#define SIR_HAL_BPF_GET_CAPABILITIES_REQ (SIR_HAL_ITC_MSG_TYPES_BEGIN + 341) -#define SIR_HAL_BPF_SET_INSTRUCTIONS_REQ (SIR_HAL_ITC_MSG_TYPES_BEGIN + 342) +#define SIR_HAL_APF_GET_CAPABILITIES_REQ (SIR_HAL_ITC_MSG_TYPES_BEGIN + 341) +#define SIR_HAL_APF_SET_INSTRUCTIONS_REQ (SIR_HAL_ITC_MSG_TYPES_BEGIN + 342) #define SIR_HAL_SET_WISA_PARAMS (SIR_HAL_ITC_MSG_TYPES_BEGIN + 343) #define SIR_HAL_SET_ADAPT_DWELLTIME_PARAMS (SIR_HAL_ITC_MSG_TYPES_BEGIN + 344) diff --git a/core/mac/src/sys/legacy/src/utils/src/mac_trace.c b/core/mac/src/sys/legacy/src/utils/src/mac_trace.c index e580d8a6b1..d191059f72 100644 --- a/core/mac/src/sys/legacy/src/utils/src/mac_trace.c +++ b/core/mac/src/sys/legacy/src/utils/src/mac_trace.c @@ -555,8 +555,8 @@ uint8_t *mac_trace_get_wma_msg_string(uint16_t wma_msg) CASE_RETURN_STRING(WMA_ADD_BCN_FILTER_CMDID); CASE_RETURN_STRING(WMA_REMOVE_BCN_FILTER_CMDID); CASE_RETURN_STRING(WMA_SET_ADAPT_DWELLTIME_CONF_PARAMS); - CASE_RETURN_STRING(WDA_BPF_GET_CAPABILITIES_REQ); - CASE_RETURN_STRING(WDA_BPF_SET_INSTRUCTIONS_REQ); + CASE_RETURN_STRING(WDA_APF_GET_CAPABILITIES_REQ); + CASE_RETURN_STRING(WDA_APF_SET_INSTRUCTIONS_REQ); CASE_RETURN_STRING(WMA_SET_PDEV_IE_REQ); CASE_RETURN_STRING(WMA_UPDATE_WEP_DEFAULT_KEY); CASE_RETURN_STRING(WMA_SEND_FREQ_RANGE_CONTROL_IND); diff --git a/core/sme/inc/sme_api.h b/core/sme/inc/sme_api.h index 89c1a574c4..25fafeeabb 100644 --- a/core/sme/inc/sme_api.h +++ b/core/sme/inc/sme_api.h @@ -1300,7 +1300,7 @@ QDF_STATUS sme_add_beacon_filter(tHalHandle hal, QDF_STATUS sme_remove_beacon_filter(tHalHandle hal, uint32_t session_id); /** - * sme_get_bpf_offload_capabilities() - Get BPF offload capabilities + * sme_get_apf_offload_capabilities() - Get APF offload capabilities * @hal: Global HAL handle * @callback: Callback function to be called with the result * @context: Opaque context to be used by the caller to associate the @@ -1311,12 +1311,12 @@ QDF_STATUS sme_remove_beacon_filter(tHalHandle hal, uint32_t session_id); * * Return: QDF_STATUS enumeration */ -QDF_STATUS sme_get_bpf_offload_capabilities(tHalHandle hal, - bpf_get_offload_cb callback, +QDF_STATUS sme_get_apf_offload_capabilities(tHalHandle hal, + apf_get_offload_cb callback, void *context); -QDF_STATUS sme_set_bpf_instructions(tHalHandle hal, - struct sir_bpf_set_offload *); +QDF_STATUS sme_set_apf_instructions(tHalHandle hal, + struct sir_apf_set_offload *); uint32_t sme_get_wni_dot11_mode(tHalHandle hal); QDF_STATUS sme_create_mon_session(tHalHandle hal_handle, uint8_t *bssid); QDF_STATUS sme_set_adaptive_dwelltime_config(tHalHandle hal, diff --git a/core/sme/inc/sme_internal.h b/core/sme/inc/sme_internal.h index b31942759d..8cf2db600e 100644 --- a/core/sme/inc/sme_internal.h +++ b/core/sme/inc/sme_internal.h @@ -124,14 +124,14 @@ typedef void (*sme_send_oem_data_rsp_msg)(struct oem_data_rsp *); #endif /** - * typedef bpf_get_offload_cb - BPF offload callback signature + * typedef apf_get_offload_cb - APF offload callback signature * @context: Opaque context that the client can use to associate the * callback with the request - * @caps: BPF offload capabilities as reported by firmware + * @caps: APF offload capabilities as reported by firmware */ -struct sir_bpf_get_offload; -typedef void (*bpf_get_offload_cb)(void *context, - struct sir_bpf_get_offload *caps); +struct sir_apf_get_offload; +typedef void (*apf_get_offload_cb)(void *context, + struct sir_apf_get_offload *caps); /** * typedef sme_encrypt_decrypt_callback - encrypt/decrypt callback @@ -227,8 +227,8 @@ typedef struct tagSmeStruct { void *dcc_stats_event_context; ocb_callback dcc_stats_event_callback; sme_set_thermal_level_callback set_thermal_level_cb; - void *bpf_get_offload_context; - bpf_get_offload_cb bpf_get_offload_cb; + void *apf_get_offload_context; + apf_get_offload_cb apf_get_offload_cb; p2p_lo_callback p2p_lo_event_callback; void *p2p_lo_event_context; #ifdef FEATURE_OEM_DATA_SUPPORT diff --git a/core/sme/src/common/sme_api.c b/core/sme/src/common/sme_api.c index dce3f76a00..0d7eef6ebd 100644 --- a/core/sme/src/common/sme_api.c +++ b/core/sme/src/common/sme_api.c @@ -14125,8 +14125,8 @@ void sme_send_disassoc_req_frame(tHalHandle hal, uint8_t session_id, FL("cds_send_mb_message Failed")); } -QDF_STATUS sme_get_bpf_offload_capabilities(tHalHandle hal, - bpf_get_offload_cb callback, +QDF_STATUS sme_get_apf_offload_capabilities(tHalHandle hal, + apf_get_offload_cb callback, void *context) { QDF_STATUS status = QDF_STATUS_SUCCESS; @@ -14138,14 +14138,14 @@ QDF_STATUS sme_get_bpf_offload_capabilities(tHalHandle hal, status = sme_acquire_global_lock(&mac_ctx->sme); if (QDF_STATUS_SUCCESS == status) { /* Serialize the req through MC thread */ - mac_ctx->sme.bpf_get_offload_cb = callback; - mac_ctx->sme.bpf_get_offload_context = context; + mac_ctx->sme.apf_get_offload_cb = callback; + mac_ctx->sme.apf_get_offload_context = context; cds_msg.bodyptr = NULL; - cds_msg.type = WDA_BPF_GET_CAPABILITIES_REQ; + cds_msg.type = WDA_APF_GET_CAPABILITIES_REQ; status = scheduler_post_msg(QDF_MODULE_ID_WMA, &cds_msg); if (!QDF_IS_STATUS_SUCCESS(status)) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, - FL("Post bpf get offload msg fail")); + FL("Post apf get offload msg fail")); status = QDF_STATUS_E_FAILURE; } sme_release_global_lock(&mac_ctx->sme); @@ -14159,19 +14159,19 @@ QDF_STATUS sme_get_bpf_offload_capabilities(tHalHandle hal, /** - * sme_set_bpf_instructions() - Set BPF bpf filter instructions. + * sme_set_apf_instructions() - Set APF apf filter instructions. * @hal: HAL handle - * @bpf_set_offload: struct to set bpf filter instructions. + * @apf_set_offload: struct to set apf filter instructions. * * Return: QDF_STATUS enumeration. */ -QDF_STATUS sme_set_bpf_instructions(tHalHandle hal, - struct sir_bpf_set_offload *req) +QDF_STATUS sme_set_apf_instructions(tHalHandle hal, + struct sir_apf_set_offload *req) { QDF_STATUS status = QDF_STATUS_SUCCESS; tpAniSirGlobal mac_ctx = PMAC_STRUCT(hal); struct scheduler_msg cds_msg = {0}; - struct sir_bpf_set_offload *set_offload; + struct sir_apf_set_offload *set_offload; set_offload = qdf_mem_malloc(sizeof(*set_offload) + req->current_length); @@ -14197,12 +14197,12 @@ QDF_STATUS sme_set_bpf_instructions(tHalHandle hal, if (QDF_STATUS_SUCCESS == status) { /* Serialize the req through MC thread */ cds_msg.bodyptr = set_offload; - cds_msg.type = WDA_BPF_SET_INSTRUCTIONS_REQ; + cds_msg.type = WDA_APF_SET_INSTRUCTIONS_REQ; status = scheduler_post_msg(QDF_MODULE_ID_WMA, &cds_msg); if (!QDF_IS_STATUS_SUCCESS(status)) { QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, - FL("Post BPF set offload msg fail")); + FL("Post APF set offload msg fail")); status = QDF_STATUS_E_FAILURE; qdf_mem_free(set_offload); } diff --git a/core/wma/inc/wma.h b/core/wma/inc/wma.h index 70c9a097dc..8de38dd7e1 100644 --- a/core/wma/inc/wma.h +++ b/core/wma/inc/wma.h @@ -1322,10 +1322,10 @@ struct hw_mode_idx_to_mac_cap_idx { * This structure is global wma context * It contains global wma module parameters and * handle of other modules. - * @bpf_packet_filter_enable: BPF filter enabled or not - * @active_uc_bpf_mode: Setting that determines how BPF is applied in active + * @apf_packet_filter_enable: APF filter enabled or not + * @active_uc_apf_mode: Setting that determines how APF is applied in active * mode for uc packets - * @active_mc_bc_bpf_mode: Setting that determines how BPF is applied in + * @active_mc_bc_apf_mode: Setting that determines how APF is applied in * active mode for MC/BC packets * @service_ready_ext_evt: Wait event for service ready ext * @wmi_cmd_rsp_wake_lock: wmi command response wake lock @@ -1481,10 +1481,10 @@ typedef struct { enum sir_roam_op_code reason); qdf_wake_lock_t wmi_cmd_rsp_wake_lock; qdf_runtime_lock_t wmi_cmd_rsp_runtime_lock; - bool bpf_enabled; - bool bpf_packet_filter_enable; - enum active_bpf_mode active_uc_bpf_mode; - enum active_bpf_mode active_mc_bc_bpf_mode; + bool apf_enabled; + bool apf_packet_filter_enable; + enum active_apf_mode active_uc_apf_mode; + enum active_apf_mode active_mc_bc_apf_mode; struct wma_ini_config ini_config; struct wma_valid_channels saved_chan; /* NAN datapath support enabled in firmware */ @@ -2148,13 +2148,14 @@ void wma_process_fw_test_cmd(WMA_HANDLE handle, QDF_STATUS wma_send_ht40_obss_scanind(tp_wma_handle wma, struct obss_ht40_scanind *req); -int wma_get_bpf_caps_event_handler(void *handle, - u_int8_t *cmd_param_info, - u_int32_t len); +int wma_get_apf_caps_event_handler(void *handle, + u_int8_t *cmd_param_info, + u_int32_t len); uint32_t wma_get_num_of_setbits_from_bitmask(uint32_t mask); -QDF_STATUS wma_get_bpf_capabilities(tp_wma_handle wma); -QDF_STATUS wma_set_bpf_instructions(tp_wma_handle wma, - struct sir_bpf_set_offload *bpf_set_offload); +QDF_STATUS wma_get_apf_capabilities(tp_wma_handle wma); +QDF_STATUS +wma_set_apf_instructions(tp_wma_handle wma, + struct sir_apf_set_offload *apf_set_offload); void wma_process_set_pdev_ie_req(tp_wma_handle wma, struct set_ie_param *ie_params); void wma_process_set_pdev_ht_ie_req(tp_wma_handle wma, diff --git a/core/wma/inc/wma_tgt_cfg.h b/core/wma/inc/wma_tgt_cfg.h index ca7852bb3e..5c57bfb02d 100644 --- a/core/wma/inc/wma_tgt_cfg.h +++ b/core/wma/inc/wma_tgt_cfg.h @@ -190,7 +190,7 @@ struct wma_tgt_cfg { #endif uint8_t ap_arpns_support; uint32_t fine_time_measurement_cap; - bool bpf_enabled; + bool apf_enabled; #ifdef FEATURE_WLAN_RA_FILTERING bool is_ra_rate_limit_enabled; #endif diff --git a/core/wma/inc/wma_types.h b/core/wma/inc/wma_types.h index fbc82babc4..1e55d7f35e 100644 --- a/core/wma/inc/wma_types.h +++ b/core/wma/inc/wma_types.h @@ -431,8 +431,8 @@ #define WMA_REMOVE_BCN_FILTER_CMDID SIR_HAL_REMOVE_BCN_FILTER_CMDID #define WMA_SET_ADAPT_DWELLTIME_CONF_PARAMS SIR_HAL_SET_ADAPT_DWELLTIME_PARAMS -#define WDA_BPF_GET_CAPABILITIES_REQ SIR_HAL_BPF_GET_CAPABILITIES_REQ -#define WDA_BPF_SET_INSTRUCTIONS_REQ SIR_HAL_BPF_SET_INSTRUCTIONS_REQ +#define WDA_APF_GET_CAPABILITIES_REQ SIR_HAL_APF_GET_CAPABILITIES_REQ +#define WDA_APF_SET_INSTRUCTIONS_REQ SIR_HAL_APF_SET_INSTRUCTIONS_REQ #define WMA_SET_PDEV_IE_REQ SIR_HAL_SET_PDEV_IE_REQ #define WMA_UPDATE_WEP_DEFAULT_KEY SIR_HAL_UPDATE_WEP_DEFAULT_KEY diff --git a/core/wma/src/wma_dev_if.c b/core/wma/src/wma_dev_if.c index 455a07923c..2239739c1f 100644 --- a/core/wma/src/wma_dev_if.c +++ b/core/wma/src/wma_dev_if.c @@ -1804,46 +1804,46 @@ static int wma_remove_bss_peer(tp_wma_handle wma, void *pdev, } /* - * get_fw_active_bpf_mode() - convert HDD BPF mode to FW configurable BPF + * get_fw_active_apf_mode() - convert HDD APF mode to FW configurable APF * mode - * @mode: BPF mode maintained in HDD + * @mode: APF mode maintained in HDD * * Return: FW configurable BP mode */ -static enum wmi_host_active_bpf_mode -get_fw_active_bpf_mode(enum active_bpf_mode mode) +static enum wmi_host_active_apf_mode +get_fw_active_apf_mode(enum active_apf_mode mode) { switch (mode) { - case ACTIVE_BPF_DISABLED: - return WMI_HOST_ACTIVE_BPF_DISABLED; - case ACTIVE_BPF_ENABLED: - return WMI_HOST_ACTIVE_BPF_ENABLED; - case ACTIVE_BPF_ADAPTIVE: - return WMI_HOST_ACTIVE_BPF_ADAPTIVE; + case ACTIVE_APF_DISABLED: + return WMI_HOST_ACTIVE_APF_DISABLED; + case ACTIVE_APF_ENABLED: + return WMI_HOST_ACTIVE_APF_ENABLED; + case ACTIVE_APF_ADAPTIVE: + return WMI_HOST_ACTIVE_APF_ADAPTIVE; default: - WMA_LOGE("Invalid Active BPF Mode %d; Using 'disabled'", mode); - return WMI_HOST_ACTIVE_BPF_DISABLED; + WMA_LOGE("Invalid Active APF Mode %d; Using 'disabled'", mode); + return WMI_HOST_ACTIVE_APF_DISABLED; } } /** - * wma_config_active_bpf_mode() - Config active BPF mode in FW + * wma_config_active_apf_mode() - Config active APF mode in FW * @wma: the WMA handle * @vdev_id: the Id of the vdev for which the configuration should be applied * * Return: QDF status */ -static QDF_STATUS wma_config_active_bpf_mode(t_wma_handle *wma, uint8_t vdev_id) +static QDF_STATUS wma_config_active_apf_mode(t_wma_handle *wma, uint8_t vdev_id) { - enum wmi_host_active_bpf_mode uc_mode, mcbc_mode; + enum wmi_host_active_apf_mode uc_mode, mcbc_mode; - uc_mode = get_fw_active_bpf_mode(wma->active_uc_bpf_mode); - mcbc_mode = get_fw_active_bpf_mode(wma->active_mc_bc_bpf_mode); + uc_mode = get_fw_active_apf_mode(wma->active_uc_apf_mode); + mcbc_mode = get_fw_active_apf_mode(wma->active_mc_bc_apf_mode); - WMA_LOGD("Configuring Active BPF Mode UC:%d MC/BC:%d for vdev %u", - uc_mode, mcbc_mode, vdev_id); + WMA_LOGD("Configuring Active APF Mode UC:%d MC/BC:%d for vdev %u", + uc_mode, mcbc_mode, vdev_id); - return wmi_unified_set_active_bpf_mode_cmd(wma->wmi_handle, vdev_id, + return wmi_unified_set_active_apf_mode_cmd(wma->wmi_handle, vdev_id, uc_mode, mcbc_mode); } @@ -2505,10 +2505,10 @@ struct cdp_vdev *wma_vdev_attach(tp_wma_handle wma_handle, } if (self_sta_req->type == WMI_VDEV_TYPE_STA) { - status = wma_config_active_bpf_mode(wma_handle, + status = wma_config_active_apf_mode(wma_handle, self_sta_req->session_id); if (QDF_IS_STATUS_ERROR(status)) - WMA_LOGE("Failed to configure active BPF mode"); + WMA_LOGE("Failed to configure active APF mode"); } end: diff --git a/core/wma/src/wma_features.c b/core/wma/src/wma_features.c index b3f8ab0ef6..163136ab44 100644 --- a/core/wma/src/wma_features.c +++ b/core/wma/src/wma_features.c @@ -1635,7 +1635,7 @@ static const u8 *wma_wow_wake_reason_str(A_INT32 wake_reason) case WOW_REASON_ACTION_FRAME_RECV: return "ACTION_FRAME_RECV"; case WOW_REASON_BPF_ALLOW: - return "BPF_ALLOW"; + return "APF_ALLOW"; case WOW_REASON_NAN_DATA: return "NAN_DATA"; case WOW_REASON_OEM_RESPONSE_EVENT: @@ -4382,20 +4382,19 @@ QDF_STATUS wma_process_set_ie_info(tp_wma_handle wma, } /** - * wma_get_bpf_caps_event_handler() - Event handler for get bpf capability + * wma_get_apf_caps_event_handler() - Event handler for get apf capability * @handle: WMA global handle * @cmd_param_info: command event data * @len: Length of @cmd_param_info * * Return: 0 on Success or Errno on failure */ -int wma_get_bpf_caps_event_handler(void *handle, - u_int8_t *cmd_param_info, - u_int32_t len) +int wma_get_apf_caps_event_handler(void *handle, u_int8_t *cmd_param_info, + u_int32_t len) { WMI_BPF_CAPABILIY_INFO_EVENTID_param_tlvs *param_buf; wmi_bpf_capability_info_evt_fixed_param *event; - struct sir_bpf_get_offload *bpf_get_offload; + struct sir_apf_get_offload *apf_get_offload; tpAniSirGlobal pmac = (tpAniSirGlobal)cds_get_context( QDF_MODULE_ID_PE); @@ -4403,42 +4402,42 @@ int wma_get_bpf_caps_event_handler(void *handle, WMA_LOGE("%s: Invalid pmac", __func__); return -EINVAL; } - if (!pmac->sme.bpf_get_offload_cb) { + if (!pmac->sme.apf_get_offload_cb) { WMA_LOGE("%s: Callback not registered", __func__); return -EINVAL; } param_buf = (WMI_BPF_CAPABILIY_INFO_EVENTID_param_tlvs *)cmd_param_info; event = param_buf->fixed_param; - bpf_get_offload = qdf_mem_malloc(sizeof(*bpf_get_offload)); + apf_get_offload = qdf_mem_malloc(sizeof(*apf_get_offload)); - if (!bpf_get_offload) { + if (!apf_get_offload) { WMA_LOGP("%s: Memory allocation failed.", __func__); return -ENOMEM; } - bpf_get_offload->bpf_version = event->bpf_version; - bpf_get_offload->max_bpf_filters = event->max_bpf_filters; - bpf_get_offload->max_bytes_for_bpf_inst = + apf_get_offload->apf_version = event->bpf_version; + apf_get_offload->max_apf_filters = event->max_bpf_filters; + apf_get_offload->max_bytes_for_apf_inst = event->max_bytes_for_bpf_inst; - WMA_LOGD("%s: BPF capabilities version: %d max bpf filter size: %d", - __func__, bpf_get_offload->bpf_version, - bpf_get_offload->max_bytes_for_bpf_inst); + WMA_LOGD("%s: APF capabilities version: %d max apf filter size: %d", + __func__, apf_get_offload->apf_version, + apf_get_offload->max_bytes_for_apf_inst); - WMA_LOGD("%s: sending bpf capabilities event to hdd", __func__); - pmac->sme.bpf_get_offload_cb(pmac->sme.bpf_get_offload_context, - bpf_get_offload); - qdf_mem_free(bpf_get_offload); + WMA_LOGD("%s: sending apf capabilities event to hdd", __func__); + pmac->sme.apf_get_offload_cb(pmac->sme.apf_get_offload_context, + apf_get_offload); + qdf_mem_free(apf_get_offload); return 0; } /** - * wma_get_bpf_capabilities - Send get bpf capability to firmware + * wma_get_apf_capabilities - Send get apf capability to firmware * @wma_handle: wma handle * * Return: QDF_STATUS enumeration. */ -QDF_STATUS wma_get_bpf_capabilities(tp_wma_handle wma) +QDF_STATUS wma_get_apf_capabilities(tp_wma_handle wma) { QDF_STATUS status = QDF_STATUS_SUCCESS; wmi_bpf_get_capability_cmd_fixed_param *cmd; @@ -4447,13 +4446,12 @@ QDF_STATUS wma_get_bpf_capabilities(tp_wma_handle wma) u_int8_t *buf_ptr; if (!wma || !wma->wmi_handle) { - WMA_LOGE(FL("WMA is closed, can not issue get BPF capab")); + WMA_LOGE(FL("WMA is closed, can not issue get APF capab")); return QDF_STATUS_E_INVAL; } - if (!wmi_service_enabled(wma->wmi_handle, - wmi_service_bpf_offload)) { - WMA_LOGE(FL("BPF cababilities feature bit not enabled")); + if (!wmi_service_enabled(wma->wmi_handle, wmi_service_apf_offload)) { + WMA_LOGE(FL("APF cababilities feature bit not enabled")); return QDF_STATUS_E_FAILURE; } @@ -4472,8 +4470,8 @@ QDF_STATUS wma_get_bpf_capabilities(tp_wma_handle wma) wmi_bpf_get_capability_cmd_fixed_param)); if (wmi_unified_cmd_send(wma->wmi_handle, wmi_buf, len, - WMI_BPF_GET_CAPABILITY_CMDID)) { - WMA_LOGE(FL("Failed to send BPF capability command")); + WMI_BPF_GET_CAPABILITY_CMDID)) { + WMA_LOGE(FL("Failed to send APF capability command")); wmi_buf_free(wmi_buf); return QDF_STATUS_E_FAILURE; } @@ -4481,14 +4479,14 @@ QDF_STATUS wma_get_bpf_capabilities(tp_wma_handle wma) } /** - * wma_set_bpf_instructions - Set bpf instructions to firmware + * wma_set_apf_instructions - Set apf instructions to firmware * @wma: wma handle - * @bpf_set_offload: Bpf offload information to set to firmware + * @apf_set_offload: apf offload information to set to firmware * * Return: QDF_STATUS enumeration */ -QDF_STATUS wma_set_bpf_instructions(tp_wma_handle wma, - struct sir_bpf_set_offload *bpf_set_offload) +QDF_STATUS wma_set_apf_instructions(tp_wma_handle wma, + struct sir_apf_set_offload *apf_set_offload) { wmi_bpf_set_vdev_instructions_cmd_fixed_param *cmd; wmi_buf_t wmi_buf; @@ -4496,36 +4494,36 @@ QDF_STATUS wma_set_bpf_instructions(tp_wma_handle wma, u_int8_t *buf_ptr; if (!wma || !wma->wmi_handle) { - WMA_LOGE("%s: WMA is closed, can not issue set BPF capability", + WMA_LOGE("%s: WMA is closed, can not issue set APF capability", __func__); return QDF_STATUS_E_INVAL; } if (!wmi_service_enabled(wma->wmi_handle, - wmi_service_bpf_offload)) { - WMA_LOGE(FL("BPF offload feature Disabled")); + wmi_service_apf_offload)) { + WMA_LOGE(FL("APF offload feature Disabled")); return QDF_STATUS_E_NOSUPPORT; } - if (!bpf_set_offload) { - WMA_LOGE("%s: Invalid BPF instruction request", __func__); + if (!apf_set_offload) { + WMA_LOGE("%s: Invalid APF instruction request", __func__); return QDF_STATUS_E_INVAL; } - if (bpf_set_offload->session_id >= wma->max_bssid) { + if (apf_set_offload->session_id >= wma->max_bssid) { WMA_LOGE(FL("Invalid vdev_id: %d"), - bpf_set_offload->session_id); + apf_set_offload->session_id); return QDF_STATUS_E_INVAL; } - if (!wma_is_vdev_up(bpf_set_offload->session_id)) { - WMA_LOGE("vdev %d is not up skipping BPF offload", - bpf_set_offload->session_id); + if (!wma_is_vdev_up(apf_set_offload->session_id)) { + WMA_LOGE("vdev %d is not up skipping APF offload", + apf_set_offload->session_id); return QDF_STATUS_E_INVAL; } - if (bpf_set_offload->total_length) { - len_aligned = roundup(bpf_set_offload->current_length, + if (apf_set_offload->total_length) { + len_aligned = roundup(apf_set_offload->current_length, sizeof(A_UINT32)); len = len_aligned + WMI_TLV_HDR_SIZE; } @@ -4544,28 +4542,28 @@ QDF_STATUS wma_set_bpf_instructions(tp_wma_handle wma, WMITLV_TAG_STRUC_wmi_bpf_set_vdev_instructions_cmd_fixed_param, WMITLV_GET_STRUCT_TLVLEN( wmi_bpf_set_vdev_instructions_cmd_fixed_param)); - cmd->vdev_id = bpf_set_offload->session_id; - cmd->filter_id = bpf_set_offload->filter_id; - cmd->total_length = bpf_set_offload->total_length; - cmd->current_offset = bpf_set_offload->current_offset; - cmd->current_length = bpf_set_offload->current_length; + cmd->vdev_id = apf_set_offload->session_id; + cmd->filter_id = apf_set_offload->filter_id; + cmd->total_length = apf_set_offload->total_length; + cmd->current_offset = apf_set_offload->current_offset; + cmd->current_length = apf_set_offload->current_length; - if (bpf_set_offload->total_length) { + if (apf_set_offload->total_length) { buf_ptr += sizeof(wmi_bpf_set_vdev_instructions_cmd_fixed_param); WMITLV_SET_HDR(buf_ptr, WMITLV_TAG_ARRAY_BYTE, len_aligned); buf_ptr += WMI_TLV_HDR_SIZE; - qdf_mem_copy(buf_ptr, bpf_set_offload->program, - bpf_set_offload->current_length); + qdf_mem_copy(buf_ptr, apf_set_offload->program, + apf_set_offload->current_length); } if (wmi_unified_cmd_send(wma->wmi_handle, wmi_buf, len, - WMI_BPF_SET_VDEV_INSTRUCTIONS_CMDID)) { - WMA_LOGE(FL("Failed to send config bpf instructions command")); + WMI_BPF_SET_VDEV_INSTRUCTIONS_CMDID)) { + WMA_LOGE(FL("Failed to send config apf instructions command")); wmi_buf_free(wmi_buf); return QDF_STATUS_E_FAILURE; } - WMA_LOGD(FL("BPF offload enabled in fw")); + WMA_LOGD(FL("APF offload enabled in fw")); return QDF_STATUS_SUCCESS; } diff --git a/core/wma/src/wma_main.c b/core/wma/src/wma_main.c index 24260fdb25..3f2c5af506 100644 --- a/core/wma/src/wma_main.c +++ b/core/wma/src/wma_main.c @@ -3208,10 +3208,10 @@ QDF_STATUS wma_open(struct wlan_objmgr_psoc *psoc, 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; - wma_handle->active_uc_bpf_mode = cds_cfg->active_uc_bpf_mode; - wma_handle->active_mc_bc_bpf_mode = cds_cfg->active_mc_bc_bpf_mode; + wma_handle->apf_packet_filter_enable = + cds_cfg->apf_packet_filter_enable; + wma_handle->active_uc_apf_mode = cds_cfg->active_uc_apf_mode; + wma_handle->active_mc_bc_apf_mode = cds_cfg->active_mc_bc_apf_mode; wma_handle->link_stats_results = NULL; #ifdef FEATURE_WLAN_RA_FILTERING wma_handle->IsRArateLimitEnabled = cds_cfg->is_ra_ratelimit_enabled; @@ -3492,8 +3492,8 @@ QDF_STATUS wma_open(struct wlan_objmgr_psoc *psoc, wma_peer_delete_handler, WMA_RX_SERIALIZER_CTX); wmi_unified_register_event_handler(wma_handle->wmi_handle, - wmi_bpf_capability_info_event_id, - wma_get_bpf_caps_event_handler, + wmi_apf_capability_info_event_id, + wma_get_apf_caps_event_handler, WMA_RX_SERIALIZER_CTX); wmi_unified_register_event_handler(wma_handle->wmi_handle, wmi_chan_info_event_id, @@ -4756,7 +4756,7 @@ static void wma_update_fw_config(struct wlan_objmgr_psoc *psoc, target_if_set_max_frag_entry(tgt_hdl, cfg->max_frag_entries); cfg->num_wow_filters = ucfg_pmo_get_num_wow_filters(psoc); - cfg->bpf_instruction_size = ucfg_pmo_get_apf_instruction_size(psoc); + cfg->apf_instruction_size = ucfg_pmo_get_apf_instruction_size(psoc); cfg->num_packet_filters = ucfg_pmo_get_num_packet_filters(psoc); } @@ -5505,7 +5505,7 @@ static void wma_update_hdd_cfg(tp_wma_handle wma_handle) tgt_cfg.lpss_support = wma_handle->lpss_support; #endif /* WLAN_FEATURE_LPSS */ tgt_cfg.ap_arpns_support = wma_handle->ap_arpns_support; - tgt_cfg.bpf_enabled = wma_handle->bpf_enabled; + tgt_cfg.apf_enabled = wma_handle->apf_enabled; tgt_cfg.dfs_cac_offload = wma_handle->is_dfs_offloaded; tgt_cfg.rcpi_enabled = wma_handle->rcpi_enabled; wma_update_ra_rate_limit(wma_handle, &tgt_cfg); @@ -5589,7 +5589,7 @@ static void wma_init_scan_fw_mode_config(struct wlan_objmgr_psoc *psoc, } /** - * wma_update_ra_limit() - update ra limit based on bpf filter + * wma_update_ra_limit() - update ra limit based on apf filter * enabled or not * @handle: wma handle * @@ -5598,7 +5598,7 @@ static void wma_init_scan_fw_mode_config(struct wlan_objmgr_psoc *psoc, #ifdef FEATURE_WLAN_RA_FILTERING static void wma_update_ra_limit(tp_wma_handle wma_handle) { - if (wma_handle->bpf_enabled) + if (wma_handle->apf_enabled) wma_handle->IsRArateLimitEnabled = false; } #else @@ -5615,7 +5615,7 @@ static void wma_set_pmo_caps(struct wlan_objmgr_psoc *psoc) caps.arp_ns_offload = wma_is_service_enabled(wmi_service_arpns_offload); caps.apf = - wma_is_service_enabled(wmi_service_bpf_offload); + wma_is_service_enabled(wmi_service_apf_offload); caps.packet_filter = wma_is_service_enabled(wmi_service_packet_filter_offload); caps.unified_wow = @@ -5819,8 +5819,8 @@ int wma_rx_service_ready_event(void *handle, uint8_t *cmd_param_info, wma_handle->ap_arpns_support = wmi_service_enabled(wmi_handle, wmi_service_ap_arpns_offload); - wma_handle->bpf_enabled = (wma_handle->bpf_packet_filter_enable && - wmi_service_enabled(wmi_handle, wmi_service_bpf_offload)); + wma_handle->apf_enabled = (wma_handle->apf_packet_filter_enable && + wmi_service_enabled(wmi_handle, wmi_service_apf_offload)); wma_update_ra_limit(wma_handle); if (wmi_service_enabled(wmi_handle, wmi_service_csa_offload)) { @@ -8419,11 +8419,11 @@ static QDF_STATUS wma_mc_process_msg(struct scheduler_msg *msg) wma_remove_beacon_filter(wma_handle, msg->bodyptr); qdf_mem_free(msg->bodyptr); break; - case WDA_BPF_GET_CAPABILITIES_REQ: - wma_get_bpf_capabilities(wma_handle); + case WDA_APF_GET_CAPABILITIES_REQ: + wma_get_apf_capabilities(wma_handle); break; - case WDA_BPF_SET_INSTRUCTIONS_REQ: - wma_set_bpf_instructions(wma_handle, msg->bodyptr); + case WDA_APF_SET_INSTRUCTIONS_REQ: + wma_set_apf_instructions(wma_handle, msg->bodyptr); qdf_mem_free(msg->bodyptr); break; case SIR_HAL_POWER_DBG_CMD: