• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2016 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *     http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef __WIFI_HAL_STUB_H__
18 #define __WIFI_HAL_STUB_H__
19 
20 #ifdef __cplusplus
21 extern "C"
22 {
23 #endif
24 
25 #include "wifi_hal.h"
26 
27 int init_wifi_stub_hal_func_table(wifi_hal_fn *hal_fn);
28 
29 /* declare all HAL stub API here*/
30 wifi_error wifi_initialize_stub(wifi_handle *handle);
31 void wifi_cleanup_stub(wifi_handle handle, wifi_cleaned_up_handler handler);
32 void wifi_event_loop_stub(wifi_handle handle);
33 void wifi_get_error_info_stub(wifi_error err, const char **msg);
34 wifi_error wifi_get_supported_feature_set_stub(wifi_interface_handle handle, feature_set *set);
35 wifi_error wifi_get_concurrency_matrix_stub(wifi_interface_handle handle, int set_size_max,
36         feature_set set[], int *set_size);
37 wifi_error wifi_get_ifaces_stub(wifi_handle handle, int *num_ifaces, wifi_interface_handle **ifaces);
38 wifi_error wifi_get_iface_name_stub(wifi_interface_handle iface, char *name, size_t size);
39 wifi_error wifi_set_iface_event_handler_stub(wifi_request_id id, wifi_interface_handle iface,
40         wifi_event_handler eh);
41 wifi_error wifi_reset_iface_event_handler_stub(wifi_request_id id, wifi_interface_handle iface);
42 wifi_error wifi_set_nodfs_flag_stub(wifi_interface_handle handle, u32 nodfs);
43 wifi_error wifi_set_scanning_mac_oui_stub(wifi_interface_handle handle, unsigned char *oui);
44 wifi_error wifi_get_supported_channels_stub(wifi_handle handle, int *size, wifi_channel *list);
45 wifi_error wifi_is_epr_supported_stub(wifi_handle handle);
46 wifi_error wifi_start_gscan_stub(wifi_request_id id, wifi_interface_handle iface,
47         wifi_scan_cmd_params params, wifi_scan_result_handler handler);
48 wifi_error wifi_stop_gscan_stub(wifi_request_id id, wifi_interface_handle iface);
49 wifi_error wifi_get_cached_gscan_results_stub(wifi_interface_handle iface, byte flush,
50         int max, wifi_cached_scan_results *results, int *num);
51 wifi_error wifi_set_bssid_hotlist_stub(wifi_request_id id, wifi_interface_handle iface,
52         wifi_bssid_hotlist_params params, wifi_hotlist_ap_found_handler handler);
53 wifi_error wifi_reset_bssid_hotlist_stub(wifi_request_id id, wifi_interface_handle iface);
54 wifi_error wifi_set_significant_change_handler_stub(wifi_request_id id, wifi_interface_handle iface,
55         wifi_significant_change_params params, wifi_significant_change_handler handler);
56 wifi_error wifi_reset_significant_change_handler_stub(wifi_request_id id,
57         wifi_interface_handle iface);
58 wifi_error wifi_get_gscan_capabilities_stub(wifi_interface_handle handle,
59         wifi_gscan_capabilities *capabilities);
60 wifi_error wifi_set_link_stats_stub(wifi_interface_handle iface, wifi_link_layer_params params);
61 wifi_error wifi_get_link_stats_stub(wifi_request_id id,
62          wifi_interface_handle iface, wifi_stats_result_handler handler);
63 wifi_error wifi_clear_link_stats_stub(wifi_interface_handle iface,
64        u32 stats_clear_req_mask, u32 *stats_clear_rsp_mask, u8 stop_req, u8 *stop_rsp);
65 wifi_error wifi_get_valid_channels_stub(wifi_interface_handle handle,
66          int band, int max_channels, wifi_channel *channels, int *num_channels);
67 wifi_error wifi_rtt_range_request_stub(wifi_request_id id, wifi_interface_handle iface,
68          unsigned num_rtt_config, wifi_rtt_config rtt_config[], wifi_rtt_event_handler handler);
69 wifi_error wifi_rtt_range_cancel_stub(wifi_request_id id,  wifi_interface_handle iface,
70          unsigned num_devices, mac_addr addr[]);
71 wifi_error wifi_get_rtt_capabilities_stub(wifi_interface_handle iface,
72          wifi_rtt_capabilities *capabilities);
73 wifi_error wifi_rtt_get_available_channel_stub(wifi_interface_handle iface,
74         wifi_channel_info* channel);
75 wifi_error wifi_enable_responder_stub(wifi_request_id id, wifi_interface_handle iface,
76         wifi_channel_info channel_hint, unsigned max_duration_seconds,
77         wifi_channel_info* channel_used);
78 wifi_error wifi_disable_responder_stub(wifi_request_id id, wifi_interface_handle iface);
79 
80 wifi_error wifi_set_nodfs_flag_stub(wifi_interface_handle iface, u32 nodfs);
81 wifi_error wifi_start_logging_stub(wifi_interface_handle iface, u32 verbose_level, u32 flags,
82          u32 max_interval_sec, u32 min_data_size, char *buffer_name);
83 wifi_error wifi_set_epno_list_stub(wifi_request_id id, wifi_interface_info *iface,
84         const wifi_epno_params *params, wifi_epno_handler handler);
85 wifi_error wifi_reset_epno_list_stub(wifi_request_id id, wifi_interface_info *iface);
86 wifi_error wifi_set_country_code_stub(wifi_interface_handle iface, const char *code);
87 wifi_error wifi_get_firmware_memory_dump_stub( wifi_interface_handle iface,
88         wifi_firmware_memory_dump_handler handler);
89 wifi_error wifi_set_log_handler_stub(wifi_request_id id, wifi_interface_handle iface,
90         wifi_ring_buffer_data_handler handler);
91 wifi_error wifi_reset_log_handler_stub(wifi_request_id id, wifi_interface_handle iface);
92 wifi_error wifi_set_alert_handler_stub(wifi_request_id id, wifi_interface_handle iface,
93         wifi_alert_handler handler);
94 wifi_error wifi_reset_alert_handler_stub(wifi_request_id id, wifi_interface_handle iface);
95 wifi_error wifi_get_firmware_version_stub(wifi_interface_handle iface, char *buffer,
96         int buffer_size);
97 wifi_error wifi_get_ring_buffers_status_stub(wifi_interface_handle iface,
98         u32 *num_rings, wifi_ring_buffer_status *status);
99 wifi_error wifi_get_logger_supported_feature_set_stub(wifi_interface_handle iface,
100         unsigned int *support);
101 wifi_error wifi_get_ring_data_stub(wifi_interface_handle iface, char *ring_name);
102 wifi_error wifi_enable_tdls_stub(wifi_interface_handle iface, mac_addr addr,
103         wifi_tdls_params *params, wifi_tdls_handler handler);
104 wifi_error wifi_disable_tdls_stub(wifi_interface_handle iface, mac_addr addr);
105 wifi_error wifi_get_tdls_status_stub(wifi_interface_handle iface, mac_addr addr,
106         wifi_tdls_status *status);
107 wifi_error wifi_get_tdls_capabilities_stub(wifi_interface_handle iface,
108         wifi_tdls_capabilities *capabilities);
109 wifi_error wifi_get_driver_version_stub(wifi_interface_handle iface, char *buffer,
110         int buffer_size);
111  wifi_error wifi_set_country_code_stub(wifi_interface_handle iface, const char *code);
112 wifi_error wifi_set_bssid_blacklist_stub(wifi_request_id id, wifi_interface_handle iface,
113         wifi_bssid_params params);
114 wifi_error wifi_start_sending_offloaded_packet_stub(wifi_request_id id,
115         wifi_interface_handle iface, u8 *ip_packet, u16 ip_packet_len,
116         u8 *src_mac_addr, u8 *dst_mac_addr, u32 period_msec);
117 wifi_error wifi_stop_sending_offloaded_packet_stub(wifi_request_id id, wifi_interface_handle iface);
118 wifi_error wifi_get_wake_reason_stats_stub(wifi_interface_handle iface,
119                                         WLAN_DRIVER_WAKE_REASON_CNT *wifi_wake_reason_cnt);
120 wifi_error wifi_configure_nd_offload_stub(wifi_interface_handle iface, u8 enable);
121 wifi_error wifi_nan_enable_request_stub(transaction_id id,
122                               wifi_interface_handle iface,
123                               NanEnableRequest* msg);
124 wifi_error wifi_nan_disable_request_stub(transaction_id id,
125                                wifi_interface_handle iface);
126 wifi_error wifi_nan_publish_request_stub(transaction_id id,
127                                wifi_interface_handle iface,
128                                NanPublishRequest* msg);
129 wifi_error wifi_nan_publish_cancel_request_stub(transaction_id id,
130                                       wifi_interface_handle iface,
131                                       NanPublishCancelRequest* msg);
132 wifi_error wifi_nan_subscribe_request_stub(transaction_id id,
133                                  wifi_interface_handle iface,
134                                  NanSubscribeRequest* msg);
135 wifi_error wifi_nan_subscribe_cancel_request_stub(transaction_id id,
136                                         wifi_interface_handle iface,
137                                         NanSubscribeCancelRequest* msg);
138 wifi_error wifi_nan_transmit_followup_request_stub(transaction_id id,
139                                          wifi_interface_handle iface,
140                                          NanTransmitFollowupRequest* msg);
141 wifi_error wifi_nan_stats_request_stub(transaction_id id,
142                              wifi_interface_handle iface,
143                              NanStatsRequest* msg);
144 wifi_error wifi_nan_config_request_stub(transaction_id id,
145                               wifi_interface_handle iface,
146                               NanConfigRequest* msg);
147 wifi_error wifi_nan_tca_request_stub(transaction_id id,
148                            wifi_interface_handle iface,
149                            NanTCARequest* msg);
150 wifi_error wifi_nan_beacon_sdf_payload_request_stub(transaction_id id,
151                                          wifi_interface_handle iface,
152                                          NanBeaconSdfPayloadRequest* msg);
153 wifi_error wifi_nan_register_handler_stub(wifi_interface_handle iface,
154                                 NanCallbackHandler handlers);
155 wifi_error wifi_nan_get_version_stub(wifi_handle handle,
156                            NanVersion* version);
157 wifi_error wifi_nan_get_capabilities_stub(transaction_id id,
158                                 wifi_interface_handle iface);
159 wifi_error wifi_get_packet_filter_capabilities_stub(wifi_interface_handle handle,
160                                           u32 *version, u32 *max_len);
161 wifi_error wifi_set_packet_filter_stub(wifi_interface_handle handle,
162                              const u8 *program, u32 len);
163 
164 #ifdef __cplusplus
165 }
166 #endif
167 #endif //__WIFI_HAL_STUB_H__
168