From 1f36626b2d3608a7b9a6f99d9bc10e03d66f0928 Mon Sep 17 00:00:00 2001 From: Qiwei Cai Date: Mon, 17 Sep 2018 19:17:13 +0800 Subject: [PATCH] qcacmn: Featurize WMI APIs and TLVs that are specific to MCL In the existing converged component, WMI TLV APIs are implemented in a generic manner without proper featurization. All the APIs exposed outside of WMI are implemented in wmi_unified_api.c and all the APIs forming the CMD or extracting the EVT is implemented in wmi_unified_tlv.c. Since WIN and MCL have a unified WMI layer in the converged component and there are features within WIN and MCL that are not common, there exists a good number of WMI APIs which are specific to WIN but compiled by MCL and vice-versa. Due to this inadvertent problem, there is a chunk of code and memory used up by WIN and MCL for features that are not used in their products. Featurize WMI APIs and TLVs that are specific to MCL - - DSRC - NAN - P2P - PMO - roaming - concurrency - STA - Generic MCL specific WMI (STA) Change-Id: I03a68b0db30a3aa585b269ab0a1745b37bc7e0b7 CRs-Fixed: 2316935 --- wmi_unified_api.h | 742 ++-------------------- wmi_unified_concurrency_api.h | 69 ++ wmi_unified_nan_api.h | 135 ++++ wmi_unified_ocb_api.h | 159 +++++ wmi_unified_p2p_api.h | 92 +++ wmi_unified_param.h | 1116 ++------------------------------- wmi_unified_pmo_api.h | 114 +++- wmi_unified_priv.h | 586 +++++++++++------ wmi_unified_roam_api.h | 324 ++++++++++ wmi_unified_roam_param.h | 579 +++++++++++++++++ wmi_unified_sta_api.h | 461 ++++++++++++++ wmi_unified_sta_param.h | 464 ++++++++++++++ 12 files changed, 2900 insertions(+), 1941 deletions(-) create mode 100644 wmi_unified_concurrency_api.h create mode 100644 wmi_unified_nan_api.h create mode 100644 wmi_unified_ocb_api.h create mode 100644 wmi_unified_p2p_api.h create mode 100644 wmi_unified_roam_api.h create mode 100644 wmi_unified_roam_param.h create mode 100644 wmi_unified_sta_api.h create mode 100644 wmi_unified_sta_param.h diff --git a/wmi_unified_api.h b/wmi_unified_api.h index 2e07b4dde9..6ee763c35e 100644 --- a/wmi_unified_api.h +++ b/wmi_unified_api.h @@ -36,9 +36,6 @@ #ifdef WLAN_POWER_MANAGEMENT_OFFLOAD #include "wmi_unified_pmo_api.h" #endif -#ifdef CONVERGED_P2P_ENABLE -#include "wlan_p2p_public_struct.h" -#endif #include "wlan_scan_public_structs.h" #ifdef WLAN_FEATURE_DISA #include "wlan_disa_public_struct.h" @@ -46,9 +43,6 @@ #ifdef WLAN_FEATURE_ACTION_OUI #include "wlan_action_oui_public_struct.h" #endif -#ifdef WLAN_FEATURE_NAN_CONVERGENCE -#include "nan_public_structs.h" -#endif #ifdef WLAN_SUPPORT_GREEN_AP #include "wlan_green_ap_api.h" #endif @@ -84,6 +78,30 @@ #include "wmi_unified_ap_api.h" #endif +#ifdef WLAN_FEATURE_DSRC +#include "wmi_unified_ocb_api.h" +#endif + +#ifdef WLAN_FEATURE_NAN_CONVERGENCE +#include "wmi_unified_nan_api.h" +#endif + +#ifdef CONVERGED_P2P_ENABLE +#include +#endif + +#ifdef WMI_ROAM_SUPPORT +#include "wmi_unified_roam_api.h" +#endif + +#ifdef WMI_CONCURRENCY_SUPPORT +#include "wmi_unified_concurrency_api.h" +#endif + +#ifdef WMI_STA_SUPPORT +#include "wmi_unified_sta_api.h" +#endif + typedef qdf_nbuf_t wmi_buf_t; #define wmi_buf_data(_buf) qdf_nbuf_data(_buf) @@ -496,13 +514,6 @@ QDF_STATUS wmi_unified_stats_request_send(void *wmi_hdl, QDF_STATUS wmi_unified_green_ap_ps_send(void *wmi_hdl, uint32_t value, uint8_t pdev_id); -#ifdef FEATURE_WLAN_D0WOW -QDF_STATUS wmi_unified_d0wow_enable_send(void *wmi_hdl, - uint8_t mac_id); -QDF_STATUS wmi_unified_d0wow_disable_send(void *wmi_hdl, - uint8_t mac_id); -#endif - QDF_STATUS wmi_unified_wow_enable_send(void *wmi_hdl, struct wow_cmd_params *param, uint8_t mac_id); @@ -601,161 +612,11 @@ wmi_unified_set_sta_uapsd_auto_trig_cmd(void *wmi_hdl, QDF_STATUS wmi_unified_get_temperature(void *wmi_hdl); -QDF_STATUS wmi_unified_set_p2pgo_oppps_req(void *wmi_hdl, - struct p2p_ps_params *oppps); - -QDF_STATUS wmi_unified_set_p2pgo_noa_req_cmd(void *wmi_hdl, - struct p2p_ps_params *noa); - -#ifdef CONVERGED_P2P_ENABLE -#ifdef FEATURE_P2P_LISTEN_OFFLOAD -QDF_STATUS wmi_unified_p2p_lo_start_cmd(void *wmi_hdl, - struct p2p_lo_start *param); - -QDF_STATUS wmi_unified_p2p_lo_stop_cmd(void *wmi_hdl, uint8_t vdev_id); -#endif -#endif - QDF_STATUS wmi_unified_set_smps_params(void *wmi_hdl, uint8_t vdev_id, int value); QDF_STATUS wmi_unified_set_mimops(void *wmi_hdl, uint8_t vdev_id, int value); -#ifdef WLAN_FEATURE_DSRC -/** - * wmi_unified_ocb_start_timing_advert() - start sending the timing - * advertisement frames on a channel - * @wmi_handle: pointer to the wmi handle - * @timing_advert: pointer to the timing advertisement struct - * - * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure - */ -QDF_STATUS wmi_unified_ocb_start_timing_advert(struct wmi_unified *wmi_handle, - struct ocb_timing_advert_param *timing_advert); - -/** - * wmi_unified_ocb_stop_timing_advert() - stop sending the timing - * advertisement frames on a channel - * @wmi_handle: pointer to the wmi handle - * @timing_advert: pointer to the timing advertisement struct - * - * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure - */ -QDF_STATUS wmi_unified_ocb_stop_timing_advert(struct wmi_unified *wmi_handle, - struct ocb_timing_advert_param *timing_advert); - -/** - * wmi_unified_ocb_set_config() - send the OCB config to the FW - * @wmi_handle: pointer to the wmi handle - * @config: the OCB configuration - * - * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failures - */ -QDF_STATUS wmi_unified_ocb_set_config(struct wmi_unified *wmi_handle, - struct ocb_config *config); - -/** - * wmi_unified_ocb_get_tsf_timer() - get ocb tsf timer val - * @wmi_handle: pointer to the wmi handle - * @req: request for tsf timer - * - * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure - */ -QDF_STATUS wmi_unified_ocb_get_tsf_timer(struct wmi_unified *wmi_handle, - struct ocb_get_tsf_timer_param *req); - -/** - * wmi_unified_ocb_set_utc_time_cmd() - get ocb tsf timer val - * @wmi_handle: pointer to the wmi handle - * @vdev_id: vdev id - * - * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure - */ -QDF_STATUS wmi_unified_ocb_set_utc_time_cmd(struct wmi_unified *wmi_handle, - struct ocb_utc_param *utc); - -/** - * wmi_unified_dcc_get_stats_cmd() - get the DCC channel stats - * @wmi_handle: pointer to the wmi handle - * @get_stats_param: pointer to the dcc stats - * - * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure - */ -QDF_STATUS wmi_unified_dcc_get_stats_cmd(struct wmi_unified *wmi_handle, - struct ocb_dcc_get_stats_param *get_stats_param); - -/** - * wmi_unified_dcc_clear_stats() - command to clear the DCC stats - * @wmi_handle: pointer to the wmi handle - * @clear_stats_param: parameters to the command - * - * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure - */ -QDF_STATUS wmi_unified_dcc_clear_stats(struct wmi_unified *wmi_handle, - struct ocb_dcc_clear_stats_param *clear_stats_param); - -/** - * wmi_unified_dcc_update_ndl() - command to update the NDL data - * @wmi_handle: pointer to the wmi handle - * @update_ndl_param: pointer to the request parameters - * - * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failures - */ -QDF_STATUS wmi_unified_dcc_update_ndl(struct wmi_unified *wmi_handle, - struct ocb_dcc_update_ndl_param *update_ndl_param); - -/** - * wmi_extract_ocb_set_channel_config_resp() - extract status from wmi event - * @wmi_handle: wmi handle - * @evt_buf: pointer to event buffer - * @status: status buffer - * - * Return: QDF_STATUS_SUCCESS on success - */ -QDF_STATUS -wmi_extract_ocb_set_channel_config_resp(struct wmi_unified *wmi_handle, - void *evt_buf, - uint32_t *status); - -/** - * wmi_extract_ocb_tsf_timer() - extract tsf timer from wmi event - * @wmi_handle: wmi handle - * @evt_buf: pointer to event buffer - * @resp: tsf timer - * - * Return: QDF_STATUS_SUCCESS on success - */ -QDF_STATUS wmi_extract_ocb_tsf_timer(struct wmi_unified *wmi_handle, - void *evt_buf, - struct ocb_get_tsf_timer_response *resp); - -/** - * wmi_extract_dcc_update_ndl_resp() - extract NDL update from wmi event - * @wmi_handle: wmi handle - * @evt_buf: pointer to event buffer - * @resp: ndl update status - * - * Return: QDF_STATUS_SUCCESS on success - */ -QDF_STATUS wmi_extract_dcc_update_ndl_resp(struct wmi_unified *wmi_handle, - void *evt_buf, struct ocb_dcc_update_ndl_response *resp); - -/** - * wmi_extract_dcc_stats() - extract DCC stats from wmi event - * @wmi_handle: wmi handle - * @evt_buf: pointer to event buffer - * @resp: DCC stats - * - * Since length of the response is variable, response buffer will be allocated. - * The caller must free the response buffer. - * - * Return: QDF_STATUS_SUCCESS on success - */ -QDF_STATUS wmi_extract_dcc_stats(struct wmi_unified *wmi_handle, - void *evt_buf, - struct ocb_dcc_get_stats_response **response); -#endif - QDF_STATUS wmi_unified_lro_config_cmd(void *wmi_hdl, struct wmi_lro_config_cmd_t *wmi_lro_cmd); @@ -765,35 +626,11 @@ QDF_STATUS wmi_unified_set_thermal_mgmt_cmd(void *wmi_hdl, QDF_STATUS wmi_unified_peer_rate_report_cmd(void *wmi_hdl, struct wmi_peer_rate_report_params *rate_report_params); -QDF_STATUS wmi_unified_set_mcc_channel_time_quota_cmd - (void *wmi_hdl, - uint32_t adapter_1_chan_freq, - uint32_t adapter_1_quota, uint32_t adapter_2_chan_freq); - -QDF_STATUS wmi_unified_set_mcc_channel_time_latency_cmd - (void *wmi_hdl, - uint32_t mcc_channel_freq, uint32_t mcc_channel_time_latency); - -QDF_STATUS wmi_unified_set_enable_disable_mcc_adaptive_scheduler_cmd( - void *wmi_hdl, uint32_t mcc_adaptive_scheduler, - uint32_t pdev_id); - #ifdef CONFIG_MCL QDF_STATUS wmi_unified_bcn_buf_ll_cmd(void *wmi_hdl, wmi_bcn_send_from_host_cmd_fixed_param *param); #endif -QDF_STATUS wmi_unified_set_sta_sa_query_param_cmd(void *wmi_hdl, - uint8_t vdev_id, uint32_t max_retries, - uint32_t retry_interval); - - -QDF_STATUS wmi_unified_set_sta_keep_alive_cmd(void *wmi_hdl, - struct sta_params *params); - -QDF_STATUS wmi_unified_vdev_set_gtx_cfg_cmd(void *wmi_hdl, uint32_t if_id, - struct wmi_gtx_config *gtx_info); - QDF_STATUS wmi_unified_process_update_edca_param(void *wmi_hdl, uint8_t vdev_id, bool mu_edca_param, struct wmi_host_wme_vparams wmm_vparams[WMI_MAX_NUM_AC]); @@ -805,81 +642,17 @@ QDF_STATUS wmi_unified_probe_rsp_tmpl_send_cmd(void *wmi_hdl, QDF_STATUS wmi_unified_setup_install_key_cmd(void *wmi_hdl, struct set_key_params *key_params); -#ifdef WLAN_FEATURE_DISA -/** - * wmi_unified_encrypt_decrypt_send_cmd() - send encryptdecrypt cmd to fw - * @wmi_hdl: wmi handle - * @params: encrypt/decrypt params - * - * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure - */ -QDF_STATUS wmi_unified_encrypt_decrypt_send_cmd(void *wmi_hdl, - struct disa_encrypt_decrypt_req_params *params); - -/** - * wmi_extract_encrypt_decrypt_resp_params() - - * extract encrypt decrypt resp params from event buffer - * @wmi_handle: wmi handle - * @evt_buf: pointer to event buffer - * @resp: encrypt decrypt resp params - * - * Return: QDF_STATUS_SUCCESS for success or error code - */ -QDF_STATUS wmi_extract_encrypt_decrypt_resp_params(void *wmi_hdl, - uint8_t *evt_buf, - struct disa_encrypt_decrypt_resp_params *resp); -#endif - QDF_STATUS wmi_unified_p2p_go_set_beacon_ie_cmd(void *wmi_hdl, uint32_t vdev_id, uint8_t *p2p_ie); - -QDF_STATUS wmi_unified_set_gateway_params_cmd(void *wmi_hdl, - struct gateway_update_req_param *req); - -QDF_STATUS wmi_unified_set_rssi_monitoring_cmd(void *wmi_hdl, - struct rssi_monitor_param *req); - QDF_STATUS wmi_unified_scan_probe_setoui_cmd(void *wmi_hdl, struct scan_mac_oui *psetoui); -#ifdef CONFIG_MCL -QDF_STATUS wmi_unified_roam_scan_offload_mode_cmd(void *wmi_hdl, - wmi_start_scan_cmd_fixed_param *scan_cmd_fp, - struct roam_offload_scan_params *roam_req); -#endif - -/** - * wmi_unified_roam_mawc_params_cmd() - configure roaming MAWC parameters - * @wmi_hdl: wmi handle - * @params: Parameters to be configured - * - * Pass the MAWC(Motion Aided wireless connectivity) related roaming - * parameters from the host to the target - * - * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure - */ -QDF_STATUS wmi_unified_roam_mawc_params_cmd(void *wmi_hdl, - struct wmi_mawc_roam_params *params); - -QDF_STATUS wmi_unified_roam_scan_offload_rssi_thresh_cmd(void *wmi_hdl, - struct roam_offload_scan_rssi_params *roam_req); - -QDF_STATUS wmi_unified_roam_scan_filter_cmd(void *wmi_hdl, - struct roam_scan_filter_params *roam_req); - #ifdef IPA_OFFLOAD QDF_STATUS wmi_unified_ipa_offload_control_cmd(void *wmi_hdl, struct ipa_uc_offload_control_params *ipa_offload); #endif -QDF_STATUS wmi_unified_plm_stop_cmd(void *wmi_hdl, - const struct plm_req_params *plm); - -QDF_STATUS wmi_unified_plm_start_cmd(void *wmi_hdl, - const struct plm_req_params *plm, - uint32_t *gchannel_list); - QDF_STATUS wmi_unified_pno_stop_cmd(void *wmi_hdl, uint8_t vdev_id); #ifdef FEATURE_WLAN_SCAN_PNO @@ -890,14 +663,6 @@ QDF_STATUS wmi_unified_pno_start_cmd(void *wmi_hdl, QDF_STATUS wmi_unified_nlo_mawc_cmd(void *wmi_hdl, struct nlo_mawc_params *params); -#ifdef WLAN_FEATURE_ROAM_OFFLOAD -QDF_STATUS wmi_unified_set_ric_req_cmd(void *wmi_hdl, void *msg, - uint8_t is_add_ts); - -QDF_STATUS wmi_unified_roam_synch_complete_cmd(void *wmi_hdl, - uint8_t vdev_id); -#endif - QDF_STATUS wmi_unified_process_ll_stats_clear_cmd (void *wmi_hdl, const struct ll_stats_clear_params *clear_req, uint8_t addr[IEEE80211_ADDR_LEN]); @@ -926,37 +691,11 @@ QDF_STATUS wmi_unified_snr_cmd(void *wmi_hdl, uint8_t vdev_id); QDF_STATUS wmi_unified_link_status_req_cmd(void *wmi_hdl, struct link_status_params *link_status); -#ifdef CONFIG_MCL -QDF_STATUS wmi_unified_process_dhcp_ind(void *wmi_hdl, - wmi_peer_set_param_cmd_fixed_param *ta_dhcp_ind); - -QDF_STATUS wmi_unified_get_link_speed_cmd(void *wmi_hdl, - wmi_mac_addr peer_macaddr); -#endif - #ifdef WLAN_SUPPORT_GREEN_AP QDF_STATUS wmi_unified_egap_conf_params_cmd(void *wmi_hdl, struct wlan_green_ap_egap_params *egap_params); #endif -QDF_STATUS wmi_unified_fw_profiling_data_cmd(void *wmi_hdl, - uint32_t cmd, uint32_t value1, uint32_t value2); - -QDF_STATUS wmi_unified_wow_timer_pattern_cmd(void *wmi_hdl, uint8_t vdev_id, - uint32_t cookie, uint32_t time); - -QDF_STATUS wmi_unified_nat_keepalive_en_cmd(void *wmi_hdl, uint8_t vdev_id); - -/** - * wmi_unified_set_latency_config_cmd() - * @wmi_handle: wmi handle - * @param: WLM parameters - * - * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure - */ -QDF_STATUS wmi_unified_wlm_latency_level_cmd(void *wmi_hdl, - struct wlm_latency_level_param *param); - QDF_STATUS wmi_unified_csa_offload_enable(void *wmi_hdl, uint8_t vdev_id); #ifdef WLAN_FEATURE_CIF_CFR @@ -986,75 +725,23 @@ QDF_STATUS wmi_unified_pktlog_wmi_send_cmd(void *wmi_hdl, uint8_t user_triggered); #endif -QDF_STATUS wmi_unified_wow_delete_pattern_cmd(void *wmi_hdl, uint8_t ptrn_id, - uint8_t vdev_id); - -QDF_STATUS wmi_unified_host_wakeup_ind_to_fw_cmd(void *wmi_hdl); -QDF_STATUS wmi_unified_del_ts_cmd(void *wmi_hdl, uint8_t vdev_id, - uint8_t ac); - -QDF_STATUS wmi_unified_aggr_qos_cmd(void *wmi_hdl, - struct aggr_add_ts_param *aggr_qos_rsp_msg); - -QDF_STATUS wmi_unified_add_ts_cmd(void *wmi_hdl, - struct add_ts_param *msg); - -QDF_STATUS wmi_unified_process_add_periodic_tx_ptrn_cmd(void *wmi_hdl, - struct periodic_tx_pattern * - pAddPeriodicTxPtrnParams, - uint8_t vdev_id); - -QDF_STATUS wmi_unified_process_del_periodic_tx_ptrn_cmd(void *wmi_hdl, - uint8_t vdev_id, - uint8_t pattern_id); - QDF_STATUS wmi_unified_stats_ext_req_cmd(void *wmi_hdl, struct stats_ext_params *preq); -QDF_STATUS wmi_unified_enable_ext_wow_cmd(void *wmi_hdl, - struct ext_wow_params *params); - -QDF_STATUS wmi_unified_set_app_type2_params_in_fw_cmd(void *wmi_hdl, - struct app_type2_params *appType2Params); - -QDF_STATUS wmi_unified_set_auto_shutdown_timer_cmd(void *wmi_hdl, - uint32_t timer_val); - -QDF_STATUS wmi_unified_nan_req_cmd(void *wmi_hdl, - struct nan_req_params *nan_req); - QDF_STATUS wmi_unified_process_dhcpserver_offload_cmd(void *wmi_hdl, struct dhcp_offload_info_params *params); -QDF_STATUS wmi_unified_process_ch_avoid_update_cmd(void *wmi_hdl); - QDF_STATUS wmi_unified_send_regdomain_info_to_fw_cmd(void *wmi_hdl, uint32_t reg_dmn, uint16_t regdmn2G, uint16_t regdmn5G, uint8_t ctl2G, uint8_t ctl5G); -QDF_STATUS wmi_unified_set_tdls_offchan_mode_cmd(void *wmi_hdl, - struct tdls_channel_switch_params *chan_switch_params); - -QDF_STATUS wmi_unified_update_fw_tdls_state_cmd(void *wmi_hdl, - void *tdls_param, uint8_t tdls_state); - -QDF_STATUS wmi_unified_update_tdls_peer_state_cmd(void *wmi_hdl, - struct tdls_peer_state_params *peerStateParams, - uint32_t *ch_mhz); - QDF_STATUS wmi_unified_process_fw_mem_dump_cmd(void *wmi_hdl, struct fw_dump_req_param *mem_dump_req); -QDF_STATUS wmi_unified_process_set_ie_info_cmd(void *wmi_hdl, - struct vdev_ie_info_param *ie_info); - QDF_STATUS wmi_unified_save_fw_version_cmd(void *wmi_hdl, void *evt_buf); -QDF_STATUS wmi_unified_set_base_macaddr_indicate_cmd(void *wmi_hdl, - uint8_t *custom_addr); - QDF_STATUS wmi_unified_log_supported_evt_cmd(void *wmi_hdl, uint8_t *event, uint32_t len); @@ -1064,65 +751,12 @@ QDF_STATUS wmi_unified_enable_specific_fw_logs_cmd(void *wmi_hdl, QDF_STATUS wmi_unified_flush_logs_to_fw_cmd(void *wmi_hdl); -QDF_STATUS wmi_unified_pdev_set_pcl_cmd(void *wmi_hdl, - struct wmi_pcl_chan_weights *msg); - -QDF_STATUS wmi_unified_soc_set_hw_mode_cmd(void *wmi_hdl, - uint32_t hw_mode_index); - -QDF_STATUS wmi_unified_pdev_set_dual_mac_config_cmd(void *wmi_hdl, - struct policy_mgr_dual_mac_config *msg); - -QDF_STATUS wmi_unified_set_led_flashing_cmd(void *wmi_hdl, - struct flashing_req_params *flashing); - -QDF_STATUS wmi_unified_app_type1_params_in_fw_cmd(void *wmi_hdl, - struct app_type1_params *app_type1_params); - QDF_STATUS wmi_unified_set_ssid_hotlist_cmd(void *wmi_hdl, struct ssid_hotlist_request_params *request); QDF_STATUS wmi_unified_unit_test_cmd(void *wmi_hdl, struct wmi_unit_test_cmd *wmi_utest); -QDF_STATUS wmi_unified_roam_invoke_cmd(void *wmi_hdl, - struct wmi_roam_invoke_cmd *roaminvoke, - uint32_t ch_hz); - -QDF_STATUS wmi_unified_roam_scan_offload_cmd(void *wmi_hdl, - uint32_t command, uint32_t vdev_id); - -#ifdef CONFIG_MCL -QDF_STATUS wmi_unified_send_roam_scan_offload_ap_cmd(void *wmi_hdl, - struct ap_profile_params *ap_profile); -#endif - -QDF_STATUS wmi_unified_roam_scan_offload_scan_period(void *wmi_hdl, - uint32_t scan_period, - uint32_t scan_age, - uint32_t vdev_id); - -QDF_STATUS wmi_unified_roam_scan_offload_chan_list_cmd(void *wmi_hdl, - uint8_t chan_count, - uint32_t *chan_list, - uint8_t list_type, uint32_t vdev_id); - -QDF_STATUS wmi_unified_roam_scan_offload_rssi_change_cmd(void *wmi_hdl, - uint32_t vdev_id, - int32_t rssi_change_thresh, - uint32_t bcn_rssi_weight, - uint32_t hirssi_delay_btw_scans); - -/** - * wmi_unified_set_per_roam_config() - set PER roam config in FW - * @wmi_hdl: wmi handle - * @req_buf: per roam config request buffer - * - * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure - */ -QDF_STATUS wmi_unified_set_per_roam_config(void *wmi_hdl, - struct wmi_per_roam_config_req *req_buf); - #ifdef FEATURE_WLAN_APF /** * wmi_unified_set_active_apf_mode_cmd() - config active APF mode in FW @@ -1449,19 +1083,6 @@ QDF_STATUS wmi_extract_vdev_roam_param(void *wmi_hdl, void *evt_buf, QDF_STATUS wmi_extract_vdev_scan_ev_param(void *wmi_hdl, void *evt_buf, struct scan_event *param); -#ifdef CONVERGED_TDLS_ENABLE -/** - * wmi_extract_vdev_tdls_ev_param - extract vdev tdls param from event - * @wmi_handle: wmi handle - * @param evt_buf: pointer to event buffer - * @param param: Pointer to hold vdev tdls param - * - * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure - */ -QDF_STATUS wmi_extract_vdev_tdls_ev_param(void *wmi_hdl, void *evt_buf, - struct tdls_event_info *param); -#endif - QDF_STATUS wmi_extract_mu_ev_param(void *wmi_hdl, void *evt_buf, wmi_host_mu_report_event *param); @@ -1488,14 +1109,6 @@ QDF_STATUS wmi_extract_pdev_generic_buffer_ev_param(void *wmi_hdl, void *evt_buf, wmi_host_pdev_generic_buffer_event *param); -#ifdef CONVERGED_P2P_ENABLE -QDF_STATUS wmi_extract_p2p_lo_stop_ev_param(void *wmi_hdl, - void *evt_buf, struct p2p_lo_event *param); - -QDF_STATUS wmi_extract_p2p_noa_ev_param(void *wmi_hdl, - void *evt_buf, struct p2p_noa_info *param); -#endif - QDF_STATUS wmi_extract_peer_ratecode_list_ev(void *wmi_hdl, void *evt_buf, uint8_t *peer_mac, wmi_sa_rate_cap *rate_cap); @@ -1591,48 +1204,6 @@ QDF_STATUS wmi_extract_vdev_nac_rssi_stats(void *wmi_hdl, void *evt_buf, QDF_STATUS wmi_unified_send_power_dbg_cmd(void *wmi_hdl, struct wmi_power_dbg_params *param); -/** - * wmi_unified_send_sar_limit_cmd() - send sar limit cmd to fw - * @wmi_hdl: wmi handle - * @params: sar limit command params - * - * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure - */ -QDF_STATUS wmi_unified_send_sar_limit_cmd(void *wmi_hdl, - struct sar_limit_cmd_params *params); - -/** - * wmi_unified_get_sar_limit_cmd() - request current SAR limits from FW - * @wmi_hdl: wmi handle - * - * Return: QDF_STATUS_SUCCESS for success or error code - */ -QDF_STATUS wmi_unified_get_sar_limit_cmd(void *wmi_hdl); - -/** - * wmi_unified_extract_sar_limit_event() - extract SAR limits from FW event - * @wmi_hdl: wmi handle - * @evt_buf: event buffer received from firmware - * @event: SAR limit event which is to be populated by data extracted from - * the @evt_buf buffer - * - * Return: QDF_STATUS_SUCCESS for success or error code - */ -QDF_STATUS wmi_unified_extract_sar_limit_event(void *wmi_hdl, - uint8_t *evt_buf, - struct sar_limit_event *event); - -/** - * wmi_unified_extract_sar2_result_event() - extract SAR limits from FW event - * @handle: wmi handle - * @event: event buffer received from firmware - * @len: length of the event buffer - * - * Return: QDF_STATUS_SUCCESS for success or error code - */ -QDF_STATUS wmi_unified_extract_sar2_result_event(void *handle, - uint8_t *event, uint32_t len); - /** * wmi_extract_sar_cap_service_ready_ext() - extract SAR cap from * FW service ready event @@ -1647,9 +1218,6 @@ QDF_STATUS wmi_extract_sar_cap_service_ready_ext( uint8_t *evt_buf, struct wlan_psoc_host_service_ext_param *ext_param); -QDF_STATUS wmi_unified_send_adapt_dwelltime_params_cmd(void *wmi_hdl, - struct wmi_adaptive_dwelltime_params * - wmi_param); QDF_STATUS wmi_unified_fw_test_cmd(void *wmi_hdl, struct set_fwtest_params *wmi_fwtest); @@ -1737,28 +1305,6 @@ wmi_unified_send_action_oui_cmd(void *wmi_hdl, struct action_oui_request *req); #endif /* WLAN_FEATURE_ACTION_OUI */ -/* - * wmi_unified_set_del_pmkid_cache() - set delete PMKID - * @wmi_hdl: wma handle - * @pmksa: pointer to pmk cache entry - * - * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure - */ -QDF_STATUS wmi_unified_set_del_pmkid_cache(void *wmi_hdl, - struct wmi_unified_pmk_cache *pmksa); - -#if defined(WLAN_FEATURE_FILS_SK) -/* - * wmi_unified_roam_send_hlp_cmd() -send HLP command info - * @wmi_hdl: wma handle - * @req_buf: Pointer to HLP params - * - * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure - */ -QDF_STATUS wmi_unified_roam_send_hlp_cmd(void *wmi_hdl, - struct hlp_params *req_buf); -#endif - /** * wmi_unified_send_request_get_rcpi_cmd() - command to request rcpi value * @wmi_hdl: wma handle @@ -1805,16 +1351,6 @@ void wmi_print_mgmt_event_log(wmi_unified_t wmi, uint32_t count, #endif /* WMI_INTERFACE_EVENT_LOGGING */ -QDF_STATUS wmi_unified_send_dbs_scan_sel_params_cmd(void *wmi_hdl, - struct wmi_dbs_scan_sel_params *wmi_param); - -QDF_STATUS wmi_unified_send_limit_off_chan_cmd(void *wmi_hdl, - struct wmi_limit_off_chan_param *wmi_param); -QDF_STATUS wmi_unified_set_arp_stats_req(void *wmi_hdl, - struct set_arp_stats *req_buf); -QDF_STATUS wmi_unified_get_arp_stats_req(void *wmi_hdl, - struct get_arp_stats *req_buf); - /** * wmi_unified_send_wds_entry_list_cmd() - WMI function to get list of * wds entries from FW @@ -1841,125 +1377,6 @@ QDF_STATUS wmi_unified_send_dump_wds_table_cmd(void *wmi_hdl); QDF_STATUS wmi_extract_wds_entry(void *wmi_hdl, uint8_t *evt_buf, struct wdsentry *wds_entry, u_int32_t idx); -#ifdef WLAN_FEATURE_NAN_CONVERGENCE -/** - * wmi_unified_ndp_initiator_req_cmd_send - api to send initiator request to FW - * @wmi_hdl: wmi handle - * @req: pointer to request buffer - * - * Return: status of operation - */ -QDF_STATUS wmi_unified_ndp_initiator_req_cmd_send(void *wmi_hdl, - struct nan_datapath_initiator_req *req); - -/** - * wmi_unified_ndp_responder_req_cmd_send - api to send responder request to FW - * @wmi_hdl: wmi handle - * @req: pointer to request buffer - * - * Return: status of operation - */ -QDF_STATUS wmi_unified_ndp_responder_req_cmd_send(void *wmi_hdl, - struct nan_datapath_responder_req *req); - -/** - * wmi_unified_ndp_end_req_cmd_send - api to send end request to FW - * @wmi_hdl: wmi handle - * @req: pointer to request buffer - * - * Return: status of operation - */ -QDF_STATUS wmi_unified_ndp_end_req_cmd_send(void *wmi_hdl, - struct nan_datapath_end_req *req); - -/** - * wmi_extract_ndp_initiator_rsp - api to extract initiator rsp from even buffer - * @wmi_hdl: wmi handle - * @data: event buffer - * @rsp: buffer to populate - * - * Return: status of operation - */ -QDF_STATUS wmi_extract_ndp_initiator_rsp(wmi_unified_t wmi_handle, - uint8_t *data, struct nan_datapath_initiator_rsp *rsp); - -/** - * wmi_extract_ndp_ind - api to extract ndp indication struct from even buffer - * @wmi_hdl: wmi handle - * @data: event buffer - * @ind: buffer to populate - * - * Return: status of operation - */ -QDF_STATUS wmi_extract_ndp_ind(wmi_unified_t wmi_handle, uint8_t *data, - struct nan_datapath_indication_event *ind); - -/** - * wmi_extract_ndp_confirm - api to extract ndp confim struct from even buffer - * @wmi_hdl: wmi handle - * @data: event buffer - * @ev: buffer to populate - * - * Return: status of operation - */ -QDF_STATUS wmi_extract_ndp_confirm(wmi_unified_t wmi_handle, uint8_t *data, - struct nan_datapath_confirm_event *ev); - -/** - * wmi_extract_ndp_responder_rsp - api to extract responder rsp from even buffer - * @wmi_hdl: wmi handle - * @data: event buffer - * @rsp: buffer to populate - * - * Return: status of operation - */ -QDF_STATUS wmi_extract_ndp_responder_rsp(wmi_unified_t wmi_handle, - uint8_t *data, struct nan_datapath_responder_rsp *rsp); - -/** - * wmi_extract_ndp_end_rsp - api to extract ndp end rsp from even buffer - * @wmi_hdl: wmi handle - * @data: event buffer - * @rsp: buffer to populate - * - * Return: status of operation - */ -QDF_STATUS wmi_extract_ndp_end_rsp(wmi_unified_t wmi_handle, uint8_t *data, - struct nan_datapath_end_rsp_event *rsp); - -/** - * wmi_extract_ndp_end_ind - api to extract ndp end indication from even buffer - * @wmi_hdl: wmi handle - * @data: event buffer - * @ind: buffer to populate - * - * Return: status of operation - */ -QDF_STATUS wmi_extract_ndp_end_ind(wmi_unified_t wmi_handle, uint8_t *data, - struct nan_datapath_end_indication_event **ind); - -/** - * wmi_extract_ndp_sch_update - api to extract ndp sch update from event buffer - * @wmi_hdl: wmi handle - * @data: event buffer - * @ind: buffer to populate - * - * Return: status of operation - */ -QDF_STATUS wmi_extract_ndp_sch_update(wmi_unified_t wmi_handle, uint8_t *data, - struct nan_datapath_sch_update_event *ind); -#endif - -/** - * wmi_unified_send_btm_config() - Send BTM config to fw - * @wmi_hdl: wmi handle - * @params: pointer to wmi_btm_config - * - * Return: QDF_STATUS - */ -QDF_STATUS wmi_unified_send_btm_config(void *wmi_hdl, - struct wmi_btm_config *params); - /** * wmi_unified_send_obss_detection_cfg_cmd() - WMI function to send obss * detection configuration to FW. @@ -1990,51 +1407,6 @@ QDF_STATUS wmi_unified_extract_obss_detection_info(void *wmi_hdl, uint8_t *data, struct wmi_obss_detect_info *info); -/** - * wmi_unified_send_bss_color_change_enable_cmd() - WMI function to send bss - * color change enable to FW. - * @wmi_hdl: wmi handle - * @vdev_id: vdev ID - * @enable: enable or disable color change handeling within firmware - * - * Send WMI_BSS_COLOR_CHANGE_ENABLE_CMDID parameters to fw, - * thereby firmware updates bss color when AP announces bss color change. - * - * Return: QDF_STATUS - */ - -QDF_STATUS wmi_unified_send_bss_color_change_enable_cmd(void *wmi_hdl, - uint32_t vdev_id, - bool enable); - -/** - * wmi_unified_send_obss_color_collision_cfg_cmd() - WMI function to send bss - * color collision detection configuration to FW. - * @wmi_hdl: wmi handle - * @cfg: obss color collision detection configuration - * - * Send WMI_OBSS_COLOR_COLLISION_DET_CONFIG_CMDID parameters to fw. - * - * Return: QDF_STATUS - */ - -QDF_STATUS wmi_unified_send_obss_color_collision_cfg_cmd(void *wmi_hdl, - struct wmi_obss_color_collision_cfg_param *cfg); - -/** - * wmi_unified_extract_obss_color_collision_info() - WMI function to extract - * obss color collision info from FW. - * @wmi_hdl: wmi handle - * @data: event data from firmware - * @info: Pointer to hold bss color collision info - * - * This function is used to extract bss collision info from firmware. - * - * Return: QDF_STATUS - */ - -QDF_STATUS wmi_unified_extract_obss_color_collision_info(void *wmi_hdl, - uint8_t *data, struct wmi_obss_color_collision_info *info); #ifdef WLAN_SUPPORT_GREEN_AP QDF_STATUS wmi_extract_green_ap_egap_status_info( @@ -2082,28 +1454,6 @@ wmi_extract_roam_scan_stats_res_evt(wmi_unified_t wmi, void *evt_buf, QDF_STATUS wmi_extract_offload_bcn_tx_status_evt(void *wmi_hdl, void *evt_buf, uint32_t *vdev_id, uint32_t *tx_status); -/** - * wmi_unified_offload_11k_cmd() - send 11k offload command - * @wmi_hdl: wmi handle - * @params: 11k offload params - * - * This function passes the 11k offload command params to FW - * - * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure - */ -QDF_STATUS wmi_unified_offload_11k_cmd(void *wmi_hdl, - struct wmi_11k_offload_params *params); -/** - * wmi_unified_invoke_neighbor_report_cmd() - send invoke neighbor report cmd - * @wmi_hdl: wmi handle - * @params: invoke neighbor report params - * - * This function passes the invoke neighbor report command to fw - * - * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure - */ -QDF_STATUS wmi_unified_invoke_neighbor_report_cmd(void *wmi_hdl, - struct wmi_invoke_neighbor_report_params *params); /* wmi_get_ch_width_from_phy_mode() - convert phy mode to channel width * @wmi_hdl: wmi handle @@ -2224,4 +1574,48 @@ QDF_STATUS wmi_unified_send_obss_spatial_reuse_set_cmd(void *wmi_handle, QDF_STATUS wmi_convert_pdev_id_host_to_target(void *wmi_hdl, uint32_t host_pdev_id, uint32_t *target_pdev_id); + +/** + * wmi_unified_send_bss_color_change_enable_cmd() - WMI function to send bss + * color change enable to FW. + * @wmi_hdl: wmi handle + * @vdev_id: vdev ID + * @enable: enable or disable color change handeling within firmware + * + * Send WMI_BSS_COLOR_CHANGE_ENABLE_CMDID parameters to fw, + * thereby firmware updates bss color when AP announces bss color change. + * + * Return: QDF_STATUS + */ +QDF_STATUS wmi_unified_send_bss_color_change_enable_cmd(void *wmi_hdl, + uint32_t vdev_id, + bool enable); + +/** + * wmi_unified_send_obss_color_collision_cfg_cmd() - WMI function to send bss + * color collision detection configuration to FW. + * @wmi_hdl: wmi handle + * @cfg: obss color collision detection configuration + * + * Send WMI_OBSS_COLOR_COLLISION_DET_CONFIG_CMDID parameters to fw. + * + * Return: QDF_STATUS + */ +QDF_STATUS wmi_unified_send_obss_color_collision_cfg_cmd(void *wmi_hdl, + struct wmi_obss_color_collision_cfg_param *cfg); + +/** + * wmi_unified_extract_obss_color_collision_info() - WMI function to extract + * obss color collision info from FW. + * @wmi_hdl: wmi handle + * @data: event data from firmware + * @info: Pointer to hold bss color collision info + * + * This function is used to extract bss collision info from firmware. + * + * Return: QDF_STATUS + */ +QDF_STATUS wmi_unified_extract_obss_color_collision_info(void *wmi_hdl, + uint8_t *data, struct wmi_obss_color_collision_info *info); + #endif /* _WMI_UNIFIED_API_H_ */ diff --git a/wmi_unified_concurrency_api.h b/wmi_unified_concurrency_api.h new file mode 100644 index 0000000000..3e2d06d356 --- /dev/null +++ b/wmi_unified_concurrency_api.h @@ -0,0 +1,69 @@ +/* + * Copyright (c) 2013-2018 The Linux Foundation. All rights reserved. + * + * Permission to use, copy, modify, and/or distribute this software for + * any purpose with or without fee is hereby granted, provided that the + * above copyright notice and this permission notice appear in all + * copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL + * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE + * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL + * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR + * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ +/** + * DOC: Implement API's specific to concurrency component. + */ + +#ifndef _WMI_UNIFIED_CONCURRENCY_API_H_ +#define _WMI_UNIFIED_CONCURRENCY_API_H_ + +/** + * wmi_unified_set_mcc_channel_time_quota_cmd() - set MCC channel time quota + * @wmi: wmi handle + * @adapter_1_chan_number: adapter 1 channel number + * @adapter_1_quota: adapter 1 quota + * @adapter_2_chan_number: adapter 2 channel number + * + * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure + */ +QDF_STATUS wmi_unified_set_mcc_channel_time_quota_cmd + (void *wmi_hdl, + uint32_t adapter_1_chan_freq, + uint32_t adapter_1_quota, uint32_t adapter_2_chan_freq); + +/** + * wmi_unified_set_mcc_channel_time_latency_cmd() - set MCC channel time latency + * @wmi: wmi handle + * @mcc_channel: mcc channel + * @mcc_channel_time_latency: MCC channel time latency. + * + * Currently used to set time latency for an MCC vdev/adapter using operating + * channel of it and channel number. The info is provided run time using + * iwpriv command: iwpriv setMccLatency . + * + * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure + */ +QDF_STATUS wmi_unified_set_mcc_channel_time_latency_cmd + (void *wmi_hdl, + uint32_t mcc_channel_freq, uint32_t mcc_channel_time_latency); + +/** + * wmi_unified_set_enable_disable_mcc_adaptive_scheduler_cmd() - control mcc + * scheduler + * @wmi_handle: wmi handle + * @mcc_adaptive_scheduler: enable/disable + * + * This function enable/disable mcc adaptive scheduler in fw. + * + * Return: QDF_STATUS_SUCCESS for success or error code + */ +QDF_STATUS wmi_unified_set_enable_disable_mcc_adaptive_scheduler_cmd( + void *wmi_hdl, uint32_t mcc_adaptive_scheduler, + uint32_t pdev_id); + +#endif /* _WMI_UNIFIED_CONCURRENCY_API_H_ */ diff --git a/wmi_unified_nan_api.h b/wmi_unified_nan_api.h new file mode 100644 index 0000000000..77d8225fbf --- /dev/null +++ b/wmi_unified_nan_api.h @@ -0,0 +1,135 @@ + +/* + * Copyright (c) 2013-2018 The Linux Foundation. All rights reserved. + * + * Permission to use, copy, modify, and/or distribute this software for + * any purpose with or without fee is hereby granted, provided that the + * above copyright notice and this permission notice appear in all + * copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL + * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE + * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL + * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR + * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ +/** + * DOC: Implement API's specific to NAN component. + */ + +#ifndef _WMI_UNIFIED_NAN_API_H_ +#define _WMI_UNIFIED_NAN_API_H_ + +#include + +/** + * wmi_unified_ndp_initiator_req_cmd_send - api to send initiator request to FW + * @wmi_hdl: wmi handle + * @req: pointer to request buffer + * + * Return: status of operation + */ +QDF_STATUS wmi_unified_ndp_initiator_req_cmd_send(void *wmi_hdl, + struct nan_datapath_initiator_req *req); + +/** + * wmi_unified_ndp_responder_req_cmd_send - api to send responder request to FW + * @wmi_hdl: wmi handle + * @req: pointer to request buffer + * + * Return: status of operation + */ +QDF_STATUS wmi_unified_ndp_responder_req_cmd_send(void *wmi_hdl, + struct nan_datapath_responder_req *req); + +/** + * wmi_unified_ndp_end_req_cmd_send - api to send end request to FW + * @wmi_hdl: wmi handle + * @req: pointer to request buffer + * + * Return: status of operation + */ +QDF_STATUS wmi_unified_ndp_end_req_cmd_send(void *wmi_hdl, + struct nan_datapath_end_req *req); + +/** + * wmi_extract_ndp_initiator_rsp - api to extract initiator rsp from even buffer + * @wmi_hdl: wmi handle + * @data: event buffer + * @rsp: buffer to populate + * + * Return: status of operation + */ +QDF_STATUS wmi_extract_ndp_initiator_rsp(wmi_unified_t wmi_handle, + uint8_t *data, struct nan_datapath_initiator_rsp *rsp); + +/** + * wmi_extract_ndp_ind - api to extract ndp indication struct from even buffer + * @wmi_hdl: wmi handle + * @data: event buffer + * @ind: buffer to populate + * + * Return: status of operation + */ +QDF_STATUS wmi_extract_ndp_ind(wmi_unified_t wmi_handle, uint8_t *data, + struct nan_datapath_indication_event *ind); + +/** + * wmi_extract_ndp_confirm - api to extract ndp confim struct from even buffer + * @wmi_hdl: wmi handle + * @data: event buffer + * @ev: buffer to populate + * + * Return: status of operation + */ +QDF_STATUS wmi_extract_ndp_confirm(wmi_unified_t wmi_handle, uint8_t *data, + struct nan_datapath_confirm_event *ev); + +/** + * wmi_extract_ndp_responder_rsp - api to extract responder rsp from even buffer + * @wmi_hdl: wmi handle + * @data: event buffer + * @rsp: buffer to populate + * + * Return: status of operation + */ +QDF_STATUS wmi_extract_ndp_responder_rsp(wmi_unified_t wmi_handle, + uint8_t *data, struct nan_datapath_responder_rsp *rsp); + +/** + * wmi_extract_ndp_end_rsp - api to extract ndp end rsp from even buffer + * @wmi_hdl: wmi handle + * @data: event buffer + * @rsp: buffer to populate + * + * Return: status of operation + */ +QDF_STATUS wmi_extract_ndp_end_rsp(wmi_unified_t wmi_handle, uint8_t *data, + struct nan_datapath_end_rsp_event *rsp); + +/** + * wmi_extract_ndp_end_ind - api to extract ndp end indication from even buffer + * @wmi_hdl: wmi handle + * @data: event buffer + * @ind: buffer to populate + * + * Return: status of operation + */ +QDF_STATUS wmi_extract_ndp_end_ind(wmi_unified_t wmi_handle, uint8_t *data, + struct nan_datapath_end_indication_event **ind); + +/** + * wmi_extract_ndp_sch_update - api to extract ndp sch update from event buffer + * @wmi_hdl: wmi handle + * @data: event buffer + * @ind: buffer to populate + * + * Return: status of operation + */ +QDF_STATUS wmi_extract_ndp_sch_update(wmi_unified_t wmi_handle, uint8_t *data, + struct nan_datapath_sch_update_event *ind); + +#endif /* _WMI_UNIFIED_NAN_API_H_ */ diff --git a/wmi_unified_ocb_api.h b/wmi_unified_ocb_api.h new file mode 100644 index 0000000000..883bc8d24b --- /dev/null +++ b/wmi_unified_ocb_api.h @@ -0,0 +1,159 @@ +/* + * Copyright (c) 2013-2018 The Linux Foundation. All rights reserved. + * + * Permission to use, copy, modify, and/or distribute this software for + * any purpose with or without fee is hereby granted, provided that the + * above copyright notice and this permission notice appear in all + * copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL + * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE + * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL + * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR + * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ +/** + * DOC: Implement API's specific to OCB component. + */ + +#ifndef _WMI_UNIFIED_DSRC_API_H_ +#define _WMI_UNIFIED_DSRC_API_H_ +#include + +/** + * wmi_unified_ocb_start_timing_advert() - start sending the timing + * advertisement frames on a channel + * @wmi_handle: pointer to the wmi handle + * @timing_advert: pointer to the timing advertisement struct + * + * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure + */ +QDF_STATUS wmi_unified_ocb_start_timing_advert(struct wmi_unified *wmi_handle, + struct ocb_timing_advert_param *timing_advert); + +/** + * wmi_unified_ocb_stop_timing_advert() - stop sending the timing + * advertisement frames on a channel + * @wmi_handle: pointer to the wmi handle + * @timing_advert: pointer to the timing advertisement struct + * + * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure + */ +QDF_STATUS wmi_unified_ocb_stop_timing_advert(struct wmi_unified *wmi_handle, + struct ocb_timing_advert_param *timing_advert); + +/** + * wmi_unified_ocb_set_config() - send the OCB config to the FW + * @wmi_handle: pointer to the wmi handle + * @config: the OCB configuration + * + * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failures + */ +QDF_STATUS wmi_unified_ocb_set_config(struct wmi_unified *wmi_handle, + struct ocb_config *config); + +/** + * wmi_unified_ocb_get_tsf_timer() - get ocb tsf timer val + * @wmi_handle: pointer to the wmi handle + * @req: request for tsf timer + * + * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure + */ +QDF_STATUS wmi_unified_ocb_get_tsf_timer(struct wmi_unified *wmi_handle, + struct ocb_get_tsf_timer_param *req); + +/** + * wmi_unified_ocb_set_utc_time_cmd() - get ocb tsf timer val + * @wmi_handle: pointer to the wmi handle + * @vdev_id: vdev id + * + * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure + */ +QDF_STATUS wmi_unified_ocb_set_utc_time_cmd(struct wmi_unified *wmi_handle, + struct ocb_utc_param *utc); + +/** + * wmi_unified_dcc_get_stats_cmd() - get the DCC channel stats + * @wmi_handle: pointer to the wmi handle + * @get_stats_param: pointer to the dcc stats + * + * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure + */ +QDF_STATUS wmi_unified_dcc_get_stats_cmd(struct wmi_unified *wmi_handle, + struct ocb_dcc_get_stats_param *get_stats_param); + +/** + * wmi_unified_dcc_clear_stats() - command to clear the DCC stats + * @wmi_handle: pointer to the wmi handle + * @clear_stats_param: parameters to the command + * + * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure + */ +QDF_STATUS wmi_unified_dcc_clear_stats(struct wmi_unified *wmi_handle, + struct ocb_dcc_clear_stats_param *clear_stats_param); + +/** + * wmi_unified_dcc_update_ndl() - command to update the NDL data + * @wmi_handle: pointer to the wmi handle + * @update_ndl_param: pointer to the request parameters + * + * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failures + */ +QDF_STATUS wmi_unified_dcc_update_ndl(struct wmi_unified *wmi_handle, + struct ocb_dcc_update_ndl_param *update_ndl_param); + +/** + * wmi_extract_ocb_set_channel_config_resp() - extract status from wmi event + * @wmi_handle: wmi handle + * @evt_buf: pointer to event buffer + * @status: status buffer + * + * Return: QDF_STATUS_SUCCESS on success + */ +QDF_STATUS +wmi_extract_ocb_set_channel_config_resp(struct wmi_unified *wmi_handle, + void *evt_buf, + uint32_t *status); + +/** + * wmi_extract_ocb_tsf_timer() - extract tsf timer from wmi event + * @wmi_handle: wmi handle + * @evt_buf: pointer to event buffer + * @resp: tsf timer + * + * Return: QDF_STATUS_SUCCESS on success + */ +QDF_STATUS wmi_extract_ocb_tsf_timer(struct wmi_unified *wmi_handle, + void *evt_buf, + struct ocb_get_tsf_timer_response *resp); + +/** + * wmi_extract_dcc_update_ndl_resp() - extract NDL update from wmi event + * @wmi_handle: wmi handle + * @evt_buf: pointer to event buffer + * @resp: ndl update status + * + * Return: QDF_STATUS_SUCCESS on success + */ +QDF_STATUS wmi_extract_dcc_update_ndl_resp(struct wmi_unified *wmi_handle, + void *evt_buf, struct ocb_dcc_update_ndl_response *resp); + +/** + * wmi_extract_dcc_stats() - extract DCC stats from wmi event + * @wmi_handle: wmi handle + * @evt_buf: pointer to event buffer + * @resp: DCC stats + * + * Since length of the response is variable, response buffer will be allocated. + * The caller must free the response buffer. + * + * Return: QDF_STATUS_SUCCESS on success + */ +QDF_STATUS wmi_extract_dcc_stats(struct wmi_unified *wmi_handle, + void *evt_buf, + struct ocb_dcc_get_stats_response **response); + +#endif /* _WMI_UNIFIED_DSRC_API_H_ */ diff --git a/wmi_unified_p2p_api.h b/wmi_unified_p2p_api.h new file mode 100644 index 0000000000..bfca908fbe --- /dev/null +++ b/wmi_unified_p2p_api.h @@ -0,0 +1,92 @@ +/* + * Copyright (c) 2013-2018 The Linux Foundation. All rights reserved. + * + * Permission to use, copy, modify, and/or distribute this software for + * any purpose with or without fee is hereby granted, provided that the + * above copyright notice and this permission notice appear in all + * copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL + * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE + * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL + * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR + * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ +/** + * DOC: Implement API's specific to P2P component. + */ + +#ifndef _WMI_UNIFIED_P2P_API_H_ +#define _WMI_UNIFIED_P2P_API_H_ + +#include + +/** + * wmi_unified_set_p2pgo_oppps_req() - send p2p go opp power save request to fw + * @wmi_hdl: wmi handle + * @opps: p2p opp power save parameters + * + * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure + */ +QDF_STATUS wmi_unified_set_p2pgo_oppps_req(void *wmi_hdl, + struct p2p_ps_params *oppps); + +/** + * wmi_unified_set_p2pgo_noa_req_cmd() - send p2p go noa request to fw + * @wmi_hdl: wmi handle + * @noa: p2p power save parameters + * + * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure + */ +QDF_STATUS wmi_unified_set_p2pgo_noa_req_cmd(void *wmi_hdl, + struct p2p_ps_params *noa); + +/** + * wmi_extract_p2p_noa_ev_param() - extract p2p noa param from event + * @wmi_handle: wmi handle + * @evt_buf: pointer to event buffer + * @param: Pointer to hold p2p noa param + * + * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure + */ +QDF_STATUS wmi_extract_p2p_noa_ev_param(void *wmi_hdl, + void *evt_buf, + struct p2p_noa_info *param); + +#ifdef FEATURE_P2P_LISTEN_OFFLOAD +/** + * wmi_unified_p2p_lo_start_cmd() - send p2p lo start request to fw + * @wmi_hdl: wmi handle + * @param: p2p listen offload start parameters + * + * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure + */ +QDF_STATUS wmi_unified_p2p_lo_start_cmd(void *wmi_hdl, + struct p2p_lo_start *param); + +/** + * wmi_unified_p2p_lo_stop_cmd() - send p2p lo stop request to fw + * @wmi_hdl: wmi handle + * @vdev_id: vdev id + * + * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure + */ +QDF_STATUS wmi_unified_p2p_lo_stop_cmd(void *wmi_hdl, uint8_t vdev_id); + +/** + * wmi_extract_p2p_lo_stop_ev_param() - extract p2p lo stop param from event + * @wmi_handle: wmi handle + * @evt_buf: pointer to event buffer + * @param: Pointer to hold listen offload stop param + * + * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure + */ +QDF_STATUS wmi_extract_p2p_lo_stop_ev_param(void *wmi_hdl, + void *evt_buf, + struct p2p_lo_event *param); +#endif /* FEATURE_P2P_LISTEN_OFFLOAD */ + +#endif /* _WMI_UNIFIED_P2P_API_H_ */ diff --git a/wmi_unified_param.h b/wmi_unified_param.h index a2ae42433a..9b6c3f7cd8 100644 --- a/wmi_unified_param.h +++ b/wmi_unified_param.h @@ -63,7 +63,6 @@ #define WMI_MSEC_TO_USEC(msec) (msec * 1000) #define WMI_ETH_LEN 64 #define WMI_QOS_NUM_TSPEC_MAX 2 -#define WMI_QOS_NUM_AC_MAX 4 #define WMI_IPV4_ADDR_LEN 4 #define WMI_KEEP_ALIVE_NULL_PKT 1 #define WMI_KEEP_ALIVE_UNSOLICIT_ARP_RSP 2 @@ -590,8 +589,6 @@ typedef enum { WMI_HOST_CHAN_WIDTH_10 = 6, } wmi_host_channel_width; -#define MAX_NUM_CHAN 128 - #define ATH_EXPONENT_TO_VALUE(v) ((1< -#ifdef CONVERGED_P2P_ENABLE -#include -#endif - #ifdef DFS_COMPONENT_ENABLE #include #endif @@ -418,6 +414,7 @@ QDF_STATUS (*send_set_sta_ps_mode_cmd)(wmi_unified_t wmi_handle, QDF_STATUS (*send_get_temperature_cmd)(wmi_unified_t wmi_handle); +#ifdef CONVERGED_P2P_ENABLE QDF_STATUS (*send_set_p2pgo_oppps_req_cmd)(wmi_unified_t wmi_handle, struct p2p_ps_params *oppps); @@ -430,7 +427,8 @@ QDF_STATUS (*send_p2p_lo_start_cmd)(wmi_unified_t wmi_handle, QDF_STATUS (*send_p2p_lo_stop_cmd)(wmi_unified_t wmi_handle, uint8_t vdev_id); -#endif +#endif /* FEATURE_P2P_LISTEN_OFFLOAD */ +#endif /* CONVERGED_P2P_ENABLE */ QDF_STATUS (*send_set_smps_params_cmd)(wmi_unified_t wmi_handle, uint8_t vdev_id, @@ -477,7 +475,7 @@ QDF_STATUS (*extract_dcc_update_ndl_resp)(wmi_unified_t wmi_hdl, QDF_STATUS (*extract_dcc_stats)(wmi_unified_t wmi_hdl, void *evt_buf, struct ocb_dcc_get_stats_response **response); -#endif +#endif /* WLAN_FEATURE_DSRC */ QDF_STATUS (*send_lro_config_cmd)(wmi_unified_t wmi_handle, struct wmi_lro_config_cmd_t *wmi_lro_cmd); @@ -487,6 +485,7 @@ QDF_STATUS (*send_set_thermal_mgmt_cmd)(wmi_unified_t wmi_handle, QDF_STATUS (*send_peer_rate_report_cmd)(wmi_unified_t wmi_handle, struct wmi_peer_rate_report_params *rate_report_params); +#ifdef WMI_CONCURRENCY_SUPPORT QDF_STATUS (*send_set_mcc_channel_time_quota_cmd) (wmi_unified_t wmi_handle, uint32_t adapter_1_chan_freq, @@ -499,6 +498,7 @@ QDF_STATUS (*send_set_mcc_channel_time_latency_cmd) QDF_STATUS (*send_set_enable_disable_mcc_adaptive_scheduler_cmd)( wmi_unified_t wmi_handle, uint32_t mcc_adaptive_scheduler, uint32_t pdev_id); +#endif /* WMI_CONCURRENCY_SUPPORT */ QDF_STATUS (*send_p2p_go_set_beacon_ie_cmd)(wmi_unified_t wmi_handle, uint32_t vdev_id, uint8_t *p2p_ie); @@ -510,29 +510,20 @@ QDF_STATUS (*send_probe_rsp_tmpl_send_cmd)(wmi_unified_t wmi_handle, QDF_STATUS (*send_setup_install_key_cmd)(wmi_unified_t wmi_handle, struct set_key_params *key_params); -QDF_STATUS (*send_vdev_set_gtx_cfg_cmd)(wmi_unified_t wmi_handle, - uint32_t if_id, - struct wmi_gtx_config *gtx_info); - -QDF_STATUS (*send_set_sta_keep_alive_cmd)(wmi_unified_t wmi_handle, - struct sta_params *params); - -QDF_STATUS (*send_set_sta_sa_query_param_cmd)(wmi_unified_t wmi_handle, - uint8_t vdev_id, uint32_t max_retries, - uint32_t retry_interval); - -QDF_STATUS (*send_set_gateway_params_cmd)(wmi_unified_t wmi_handle, - struct gateway_update_req_param *req); - -QDF_STATUS (*send_set_rssi_monitoring_cmd)(wmi_unified_t wmi_handle, - struct rssi_monitor_param *req); - -QDF_STATUS (*send_scan_probe_setoui_cmd)(wmi_unified_t wmi_handle, - struct scan_mac_oui *psetoui); - QDF_STATUS (*send_reset_passpoint_network_list_cmd)(wmi_unified_t wmi_handle, struct wifi_passpoint_req_param *req); +#ifdef WMI_ROAM_SUPPORT +#ifdef FEATURE_LFR_SUBNET_DETECTION +QDF_STATUS (*send_set_gateway_params_cmd)(wmi_unified_t wmi_handle, + struct gateway_update_req_param *req); +#endif /* FEATURE_LFR_SUBNET_DETECTION */ + +#ifdef FEATURE_RSSI_MONITOR +QDF_STATUS (*send_set_rssi_monitoring_cmd)(wmi_unified_t wmi_handle, + struct rssi_monitor_param *req); +#endif /* FEATURE_RSSI_MONITOR */ + QDF_STATUS (*send_roam_scan_offload_rssi_thresh_cmd)(wmi_unified_t wmi_handle, struct roam_offload_scan_rssi_params *roam_req); @@ -542,10 +533,76 @@ QDF_STATUS (*send_roam_mawc_params_cmd)(wmi_unified_t wmi_handle, QDF_STATUS (*send_roam_scan_filter_cmd)(wmi_unified_t wmi_handle, struct roam_scan_filter_params *roam_req); -#if defined(WLAN_FEATURE_FILS_SK) +QDF_STATUS (*send_roam_scan_offload_mode_cmd)(wmi_unified_t wmi_handle, + wmi_start_scan_cmd_fixed_param *scan_cmd_fp, + struct roam_offload_scan_params *roam_req); + +QDF_STATUS (*send_roam_scan_offload_ap_profile_cmd)(wmi_unified_t wmi_handle, + struct ap_profile_params *ap_profile); + +QDF_STATUS (*send_roam_scan_offload_cmd)(wmi_unified_t wmi_handle, + uint32_t command, uint32_t vdev_id); + +QDF_STATUS (*send_roam_scan_offload_scan_period_cmd)(wmi_unified_t wmi_handle, + uint32_t scan_period, + uint32_t scan_age, + uint32_t vdev_id); + +QDF_STATUS (*send_roam_scan_offload_chan_list_cmd)(wmi_unified_t wmi_handle, + uint8_t chan_count, + uint32_t *chan_list, + uint8_t list_type, uint32_t vdev_id); + +QDF_STATUS (*send_roam_scan_offload_rssi_change_cmd)(wmi_unified_t wmi_handle, + uint32_t vdev_id, + int32_t rssi_change_thresh, + uint32_t bcn_rssi_weight, + uint32_t hirssi_delay_btw_scans); + +QDF_STATUS (*send_per_roam_config_cmd)(wmi_unified_t wmi_handle, + struct wmi_per_roam_config_req *req_buf); + +QDF_STATUS (*send_offload_11k_cmd)(wmi_unified_t wmi_handle, + struct wmi_11k_offload_params *params); + +QDF_STATUS (*send_invoke_neighbor_report_cmd)(wmi_unified_t wmi_handle, + struct wmi_invoke_neighbor_report_params *params); + +QDF_STATUS (*send_btm_config)(wmi_unified_t wmi_handle, + struct wmi_btm_config *params); + +QDF_STATUS (*send_limit_off_chan_cmd)(wmi_unified_t wmi_handle, + struct wmi_limit_off_chan_param *limit_off_chan_param); + +#ifdef WLAN_FEATURE_FILS_SK QDF_STATUS (*send_roam_scan_hlp_cmd) (wmi_unified_t wmi_handle, struct hlp_params *params); -#endif +#endif /* WLAN_FEATURE_FILS_SK */ + +#ifdef FEATURE_WLAN_ESE +QDF_STATUS (*send_plm_stop_cmd)(wmi_unified_t wmi_handle, + const struct plm_req_params *plm); + +QDF_STATUS (*send_plm_start_cmd)(wmi_unified_t wmi_handle, + const struct plm_req_params *plm, + uint32_t *gchannel_list); +#endif /* FEATURE_WLAN_ESE */ + +#ifdef WLAN_FEATURE_ROAM_OFFLOAD +QDF_STATUS (*send_set_ric_req_cmd)(wmi_unified_t wmi_handle, void *msg, + uint8_t is_add_ts); + +QDF_STATUS (*send_process_roam_synch_complete_cmd)(wmi_unified_t wmi_handle, + uint8_t vdev_id); + +QDF_STATUS (*send_roam_invoke_cmd)(wmi_unified_t wmi_handle, + struct wmi_roam_invoke_cmd *roaminvoke, + uint32_t ch_hz); +#endif /* WLAN_FEATURE_ROAM_OFFLOAD */ +#endif /* WMI_ROAM_SUPPORT */ + +QDF_STATUS (*send_scan_probe_setoui_cmd)(wmi_unified_t wmi_handle, + struct scan_mac_oui *psetoui); QDF_STATUS (*send_set_passpoint_network_list_cmd)(wmi_unified_t wmi_handle, struct wifi_passpoint_req_param *req); @@ -578,16 +635,6 @@ QDF_STATUS (*send_stop_extscan_cmd)(wmi_unified_t wmi_handle, QDF_STATUS (*send_start_extscan_cmd)(wmi_unified_t wmi_handle, struct wifi_scan_cmd_req_params *pstart); -QDF_STATUS (*send_plm_stop_cmd)(wmi_unified_t wmi_handle, - const struct plm_req_params *plm); - -QDF_STATUS (*send_wlm_latency_level_cmd)(wmi_unified_t wmi_handle, - struct wlm_latency_level_param *param); - -QDF_STATUS (*send_plm_start_cmd)(wmi_unified_t wmi_handle, - const struct plm_req_params *plm, - uint32_t *gchannel_list); - QDF_STATUS (*send_csa_offload_enable_cmd)(wmi_unified_t wmi_handle, uint8_t vdev_id); @@ -604,14 +651,6 @@ QDF_STATUS (*send_ipa_offload_control_cmd)(wmi_unified_t wmi_handle, struct ipa_uc_offload_control_params *ipa_offload); #endif -#ifdef WLAN_FEATURE_ROAM_OFFLOAD -QDF_STATUS (*send_set_ric_req_cmd)(wmi_unified_t wmi_handle, void *msg, - uint8_t is_add_ts); - -QDF_STATUS (*send_process_roam_synch_complete_cmd)(wmi_unified_t wmi_handle, - uint8_t vdev_id); -#endif - QDF_STATUS (*send_process_ll_stats_clear_cmd) (wmi_unified_t wmi_handle, const struct ll_stats_clear_params *clear_req, @@ -688,6 +727,15 @@ QDF_STATUS (*extract_gtk_rsp_event)(wmi_unified_t wmi_handle, void *evt_buf, struct pmo_gtk_rsp_params *gtk_rsp_param, uint32_t len); +QDF_STATUS (*send_wow_delete_pattern_cmd)(wmi_unified_t wmi_handle, + uint8_t ptrn_id, + uint8_t vdev_id); + +QDF_STATUS (*send_host_wakeup_ind_to_fw_cmd)(wmi_unified_t wmi_handle); + +QDF_STATUS (*send_wow_timer_pattern_cmd)(wmi_unified_t wmi_handle, + uint8_t vdev_id, uint32_t cookie, uint32_t time); +#ifdef FEATURE_WLAN_LPHB QDF_STATUS (*send_lphb_config_hbenable_cmd)(wmi_unified_t wmi_handle, wmi_hb_set_enable_cmd_fixed_param *params); @@ -702,7 +750,7 @@ QDF_STATUS (*send_lphb_config_udp_params_cmd)(wmi_unified_t wmi_handle, QDF_STATUS (*send_lphb_config_udp_pkt_filter_cmd)(wmi_unified_t wmi_handle, wmi_hb_set_udp_pkt_filter_cmd_fixed_param *lphb_conf_req); - +#endif /* FEATURE_WLAN_LPHB */ #ifdef WLAN_FEATURE_PACKET_FILTERING QDF_STATUS (*send_enable_disable_packet_filter_cmd)(wmi_unified_t wmi_handle, uint8_t vdev_id, bool enable); @@ -713,22 +761,9 @@ QDF_STATUS (*send_config_packet_filter_cmd)(wmi_unified_t wmi_handle, #endif #endif /* end of WLAN_POWER_MANAGEMENT_OFFLOAD */ #ifdef CONFIG_MCL -QDF_STATUS (*send_process_dhcp_ind_cmd)(wmi_unified_t wmi_handle, - wmi_peer_set_param_cmd_fixed_param *ta_dhcp_ind); - -QDF_STATUS (*send_get_link_speed_cmd)(wmi_unified_t wmi_handle, - wmi_mac_addr peer_macaddr); - QDF_STATUS (*send_bcn_buf_ll_cmd)(wmi_unified_t wmi_handle, wmi_bcn_send_from_host_cmd_fixed_param * param); -QDF_STATUS (*send_roam_scan_offload_mode_cmd)(wmi_unified_t wmi_handle, - wmi_start_scan_cmd_fixed_param * scan_cmd_fp, - struct roam_offload_scan_params *roam_req); - -QDF_STATUS (*send_roam_scan_offload_ap_profile_cmd)(wmi_unified_t wmi_handle, - struct ap_profile_params *ap_profile); - QDF_STATUS (*send_pktlog_wmi_send_cmd)(wmi_unified_t wmi_handle, WMI_PKTLOG_EVENT pktlog_event, WMI_CMD_ID cmd_id, uint8_t user_triggered); @@ -739,11 +774,6 @@ QDF_STATUS (*send_egap_conf_params_cmd)(wmi_unified_t wmi_handle, struct wlan_green_ap_egap_params *egap_params); #endif -QDF_STATUS (*send_fw_profiling_cmd)(wmi_unified_t wmi_handle, - uint32_t cmd, uint32_t value1, uint32_t value2); - -QDF_STATUS (*send_nat_keepalive_en_cmd)(wmi_unified_t wmi_handle, uint8_t vdev_id); - #ifdef WLAN_FEATURE_CIF_CFR QDF_STATUS (*send_oem_dma_cfg_cmd)(wmi_unified_t wmi_handle, wmi_oem_dma_ring_cfg_req_fixed_param *cfg); @@ -757,11 +787,17 @@ QDF_STATUS (*send_dfs_phyerr_filter_offload_en_cmd)(wmi_unified_t wmi_handle, bool dfs_phyerr_filter_offload); -QDF_STATUS (*send_wow_delete_pattern_cmd)(wmi_unified_t wmi_handle, uint8_t ptrn_id, - uint8_t vdev_id); +QDF_STATUS (*send_bss_color_change_enable_cmd)(wmi_unified_t wmi_handle, + uint32_t vdev_id, + bool enable); -QDF_STATUS (*send_host_wakeup_ind_to_fw_cmd)(wmi_unified_t wmi_handle); +QDF_STATUS (*send_obss_color_collision_cfg_cmd)(wmi_unified_t wmi_handle, + struct wmi_obss_color_collision_cfg_param *cfg); +QDF_STATUS (*extract_obss_color_collision_info)(uint8_t *evt_buf, + struct wmi_obss_color_collision_info *info); + +#ifdef WMI_STA_SUPPORT QDF_STATUS (*send_del_ts_cmd)(wmi_unified_t wmi_handle, uint8_t vdev_id, uint8_t ac); @@ -780,31 +816,100 @@ QDF_STATUS (*send_process_del_periodic_tx_ptrn_cmd)(wmi_unified_t wmi_handle, uint8_t vdev_id, uint8_t pattern_id); -QDF_STATUS (*send_stats_ext_req_cmd)(wmi_unified_t wmi_handle, - struct stats_ext_params *preq); - -QDF_STATUS (*send_enable_ext_wow_cmd)(wmi_unified_t wmi_handle, - struct ext_wow_params *params); - -QDF_STATUS (*send_set_app_type2_params_in_fw_cmd)(wmi_unified_t wmi_handle, - struct app_type2_params *appType2Params); - QDF_STATUS (*send_set_auto_shutdown_timer_cmd)(wmi_unified_t wmi_handle, uint32_t timer_val); +#ifdef WLAN_FEATURE_NAN QDF_STATUS (*send_nan_req_cmd)(wmi_unified_t wmi_handle, struct nan_req_params *nan_req); - -QDF_STATUS (*send_process_dhcpserver_offload_cmd)(wmi_unified_t wmi_handle, - struct dhcp_offload_info_params *params); +#endif QDF_STATUS (*send_process_ch_avoid_update_cmd)(wmi_unified_t wmi_handle); -QDF_STATUS (*send_regdomain_info_to_fw_cmd)(wmi_unified_t wmi_handle, - uint32_t reg_dmn, uint16_t regdmn2G, - uint16_t regdmn5G, uint8_t ctl2G, - uint8_t ctl5G); +QDF_STATUS (*send_process_set_ie_info_cmd)(wmi_unified_t wmi_handle, + struct vdev_ie_info_param *ie_info); +QDF_STATUS (*send_set_base_macaddr_indicate_cmd)(wmi_unified_t wmi_handle, + uint8_t *custom_addr); + +QDF_STATUS (*send_pdev_set_pcl_cmd)(wmi_unified_t wmi_handle, + struct wmi_pcl_chan_weights *msg); + +QDF_STATUS (*send_pdev_set_hw_mode_cmd)(wmi_unified_t wmi_handle, + uint32_t hw_mode_index); + +#ifdef WLAN_POLICY_MGR_ENABLE +QDF_STATUS (*send_pdev_set_dual_mac_config_cmd)(wmi_unified_t wmi_handle, + struct policy_mgr_dual_mac_config *msg); +#endif + +QDF_STATUS (*send_set_led_flashing_cmd)(wmi_unified_t wmi_handle, + struct flashing_req_params *flashing); + +QDF_STATUS (*send_set_arp_stats_req_cmd)(wmi_unified_t wmi_handle, + struct set_arp_stats *req_buf); + +QDF_STATUS (*send_get_arp_stats_req_cmd)(wmi_unified_t wmi_handle, + struct get_arp_stats *req_buf); + +QDF_STATUS (*send_set_del_pmkid_cache_cmd) (wmi_unified_t wmi_handle, + struct wmi_unified_pmk_cache *req_buf); + +QDF_STATUS (*send_adapt_dwelltime_params_cmd)(wmi_unified_t wmi_handle, + struct wmi_adaptive_dwelltime_params *dwelltime_params); + +QDF_STATUS (*send_dbs_scan_sel_params_cmd)(wmi_unified_t wmi_handle, + struct wmi_dbs_scan_sel_params *dbs_scan_params); + +QDF_STATUS (*send_vdev_set_gtx_cfg_cmd)(wmi_unified_t wmi_handle, + uint32_t if_id, + struct wmi_gtx_config *gtx_info); + +QDF_STATUS (*send_set_sta_keep_alive_cmd)(wmi_unified_t wmi_handle, + struct sta_params *params); + +QDF_STATUS (*send_set_sta_sa_query_param_cmd)(wmi_unified_t wmi_handle, + uint8_t vdev_id, uint32_t max_retries, + uint32_t retry_interval); + +QDF_STATUS (*send_fw_profiling_cmd)(wmi_unified_t wmi_handle, + uint32_t cmd, uint32_t value1, uint32_t value2); + +QDF_STATUS (*send_nat_keepalive_en_cmd)(wmi_unified_t wmi_handle, + uint8_t vdev_id); + +QDF_STATUS (*send_process_dhcp_ind_cmd)(wmi_unified_t wmi_handle, + wmi_peer_set_param_cmd_fixed_param *ta_dhcp_ind); + +QDF_STATUS (*send_get_link_speed_cmd)(wmi_unified_t wmi_handle, + wmi_mac_addr peer_macaddr); + +QDF_STATUS (*send_wlm_latency_level_cmd)(wmi_unified_t wmi_handle, + struct wlm_latency_level_param *param); + +QDF_STATUS (*send_sar_limit_cmd)(wmi_unified_t wmi_handle, + struct sar_limit_cmd_params *params); + +QDF_STATUS (*get_sar_limit_cmd)(wmi_unified_t wmi_handle); + +QDF_STATUS (*extract_sar_limit_event)(wmi_unified_t wmi_handle, + uint8_t *evt_buf, + struct sar_limit_event *event); + +QDF_STATUS (*extract_sar2_result_event)(void *handle, + uint8_t *event, + uint32_t len); + +#ifdef WLAN_FEATURE_DISA +QDF_STATUS (*send_encrypt_decrypt_send_cmd)(wmi_unified_t wmi_handle, + struct disa_encrypt_decrypt_req_params *params); + +QDF_STATUS (*extract_encrypt_decrypt_resp_event)(wmi_unified_t wmi_handle, + void *evt_buf, + struct disa_encrypt_decrypt_resp_params *resp); +#endif + +#ifdef CONVERGED_TDLS_ENABLE QDF_STATUS (*send_set_tdls_offchan_mode_cmd)(wmi_unified_t wmi_handle, struct tdls_channel_switch_params *chan_switch_params); @@ -812,23 +917,43 @@ QDF_STATUS (*send_update_fw_tdls_state_cmd)(wmi_unified_t wmi_handle, void *tdls_param, uint8_t tdls_state); QDF_STATUS (*send_update_tdls_peer_state_cmd)(wmi_unified_t wmi_handle, - struct tdls_peer_state_params *peerStateParams, - uint32_t *ch_mhz); + struct tdls_peer_state_params *peerStateParams, + uint32_t *ch_mhz); +QDF_STATUS (*extract_vdev_tdls_ev_param)(wmi_unified_t wmi_handle, + void *evt_buf, struct tdls_event_info *param); +#endif /* CONVERGED_TDLS_ENABLE */ +#endif /* WMI_STA_SUPPORT */ + +QDF_STATUS (*send_stats_ext_req_cmd)(wmi_unified_t wmi_handle, + struct stats_ext_params *preq); + +#ifdef WLAN_FEATURE_EXTWOW_SUPPORT +QDF_STATUS (*send_enable_ext_wow_cmd)(wmi_unified_t wmi_handle, + struct ext_wow_params *params); + +QDF_STATUS (*send_set_app_type2_params_in_fw_cmd)(wmi_unified_t wmi_handle, + struct app_type2_params *appType2Params); + +QDF_STATUS (*send_app_type1_params_in_fw_cmd)(wmi_unified_t wmi_handle, + struct app_type1_params *app_type1_params); +#endif /* WLAN_FEATURE_EXTWOW_SUPPORT */ + +QDF_STATUS (*send_process_dhcpserver_offload_cmd)(wmi_unified_t wmi_handle, + struct dhcp_offload_info_params *params); + +QDF_STATUS (*send_regdomain_info_to_fw_cmd)(wmi_unified_t wmi_handle, + uint32_t reg_dmn, uint16_t regdmn2G, + uint16_t regdmn5G, uint8_t ctl2G, + uint8_t ctl5G); QDF_STATUS (*send_process_fw_mem_dump_cmd)(wmi_unified_t wmi_handle, struct fw_dump_req_param *mem_dump_req); -QDF_STATUS (*send_process_set_ie_info_cmd)(wmi_unified_t wmi_handle, - struct vdev_ie_info_param *ie_info); - QDF_STATUS (*save_fw_version_cmd)(wmi_unified_t wmi_handle, void *evt_buf); QDF_STATUS (*check_and_update_fw_version_cmd)(wmi_unified_t wmi_hdl, void *ev); -QDF_STATUS (*send_set_base_macaddr_indicate_cmd)(wmi_unified_t wmi_handle, - uint8_t *custom_addr); - QDF_STATUS (*send_log_supported_evt_cmd)(wmi_unified_t wmi_handle, uint8_t *event, uint32_t len); @@ -838,59 +963,12 @@ QDF_STATUS (*send_enable_specific_fw_logs_cmd)(wmi_unified_t wmi_handle, QDF_STATUS (*send_flush_logs_to_fw_cmd)(wmi_unified_t wmi_handle); -QDF_STATUS (*send_pdev_set_pcl_cmd)(wmi_unified_t wmi_handle, - struct wmi_pcl_chan_weights *msg); - -QDF_STATUS (*send_pdev_set_hw_mode_cmd)(wmi_unified_t wmi_handle, - uint32_t hw_mode_index); - -QDF_STATUS (*send_pdev_set_dual_mac_config_cmd)(wmi_unified_t wmi_handle, - struct policy_mgr_dual_mac_config *msg); - -QDF_STATUS (*send_set_led_flashing_cmd)(wmi_unified_t wmi_handle, - struct flashing_req_params *flashing); - -QDF_STATUS (*send_app_type1_params_in_fw_cmd)(wmi_unified_t wmi_handle, - struct app_type1_params *app_type1_params); - QDF_STATUS (*send_set_ssid_hotlist_cmd)(wmi_unified_t wmi_handle, struct ssid_hotlist_request_params *request); QDF_STATUS (*send_unit_test_cmd)(wmi_unified_t wmi_handle, struct wmi_unit_test_cmd *wmi_utest); -QDF_STATUS (*send_roam_invoke_cmd)(wmi_unified_t wmi_handle, - struct wmi_roam_invoke_cmd *roaminvoke, - uint32_t ch_hz); - -QDF_STATUS (*send_roam_scan_offload_cmd)(wmi_unified_t wmi_handle, - uint32_t command, uint32_t vdev_id); - -QDF_STATUS (*send_roam_scan_offload_scan_period_cmd)(wmi_unified_t wmi_handle, - uint32_t scan_period, - uint32_t scan_age, - uint32_t vdev_id); - -QDF_STATUS (*send_roam_scan_offload_chan_list_cmd)(wmi_unified_t wmi_handle, - uint8_t chan_count, - uint32_t *chan_list, - uint8_t list_type, uint32_t vdev_id); - -QDF_STATUS (*send_roam_scan_offload_rssi_change_cmd)(wmi_unified_t wmi_handle, - uint32_t vdev_id, - int32_t rssi_change_thresh, - uint32_t bcn_rssi_weight, - uint32_t hirssi_delay_btw_scans); - -QDF_STATUS (*send_per_roam_config_cmd)(wmi_unified_t wmi_handle, - struct wmi_per_roam_config_req *req_buf); - -QDF_STATUS (*send_set_arp_stats_req_cmd)(wmi_unified_t wmi_handle, - struct set_arp_stats *req_buf); - -QDF_STATUS (*send_get_arp_stats_req_cmd)(wmi_unified_t wmi_handle, - struct get_arp_stats *req_buf); - #ifdef FEATURE_WLAN_APF QDF_STATUS (*send_set_active_apf_mode_cmd)(wmi_unified_t wmi_handle, uint8_t vdev_id, @@ -1027,8 +1105,6 @@ QDF_STATUS (*send_vdev_spectral_configure_cmd)(wmi_unified_t wmi_handle, QDF_STATUS (*send_vdev_spectral_enable_cmd)(wmi_unified_t wmi_handle, struct vdev_spectral_enable_params *param); -QDF_STATUS (*send_set_del_pmkid_cache_cmd) (wmi_unified_t wmi_handle, - struct wmi_unified_pmk_cache *req_buf); QDF_STATUS (*send_bss_chan_info_request_cmd)(wmi_unified_t wmi_handle, struct bss_chan_info_request_params *param); @@ -1298,11 +1374,6 @@ QDF_STATUS (*extract_vdev_roam_param)(wmi_unified_t wmi_handle, void *evt_buf, QDF_STATUS (*extract_vdev_scan_ev_param)(wmi_unified_t wmi_handle, void *evt_buf, struct scan_event *param); -#ifdef CONVERGED_TDLS_ENABLE -QDF_STATUS (*extract_vdev_tdls_ev_param)(wmi_unified_t wmi_handle, - void *evt_buf, struct tdls_event_info *param); -#endif - QDF_STATUS (*extract_mu_ev_param)(wmi_unified_t wmi_handle, void *evt_buf, wmi_host_mu_report_event *param); @@ -1479,42 +1550,14 @@ QDF_STATUS (*send_power_dbg_cmd)(wmi_unified_t wmi_handle, QDF_STATUS (*send_multiple_vdev_restart_req_cmd)(wmi_unified_t wmi_handle, struct multiple_vdev_restart_params *param); -QDF_STATUS (*send_adapt_dwelltime_params_cmd)(wmi_unified_t wmi_handle, - struct wmi_adaptive_dwelltime_params *dwelltime_params); - -QDF_STATUS (*send_dbs_scan_sel_params_cmd)(wmi_unified_t wmi_handle, - struct wmi_dbs_scan_sel_params *dbs_scan_params); - QDF_STATUS (*send_fw_test_cmd)(wmi_unified_t wmi_handle, struct set_fwtest_params *wmi_fwtest); -#ifdef WLAN_FEATURE_DISA -QDF_STATUS (*send_encrypt_decrypt_send_cmd)(wmi_unified_t wmi_handle, - struct disa_encrypt_decrypt_req_params *params); - -QDF_STATUS (*extract_encrypt_decrypt_resp_event)(wmi_unified_t wmi_handle, - void *evt_buf, - struct disa_encrypt_decrypt_resp_params *resp); -#endif - #ifdef WLAN_FEATURE_ACTION_OUI QDF_STATUS (*send_action_oui_cmd)(wmi_unified_t wmi_handle, struct action_oui_request *req); #endif /* WLAN_FEATURE_ACTION_OUI */ -QDF_STATUS (*send_sar_limit_cmd)(wmi_unified_t wmi_handle, - struct sar_limit_cmd_params *params); - -QDF_STATUS (*get_sar_limit_cmd)(wmi_unified_t wmi_handle); - -QDF_STATUS (*extract_sar_limit_event)(wmi_unified_t wmi_handle, - uint8_t *evt_buf, - struct sar_limit_event *event); - -QDF_STATUS (*extract_sar2_result_event)(void *handle, - uint8_t *event, - uint32_t len); - QDF_STATUS (*send_peer_rx_reorder_queue_setup_cmd)(wmi_unified_t wmi_handle, struct rx_reorder_queue_setup_params *param); @@ -1643,11 +1686,7 @@ uint32_t (*convert_pdev_id_target_to_host)(uint32_t pdev_id); QDF_STATUS (*send_user_country_code_cmd)(wmi_unified_t wmi_handle, uint8_t pdev_id, struct cc_regdmn_s *rd); -QDF_STATUS (*send_limit_off_chan_cmd)(wmi_unified_t wmi_handle, - struct wmi_limit_off_chan_param *limit_off_chan_param); -QDF_STATUS (*send_wow_timer_pattern_cmd)(wmi_unified_t wmi_handle, - uint8_t vdev_id, uint32_t cookie, uint32_t time); QDF_STATUS (*send_wds_entry_list_cmd)(wmi_unified_t wmi_handle); QDF_STATUS (*extract_wds_entry)(wmi_unified_t wmi_handle, uint8_t *evt_buf, @@ -1678,8 +1717,6 @@ QDF_STATUS (*extract_ndp_sch_update)(wmi_unified_t wmi_handle, uint8_t *data, struct nan_datapath_sch_update_event *ind); #endif /* WLAN_FEATURE_NAN_CONVERGENCE */ -QDF_STATUS (*send_btm_config)(wmi_unified_t wmi_handle, - struct wmi_btm_config *params); QDF_STATUS (*send_obss_detection_cfg_cmd)(wmi_unified_t wmi_handle, struct wmi_obss_detection_cfg_param *obss_cfg_param); QDF_STATUS (*extract_obss_detection_info)(uint8_t *evt_buf, @@ -1708,12 +1745,6 @@ QDF_STATUS void *evt_buf, uint32_t *vdev_id, uint32_t *tx_status); -QDF_STATUS (*send_offload_11k_cmd)(wmi_unified_t wmi_handle, - struct wmi_11k_offload_params *params); - -QDF_STATUS (*send_invoke_neighbor_report_cmd)(wmi_unified_t wmi_handle, - struct wmi_invoke_neighbor_report_params *params); - void (*wmi_pdev_id_conversion_enable)(wmi_unified_t wmi_handle); void (*send_time_stamp_sync_cmd)(wmi_unified_t wmi_handle); void (*wmi_free_allocated_event)(uint32_t cmd_event_id, @@ -1725,13 +1756,7 @@ int (*wmi_check_and_pad_event)(void *os_handle, void *param_struc_ptr, int (*wmi_check_command_params)(void *os_handle, void *param_struc_ptr, uint32_t param_buf_len, uint32_t wmi_cmd_event_id); -QDF_STATUS (*send_bss_color_change_enable_cmd)(wmi_unified_t wmi_handle, - uint32_t vdev_id, - bool enable); -QDF_STATUS (*send_obss_color_collision_cfg_cmd)(wmi_unified_t wmi_handle, - struct wmi_obss_color_collision_cfg_param *cfg); -QDF_STATUS (*extract_obss_color_collision_info)(uint8_t *evt_buf, - struct wmi_obss_color_collision_info *info); + #ifdef WLAN_SUPPORT_TWT QDF_STATUS (*send_twt_enable_cmd)(wmi_unified_t wmi_handle, struct wmi_twt_enable_param *params); @@ -1989,6 +2014,181 @@ static inline void wmi_ap_attach_tlv(struct wmi_unified *wmi_handle) } #endif +#ifdef WLAN_FEATURE_DSRC +void wmi_ocb_attach_tlv(wmi_unified_t wmi_handle); +#else +static inline void wmi_ocb_attach_tlv(wmi_unified_t wmi_handle) +{ +} +#endif + +#ifdef WLAN_FEATURE_NAN_CONVERGENCE +void wmi_nan_attach_tlv(wmi_unified_t wmi_handle); +#else +static inline void wmi_nan_attach_tlv(wmi_unified_t wmi_handle) +{ +} +#endif + +#ifdef FEATURE_P2P_LISTEN_OFFLOAD +void wmi_p2p_listen_offload_attach_tlv(wmi_unified_t wmi_handle); +#else +static inline +void wmi_p2p_listen_offload_attach_tlv(wmi_unified_t wmi_handle) +{ +} +#endif + +#ifdef CONVERGED_P2P_ENABLE +void wmi_p2p_attach_tlv(wmi_unified_t wmi_handle); +#else +static inline void wmi_p2p_attach_tlv(struct wmi_unified *wmi_handle) +{ +} +#endif + +#ifdef FEATURE_LFR_SUBNET_DETECTION +void wmi_lfr_subnet_detection_attach_tlv(wmi_unified_t wmi_handle); +#else +static inline +void wmi_lfr_subnet_detection_attach_tlv(struct wmi_unified *wmi_handle) +{ +} +#endif + +#ifdef FEATURE_RSSI_MONITOR +void wmi_rssi_monitor_attach_tlv(wmi_unified_t wmi_handle); +#else +static inline +void wmi_rssi_monitor_attach_tlv(struct wmi_unified *wmi_handle) +{ +} +#endif + +#ifdef FEATURE_WLAN_ESE +void wmi_ese_attach_tlv(wmi_unified_t wmi_handle); +#else +static inline void wmi_ese_attach_tlv(struct wmi_unified *wmi_handle) +{ +} +#endif + +#ifdef WLAN_FEATURE_ROAM_OFFLOAD +void wmi_roam_offload_attach_tlv(wmi_unified_t wmi_handle); +#else +static inline +void wmi_roam_offload_attach_tlv(struct wmi_unified *wmi_handle) +{ +} +#endif + +#ifdef WLAN_FEATURE_FILS_SK +void wmi_fils_sk_attach_tlv(wmi_unified_t wmi_handle); +#else +static inline void wmi_fils_sk_attach_tlv(struct wmi_unified *wmi_handle) +{ +} +#endif + +#ifdef WMI_ROAM_SUPPORT +void wmi_roam_attach_tlv(struct wmi_unified *wmi_handle); +#else +static inline void wmi_roam_attach_tlv(struct wmi_unified *wmi_handle) +{ +} +#endif + +#ifdef WMI_CONCURRENCY_SUPPORT +void wmi_concurrency_attach_tlv(struct wmi_unified *wmi_handle); +#else +static inline void wmi_concurrency_attach_tlv(struct wmi_unified *wmi_handle) +{ +} +#endif + +#ifdef FEATURE_WLAN_D0WOW +void wmi_d0wow_attach_tlv(struct wmi_unified *wmi_handle); +#else +static inline void wmi_d0wow_attach_tlv(struct wmi_unified *wmi_handle) +{ +} +#endif + +#ifdef FEATURE_WLAN_RA_FILTERING +void wmi_ra_filtering_attach_tlv(struct wmi_unified *wmi_handle); +#else +static inline +void wmi_ra_filtering_attach_tlv(struct wmi_unified *wmi_handle) +{ +} +#endif + +#ifdef FEATURE_WLAN_LPHB +void wmi_lphb_attach_tlv(struct wmi_unified *wmi_handle); +#else +static inline void wmi_lphb_attach_tlv(struct wmi_unified *wmi_handle) +{ +} +#endif + +#ifdef WLAN_FEATURE_PACKET_FILTERING +void wmi_packet_filtering_attach_tlv(struct wmi_unified *wmi_handle); +#else +static inline +void wmi_packet_filtering_attach_tlv(struct wmi_unified *wmi_handle) +{ +} +#endif + +#ifdef WLAN_FEATURE_EXTWOW_SUPPORT +void wmi_extwow_attach_tlv(struct wmi_unified *wmi_handle); +#else +static inline void wmi_extwow_attach_tlv(struct wmi_unified *wmi_handle) +{ +} +#endif + +#ifdef WLAN_POWER_MANAGEMENT_OFFLOAD +void wmi_pmo_attach_tlv(struct wmi_unified *wmi_handle); +#else +static inline void wmi_pmo_attach_tlv(struct wmi_unified *wmi_handle) +{ +} +#endif + +#ifdef CONVERGED_TDLS_ENABLE +void wmi_tdls_attach_tlv(struct wmi_unified *wmi_handle); +#else +static inline void wmi_tdls_attach_tlv(struct wmi_unified *wmi_handle) +{ +} +#endif + +#ifdef WLAN_FEATURE_DISA +void wmi_disa_attach_tlv(struct wmi_unified *wmi_handle); +#else +static inline void wmi_disa_attach_tlv(struct wmi_unified *wmi_handle) +{ +} +#endif + +#ifdef WLAN_POLICY_MGR_ENABLE +void wmi_policy_mgr_attach_tlv(struct wmi_unified *wmi_handle); +#else +static inline +void wmi_policy_mgr_attach_tlv(struct wmi_unified *wmi_handle) +{ +} +#endif + +#ifdef WMI_STA_SUPPORT +void wmi_sta_attach_tlv(struct wmi_unified *wmi_handle); +#else +static inline void wmi_sta_attach_tlv(struct wmi_unified *wmi_handle) +{ +} +#endif + /** * wmi_align() - provides word aligned parameter * @param: parameter to be aligned diff --git a/wmi_unified_roam_api.h b/wmi_unified_roam_api.h new file mode 100644 index 0000000000..12ae77a27c --- /dev/null +++ b/wmi_unified_roam_api.h @@ -0,0 +1,324 @@ +/* + * Copyright (c) 2013-2018 The Linux Foundation. All rights reserved. + * + * Permission to use, copy, modify, and/or distribute this software for + * any purpose with or without fee is hereby granted, provided that the + * above copyright notice and this permission notice appear in all + * copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL + * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE + * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL + * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR + * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ +/** + * DOC: Implement API's specific to ROAMING component. + */ + +#ifndef _WMI_UNIFIED_ROAM_API_H_ +#define _WMI_UNIFIED_ROAM_API_H_ + +#include + +#ifdef FEATURE_LFR_SUBNET_DETECTION +/** + * wmi_unified_set_gateway_params_cmd() - set gateway parameters + * @wmi_hdl: wmi handle + * @req: gateway parameter update request structure + * + * This function reads the incoming @req and fill in the destination + * WMI structure and sends down the gateway configs down to the firmware + * + * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failures; + * error number otherwise + */ +QDF_STATUS wmi_unified_set_gateway_params_cmd(void *wmi_hdl, + struct gateway_update_req_param *req); +#endif + +#ifdef FEATURE_RSSI_MONITOR +/** + * wmi_unified_set_rssi_monitoring_cmd() - set rssi monitoring + * @wmi_hdl: wmi handle + * @req: rssi monitoring request structure + * + * This function reads the incoming @req and fill in the destination + * WMI structure and send down the rssi monitoring configs down to the firmware + * + * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failures; + * error number otherwise + */ +QDF_STATUS wmi_unified_set_rssi_monitoring_cmd(void *wmi_hdl, + struct rssi_monitor_param *req); +#endif + +/** + * wmi_unified_roam_scan_offload_rssi_thresh_cmd() - set roam scan rssi + * parameters + * @wmi_hdl: wmi handle + * @roam_req: roam rssi related parameters + * + * This function reads the incoming @roam_req and fill in the destination + * WMI structure and send down the roam scan rssi configs down to the firmware + * + * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure + */ +QDF_STATUS wmi_unified_roam_scan_offload_rssi_thresh_cmd(void *wmi_hdl, + struct roam_offload_scan_rssi_params *roam_req); + +/** + * wmi_unified_roam_mawc_params_cmd() - configure roaming MAWC parameters + * @wmi_hdl: wmi handle + * @params: Parameters to be configured + * + * Pass the MAWC(Motion Aided wireless connectivity) related roaming + * parameters from the host to the target + * + * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure + */ +QDF_STATUS wmi_unified_roam_mawc_params_cmd(void *wmi_hdl, + struct wmi_mawc_roam_params *params); + +/** + * wmi_unified_roam_scan_filter_cmd() - send roam scan whitelist, + * blacklist and preferred list + * @wmi_hdl: wmi handle + * @roam_req: roam scan lists related parameters + * + * This function reads the incoming @roam_req and fill in the destination + * WMI structure and send down the different roam scan lists down to the fw + * + * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure + */ +QDF_STATUS wmi_unified_roam_scan_filter_cmd(void *wmi_hdl, + struct roam_scan_filter_params *roam_req); + +#ifdef FEATURE_WLAN_ESE +/** + * wmi_unified_plm_stop_cmd() - plm stop request + * @wmi_hdl: wmi handle + * @plm: plm request parameters + * + * This function request FW to stop PLM. + * + * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure + */ +QDF_STATUS wmi_unified_plm_stop_cmd(void *wmi_hdl, + const struct plm_req_params *plm); + +/** + * wmi_unified_plm_start_cmd() - plm start request + * @wmi_hdl: wmi handle + * @plm: plm request parameters + * + * This function request FW to start PLM. + * + * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure + */ +QDF_STATUS wmi_unified_plm_start_cmd(void *wmi_hdl, + const struct plm_req_params *plm, + uint32_t *gchannel_list); +#endif /* FEATURE_WLAN_ESE */ + +#ifdef WLAN_FEATURE_ROAM_OFFLOAD +/* wmi_unified_set_ric_req_cmd() - set ric request element + * @wmi_hdl: wmi handle + * @msg: message + * @is_add_ts: is addts required + * + * This function sets ric request element for 11r roaming. + * + * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure + */ +QDF_STATUS wmi_unified_set_ric_req_cmd(void *wmi_hdl, void *msg, + uint8_t is_add_ts); + +/** + * wmi_unified_roam_synch_complete_cmd() - roam synch complete command to fw. + * @wmi_hdl: wmi handle + * @vdev_id: vdev id + * + * This function sends roam synch complete event to fw. + * + * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure + */ +QDF_STATUS wmi_unified_roam_synch_complete_cmd(void *wmi_hdl, + uint8_t vdev_id); + +/** + * wmi_unified__roam_invoke_cmd() - send roam invoke command to fw. + * @wmi_hdl: wmi handle + * @roaminvoke: roam invoke command + * + * Send roam invoke command to fw for fastreassoc. + * + * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure + */ +QDF_STATUS wmi_unified_roam_invoke_cmd(void *wmi_hdl, + struct wmi_roam_invoke_cmd *roaminvoke, + uint32_t ch_hz); +#endif /* WLAN_FEATURE_ROAM_OFFLOAD */ + +/** + * wmi_unified_roam_scan_offload_mode_cmd() - set roam scan parameters + * @wmi_hdl: wmi handle + * @scan_cmd_fp: scan related parameters + * @roam_req: roam related parameters + * + * This function reads the incoming @roam_req and fill in the destination + * WMI structure and send down the roam scan configs down to the firmware + * + * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure + */ +QDF_STATUS wmi_unified_roam_scan_offload_mode_cmd(void *wmi_hdl, + wmi_start_scan_cmd_fixed_param *scan_cmd_fp, + struct roam_offload_scan_params *roam_req); + +/** + * wmi_unified_send_roam_scan_offload_ap_cmd() - set roam ap profile in fw + * @wmi_hdl: wmi handle + * @ap_profile: ap profile params + * + * Send WMI_ROAM_AP_PROFILE to firmware + * + * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure + */ +QDF_STATUS wmi_unified_send_roam_scan_offload_ap_cmd(void *wmi_hdl, + struct ap_profile_params *ap_profile); + +/** + * wmi_unified_roam_scan_offload_cmd() - set roam offload command + * @wmi_hdl: wmi handle + * @command: command + * @vdev_id: vdev id + * + * This function set roam offload command to fw. + * + * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure + */ +QDF_STATUS wmi_unified_roam_scan_offload_cmd(void *wmi_hdl, + uint32_t command, + uint32_t vdev_id); + +/** + * wmi_unified_roam_scan_offload_scan_period() - set roam offload scan period + * @wmi_handle: wmi handle + * @scan_period: scan period + * @scan_age: scan age + * @vdev_id: vdev id + * + * Send WMI_ROAM_SCAN_PERIOD parameters to fw. + * + * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure + */ +QDF_STATUS wmi_unified_roam_scan_offload_scan_period(void *wmi_hdl, + uint32_t scan_period, + uint32_t scan_age, + uint32_t vdev_id); + +/** + * wmi_unified_roam_scan_offload_chan_list_cmd() - set roam offload channel list + * @wmi_handle: wmi handle + * @chan_count: channel count + * @chan_list: channel list + * @list_type: list type + * @vdev_id: vdev id + * + * Set roam offload channel list. + * + * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure + */ +QDF_STATUS wmi_unified_roam_scan_offload_chan_list_cmd(void *wmi_hdl, + uint8_t chan_count, + uint32_t *chan_list, + uint8_t list_type, + uint32_t vdev_id); + +/** + * wmi_unified_roam_scan_offload_rssi_change_cmd() - set roam offload RSSI th + * @wmi_hdl: wmi handle + * @rssi_change_thresh: RSSI Change threshold + * @bcn_rssi_weight: beacon RSSI weight + * @vdev_id: vdev id + * + * Send WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD parameters to fw. + * + * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure + */ +QDF_STATUS wmi_unified_roam_scan_offload_rssi_change_cmd(void *wmi_hdl, + uint32_t vdev_id, + int32_t rssi_change_thresh, + uint32_t bcn_rssi_weight, + uint32_t hirssi_delay_btw_scans); + +/** + * wmi_unified_set_per_roam_config() - set PER roam config in FW + * @wmi_hdl: wmi handle + * @req_buf: per roam config request buffer + * + * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure + */ +QDF_STATUS wmi_unified_set_per_roam_config(void *wmi_hdl, + struct wmi_per_roam_config_req *req_buf); + +/** + * wmi_unified_send_limit_off_chan_cmd() - send wmi cmd of limit off channel + * configuration params + * @wmi_hdl: wmi handler + * @limit_off_chan_param: pointer to wmi_limit_off_chan_param + * + * Return: QDF_STATUS_SUCCESS on success and QDF failure reason code on failure + */ +QDF_STATUS wmi_unified_send_limit_off_chan_cmd(void *wmi_hdl, + struct wmi_limit_off_chan_param *wmi_param); + +#ifdef WLAN_FEATURE_FILS_SK +/* + * wmi_unified_roam_send_hlp_cmd() -send HLP command info + * @wmi_hdl: wma handle + * @req_buf: Pointer to HLP params + * + * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure + */ +QDF_STATUS wmi_unified_roam_send_hlp_cmd(void *wmi_hdl, + struct hlp_params *req_buf); +#endif /* WLAN_FEATURE_FILS_SK */ + +/** + * wmi_unified_send_btm_config() - Send BTM config to fw + * @wmi_hdl: wmi handle + * @params: pointer to wmi_btm_config + * + * Return: QDF_STATUS + */ +QDF_STATUS wmi_unified_send_btm_config(void *wmi_hdl, + struct wmi_btm_config *params); + +/** + * wmi_unified_offload_11k_cmd() - send 11k offload command + * @wmi_hdl: wmi handle + * @params: 11k offload params + * + * This function passes the 11k offload command params to FW + * + * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure + */ +QDF_STATUS wmi_unified_offload_11k_cmd(void *wmi_hdl, + struct wmi_11k_offload_params *params); +/** + * wmi_unified_invoke_neighbor_report_cmd() - send invoke neighbor report cmd + * @wmi_hdl: wmi handle + * @params: invoke neighbor report params + * + * This function passes the invoke neighbor report command to fw + * + * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure + */ +QDF_STATUS wmi_unified_invoke_neighbor_report_cmd(void *wmi_hdl, + struct wmi_invoke_neighbor_report_params *params); + +#endif /* _WMI_UNIFIED_ROAM_API_H_ */ diff --git a/wmi_unified_roam_param.h b/wmi_unified_roam_param.h new file mode 100644 index 0000000000..3daac3bcf5 --- /dev/null +++ b/wmi_unified_roam_param.h @@ -0,0 +1,579 @@ +/* + * Copyright (c) 2013-2018 The Linux Foundation. All rights reserved. + * + * Permission to use, copy, modify, and/or distribute this software for + * any purpose with or without fee is hereby granted, provided that the + * above copyright notice and this permission notice appear in all + * copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL + * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE + * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL + * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR + * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ + +/* + * This file contains the API definitions for the ROAMING WMI APIs. + */ + +#ifndef _WMI_UNIFIED_ROAM_PARAM_H_ +#define _WMI_UNIFIED_ROAM_PARAM_H_ + +/** + * struct gateway_update_req_param - gateway parameter update request + * @request_id: request id + * @session_id: session id + * @max_retries: Max ARP/NS retry attempts + * @timeout: Retry interval + * @ipv4_addr_type: on ipv4 network + * @ipv6_addr_type: on ipv6 network + * @gw_mac_addr: gateway mac addr + * @ipv4_addr: ipv4 addr + * @ipv6_addr: ipv6 addr + */ +struct gateway_update_req_param { + uint32_t request_id; + uint32_t session_id; + uint32_t max_retries; + uint32_t timeout; + uint32_t ipv4_addr_type; + uint32_t ipv6_addr_type; + struct qdf_mac_addr gw_mac_addr; + uint8_t ipv4_addr[QDF_IPV4_ADDR_SIZE]; + uint8_t ipv6_addr[QDF_IPV6_ADDR_SIZE]; +}; + +/** + * struct rssi_monitor_param - rssi monitoring + * @request_id: request id + * @session_id: session id + * @min_rssi: minimum rssi + * @max_rssi: maximum rssi + * @control: flag to indicate start or stop + */ +struct rssi_monitor_param { + uint32_t request_id; + uint32_t session_id; + int8_t min_rssi; + int8_t max_rssi; + bool control; +}; + +/** + * struct roam_offload_scan_rssi_params - structure containing + * parameters for roam offload scan based on RSSI + * @rssi_thresh: rssi threshold + * @rssi_thresh_diff: difference in rssi threshold + * @hi_rssi_scan_max_count: 5G scan max count + * @hi_rssi_scan_rssi_delta: 5G scan rssi change threshold value + * @hi_rssi_scan_rssi_ub: 5G scan upper bound + * @raise_rssi_thresh_5g: flag to determine penalty and boost thresholds + * @session_id: vdev id + * @penalty_threshold_5g: RSSI threshold below which 5GHz RSSI is penalized + * @boost_threshold_5g: RSSI threshold above which 5GHz RSSI is favored + * @raise_factor_5g: factor by which 5GHz RSSI is boosted + * @drop_factor_5g: factor by which 5GHz RSSI is penalized + * @max_raise_rssi_5g: maximum boost that can be applied to a 5GHz RSSI + * @max_drop_rssi_5g: maximum penalty that can be applied to a 5GHz RSSI + * @good_rssi_threshold: RSSI below which roam is kicked in by background + * scan although rssi is still good + * @roam_earlystop_thres_min: Minimum RSSI threshold value for early stop, + * unit is dB above NF + * @roam_earlystop_thres_max: Maximum RSSI threshold value for early stop, + * unit is dB above NF + * @dense_rssi_thresh_offset: dense roam RSSI threshold difference + * @dense_min_aps_cnt: dense roam minimum APs + * @initial_dense_status: dense status detected by host + * @traffic_threshold: dense roam RSSI threshold + * @bg_scan_bad_rssi_thresh: Bad RSSI threshold to perform bg scan + * @roam_bad_rssi_thresh_offset_2g: Offset from Bad RSSI threshold for 2G + * to 5G Roam + * @bg_scan_client_bitmap: Bitmap used to identify the client scans to snoop + * @flags: Flags for Background Roaming + * Bit 0 : BG roaming enabled when we connect to 2G AP only and roaming + * to 5G AP only. + * Bit 1-31: Reserved + */ +struct roam_offload_scan_rssi_params { + int8_t rssi_thresh; + uint8_t rssi_thresh_diff; + uint32_t hi_rssi_scan_max_count; + uint32_t hi_rssi_scan_rssi_delta; + int32_t hi_rssi_scan_rssi_ub; + int raise_rssi_thresh_5g; + uint8_t session_id; + uint32_t penalty_threshold_5g; + uint32_t boost_threshold_5g; + uint8_t raise_factor_5g; + uint8_t drop_factor_5g; + int max_raise_rssi_5g; + int max_drop_rssi_5g; + uint32_t good_rssi_threshold; + uint32_t roam_earlystop_thres_min; + uint32_t roam_earlystop_thres_max; + int dense_rssi_thresh_offset; + int dense_min_aps_cnt; + int initial_dense_status; + int traffic_threshold; + int32_t rssi_thresh_offset_5g; + int8_t bg_scan_bad_rssi_thresh; + uint8_t roam_bad_rssi_thresh_offset_2g; + uint32_t bg_scan_client_bitmap; + uint32_t flags; +}; + +/** + * struct wmi_mawc_roam_params - Motion Aided wireless connectivity params + * @vdev_id: VDEV on which the parameters should be applied + * @enable: MAWC roaming feature enable/disable + * @traffic_load_threshold: Traffic threshold in kBps for MAWC roaming + * @best_ap_rssi_threshold: AP RSSI Threshold for MAWC roaming + * @rssi_stationary_high_adjust: High RSSI adjustment value to suppress scan + * @rssi_stationary_low_adjust: Low RSSI adjustment value to suppress scan + */ +struct wmi_mawc_roam_params { + uint8_t vdev_id; + bool enable; + uint32_t traffic_load_threshold; + uint32_t best_ap_rssi_threshold; + uint8_t rssi_stationary_high_adjust; + uint8_t rssi_stationary_low_adjust; +}; + +#define MAX_SSID_ALLOWED_LIST 4 +#define MAX_BSSID_AVOID_LIST 16 +#define MAX_BSSID_FAVORED 16 +#define MAX_RSSI_AVOID_BSSID_LIST 10 + +/** + * struct rssi_disallow_bssid - Structure holding Rssi based avoid candidate + * @bssid: BSSID of the AP + * @remaining_duration: remaining disallow duration in ms + * @expected_rssi: RSSI at which STA can initate in dBm + */ +struct rssi_disallow_bssid { + struct qdf_mac_addr bssid; + uint32_t remaining_duration; + int8_t expected_rssi; +}; + +/** + * struct roam_scan_filter_params - Structure holding roaming scan + * parameters + * @op_bitmap: bitmap to determine reason of roaming + * @session_id: vdev id + * @num_bssid_black_list: The number of BSSID's that we should + * avoid connecting to. It is like a + * blacklist of BSSID's. + * @num_ssid_white_list: The number of SSID profiles that are + * in the Whitelist. When roaming, we + * consider the BSSID's with this SSID + * also for roaming apart from the connected one's + * @num_bssid_preferred_list: Number of BSSID's which have a preference over + * others + * @bssid_avoid_list: Blacklist SSID's + * @ssid_allowed_list: Whitelist SSID's + * @bssid_favored: Favorable BSSID's + * @bssid_favored_factor: RSSI to be added to this BSSID to prefer it + * @lca_disallow_config_present: LCA [Last Connected AP] disallow config present + * @disallow_duration: How long LCA AP will be disallowed before it + * can be a roaming candidate again, in seconds + * @rssi_channel_penalization:How much RSSI will be penalized if candidate(s) + * are found in the same channel as disallowed AP's, + * in units of db + * @num_disallowed_aps: How many APs the target should maintain in its + * LCA list + * + * This structure holds all the key parameters related to + * initial connection and roaming connections. + */ + +struct roam_scan_filter_params { + uint32_t op_bitmap; + uint8_t session_id; + uint32_t num_bssid_black_list; + uint32_t num_ssid_white_list; + uint32_t num_bssid_preferred_list; + struct qdf_mac_addr bssid_avoid_list[MAX_BSSID_AVOID_LIST]; + struct mac_ssid ssid_allowed_list[MAX_SSID_ALLOWED_LIST]; + struct qdf_mac_addr bssid_favored[MAX_BSSID_FAVORED]; + uint8_t bssid_favored_factor[MAX_BSSID_FAVORED]; + uint8_t lca_disallow_config_present; + uint32_t disallow_duration; + uint32_t rssi_channel_penalization; + uint32_t num_disallowed_aps; + uint32_t num_rssi_rejection_ap; + struct rssi_disallow_bssid rssi_rejection_ap[MAX_RSSI_AVOID_BSSID_LIST]; +}; + +#define WMI_CFG_VALID_CHANNEL_LIST_LEN 100 +/* Occupied channel list remains static */ +#define WMI_CHANNEL_LIST_STATIC 1 +/* Occupied channel list can be learnt after init */ +#define WMI_CHANNEL_LIST_DYNAMIC_INIT 2 +/* Occupied channel list can be learnt after flush */ +#define WMI_CHANNEL_LIST_DYNAMIC_FLUSH 3 +/* Occupied channel list can be learnt after update */ +#define WMI_CHANNEL_LIST_DYNAMIC_UPDATE 4 + +/** + * struct plm_req_params - plm req parameter + * @diag_token: Dialog token + * @meas_token: measurement token + * @num_bursts: total number of bursts + * @burst_int: burst interval in seconds + * @meas_duration:in TU's,STA goes off-ch + * @burst_len: no of times the STA should cycle through PLM ch list + * @desired_tx_pwr: desired tx power + * @mac_addr: MC dest addr + * @plm_num_ch: channel numbers + * @plm_ch_list: channel list + * @session_id: session id + * @enable: enable/disable + */ +struct plm_req_params { + uint16_t diag_token; + uint16_t meas_token; + uint16_t num_bursts; + uint16_t burst_int; + uint16_t meas_duration; + /* no of times the STA should cycle through PLM ch list */ + uint8_t burst_len; + int8_t desired_tx_pwr; + struct qdf_mac_addr mac_addr; + /* no of channels */ + uint8_t plm_num_ch; + /* channel numbers */ + uint8_t plm_ch_list[WMI_CFG_VALID_CHANNEL_LIST_LEN]; + uint8_t session_id; + bool enable; +}; + +/** + * struct ap_profile - Structure ap profile to match candidate + * @flags: flags + * @rssi_threshold: the value of the the candidate AP should higher by this + * threshold than the rssi of the currrently associated AP + * @ssid: ssid vlaue to be matched + * @rsn_authmode: security params to be matched + * @rsn_ucastcipherset: unicast cipher set + * @rsn_mcastcipherset: mcast/group cipher set + * @rsn_mcastmgmtcipherset: mcast/group management frames cipher set + * @rssi_abs_thresh: the value of the candidate AP should higher than this + * absolute RSSI threshold. Zero means no absolute minimum + * RSSI is required. units are the offset from the noise + * floor in dB + */ +struct ap_profile { + uint32_t flags; + uint32_t rssi_threshold; + struct mac_ssid ssid; + uint32_t rsn_authmode; + uint32_t rsn_ucastcipherset; + uint32_t rsn_mcastcipherset; + uint32_t rsn_mcastmgmtcipherset; + uint32_t rssi_abs_thresh; +}; + +/** + * struct rssi_scoring - rssi scoring param to sortlist selected AP + * @best_rssi_threshold: Roamable AP RSSI equal or better than this threshold, + * full rssi score 100. Units in dBm. + * @good_rssi_threshold: Below threshold, scoring linear percentage between + * rssi_good_pnt and 100. Units in dBm. + * @bad_rssi_threshold: Between good and bad rssi threshold, scoring linear + * % between rssi_bad_pcnt and rssi_good_pct in dBm. + * @good_rssi_pcnt: Used to assigned scoring percentage of each slot between + * best to good rssi threshold. Units in percentage. + * @bad_rssi_pcnt: Used to assigned scoring percentage of each slot between good + * to bad rssi threshold. Unites in percentage. + * @good_bucket_size : bucket size of slot in good zone + * @bad_bucket_size : bucket size of slot in bad zone + * @rssi_pref_5g_rssi_thresh: Below rssi threshold, 5G AP have given preference + * of band percentage. Units in dBm. + */ +struct rssi_scoring { + int32_t best_rssi_threshold; + int32_t good_rssi_threshold; + int32_t bad_rssi_threshold; + uint32_t good_rssi_pcnt; + uint32_t bad_rssi_pcnt; + uint32_t good_bucket_size; + uint32_t bad_bucket_size; + int32_t rssi_pref_5g_rssi_thresh; +}; + +/** + * struct param_slot_scoring - define % score for differents slots for a + * scoring param. + * @num_slot: number of slots in which the param will be divided. + * Max 15. index 0 is used for 'not_present. Num_slot will + * equally divide 100. e.g, if num_slot = 4 slot 0 = 0-25%, slot + * 1 = 26-50% slot 2 = 51-75%, slot 3 = 76-100% + * @score_pcnt3_to_0: Conatins score percentage for slot 0-3 + * BITS 0-7 :- the scoring pcnt when not present + * BITS 8-15 :- SLOT_1 + * BITS 16-23 :- SLOT_2 + * BITS 24-31 :- SLOT_3 + * @score_pcnt7_to_4: Conatins score percentage for slot 4-7 + * BITS 0-7 :- SLOT_4 + * BITS 8-15 :- SLOT_5 + * BITS 16-23 :- SLOT_6 + * BITS 24-31 :- SLOT_7 + * @score_pcnt11_to_8: Conatins score percentage for slot 8-11 + * BITS 0-7 :- SLOT_8 + * BITS 8-15 :- SLOT_9 + * BITS 16-23 :- SLOT_10 + * BITS 24-31 :- SLOT_11 + * @score_pcnt15_to_12: Conatins score percentage for slot 12-15 + * BITS 0-7 :- SLOT_12 + * BITS 8-15 :- SLOT_13 + * BITS 16-23 :- SLOT_14 + * BITS 24-31 :- SLOT_15 + */ +struct param_slot_scoring { + uint32_t num_slot; + uint32_t score_pcnt3_to_0; + uint32_t score_pcnt7_to_4; + uint32_t score_pcnt11_to_8; + uint32_t score_pcnt15_to_12; +}; + +/** + * struct scoring_param - scoring param to sortlist selected AP + * @disable_bitmap: Each bit will be either allow(0)/disallow(1) to + * considered the roam score param. + * @rssi_weightage: RSSI weightage out of total score in % + * @ht_weightage: HT weightage out of total score in %. + * @vht_weightage: VHT weightage out of total score in %. + * @he_weightaget: 11ax weightage out of total score in %. + * @bw_weightage: Bandwidth weightage out of total score in %. + * @band_weightage: Band(2G/5G) weightage out of total score in %. + * @nss_weightage: NSS(1x1 / 2x2)weightage out of total score in %. + * @esp_qbss_weightage: ESP/QBSS weightage out of total score in %. + * @beamforming_weightage: Beamforming weightage out of total score in %. + * @pcl_weightage: PCL weightage out of total score in %. + * @oce_wan_weightage OCE WAN metrics weightage out of total score in %. + * @bw_index_score: channel BW scoring percentage information. + * BITS 0-7 :- It contains scoring percentage of 20MHz BW + * BITS 8-15 :- It contains scoring percentage of 40MHz BW + * BITS 16-23 :- It contains scoring percentage of 80MHz BW + * BITS 24-31 :- It contains scoring percentage of 1600MHz BW + * The value of each index must be 0-100 + * @band_index_score: band scording percentage information. + * BITS 0-7 :- It contains scoring percentage of 2G + * BITS 8-15 :- It contains scoring percentage of 5G + * BITS 16-23 :- reserved + * BITS 24-31 :- reserved + * The value of each index must be 0-100 + * @nss_index_score: NSS scoring percentage information. + * BITS 0-7 :- It contains scoring percentage of 1x1 + * BITS 8-15 :- It contains scoring percentage of 2x2 + * BITS 16-23 :- It contains scoring percentage of 3x3 + * BITS 24-31 :- It contains scoring percentage of 4x4 + * The value of each index must be 0-100 + * @rssi_scoring: RSSI scoring information. + * @esp_qbss_scoring: ESP/QBSS scoring percentage information + * @oce_wan_scoring: OCE WAN metrics percentage information +*/ +struct scoring_param { + uint32_t disable_bitmap; + int32_t rssi_weightage; + int32_t ht_weightage; + int32_t vht_weightage; + int32_t he_weightage; + int32_t bw_weightage; + int32_t band_weightage; + int32_t nss_weightage; + int32_t esp_qbss_weightage; + int32_t beamforming_weightage; + int32_t pcl_weightage; + int32_t oce_wan_weightage; + uint32_t bw_index_score; + uint32_t band_index_score; + uint32_t nss_index_score; + struct rssi_scoring rssi_scoring; + struct param_slot_scoring esp_qbss_scoring; + struct param_slot_scoring oce_wan_scoring; +}; + +/** + * struct ap_profile_params - ap profile params + * @vdev_id: vdev id + * @profile: ap profile to match candidate + * @param: scoring params to short candidate + */ +struct ap_profile_params { + uint8_t vdev_id; + struct ap_profile profile; + struct scoring_param param; +}; + +/** + * struct wmi_roam_invoke_cmd - roam invoke command + * @vdev_id: vdev id + * @bssid: mac address + * @channel: channel + * @frame_len: frame length, includs mac header, fixed params and ies + * @frame_buf: buffer contaning probe response or beacon + * @is_same_bssid: flag to indicate if roaming is requested for same bssid + */ +struct wmi_roam_invoke_cmd { + uint32_t vdev_id; + uint8_t bssid[IEEE80211_ADDR_LEN]; + uint32_t channel; + uint32_t frame_len; + uint8_t *frame_buf; + uint8_t is_same_bssid; +}; + +/** + * struct wmi_per_roam_config - per based roaming parameters + * @enable: if PER based roaming is enabled/disabled + * @tx_high_rate_thresh: high rate threshold at which PER based + * roam will stop in tx path + * @rx_high_rate_thresh: high rate threshold at which PER based + * roam will stop in rx path + * @tx_low_rate_thresh: rate below which traffic will be considered + * for PER based roaming in Tx path + * @rx_low_rate_thresh: rate below which traffic will be considered + * for PER based roaming in Tx path + * @tx_rate_thresh_percnt: % above which when traffic is below low_rate_thresh + * will be considered for PER based scan in tx path + * @rx_rate_thresh_percnt: % above which when traffic is below low_rate_thresh + * will be considered for PER based scan in rx path + * @per_rest_time: time for which PER based roam will wait once it + * issues a roam scan. + * @tx_per_mon_time: Minimum time required to be considered as valid scenario + * for PER based roam in tx path + * @rx_per_mon_time: Minimum time required to be considered as valid scenario + * for PER based roam in rx path + * @min_candidate_rssi: Minimum RSSI threshold for candidate AP to be used for + * PER based roaming + */ +struct wmi_per_roam_config { + uint32_t enable; + uint32_t tx_high_rate_thresh; + uint32_t rx_high_rate_thresh; + uint32_t tx_low_rate_thresh; + uint32_t rx_low_rate_thresh; + uint32_t tx_rate_thresh_percnt; + uint32_t rx_rate_thresh_percnt; + uint32_t per_rest_time; + uint32_t tx_per_mon_time; + uint32_t rx_per_mon_time; + uint32_t min_candidate_rssi; +}; + +/** + * struct wmi_per_roam_config_req: PER based roaming config request + * @vdev_id: vdev id on which config needs to be set + * @per_config: PER config + */ +struct wmi_per_roam_config_req { + uint8_t vdev_id; + struct wmi_per_roam_config per_config; +}; + +/** + * struct wmi_limit_off_chan_param - limit off channel parameters + * @vdev_id: vdev id + * @status: status of the command (enable/disable) + * @max_offchan_time: max off channel time + * @rest_time: home channel time + * @skip_dfs_chans: skip dfs channels during scan + */ +struct wmi_limit_off_chan_param { + uint32_t vdev_id; + bool status; + uint32_t max_offchan_time; + uint32_t rest_time; + bool skip_dfs_chans; +}; + +#define WMI_MAX_HLP_IE_LEN 2048 +/** + * struct hlp_params - HLP info params + * @vdev_id: vdev id + * @hlp_ie_len: HLP IE length + * @hlp_ie: HLP IE + */ +struct hlp_params { + uint8_t vdev_id; + uint32_t hlp_ie_len; + uint8_t hlp_ie[WMI_MAX_HLP_IE_LEN]; +}; + +/** + * struct wmi_btm_config - BSS Transition Management offload params + * @vdev_id: VDEV on which the parameters should be applied + * @btm_offload_config: BTM config + * @btm_solicited_timeout: Timeout value for waiting BTM request + * @btm_max_attempt_cnt: Maximum attempt for sending BTM query to ESS + * @btm_sticky_time: Stick time after roaming to new AP by BTM + */ +struct wmi_btm_config { + uint8_t vdev_id; + uint32_t btm_offload_config; + uint32_t btm_solicited_timeout; + uint32_t btm_max_attempt_cnt; + uint32_t btm_sticky_time; +}; + +/** + * @time_offset: time offset after 11k offload command to trigger a neighbor + * report request (in seconds) + * @low_rssi_offset: Offset from rssi threshold to trigger a neighbor + * report request (in dBm) + * @bmiss_count_trigger: Number of beacon miss events to trigger neighbor + * report request + * @per_threshold_offset: offset from PER threshold to trigger neighbor + * report request (in %) + * @neighbor_report_cache_timeout: timeout after which new trigger can enable + * sending of a neighbor report request (in seconds) + * @max_neighbor_report_req_cap: max number of neighbor report requests that + * can be sent to the peer in the current session + * @ssid: Current connect SSID info + */ +struct wmi_11k_offload_neighbor_report_params { + uint32_t time_offset; + uint32_t low_rssi_offset; + uint32_t bmiss_count_trigger; + uint32_t per_threshold_offset; + uint32_t neighbor_report_cache_timeout; + uint32_t max_neighbor_report_req_cap; + struct mac_ssid ssid; +}; + +/** + * struct wmi_11k_offload_params - offload 11k features to FW + * @vdev_id: vdev id + * @offload_11k_bitmask: bitmask to specify offloaded features + * B0: Neighbor Report Request offload + * B1-B31: Reserved + * @neighbor_report_params: neighbor report offload params + */ +struct wmi_11k_offload_params { + uint32_t vdev_id; + uint32_t offload_11k_bitmask; + struct wmi_11k_offload_neighbor_report_params neighbor_report_params; +}; + +/** + * struct wmi_invoke_neighbor_report_params - Invoke neighbor report request + * from IW to FW + * @vdev_id: vdev id + * @send_resp_to_host: bool to send response to host or not + * @ssid: ssid given from the IW command + */ +struct wmi_invoke_neighbor_report_params { + uint32_t vdev_id; + uint32_t send_resp_to_host; + struct mac_ssid ssid; +}; + +#endif /* _WMI_UNIFIED_ROAM_PARAM_H_ */ diff --git a/wmi_unified_sta_api.h b/wmi_unified_sta_api.h new file mode 100644 index 0000000000..fb38e704b2 --- /dev/null +++ b/wmi_unified_sta_api.h @@ -0,0 +1,461 @@ +/* + * Copyright (c) 2013-2018 The Linux Foundation. All rights reserved. + * + * Permission to use, copy, modify, and/or distribute this software for + * any purpose with or without fee is hereby granted, provided that the + * above copyright notice and this permission notice appear in all + * copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL + * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE + * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL + * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR + * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ + +/** + * DOC: Implement API's specific to STA component. + */ + +#ifndef _WMI_UNIFIED_STA_API_H_ +#define _WMI_UNIFIED_STA_API_H_ + +#include "wlan_disa_public_struct.h" +#include "wlan_tdls_public_structs.h" +#include "wlan_policy_mgr_public_struct.h" +#include "wmi_unified_sta_param.h" + +struct policy_mgr_dual_mac_config; + +/** + * wmi_unified_set_sta_sa_query_param_cmd() - set sta sa query parameters + * @wmi_hdl: wmi handle + * @vdev_id: vdev id + * @max_retries: max retries + * @retry_interval: retry interval + * This function sets sta query related parameters in fw. + * + * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure + */ +QDF_STATUS wmi_unified_set_sta_sa_query_param_cmd(void *wmi_hdl, + uint8_t vdev_id, + uint32_t max_retries, + uint32_t retry_interval); + +/** + * wmi_unified_set_sta_keep_alive_cmd() - set sta keep alive parameters + * @wmi_hdl: wmi handle + * @params: sta keep alive parameter + * + * This function sets keep alive related parameters in fw. + * + * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure + */ +QDF_STATUS wmi_unified_set_sta_keep_alive_cmd(void *wmi_hdl, + struct sta_params *params); + +/** + * wmi_unified_vdev_set_gtx_cfg_cmd() - set GTX params + * @wmi_hdl: wmi handle + * @if_id: vdev id + * @gtx_info: GTX config params + * + * This function set GTX related params in firmware. + * + * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure + */ +QDF_STATUS wmi_unified_vdev_set_gtx_cfg_cmd(void *wmi_hdl, uint32_t if_id, + struct wmi_gtx_config *gtx_info); + +#ifdef WLAN_FEATURE_DISA +/** + * wmi_unified_encrypt_decrypt_send_cmd() - send encryptdecrypt cmd to fw + * @wmi_hdl: wmi handle + * @params: encrypt/decrypt params + * + * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure + */ +QDF_STATUS wmi_unified_encrypt_decrypt_send_cmd(void *wmi_hdl, + struct disa_encrypt_decrypt_req_params *params); + +/** + * wmi_extract_encrypt_decrypt_resp_params() - + * extract encrypt decrypt resp params from event buffer + * @wmi_handle: wmi handle + * @evt_buf: pointer to event buffer + * @resp: encrypt decrypt resp params + * + * Return: QDF_STATUS_SUCCESS for success or error code + */ +QDF_STATUS wmi_extract_encrypt_decrypt_resp_params(void *wmi_hdl, + uint8_t *evt_buf, + struct disa_encrypt_decrypt_resp_params *resp); +#endif /* WLAN_FEATURE_DISA */ + +/** + * wmi_unified_process_dhcp_ind() - process dhcp indication from SME + * @wmi_handle: wmi handle + * @ta_dhcp_ind: DHCP indication parameter + * + * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure + */ +QDF_STATUS wmi_unified_process_dhcp_ind(void *wmi_hdl, + wmi_peer_set_param_cmd_fixed_param *ta_dhcp_ind); + +/** + * wmi_unified_get_link_speed_cmd() -send command to get linkspeed + * @wmi_handle: wmi handle + * @pLinkSpeed: link speed info + * + * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure + */ +QDF_STATUS wmi_unified_get_link_speed_cmd(void *wmi_hdl, + wmi_mac_addr peer_macaddr); + +/** + * wmi_unified_fw_profiling_data_cmd() - send FW profiling cmd to WLAN FW + * @wmi_handl: wmi handle + * @cmd: Profiling command index + * @value1: parameter1 value + * @value2: parameter2 value + * + * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure + */ +QDF_STATUS wmi_unified_fw_profiling_data_cmd(void *wmi_hdl, + uint32_t cmd, uint32_t value1, uint32_t value2); + +/** + * wmi_unified_nat_keepalive_en_cmd() - enable NAT keepalive filter + * @wmi_handle: wmi handle + * @vdev_id: vdev id + * + * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure + */ +QDF_STATUS wmi_unified_nat_keepalive_en_cmd(void *wmi_hdl, uint8_t vdev_id); + +/** + * wmi_unified_set_latency_config_cmd() + * @wmi_handle: wmi handle + * @param: WLM parameters + * + * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure + */ +QDF_STATUS wmi_unified_wlm_latency_level_cmd(void *wmi_hdl, + struct wlm_latency_level_param *param); + +/** + * wmi_unified_nan_req_cmd() - to send nan request to target + * @wmi_handle: wmi handle + * @nan_req: request data which will be non-null + * + * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure + */ +QDF_STATUS wmi_unified_nan_req_cmd(void *wmi_hdl, + struct nan_req_params *nan_req); + +/** + * wmi_unified_process_set_ie_info_cmd() - Function to send IE info to firmware + * @wmi_handle: Pointer to WMi handle + * @ie_data: Pointer for ie data + * + * This function sends IE information to firmware + * + * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure + */ +QDF_STATUS wmi_unified_process_set_ie_info_cmd(void *wmi_hdl, + struct vdev_ie_info_param *ie_info); + +/** + * wmi_unified_set_base_macaddr_indicate_cmd() - set base mac address in fw + * @wmi_hdl: wmi handle + * @custom_addr: base mac address + * + * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure + */ +QDF_STATUS wmi_unified_set_base_macaddr_indicate_cmd(void *wmi_hdl, + uint8_t *custom_addr); + +#ifdef CONVERGED_TDLS_ENABLE +/** + * wmi_unified_set_tdls_offchan_mode_cmd() - set tdls off channel mode + * @wmi_handle: wmi handle + * @chan_switch_params: Pointer to tdls channel switch parameter structure + * + * This function sets tdls off channel mode + * + * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failures; + * Negative errno otherwise + */ +QDF_STATUS wmi_unified_set_tdls_offchan_mode_cmd(void *wmi_hdl, + struct tdls_channel_switch_params *chan_switch_params); + +/** + * wmi_unified_update_fw_tdls_state_cmd() - send enable/disable tdls for a vdev + * @wmi_handle: wmi handle + * @pwmaTdlsparams: TDLS params + * + * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure + */ +QDF_STATUS wmi_unified_update_fw_tdls_state_cmd(void *wmi_hdl, + void *tdls_param, + uint8_t tdls_state); + +/** + * wmi_unified_update_tdls_peer_state_cmd() - update TDLS peer state + * @wmi_handle: wmi handle + * @peerStateParams: TDLS peer state params + * + * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure + */ +QDF_STATUS wmi_unified_update_tdls_peer_state_cmd(void *wmi_hdl, + struct tdls_peer_state_params *peerStateParams, + uint32_t *ch_mhz); + +/** + * wmi_extract_vdev_tdls_ev_param - extract vdev tdls param from event + * @wmi_handle: wmi handle + * @param evt_buf: pointer to event buffer + * @param param: Pointer to hold vdev tdls param + * + * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure + */ +QDF_STATUS wmi_extract_vdev_tdls_ev_param(void *wmi_hdl, void *evt_buf, + struct tdls_event_info *param); +#endif /* CONVERGED_TDLS_ENABLE */ + +/** + * wmi_unified_send_sar_limit_cmd() - send sar limit cmd to fw + * @wmi_hdl: wmi handle + * @params: sar limit command params + * + * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure + */ +QDF_STATUS wmi_unified_send_sar_limit_cmd(void *wmi_hdl, + struct sar_limit_cmd_params *params); + +/** + * wmi_unified_get_sar_limit_cmd() - request current SAR limits from FW + * @wmi_hdl: wmi handle + * + * Return: QDF_STATUS_SUCCESS for success or error code + */ +QDF_STATUS wmi_unified_get_sar_limit_cmd(void *wmi_hdl); + +/** + * wmi_unified_extract_sar_limit_event() - extract SAR limits from FW event + * @wmi_hdl: wmi handle + * @evt_buf: event buffer received from firmware + * @event: SAR limit event which is to be populated by data extracted from + * the @evt_buf buffer + * + * Return: QDF_STATUS_SUCCESS for success or error code + */ +QDF_STATUS wmi_unified_extract_sar_limit_event(void *wmi_hdl, + uint8_t *evt_buf, + struct sar_limit_event *event); + +/** + * wmi_unified_extract_sar2_result_event() - extract SAR limits from FW event + * @handle: wmi handle + * @event: event buffer received from firmware + * @len: length of the event buffer + * + * Return: QDF_STATUS_SUCCESS for success or error code + */ +QDF_STATUS wmi_unified_extract_sar2_result_event(void *handle, + uint8_t *event, uint32_t len); + +/* + * wmi_unified_set_del_pmkid_cache() - set delete PMKID + * @wmi_hdl: wma handle + * @pmksa: pointer to pmk cache entry + * + * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure + */ +QDF_STATUS wmi_unified_set_del_pmkid_cache(void *wmi_hdl, + struct wmi_unified_pmk_cache *pmksa); + +/** + * wmi_unified_del_ts_cmd() - send DELTS request to fw + * @wmi_handle: wmi handle + * @msg: delts params + * + * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure + */ +QDF_STATUS wmi_unified_del_ts_cmd(void *wmi_hdl, uint8_t vdev_id, + uint8_t ac); + +/** + * wmi_unified_aggr_qos_cmd() - send aggr qos request to fw + * @wmi_handle: handle to wmi + * @aggr_qos_rsp_msg - combined struct for all ADD_TS requests. + * + * A function to handle WMI_AGGR_QOS_REQ. This will send out + * ADD_TS requestes to firmware in loop for all the ACs with + * active flow. + * + * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure + */ +QDF_STATUS wmi_unified_aggr_qos_cmd(void *wmi_hdl, + struct aggr_add_ts_param *aggr_qos_rsp_msg); + +/** + * wmi_unified_add_ts_cmd() - send ADDTS request to fw + * @wmi_handle: wmi handle + * @msg: ADDTS params + * + * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure + */ +QDF_STATUS wmi_unified_add_ts_cmd(void *wmi_hdl, + struct add_ts_param *msg); + +/** + * wmi_unified_process_add_periodic_tx_ptrn_cmd - add periodic tx ptrn + * @wmi_handle: wmi handle + * @pAddPeriodicTxPtrnParams: tx ptrn params + * + * Retrun: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure + */ +QDF_STATUS wmi_unified_process_add_periodic_tx_ptrn_cmd(void *wmi_hdl, + struct periodic_tx_pattern * + pAddPeriodicTxPtrnParams, + uint8_t vdev_id); + +/** + * wmi_unified_process_del_periodic_tx_ptrn_cmd - del periodic tx ptrn + * @wmi_handle: wmi handle + * @vdev_id: vdev id + * @pattern_id: pattern id + * + * Retrun: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure + */ +QDF_STATUS wmi_unified_process_del_periodic_tx_ptrn_cmd(void *wmi_hdl, + uint8_t vdev_id, + uint8_t pattern_id); + +/** + * wmi_unified_set_auto_shutdown_timer_cmd() - sets auto shutdown + * timer in firmware + * @wmi_handle: wmi handle + * @timer_val: auto shutdown timer value + * + * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure + */ +QDF_STATUS wmi_unified_set_auto_shutdown_timer_cmd(void *wmi_hdl, + uint32_t timer_val); + +/** + * wmi_unified_set_led_flashing_cmd() - set led flashing in fw + * @wmi_hdl: wmi handle + * @flashing: flashing request + * + * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure + */ +QDF_STATUS wmi_unified_set_led_flashing_cmd(void *wmi_hdl, + struct flashing_req_params *flashing); + +/** + * wmi_unified_process_ch_avoid_update_cmd() - handles channel avoid + * update request + * @wmi_handle: wmi handle + * @ch_avoid_update_req: channel avoid update params + * + * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure + */ +QDF_STATUS wmi_unified_process_ch_avoid_update_cmd(void *wmi_hdl); + +/** + * wmi_unified_pdev_set_pcl_cmd() - Send WMI_SOC_SET_PCL_CMDID to FW + * @wmi_hdl: wmi handle + * @msg: PCL structure containing the PCL and the number of channels + * + * WMI_SOC_SET_PCL_CMDID provides a Preferred Channel List (PCL) to the WLAN + * firmware. The DBS Manager is the consumer of this information in the WLAN + * firmware. The channel list will be used when a Virtual DEVice (VDEV) needs + * to migrate to a new channel without host driver involvement. An example of + * this behavior is Legacy Fast Roaming (LFR 3.0). Generally, the host will + * manage the channel selection without firmware involvement. + * + * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure + */ +QDF_STATUS wmi_unified_pdev_set_pcl_cmd(void *wmi_hdl, + struct wmi_pcl_chan_weights *msg); + +/** + * wmi_unified_soc_set_hw_mode_cmd() - Send WMI_SOC_SET_HW_MODE_CMDID to FW + * @wmi_hdl: wmi handle + * @msg: Structure containing the following parameters + * + * - hw_mode_index: The HW_Mode field is a enumerated type that is selected + * from the HW_Mode table, which is returned in the WMI_SERVICE_READY_EVENTID. + * + * Provides notification to the WLAN firmware that host driver is requesting a + * HardWare (HW) Mode change. This command is needed to support iHelium in the + * configurations that include the Dual Band Simultaneous (DBS) feature. + * + * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure + */ +QDF_STATUS wmi_unified_soc_set_hw_mode_cmd(void *wmi_hdl, + uint32_t hw_mode_index); + +#ifdef WLAN_POLICY_MGR_ENABLE +/** + * wmi_unified_pdev_set_dual_mac_config_cmd() - Set dual mac config to FW + * @wmi_hdl: wmi handle + * @msg: Dual MAC config parameters + * + * Configures WLAN firmware with the dual MAC features + * + * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failures. + */ +QDF_STATUS wmi_unified_pdev_set_dual_mac_config_cmd(void *wmi_hdl, + struct policy_mgr_dual_mac_config *msg); +#endif /* WLAN_POLICY_MGR_ENABLE */ + +/** + * wmi_unified_send_adapt_dwelltime_params_cmd() - send wmi cmd of + * adaptive dwelltime configuration params + * @wma_handle: wma handler + * @dwelltime_params: pointer to dwelltime_params + * + * Return: QDF_STATUS_SUCCESS on success and QDF failure reason code for failure + */ +QDF_STATUS wmi_unified_send_adapt_dwelltime_params_cmd(void *wmi_hdl, + struct wmi_adaptive_dwelltime_params * + wmi_param); + +/** + * wmi_unified_send_dbs_scan_sel_params_cmd() - send wmi cmd of + * DBS scan selection configuration params + * @wma_handle: wma handler + * @dbs_scan_params: pointer to wmi_dbs_scan_sel_params + * + * Return: QDF_STATUS_SUCCESS on success and QDF failure reason code for failure + */ +QDF_STATUS wmi_unified_send_dbs_scan_sel_params_cmd(void *wmi_hdl, + struct wmi_dbs_scan_sel_params *wmi_param); + +/** + * wmi_unified_set_arp_stats_req() - set arp stats request + * @wmi_hdl: wmi handle + * @req_buf: pointer to set_arp_stats + * + * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure + */ +QDF_STATUS wmi_unified_set_arp_stats_req(void *wmi_hdl, + struct set_arp_stats *req_buf); + +/** + * wmi_unified_get_arp_stats_req() - get arp stats request + * @wmi_hdl: wmi handle + * @req_buf: pointer to get_arp_stats + * + * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure + */ +QDF_STATUS wmi_unified_get_arp_stats_req(void *wmi_hdl, + struct get_arp_stats *req_buf); + +#endif /* _WMI_UNIFIED_STA_API_H_ */ diff --git a/wmi_unified_sta_param.h b/wmi_unified_sta_param.h new file mode 100644 index 0000000000..747705908b --- /dev/null +++ b/wmi_unified_sta_param.h @@ -0,0 +1,464 @@ +/* + * Copyright (c) 2013-2018 The Linux Foundation. All rights reserved. + * + * Permission to use, copy, modify, and/or distribute this software for + * any purpose with or without fee is hereby granted, provided that the + * above copyright notice and this permission notice appear in all + * copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL + * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE + * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL + * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR + * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ + +/* + * This file contains the API definitions for the STA WMI APIs. + */ + +#ifndef _WMI_UNIFIED_STA_PARAM_H_ +#define _WMI_UNIFIED_STA_PARAM_H_ + +/** + * struct sta_params - sta keep alive parameters + * @vdev_id: vdev id + * @method: keep alive method + * @timeperiod: time to keep alive + * @hostv4addr: host ipv4 address + * @destv4addr: destination ipv4 address + * @destmac: destination mac address + */ +struct sta_params { + uint8_t vdev_id; + uint32_t method; + uint32_t timeperiod; + uint8_t *hostv4addr; + uint8_t *destv4addr; + uint8_t *destmac; +}; + +/** + * struct gtx_config_t - GTX config + * @gtx_rt_mask: for HT and VHT rate masks + * @gtx_usrcfg: host request for GTX mask + * @gtx_threshold: PER Threshold (default: 10%) + * @gtx_margin: PER margin (default: 2%) + * @gtx_tcpstep: TCP step (default: 1) + * @gtx_tpcMin: TCP min (default: 5) + * @gtx_bwmask: BW mask (20/40/80/160 Mhz) + */ +struct wmi_gtx_config { + uint32_t gtx_rt_mask[2]; + uint32_t gtx_usrcfg; + uint32_t gtx_threshold; + uint32_t gtx_margin; + uint32_t gtx_tpcstep; + uint32_t gtx_tpcmin; + uint32_t gtx_bwmask; +}; + +/** + * struct wlm_latency_level_param - WLM parameters + * @wlm_latency_level: wlm latency level to set + * 0 - normal, 1 - moderate, 2 - low, 3 - ultralow + * @wlm_latency_flags: wlm latency flags to set + * |31 12| 11 | 10 |9 8|7 6|5 4|3 2| 1 | 0 | + * +------+------+------+------+------+------+------+-----+-----+ + * | RSVD | SSLP | CSLP | RSVD | Roam | RSVD | DWLT | DFS | SUP | + * +------+-------------+-------------+-------------------------+ + * | WAL | PS | Roam | Scan | + * + * bit 0: Avoid scan request from HLOS if setting + * bit 1: Skip DFS channel SCAN if setting + * bit 2-3: Define policy of dwell time/duration for each foreign channel + * (b2 b3) + * (0 0 ): Default scan dwell time + * (0 1 ): Reserve + * (1 0 ): Shrink off channel dwell time + * (1 1 ): Reserve + * bit 4-5: Reserve for scan + * bit 6-7: Define roaming policy + * (b6 b7) + * (0 0 ): Default roaming behavior, allow roaming in all scenarios + * (0 1 ): Disallow all roaming + * (1 0 ): Allow roaming when final bmissed + * (1 1 ): Reserve + * bit 8-9: Reserve for roaming + * bit 10: Disable css power collapse if setting + * bit 11: Disable sys sleep if setting + * bit 12-31: Reserve for future useage + * @vdev_id: vdev id + */ +struct wlm_latency_level_param { + uint16_t wlm_latency_level; + uint32_t wlm_latency_flags; + uint16_t vdev_id; +}; + +/** + * struct nan_req_params - NAN request params + * @request_data_len: request data length + * @request_data: request data + */ +struct nan_req_params { + uint16_t request_data_len; + uint8_t request_data[]; +}; + +#ifndef CONVERGED_TDLS_ENABLE +/** + * struct tdls_chan_switch_params - channel switch parameter structure + * @vdev_id: vdev ID + * @peer_mac_addr: Peer mac address + * @tdls_off_ch_bw_offset: Target off-channel bandwitdh offset + * @tdls_off_ch: Target Off Channel + * @oper_class: Operating class for target channel + * @is_responder: Responder or initiator + */ +struct tdls_channel_switch_params { + uint32_t vdev_id; + uint8_t peer_mac_addr[IEEE80211_ADDR_LEN]; + uint16_t tdls_off_ch_bw_offset; + uint8_t tdls_off_ch; + uint8_t tdls_sw_mode; + uint8_t oper_class; + uint8_t is_responder; +}; +#endif + +#define WMI_TDLS_MAX_SUPP_CHANNELS 128 +#define WMI_TDLS_MAX_SUPP_OPER_CLASSES 32 +#define WMI_2_4_GHZ_MAX_FREQ 3000 + +/** + * struct tdls_update_ch_params - channel parameters + * @chanId: ID of the channel + * @pwr: power level + * @dfsSet: is dfs supported or not + * @half_rate: is the channel operating at 10MHz + * @quarter_rate: is the channel operating at 5MHz + */ +struct tdls_update_ch_params { + uint8_t chanId; + uint8_t pwr; + bool dfsSet; + bool half_rate; + bool quarter_rate; +}; + +/** + * struct tdls_peer_cap_params - TDLS peer capablities parameters + * @isPeerResponder: is peer responder or not + * @peerUapsdQueue: peer uapsd queue + * @peerMaxSp: peer max SP value + * @peerBuffStaSupport: peer buffer sta supported or not + * @peerOffChanSupport: peer offchannel support + * @peerCurrOperClass: peer current operating class + * @selfCurrOperClass: self current operating class + * @peerChanLen: peer channel length + * @peerChan: peer channel list + * @peerOperClassLen: peer operating class length + * @peerOperClass: peer operating class + * @prefOffChanNum: peer offchannel number + * @prefOffChanBandwidth: peer offchannel bandwidth + * @opClassForPrefOffChan: operating class for offchannel + */ +struct tdls_peer_cap_params { + uint8_t isPeerResponder; + uint8_t peerUapsdQueue; + uint8_t peerMaxSp; + uint8_t peerBuffStaSupport; + uint8_t peerOffChanSupport; + uint8_t peerCurrOperClass; + uint8_t selfCurrOperClass; + uint8_t peerChanLen; + struct tdls_update_ch_params peerChan[WMI_TDLS_MAX_SUPP_CHANNELS]; + uint8_t peerOperClassLen; + uint8_t peerOperClass[WMI_TDLS_MAX_SUPP_OPER_CLASSES]; + uint8_t prefOffChanNum; + uint8_t prefOffChanBandwidth; + uint8_t opClassForPrefOffChan; +}; + +/** + * struct tdls_peer_state_params - TDLS peer state parameters + * @vdevId: vdev id + * @peerMacAddr: peer mac address + * @peerCap: peer capabality + */ +struct tdls_peer_state_params { + uint32_t vdevId; + uint8_t peerMacAddr[IEEE80211_ADDR_LEN]; + uint32_t peerState; + struct tdls_peer_cap_params peerCap; +}; + +/** + * struct vdev_ie_info_param - IE info + * @vdev_id - vdev for which the IE is being sent + * @ie_id - ID of the IE + * @length - length of the IE data + * @data - IE data + * + * This structure is used to store the IE information. + */ +struct vdev_ie_info_param { + uint32_t vdev_id; + uint32_t ie_id; + uint32_t length; + uint32_t ie_source; + uint32_t band; + uint8_t *data; +}; + +#define MAX_SAR_LIMIT_ROWS_SUPPORTED 64 +/** + * struct sar_limit_cmd_row - sar limits row + * @band_id: Optional param for frequency band + * See %enum wmi_sar_band_id_flags for possible values + * @chain_id: Optional param for antenna chain id + * @mod_id: Optional param for modulation scheme + * See %enum wmi_sar_mod_id_flags for possible values + * @limit_value: Mandatory param providing power limits in steps of 0.5 dbm + * @validity_bitmap: bitmap of valid optional params in sar_limit_cmd_row struct + * See WMI_SAR_*_VALID_MASK for possible values + */ +struct sar_limit_cmd_row { + uint32_t band_id; + uint32_t chain_id; + uint32_t mod_id; + uint32_t limit_value; + uint32_t validity_bitmap; +}; + +/** + * struct sar_limit_cmd_params - sar limits params + * @sar_enable: flag to enable SAR + * See %enum wmi_sar_feature_state_flags for possible values + * @num_limit_rows: number of items in sar_limits + * @commit_limits: indicates firmware to start apply new SAR values + * @sar_limit_row_list: pointer to array of sar limit rows + */ +struct sar_limit_cmd_params { + uint32_t sar_enable; + uint32_t num_limit_rows; + uint32_t commit_limits; + struct sar_limit_cmd_row *sar_limit_row_list; +}; + +/** + * struct sar_limit_event_row - sar limits row + * @band_id: Frequency band. + * See %enum wmi_sar_band_id_flags for possible values + * @chain_id: Chain id + * @mod_id: Modulation scheme + * See %enum wmi_sar_mod_id_flags for possible values + * @limit_value: Power limits in steps of 0.5 dbm that is currently active for + * the given @band_id, @chain_id, and @mod_id + */ +struct sar_limit_event_row { + uint32_t band_id; + uint32_t chain_id; + uint32_t mod_id; + uint32_t limit_value; +}; + +/** + * struct sar_limit_event - sar limits params + * @sar_enable: Current status of SAR enablement. + * See %enum wmi_sar_feature_state_flags for possible values + * @num_limit_rows: number of items in sar_limits + * @sar_limit_row: array of sar limit rows. Only @num_limit_rows + * should be considered valid. + */ +struct sar_limit_event { + uint32_t sar_enable; + uint32_t num_limit_rows; + struct sar_limit_event_row + sar_limit_row[MAX_SAR_LIMIT_ROWS_SUPPORTED]; +}; + +#define WMI_UNIFIED_MAX_PMKID_LEN 16 +#define WMI_UNIFIED_MAX_PMK_LEN 64 + +/** + * struct wmi_unified_pmk_cache - used to set del pmkid cache + * @tlv_header: TLV header, TLV tag and len; tag equals WMITLV_TAG_ARRAY_UINT32 + * @pmk_len: PMK len + * for big-endian hosts, manual endian conversion will be needed to keep + * the array values in their original order in spite of the automatic + * byte-swap applied to WMI messages during download + * @pmk: PMK array + * @pmkid_len: PMK ID Len + * @pmkid: PMK ID Array + * @bssid: BSSID + * @ssid: SSID + * @cache_id: PMK Cache ID + * @cat_flag: whether (bssid) or (ssid,cache_id) is valid + * @action_flag: add/delete the entry + */ +struct wmi_unified_pmk_cache { + uint32_t tlv_header; + uint32_t pmk_len; + uint8_t session_id; + uint8_t pmk[WMI_UNIFIED_MAX_PMK_LEN]; + uint32_t pmkid_len; + uint8_t pmkid[WMI_UNIFIED_MAX_PMKID_LEN]; + wmi_host_mac_addr bssid; + struct mac_ssid ssid; + uint32_t cache_id; + uint32_t cat_flag; + uint32_t action_flag; +}; + +#define WMI_QOS_NUM_AC_MAX 4 + +/** + * struct aggr_add_ts_param - ADDTS parameters + * @staIdx: station index + * @tspecIdx: TSPEC handler uniquely identifying a TSPEC for a STA in a BSS + * @tspec: tspec value + * @status: CDF status + * @sessionId: session id + * @vdev_id: vdev id + */ +struct aggr_add_ts_param { + uint16_t staIdx; + uint16_t tspecIdx; + struct mac_tspec_ie tspec[WMI_QOS_NUM_AC_MAX]; + QDF_STATUS status[WMI_QOS_NUM_AC_MAX]; + uint8_t sessionId; + uint8_t vdev_id; +}; + +#define WMI_PERIODIC_TX_PTRN_MAX_SIZE 1536 +/** + * struct periodic_tx_pattern - periodic tx pattern + * @mac_address: MAC Address for the adapter + * @ucPtrnId: Pattern ID + * @ucPtrnSize: Pattern size + * @usPtrnIntervalMs: in ms + * @ucPattern: Pattern buffer + */ +struct periodic_tx_pattern { + struct qdf_mac_addr mac_address; + uint8_t ucPtrnId; + uint16_t ucPtrnSize; + uint32_t usPtrnIntervalMs; + uint8_t ucPattern[WMI_PERIODIC_TX_PTRN_MAX_SIZE]; +}; + +/** + * struct flashing_req_params - led flashing parameter + * @reqId: request id + * @pattern_id: pattern identifier. 0: disconnected 1: connected + * @led_x0: led flashing parameter0 + * @led_x1: led flashing parameter1 + */ +struct flashing_req_params { + uint32_t req_id; + uint32_t pattern_id; + uint32_t led_x0; + uint32_t led_x1; +}; + +#define MAX_NUM_CHAN 128 + +/** + * struct wmi_pcl_chan_weights - Params to get the valid weighed list + * @pcl_list: Preferred channel list already sorted in the order of preference + * @pcl_len: Length of the PCL + * @saved_chan_list: Valid channel list updated as part of + * WMA_UPDATE_CHAN_LIST_REQ + * @saved_num_chan: Length of the valid channel list + * @weighed_valid_list: Weights of the valid channel list. This will have one + * to one mapping with valid_chan_list. FW expects channel order and size to be + * as per the list provided in WMI_SCAN_CHAN_LIST_CMDID. + * @weight_list: Weights assigned by policy manager + */ +struct wmi_pcl_chan_weights { + uint8_t pcl_list[MAX_NUM_CHAN]; + uint32_t pcl_len; + uint8_t saved_chan_list[MAX_NUM_CHAN]; + uint32_t saved_num_chan; + uint8_t weighed_valid_list[MAX_NUM_CHAN]; + uint8_t weight_list[MAX_NUM_CHAN]; +}; + +/** + * struct wmi_adaptive_dwelltime_params - the adaptive dwelltime params + * @vdev_id: vdev id + * @is_enabled: Adaptive dwell time is enabled/disabled + * @dwelltime_mode: global default adaptive dwell mode + * @lpf_weight: weight to calculate the average low pass + * filter for channel congestion + * @passive_mon_intval: intval to monitor wifi activity in passive scan in msec + * @wifi_act_threshold: % of wifi activity used in passive scan 0-100 + * + */ +struct wmi_adaptive_dwelltime_params { + uint32_t vdev_id; + bool is_enabled; + enum scan_dwelltime_adaptive_mode dwelltime_mode; + uint8_t lpf_weight; + uint8_t passive_mon_intval; + uint8_t wifi_act_threshold; +}; + +#define WMI_SCAN_CLIENT_MAX 7 + +/** + * struct wmi_dbs_scan_sel_params - DBS scan selection params + * @num_clients: Number of scan clients dutycycle + * @pdev_id: pdev_id for identifying the MAC + * @module_id: scan client module id + * @num_dbs_scans: number of DBS scans + * @num_non_dbs_scans: number of non-DBS scans + */ +struct wmi_dbs_scan_sel_params { + uint32_t num_clients; + uint32_t pdev_id; + uint32_t module_id[WMI_SCAN_CLIENT_MAX]; + uint32_t num_dbs_scans[WMI_SCAN_CLIENT_MAX]; + uint32_t num_non_dbs_scans[WMI_SCAN_CLIENT_MAX]; +}; + +/** + * struct set_arp_stats - set/reset arp stats + * @vdev_id: session id + * @flag: enable/disable stats + * @pkt_type: type of packet(1 - arp) + * @ip_addr: subnet ipv4 address in case of encrypted packets + * @pkt_type_bitmap: pkt bitmap + * @tcp_src_port: tcp src port for pkt tracking + * @tcp_dst_port: tcp dst port for pkt tracking + * @icmp_ipv4: target ipv4 address to track ping packets + * @reserved: reserved + */ +struct set_arp_stats { + uint32_t vdev_id; + uint8_t flag; + uint8_t pkt_type; + uint32_t ip_addr; + uint32_t pkt_type_bitmap; + uint32_t tcp_src_port; + uint32_t tcp_dst_port; + uint32_t icmp_ipv4; + uint32_t reserved; +}; + +/** + * struct get_arp_stats - get arp stats from firmware + * @pkt_type: packet type(1 - ARP) + * @vdev_id: session id + */ +struct get_arp_stats { + uint8_t pkt_type; + uint32_t vdev_id; +}; + +#endif /* _WMI_UNIFIED_STA_PARAM_H_ */