From a52b8182da48ea8b46d3e207a1f11cc61ec77184 Mon Sep 17 00:00:00 2001 From: Nachiket Kukade Date: Tue, 22 May 2018 12:17:15 +0530 Subject: [PATCH] qcacmn: Rename legacy definitions containing BPF to APF In implementation of Android Packet Filter, functions, variables, definitions are named after BPF, which stands for Berkely Packet Filter. The term was more appropriate for Link Layer packet filters implemented in the Linux kernel, known as Linux Socket Filters. The term BPF is obsolete now, so rename it with the appropriate acronym, APF. Change-Id: I606afc747cddedb524a41cd8e5998400f04e69f6 CRs-Fixed: 2191531 --- os_if/linux/qca_vendor.h | 4 ++-- wmi/inc/wmi_unified_apf_tlv.h | 12 ++++++------ wmi/inc/wmi_unified_api.h | 15 ++++++++------- wmi/inc/wmi_unified_param.h | 24 ++++++++++++------------ wmi/inc/wmi_unified_priv.h | 8 ++++---- wmi/src/wmi_unified_apf_tlv.c | 12 ++++++------ wmi/src/wmi_unified_api.c | 15 ++++++++------- wmi/src/wmi_unified_non_tlv.c | 2 +- wmi/src/wmi_unified_tlv.c | 8 ++++---- 9 files changed, 51 insertions(+), 49 deletions(-) diff --git a/os_if/linux/qca_vendor.h b/os_if/linux/qca_vendor.h index 10bf652919..1aa7fce49b 100644 --- a/os_if/linux/qca_vendor.h +++ b/os_if/linux/qca_vendor.h @@ -3825,13 +3825,13 @@ enum set_reset_packet_filter { }; /** - * enum qca_wlan_vendor_attr_packet_filter - BPF control commands + * enum qca_wlan_vendor_attr_packet_filter - APF control commands * @QCA_WLAN_VENDOR_ATTR_PACKET_FILTER_INVALID: Invalid * @QCA_WLAN_VENDOR_ATTR_SET_RESET_PACKET_FILTER: Filter ID * @QCA_WLAN_VENDOR_ATTR_PACKET_FILTER_VERSION: Filter Version * @QCA_WLAN_VENDOR_ATTR_PACKET_FILTER_SIZE: Total Length * @QCA_WLAN_VENDOR_ATTR_PACKET_FILTER_CURRENT_OFFSET: Current offset - * @QCA_WLAN_VENDOR_ATTR_PACKET_FILTER_PROGRAM: length of BPF instructions + * @QCA_WLAN_VENDOR_ATTR_PACKET_FILTER_PROGRAM: length of APF instructions */ enum qca_wlan_vendor_attr_packet_filter { QCA_WLAN_VENDOR_ATTR_PACKET_FILTER_INVALID = 0, diff --git a/wmi/inc/wmi_unified_apf_tlv.h b/wmi/inc/wmi_unified_apf_tlv.h index 2940d4c8c3..ab764198bc 100644 --- a/wmi/inc/wmi_unified_apf_tlv.h +++ b/wmi/inc/wmi_unified_apf_tlv.h @@ -24,19 +24,19 @@ #include "wmi_unified_param.h" /** - * send_set_active_bpf_mode_cmd_tlv() - configure active BPF mode in FW + * send_set_active_apf_mode_cmd_tlv() - configure active APF mode in FW * @wmi_handle: the WMI handle * @vdev_id: the Id of the vdev to apply the configuration to - * @ucast_mode: the active BPF mode to configure for unicast packets - * @mcast_bcast_mode: the active BPF mode to configure for multicast/broadcast + * @ucast_mode: the active APF mode to configure for unicast packets + * @mcast_bcast_mode: the active APF mode to configure for multicast/broadcast * packets * * Return: QDF status */ QDF_STATUS -send_set_active_bpf_mode_cmd_tlv(wmi_unified_t wmi_handle, +send_set_active_apf_mode_cmd_tlv(wmi_unified_t wmi_handle, uint8_t vdev_id, - enum wmi_host_active_bpf_mode ucast_mode, - enum wmi_host_active_bpf_mode + enum wmi_host_active_apf_mode ucast_mode, + enum wmi_host_active_apf_mode mcast_bcast_mode); #endif /* _WMI_UNIFIED_APF_TLV_H_ */ diff --git a/wmi/inc/wmi_unified_api.h b/wmi/inc/wmi_unified_api.h index a3726dfaa0..680226abe7 100644 --- a/wmi/inc/wmi_unified_api.h +++ b/wmi/inc/wmi_unified_api.h @@ -1097,17 +1097,18 @@ QDF_STATUS wmi_unified_set_per_roam_config(void *wmi_hdl, struct wmi_per_roam_config_req *req_buf); /** - * wmi_unified_set_active_bpf_mode_cmd() - config active BPF mode in FW + * wmi_unified_set_active_apf_mode_cmd() - config active APF mode in FW * @wmi_hdl: the WMI handle * @vdev_id: the Id of the vdev to apply the configuration to - * @ucast_mode: the active BPF mode to configure for unicast packets - * @mcast_bcast_mode: the active BPF mode to configure for multicast/broadcast + * @ucast_mode: the active APF mode to configure for unicast packets + * @mcast_bcast_mode: the active APF mode to configure for multicast/broadcast * packets */ -QDF_STATUS wmi_unified_set_active_bpf_mode_cmd(void *wmi_hdl, - uint8_t vdev_id, - enum wmi_host_active_bpf_mode ucast_mode, - enum wmi_host_active_bpf_mode mcast_bcast_mode); +QDF_STATUS +wmi_unified_set_active_apf_mode_cmd(void *wmi_hdl, uint8_t vdev_id, + enum wmi_host_active_apf_mode ucast_mode, + enum wmi_host_active_apf_mode + mcast_bcast_mode); QDF_STATUS wmi_unified_stats_request_send(void *wmi_hdl, uint8_t macaddr[IEEE80211_ADDR_LEN], diff --git a/wmi/inc/wmi_unified_param.h b/wmi/inc/wmi_unified_param.h index 151ecf47d3..c09784b9ce 100644 --- a/wmi/inc/wmi_unified_param.h +++ b/wmi/inc/wmi_unified_param.h @@ -5503,7 +5503,7 @@ typedef enum { wmi_ap_ps_egap_info_event_id, wmi_peer_assoc_conf_event_id, wmi_vdev_delete_resp_event_id, - wmi_bpf_capability_info_event_id, + wmi_apf_capability_info_event_id, wmi_vdev_encrypt_decrypt_data_rsp_event_id, wmi_report_rx_aggr_failure_event_id, wmi_pdev_chip_pwr_save_failure_detect_event_id, @@ -5908,7 +5908,7 @@ typedef enum { wmi_service_sta_pmf_offload, wmi_service_unified_wow_capability, wmi_service_enterprise_mesh, - wmi_service_bpf_offload, + wmi_service_apf_offload, wmi_service_sync_delete_cmds, wmi_service_ratectrl_limit_max_min_rates, wmi_service_nan_data, @@ -6065,7 +6065,7 @@ struct wmi_host_fw_abi_ver { * @num_packet_filters: maximum number of packet filter rules to support * @num_max_sta_vdevs: maximum number of concurrent station vdevs to support * @num_ns_ext_tuples_cfg: - * @bpf_instruction_size: + * @apf_instruction_size: * @max_bssid_rx_filters: * @use_pdev_id: * @max_num_dbs_scan_duty_cycle: max dbs can duty cycle value @@ -6140,7 +6140,7 @@ typedef struct { uint32_t num_packet_filters; uint32_t num_max_sta_vdevs; uint32_t num_ns_ext_tuples_cfg; - uint32_t bpf_instruction_size; + uint32_t apf_instruction_size; uint32_t max_bssid_rx_filters; uint32_t use_pdev_id; uint32_t max_num_dbs_scan_duty_cycle; @@ -7943,16 +7943,16 @@ struct pdev_csa_switch_count_status { }; /** - * enum wmi_host_active-bpf_mode - FW_ACTIVE_BPF_MODE, replicated from FW header - * @WMI_HOST_ACTIVE_BPF_DISABLED: BPF is disabled for all packets in active mode - * @WMI_HOST_ACTIVE_BPF_ENABLED: BPF is enabled for all packets in active mode - * @WMI_HOST_ACTIVE_BPF_ADAPTIVE: BPF is enabled for packets up to some + * enum wmi_host_active-apf_mode - FW_ACTIVE_APF_MODE, replicated from FW header + * @WMI_HOST_ACTIVE_APF_DISABLED: APF is disabled for all packets in active mode + * @WMI_HOST_ACTIVE_APF_ENABLED: APF is enabled for all packets in active mode + * @WMI_HOST_ACTIVE_APF_ADAPTIVE: APF is enabled for packets up to some * threshold in active mode */ -enum wmi_host_active_bpf_mode { - WMI_HOST_ACTIVE_BPF_DISABLED = (1 << 1), - WMI_HOST_ACTIVE_BPF_ENABLED = (1 << 2), - WMI_HOST_ACTIVE_BPF_ADAPTIVE = (1 << 3) +enum wmi_host_active_apf_mode { + WMI_HOST_ACTIVE_APF_DISABLED = (1 << 1), + WMI_HOST_ACTIVE_APF_ENABLED = (1 << 2), + WMI_HOST_ACTIVE_APF_ADAPTIVE = (1 << 3) }; /** diff --git a/wmi/inc/wmi_unified_priv.h b/wmi/inc/wmi_unified_priv.h index ff2235bc22..5971f16972 100644 --- a/wmi/inc/wmi_unified_priv.h +++ b/wmi/inc/wmi_unified_priv.h @@ -811,10 +811,10 @@ QDF_STATUS (*send_get_buf_extscan_hotlist_cmd)(wmi_unified_t wmi_handle, struct ext_scan_setbssi_hotlist_params * photlist, int *buf_len); -QDF_STATUS (*send_set_active_bpf_mode_cmd)(wmi_unified_t wmi_handle, - uint8_t vdev_id, - enum wmi_host_active_bpf_mode ucast_mode, - enum wmi_host_active_bpf_mode mcast_bcast_mode); +QDF_STATUS +(*send_set_active_apf_mode_cmd)(wmi_unified_t wmi_handle, uint8_t vdev_id, + enum wmi_host_active_apf_mode ucast_mode, + enum wmi_host_active_apf_mode mcast_bcast_mode); QDF_STATUS (*send_pdev_get_tpc_config_cmd)(wmi_unified_t wmi_handle, uint32_t param); diff --git a/wmi/src/wmi_unified_apf_tlv.c b/wmi/src/wmi_unified_apf_tlv.c index f5a0670cea..e61d3ac547 100644 --- a/wmi/src/wmi_unified_apf_tlv.c +++ b/wmi/src/wmi_unified_apf_tlv.c @@ -18,11 +18,11 @@ #include "wmi_unified_apf_tlv.h" -QDF_STATUS send_set_active_bpf_mode_cmd_tlv(wmi_unified_t wmi_handle, +QDF_STATUS send_set_active_apf_mode_cmd_tlv(wmi_unified_t wmi_handle, uint8_t vdev_id, - enum wmi_host_active_bpf_mode + enum wmi_host_active_apf_mode ucast_mode, - enum wmi_host_active_bpf_mode + enum wmi_host_active_apf_mode mcast_bcast_mode) { const WMITLV_TAG_ID tag_id = @@ -33,7 +33,7 @@ QDF_STATUS send_set_active_bpf_mode_cmd_tlv(wmi_unified_t wmi_handle, wmi_bpf_set_vdev_active_mode_cmd_fixed_param *cmd; wmi_buf_t buf; - WMI_LOGD("Sending WMI_BPF_SET_VDEV_ACTIVE_MODE_CMDID(%u, %d, %d)", + WMI_LOGD("Sending WMI_APF_SET_VDEV_ACTIVE_MODE_CMDID(%u, %d, %d)", vdev_id, ucast_mode, mcast_bcast_mode); /* allocate command buffer */ @@ -56,13 +56,13 @@ QDF_STATUS send_set_active_bpf_mode_cmd_tlv(wmi_unified_t wmi_handle, status = wmi_unified_cmd_send(wmi_handle, buf, sizeof(*cmd), WMI_BPF_SET_VDEV_ACTIVE_MODE_CMDID); if (QDF_IS_STATUS_ERROR(status)) { - WMI_LOGE("Failed to send WMI_BPF_SET_VDEV_ACTIVE_MODE_CMDID:%d", + WMI_LOGE("Failed to send WMI_APF_SET_VDEV_ACTIVE_MODE_CMDID:%d", status); wmi_buf_free(buf); return status; } - WMI_LOGD("Sent WMI_BPF_SET_VDEV_ACTIVE_MODE_CMDID successfully"); + WMI_LOGD("Sent WMI_APF_SET_VDEV_ACTIVE_MODE_CMDID successfully"); return QDF_STATUS_SUCCESS; } diff --git a/wmi/src/wmi_unified_api.c b/wmi/src/wmi_unified_api.c index fc98960131..6dce61cbb1 100644 --- a/wmi/src/wmi_unified_api.c +++ b/wmi/src/wmi_unified_api.c @@ -3157,19 +3157,20 @@ QDF_STATUS wmi_unified_roam_send_hlp_cmd(void *wmi_hdl, } #endif -QDF_STATUS wmi_unified_set_active_bpf_mode_cmd(void *wmi_hdl, - uint8_t vdev_id, - enum wmi_host_active_bpf_mode ucast_mode, - enum wmi_host_active_bpf_mode mcast_bcast_mode) +QDF_STATUS +wmi_unified_set_active_apf_mode_cmd(void *wmi_hdl, uint8_t vdev_id, + enum wmi_host_active_apf_mode ucast_mode, + enum wmi_host_active_apf_mode + mcast_bcast_mode) { wmi_unified_t wmi = (wmi_unified_t)wmi_hdl; - if (!wmi->ops->send_set_active_bpf_mode_cmd) { - WMI_LOGD("send_set_active_bpf_mode_cmd op is NULL"); + if (!wmi->ops->send_set_active_apf_mode_cmd) { + WMI_LOGD("send_set_active_apf_mode_cmd op is NULL"); return QDF_STATUS_E_FAILURE; } - return wmi->ops->send_set_active_bpf_mode_cmd(wmi, vdev_id, + return wmi->ops->send_set_active_apf_mode_cmd(wmi, vdev_id, ucast_mode, mcast_bcast_mode); } diff --git a/wmi/src/wmi_unified_non_tlv.c b/wmi/src/wmi_unified_non_tlv.c index 6629205e91..ed2c54bc5b 100644 --- a/wmi/src/wmi_unified_non_tlv.c +++ b/wmi/src/wmi_unified_non_tlv.c @@ -8894,7 +8894,7 @@ static void populate_non_tlv_service(uint32_t *wmi_service) wmi_service[wmi_service_unified_wow_capability] = WMI_SERVICE_UNAVAILABLE; wmi_service[wmi_service_enterprise_mesh] = WMI_SERVICE_UNAVAILABLE; - wmi_service[wmi_service_bpf_offload] = WMI_SERVICE_UNAVAILABLE; + wmi_service[wmi_service_apf_offload] = WMI_SERVICE_UNAVAILABLE; wmi_service[wmi_service_sync_delete_cmds] = WMI_SERVICE_UNAVAILABLE; wmi_service[wmi_service_ratectrl_limit_max_min_rates] = WMI_SERVICE_UNAVAILABLE; diff --git a/wmi/src/wmi_unified_tlv.c b/wmi/src/wmi_unified_tlv.c index 274ab9649d..5489449cde 100644 --- a/wmi/src/wmi_unified_tlv.c +++ b/wmi/src/wmi_unified_tlv.c @@ -12423,7 +12423,7 @@ void wmi_copy_resource_config(wmi_resource_config *resource_cfg, tgt_res_cfg->num_ocb_channels; resource_cfg->num_ocb_schedules = tgt_res_cfg->num_ocb_schedules; - resource_cfg->bpf_instruction_size = tgt_res_cfg->bpf_instruction_size; + resource_cfg->bpf_instruction_size = tgt_res_cfg->apf_instruction_size; resource_cfg->max_bssid_rx_filters = tgt_res_cfg->max_bssid_rx_filters; resource_cfg->use_pdev_id = tgt_res_cfg->use_pdev_id; resource_cfg->max_num_dbs_scan_duty_cycle = @@ -21741,7 +21741,7 @@ struct wmi_ops tlv_ops = { send_roam_scan_offload_chan_list_cmd_tlv, .send_roam_scan_offload_rssi_change_cmd = send_roam_scan_offload_rssi_change_cmd_tlv, - .send_set_active_bpf_mode_cmd = send_set_active_bpf_mode_cmd_tlv, + .send_set_active_apf_mode_cmd = send_set_active_apf_mode_cmd_tlv, .send_adapt_dwelltime_params_cmd = send_adapt_dwelltime_params_cmd_tlv, .send_dbs_scan_sel_params_cmd = @@ -22233,7 +22233,7 @@ static void populate_tlv_events_id(uint32_t *event_ids) event_ids[wmi_ap_ps_egap_info_event_id] = WMI_AP_PS_EGAP_INFO_EVENTID; event_ids[wmi_peer_assoc_conf_event_id] = WMI_PEER_ASSOC_CONF_EVENTID; event_ids[wmi_vdev_delete_resp_event_id] = WMI_VDEV_DELETE_RESP_EVENTID; - event_ids[wmi_bpf_capability_info_event_id] = + event_ids[wmi_apf_capability_info_event_id] = WMI_BPF_CAPABILIY_INFO_EVENTID; event_ids[wmi_vdev_encrypt_decrypt_data_rsp_event_id] = WMI_VDEV_ENCRYPT_DECRYPT_DATA_RESP_EVENTID; @@ -22413,7 +22413,7 @@ static void populate_tlv_service(uint32_t *wmi_service) wmi_service[wmi_service_unified_wow_capability] = WMI_SERVICE_UNIFIED_WOW_CAPABILITY; wmi_service[wmi_service_enterprise_mesh] = WMI_SERVICE_ENTERPRISE_MESH; - wmi_service[wmi_service_bpf_offload] = WMI_SERVICE_BPF_OFFLOAD; + wmi_service[wmi_service_apf_offload] = WMI_SERVICE_BPF_OFFLOAD; wmi_service[wmi_service_sync_delete_cmds] = WMI_SERVICE_SYNC_DELETE_CMDS; wmi_service[wmi_service_ratectrl_limit_max_min_rates] =