1ec61e7731968be994a23f2bd138f6761c8aea498xinhe/* 2956f54b391677d78379729dd14518edddf3c7660Etan Cohen * Copyright (C) 2016 The Android Open Source Project 3ec61e7731968be994a23f2bd138f6761c8aea498xinhe * 4ec61e7731968be994a23f2bd138f6761c8aea498xinhe * Licensed under the Apache License, Version 2.0 (the "License"); 5ec61e7731968be994a23f2bd138f6761c8aea498xinhe * you may not use this file except in compliance with the License. 6ec61e7731968be994a23f2bd138f6761c8aea498xinhe * You may obtain a copy of the License at 7ec61e7731968be994a23f2bd138f6761c8aea498xinhe * 8ec61e7731968be994a23f2bd138f6761c8aea498xinhe * http://www.apache.org/licenses/LICENSE-2.0 9ec61e7731968be994a23f2bd138f6761c8aea498xinhe * 10ec61e7731968be994a23f2bd138f6761c8aea498xinhe * Unless required by applicable law or agreed to in writing, software 11ec61e7731968be994a23f2bd138f6761c8aea498xinhe * distributed under the License is distributed on an "AS IS" BASIS, 12ec61e7731968be994a23f2bd138f6761c8aea498xinhe * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13ec61e7731968be994a23f2bd138f6761c8aea498xinhe * See the License for the specific language governing permissions and 14ec61e7731968be994a23f2bd138f6761c8aea498xinhe * limitations under the License. 15ec61e7731968be994a23f2bd138f6761c8aea498xinhe */ 16ec61e7731968be994a23f2bd138f6761c8aea498xinhe 17ec61e7731968be994a23f2bd138f6761c8aea498xinhe#ifndef __WIFI_HAL_STUB_H__ 18ec61e7731968be994a23f2bd138f6761c8aea498xinhe#define __WIFI_HAL_STUB_H__ 19ec61e7731968be994a23f2bd138f6761c8aea498xinhe 20ec61e7731968be994a23f2bd138f6761c8aea498xinhe#ifdef __cplusplus 21ec61e7731968be994a23f2bd138f6761c8aea498xinheextern "C" 22ec61e7731968be994a23f2bd138f6761c8aea498xinhe{ 23ec61e7731968be994a23f2bd138f6761c8aea498xinhe#endif 24be62c038644a39d9441b70cfafb95f9518878541Etan Cohen 25ec61e7731968be994a23f2bd138f6761c8aea498xinhe#include "wifi_hal.h" 26be62c038644a39d9441b70cfafb95f9518878541Etan Cohen 27be62c038644a39d9441b70cfafb95f9518878541Etan Cohenint init_wifi_stub_hal_func_table(wifi_hal_fn *hal_fn); 28be62c038644a39d9441b70cfafb95f9518878541Etan Cohen 29ec61e7731968be994a23f2bd138f6761c8aea498xinhe/* declare all HAL stub API here*/ 30ec61e7731968be994a23f2bd138f6761c8aea498xinhewifi_error wifi_initialize_stub(wifi_handle *handle); 31ec61e7731968be994a23f2bd138f6761c8aea498xinhevoid wifi_cleanup_stub(wifi_handle handle, wifi_cleaned_up_handler handler); 32ec61e7731968be994a23f2bd138f6761c8aea498xinhevoid wifi_event_loop_stub(wifi_handle handle); 33ec61e7731968be994a23f2bd138f6761c8aea498xinhevoid wifi_get_error_info_stub(wifi_error err, const char **msg); 34ec61e7731968be994a23f2bd138f6761c8aea498xinhewifi_error wifi_get_supported_feature_set_stub(wifi_interface_handle handle, feature_set *set); 35ec61e7731968be994a23f2bd138f6761c8aea498xinhewifi_error wifi_get_concurrency_matrix_stub(wifi_interface_handle handle, int set_size_max, 36ec61e7731968be994a23f2bd138f6761c8aea498xinhe feature_set set[], int *set_size); 37ec61e7731968be994a23f2bd138f6761c8aea498xinhewifi_error wifi_get_ifaces_stub(wifi_handle handle, int *num_ifaces, wifi_interface_handle **ifaces); 38ec61e7731968be994a23f2bd138f6761c8aea498xinhewifi_error wifi_get_iface_name_stub(wifi_interface_handle iface, char *name, size_t size); 39ec61e7731968be994a23f2bd138f6761c8aea498xinhewifi_error wifi_set_iface_event_handler_stub(wifi_request_id id, wifi_interface_handle iface, 40ec61e7731968be994a23f2bd138f6761c8aea498xinhe wifi_event_handler eh); 41ec61e7731968be994a23f2bd138f6761c8aea498xinhewifi_error wifi_reset_iface_event_handler_stub(wifi_request_id id, wifi_interface_handle iface); 42ec61e7731968be994a23f2bd138f6761c8aea498xinhewifi_error wifi_set_nodfs_flag_stub(wifi_interface_handle handle, u32 nodfs); 43ec61e7731968be994a23f2bd138f6761c8aea498xinhewifi_error wifi_set_scanning_mac_oui_stub(wifi_interface_handle handle, unsigned char *oui); 44ec61e7731968be994a23f2bd138f6761c8aea498xinhewifi_error wifi_get_supported_channels_stub(wifi_handle handle, int *size, wifi_channel *list); 45ec61e7731968be994a23f2bd138f6761c8aea498xinhewifi_error wifi_is_epr_supported_stub(wifi_handle handle); 46ec61e7731968be994a23f2bd138f6761c8aea498xinhewifi_error wifi_start_gscan_stub(wifi_request_id id, wifi_interface_handle iface, 47ec61e7731968be994a23f2bd138f6761c8aea498xinhe wifi_scan_cmd_params params, wifi_scan_result_handler handler); 48ec61e7731968be994a23f2bd138f6761c8aea498xinhewifi_error wifi_stop_gscan_stub(wifi_request_id id, wifi_interface_handle iface); 49ec61e7731968be994a23f2bd138f6761c8aea498xinhewifi_error wifi_get_cached_gscan_results_stub(wifi_interface_handle iface, byte flush, 50ec61e7731968be994a23f2bd138f6761c8aea498xinhe int max, wifi_cached_scan_results *results, int *num); 51ec61e7731968be994a23f2bd138f6761c8aea498xinhewifi_error wifi_set_bssid_hotlist_stub(wifi_request_id id, wifi_interface_handle iface, 52ec61e7731968be994a23f2bd138f6761c8aea498xinhe wifi_bssid_hotlist_params params, wifi_hotlist_ap_found_handler handler); 53ec61e7731968be994a23f2bd138f6761c8aea498xinhewifi_error wifi_reset_bssid_hotlist_stub(wifi_request_id id, wifi_interface_handle iface); 54ec61e7731968be994a23f2bd138f6761c8aea498xinhewifi_error wifi_set_significant_change_handler_stub(wifi_request_id id, wifi_interface_handle iface, 55ec61e7731968be994a23f2bd138f6761c8aea498xinhe wifi_significant_change_params params, wifi_significant_change_handler handler); 56ec61e7731968be994a23f2bd138f6761c8aea498xinhewifi_error wifi_reset_significant_change_handler_stub(wifi_request_id id, 57ec61e7731968be994a23f2bd138f6761c8aea498xinhe wifi_interface_handle iface); 58ec61e7731968be994a23f2bd138f6761c8aea498xinhewifi_error wifi_get_gscan_capabilities_stub(wifi_interface_handle handle, 59ec61e7731968be994a23f2bd138f6761c8aea498xinhe wifi_gscan_capabilities *capabilities); 60ec61e7731968be994a23f2bd138f6761c8aea498xinhewifi_error wifi_set_link_stats_stub(wifi_interface_handle iface, wifi_link_layer_params params); 61ec61e7731968be994a23f2bd138f6761c8aea498xinhewifi_error wifi_get_link_stats_stub(wifi_request_id id, 62ec61e7731968be994a23f2bd138f6761c8aea498xinhe wifi_interface_handle iface, wifi_stats_result_handler handler); 63d57f630f6a7a5fca872d2b96fc4cce1905daee5dxinhewifi_error wifi_clear_link_stats_stub(wifi_interface_handle iface, 64ec61e7731968be994a23f2bd138f6761c8aea498xinhe u32 stats_clear_req_mask, u32 *stats_clear_rsp_mask, u8 stop_req, u8 *stop_rsp); 65d57f630f6a7a5fca872d2b96fc4cce1905daee5dxinhewifi_error wifi_get_valid_channels_stub(wifi_interface_handle handle, 66ec61e7731968be994a23f2bd138f6761c8aea498xinhe int band, int max_channels, wifi_channel *channels, int *num_channels); 67d57f630f6a7a5fca872d2b96fc4cce1905daee5dxinhewifi_error wifi_rtt_range_request_stub(wifi_request_id id, wifi_interface_handle iface, 68ec61e7731968be994a23f2bd138f6761c8aea498xinhe unsigned num_rtt_config, wifi_rtt_config rtt_config[], wifi_rtt_event_handler handler); 69d57f630f6a7a5fca872d2b96fc4cce1905daee5dxinhewifi_error wifi_rtt_range_cancel_stub(wifi_request_id id, wifi_interface_handle iface, 70ec61e7731968be994a23f2bd138f6761c8aea498xinhe unsigned num_devices, mac_addr addr[]); 71d57f630f6a7a5fca872d2b96fc4cce1905daee5dxinhewifi_error wifi_get_rtt_capabilities_stub(wifi_interface_handle iface, 72ec61e7731968be994a23f2bd138f6761c8aea498xinhe wifi_rtt_capabilities *capabilities); 73342457d535beadd74d140128f5563139704e642aWei Wangwifi_error wifi_rtt_get_available_channel_stub(wifi_interface_handle iface, 7468cb8c02b4ad079c54a2ffd4407da921d18c7af9Wei Wang wifi_channel_info* channel); 7568cb8c02b4ad079c54a2ffd4407da921d18c7af9Wei Wangwifi_error wifi_enable_responder_stub(wifi_request_id id, wifi_interface_handle iface, 7668cb8c02b4ad079c54a2ffd4407da921d18c7af9Wei Wang wifi_channel_info channel_hint, unsigned max_duration_seconds, 7768cb8c02b4ad079c54a2ffd4407da921d18c7af9Wei Wang wifi_channel_info* channel_used); 7868cb8c02b4ad079c54a2ffd4407da921d18c7af9Wei Wangwifi_error wifi_disable_responder_stub(wifi_request_id id, wifi_interface_handle iface); 7968cb8c02b4ad079c54a2ffd4407da921d18c7af9Wei Wang 80d57f630f6a7a5fca872d2b96fc4cce1905daee5dxinhewifi_error wifi_set_nodfs_flag_stub(wifi_interface_handle iface, u32 nodfs); 81d57f630f6a7a5fca872d2b96fc4cce1905daee5dxinhewifi_error wifi_start_logging_stub(wifi_interface_handle iface, u32 verbose_level, u32 flags, 825faa29da989a82096e1e17c46126604eecfc0780Pierre Vandwalle u32 max_interval_sec, u32 min_data_size, char *buffer_name); 832a6d76f0899289cd3b96e3428f02076fdbc0363eMitchell Willswifi_error wifi_set_epno_list_stub(wifi_request_id id, wifi_interface_info *iface, 842a6d76f0899289cd3b96e3428f02076fdbc0363eMitchell Wills const wifi_epno_params *params, wifi_epno_handler handler); 852a6d76f0899289cd3b96e3428f02076fdbc0363eMitchell Willswifi_error wifi_reset_epno_list_stub(wifi_request_id id, wifi_interface_info *iface); 86d57f630f6a7a5fca872d2b96fc4cce1905daee5dxinhewifi_error wifi_set_country_code_stub(wifi_interface_handle iface, const char *code); 8778057ef03352033a9a5fb718f52323e67fcaa1f0xinhewifi_error wifi_get_firmware_memory_dump_stub( wifi_interface_handle iface, 8878057ef03352033a9a5fb718f52323e67fcaa1f0xinhe wifi_firmware_memory_dump_handler handler); 8978057ef03352033a9a5fb718f52323e67fcaa1f0xinhewifi_error wifi_set_log_handler_stub(wifi_request_id id, wifi_interface_handle iface, 9078057ef03352033a9a5fb718f52323e67fcaa1f0xinhe wifi_ring_buffer_data_handler handler); 9132cbc7acce70697ccf7881324bf8a6861905e899JerryLeewifi_error wifi_reset_log_handler_stub(wifi_request_id id, wifi_interface_handle iface); 9278057ef03352033a9a5fb718f52323e67fcaa1f0xinhewifi_error wifi_set_alert_handler_stub(wifi_request_id id, wifi_interface_handle iface, 9378057ef03352033a9a5fb718f52323e67fcaa1f0xinhe wifi_alert_handler handler); 94370ad50a5f1dd907de8f4d201f73eb7139f79dd4Jerry Leewifi_error wifi_reset_alert_handler_stub(wifi_request_id id, wifi_interface_handle iface); 956d0cd10057e479dfcb8c9e290b9d1d433644dc06xinhewifi_error wifi_get_firmware_version_stub(wifi_interface_handle iface, char *buffer, 966d0cd10057e479dfcb8c9e290b9d1d433644dc06xinhe int buffer_size); 9778057ef03352033a9a5fb718f52323e67fcaa1f0xinhewifi_error wifi_get_ring_buffers_status_stub(wifi_interface_handle iface, 986d0cd10057e479dfcb8c9e290b9d1d433644dc06xinhe u32 *num_rings, wifi_ring_buffer_status *status); 9978057ef03352033a9a5fb718f52323e67fcaa1f0xinhewifi_error wifi_get_logger_supported_feature_set_stub(wifi_interface_handle iface, 10078057ef03352033a9a5fb718f52323e67fcaa1f0xinhe unsigned int *support); 10178057ef03352033a9a5fb718f52323e67fcaa1f0xinhewifi_error wifi_get_ring_data_stub(wifi_interface_handle iface, char *ring_name); 102d57f630f6a7a5fca872d2b96fc4cce1905daee5dxinhewifi_error wifi_enable_tdls_stub(wifi_interface_handle iface, mac_addr addr, 103d57f630f6a7a5fca872d2b96fc4cce1905daee5dxinhe wifi_tdls_params *params, wifi_tdls_handler handler); 104d57f630f6a7a5fca872d2b96fc4cce1905daee5dxinhewifi_error wifi_disable_tdls_stub(wifi_interface_handle iface, mac_addr addr); 105d57f630f6a7a5fca872d2b96fc4cce1905daee5dxinhewifi_error wifi_get_tdls_status_stub(wifi_interface_handle iface, mac_addr addr, 106d57f630f6a7a5fca872d2b96fc4cce1905daee5dxinhe wifi_tdls_status *status); 107d57f630f6a7a5fca872d2b96fc4cce1905daee5dxinhewifi_error wifi_get_tdls_capabilities_stub(wifi_interface_handle iface, 108d57f630f6a7a5fca872d2b96fc4cce1905daee5dxinhe wifi_tdls_capabilities *capabilities); 1096d0cd10057e479dfcb8c9e290b9d1d433644dc06xinhewifi_error wifi_get_driver_version_stub(wifi_interface_handle iface, char *buffer, 1106d0cd10057e479dfcb8c9e290b9d1d433644dc06xinhe int buffer_size); 111d4c25fd76644d5490700ae69fada4669de5193a1Pierre Vandwalle wifi_error wifi_set_country_code_stub(wifi_interface_handle iface, const char *code); 112d4c25fd76644d5490700ae69fada4669de5193a1Pierre Vandwallewifi_error wifi_set_bssid_blacklist_stub(wifi_request_id id, wifi_interface_handle iface, 113d4c25fd76644d5490700ae69fada4669de5193a1Pierre Vandwalle wifi_bssid_params params); 1142723d997840a21379ac1c1224bf07e5026559603Ecco Parkwifi_error wifi_start_sending_offloaded_packet_stub(wifi_request_id id, 1152723d997840a21379ac1c1224bf07e5026559603Ecco Park wifi_interface_handle iface, u8 *ip_packet, u16 ip_packet_len, 1162723d997840a21379ac1c1224bf07e5026559603Ecco Park u8 *src_mac_addr, u8 *dst_mac_addr, u32 period_msec); 1172723d997840a21379ac1c1224bf07e5026559603Ecco Parkwifi_error wifi_stop_sending_offloaded_packet_stub(wifi_request_id id, wifi_interface_handle iface); 1185e5aa7059e474895c6719738d9def61eecc15973Prerepa Viswanadhamwifi_error wifi_get_wake_reason_stats_stub(wifi_interface_handle iface, 1195e5aa7059e474895c6719738d9def61eecc15973Prerepa Viswanadham WLAN_DRIVER_WAKE_REASON_CNT *wifi_wake_reason_cnt); 120b6e8d98d1af299afe8ee0cb2e00563fdf54f7339Erik Klinewifi_error wifi_configure_nd_offload_stub(wifi_interface_handle iface, u8 enable); 121956f54b391677d78379729dd14518edddf3c7660Etan Cohenwifi_error wifi_nan_enable_request_stub(transaction_id id, 122956f54b391677d78379729dd14518edddf3c7660Etan Cohen wifi_interface_handle iface, 123956f54b391677d78379729dd14518edddf3c7660Etan Cohen NanEnableRequest* msg); 124956f54b391677d78379729dd14518edddf3c7660Etan Cohenwifi_error wifi_nan_disable_request_stub(transaction_id id, 125956f54b391677d78379729dd14518edddf3c7660Etan Cohen wifi_interface_handle iface); 126956f54b391677d78379729dd14518edddf3c7660Etan Cohenwifi_error wifi_nan_publish_request_stub(transaction_id id, 127956f54b391677d78379729dd14518edddf3c7660Etan Cohen wifi_interface_handle iface, 128956f54b391677d78379729dd14518edddf3c7660Etan Cohen NanPublishRequest* msg); 129956f54b391677d78379729dd14518edddf3c7660Etan Cohenwifi_error wifi_nan_publish_cancel_request_stub(transaction_id id, 130956f54b391677d78379729dd14518edddf3c7660Etan Cohen wifi_interface_handle iface, 131956f54b391677d78379729dd14518edddf3c7660Etan Cohen NanPublishCancelRequest* msg); 132956f54b391677d78379729dd14518edddf3c7660Etan Cohenwifi_error wifi_nan_subscribe_request_stub(transaction_id id, 133956f54b391677d78379729dd14518edddf3c7660Etan Cohen wifi_interface_handle iface, 134956f54b391677d78379729dd14518edddf3c7660Etan Cohen NanSubscribeRequest* msg); 135956f54b391677d78379729dd14518edddf3c7660Etan Cohenwifi_error wifi_nan_subscribe_cancel_request_stub(transaction_id id, 136956f54b391677d78379729dd14518edddf3c7660Etan Cohen wifi_interface_handle iface, 137956f54b391677d78379729dd14518edddf3c7660Etan Cohen NanSubscribeCancelRequest* msg); 138956f54b391677d78379729dd14518edddf3c7660Etan Cohenwifi_error wifi_nan_transmit_followup_request_stub(transaction_id id, 139956f54b391677d78379729dd14518edddf3c7660Etan Cohen wifi_interface_handle iface, 140956f54b391677d78379729dd14518edddf3c7660Etan Cohen NanTransmitFollowupRequest* msg); 141956f54b391677d78379729dd14518edddf3c7660Etan Cohenwifi_error wifi_nan_stats_request_stub(transaction_id id, 142956f54b391677d78379729dd14518edddf3c7660Etan Cohen wifi_interface_handle iface, 143956f54b391677d78379729dd14518edddf3c7660Etan Cohen NanStatsRequest* msg); 144956f54b391677d78379729dd14518edddf3c7660Etan Cohenwifi_error wifi_nan_config_request_stub(transaction_id id, 145956f54b391677d78379729dd14518edddf3c7660Etan Cohen wifi_interface_handle iface, 146956f54b391677d78379729dd14518edddf3c7660Etan Cohen NanConfigRequest* msg); 147956f54b391677d78379729dd14518edddf3c7660Etan Cohenwifi_error wifi_nan_tca_request_stub(transaction_id id, 148956f54b391677d78379729dd14518edddf3c7660Etan Cohen wifi_interface_handle iface, 149956f54b391677d78379729dd14518edddf3c7660Etan Cohen NanTCARequest* msg); 150956f54b391677d78379729dd14518edddf3c7660Etan Cohenwifi_error wifi_nan_beacon_sdf_payload_request_stub(transaction_id id, 151956f54b391677d78379729dd14518edddf3c7660Etan Cohen wifi_interface_handle iface, 152956f54b391677d78379729dd14518edddf3c7660Etan Cohen NanBeaconSdfPayloadRequest* msg); 153956f54b391677d78379729dd14518edddf3c7660Etan Cohenwifi_error wifi_nan_register_handler_stub(wifi_interface_handle iface, 154956f54b391677d78379729dd14518edddf3c7660Etan Cohen NanCallbackHandler handlers); 155956f54b391677d78379729dd14518edddf3c7660Etan Cohenwifi_error wifi_nan_get_version_stub(wifi_handle handle, 156956f54b391677d78379729dd14518edddf3c7660Etan Cohen NanVersion* version); 157e36f5903f5d236a29dc94c8bdb215807ae75f5a1Etan Cohenwifi_error wifi_nan_get_capabilities_stub(transaction_id id, 158e36f5903f5d236a29dc94c8bdb215807ae75f5a1Etan Cohen wifi_interface_handle iface); 159c0d77321e4fe6058017125606fa7da558cfe3c33Paul Jensenwifi_error wifi_get_packet_filter_capabilities_stub(wifi_interface_handle handle, 160c0d77321e4fe6058017125606fa7da558cfe3c33Paul Jensen u32 *version, u32 *max_len); 161c0d77321e4fe6058017125606fa7da558cfe3c33Paul Jensenwifi_error wifi_set_packet_filter_stub(wifi_interface_handle handle, 162c0d77321e4fe6058017125606fa7da558cfe3c33Paul Jensen const u8 *program, u32 len); 163956f54b391677d78379729dd14518edddf3c7660Etan Cohen 164ec61e7731968be994a23f2bd138f6761c8aea498xinhe#ifdef __cplusplus 165ec61e7731968be994a23f2bd138f6761c8aea498xinhe} 166ec61e7731968be994a23f2bd138f6761c8aea498xinhe#endif 167628199920e1d1fa86caabaf13874e7dc601e7b06xinhe#endif //__WIFI_HAL_STUB_H__ 168