hal_tool.cpp revision 6842fee9c6df2db54f4f7381e32fe02f4e777050
1b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan/*
2b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan * Copyright (C) 2016 The Android Open Source Project
3b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan *
4b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan * Licensed under the Apache License, Version 2.0 (the "License");
5b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan * you may not use this file except in compliance with the License.
6b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan * You may obtain a copy of the License at
7b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan *
8b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan *      http://www.apache.org/licenses/LICENSE-2.0
9b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan *
10b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan * Unless required by applicable law or agreed to in writing, software
11b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan * distributed under the License is distributed on an "AS IS" BASIS,
12b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan * See the License for the specific language governing permissions and
14b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan * limitations under the License.
15b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan */
16b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan
17b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan#include "wifi_system/hal.h"
18b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan
19b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan#include <log/log.h>
20b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan
21b1b7080deea42aa533c3757b585cf765c6b76732Michael Channamespace android {
22b1b7080deea42aa533c3757b585cf765c6b76732Michael Channamespace wifi_system {
23b1b7080deea42aa533c3757b585cf765c6b76732Michael Channamespace {
24b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan
25b1b7080deea42aa533c3757b585cf765c6b76732Michael Chanwifi_error wifi_initialize_stub(wifi_handle* handle) {
26b064db0d1a7ffcedddd691b35d57e2cdb0268883Michael Chan  return WIFI_ERROR_NOT_SUPPORTED;
27b064db0d1a7ffcedddd691b35d57e2cdb0268883Michael Chan}
28b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan
29b1b7080deea42aa533c3757b585cf765c6b76732Michael Chanvoid wifi_cleanup_stub(wifi_handle handle, wifi_cleaned_up_handler handler) {}
30b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan
31b1b7080deea42aa533c3757b585cf765c6b76732Michael Chanvoid wifi_event_loop_stub(wifi_handle handle) {}
32b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan
33b1b7080deea42aa533c3757b585cf765c6b76732Michael Chanvoid wifi_get_error_info_stub(wifi_error err, const char** msg) { *msg = NULL; }
34b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan
351db8933b4e7e0190f59344c86e92d56607658089Michael Chanwifi_error wifi_get_supported_feature_set_stub(wifi_interface_handle handle,
36143a7e20a46dbd66bec4e4d7e8e0dcb693d343d3Michael Chan                                               feature_set* set) {
37b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan  return WIFI_ERROR_UNINITIALIZED;
38b064db0d1a7ffcedddd691b35d57e2cdb0268883Michael Chan}
39b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan
40b1b7080deea42aa533c3757b585cf765c6b76732Michael Chanwifi_error wifi_get_concurrency_matrix_stub(wifi_interface_handle handle,
41a8dd2dfa92587e5fc11e6c24da91be9e7bf3afb7James Kung                                            int max_size, feature_set* matrix,
42b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan                                            int* size) {
4396e8dde991e426d0cd44f5b4eb76118fd7374ac0Sam Blitzstein  return WIFI_ERROR_UNINITIALIZED;
44b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan}
45b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan
46b1b7080deea42aa533c3757b585cf765c6b76732Michael Chanwifi_error wifi_set_scanning_mac_oui_stub(wifi_interface_handle handle,
47b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan                                          unsigned char* oui_data) {
48b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan  return WIFI_ERROR_UNINITIALIZED;
49a8dd2dfa92587e5fc11e6c24da91be9e7bf3afb7James Kung}
50a8dd2dfa92587e5fc11e6c24da91be9e7bf3afb7James Kung
51a8dd2dfa92587e5fc11e6c24da91be9e7bf3afb7James Kung/* List of all supported channels, including 5GHz channels */
52a8dd2dfa92587e5fc11e6c24da91be9e7bf3afb7James Kungwifi_error wifi_get_supported_channels_stub(wifi_handle handle, int* size,
53a8dd2dfa92587e5fc11e6c24da91be9e7bf3afb7James Kung                                            wifi_channel* list) {
54a8dd2dfa92587e5fc11e6c24da91be9e7bf3afb7James Kung  return WIFI_ERROR_UNINITIALIZED;
55b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan}
56b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan
57b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan/* Enhanced power reporting */
58b1b7080deea42aa533c3757b585cf765c6b76732Michael Chanwifi_error wifi_is_epr_supported_stub(wifi_handle handle) {
59b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan  return WIFI_ERROR_UNINITIALIZED;
60b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan}
61b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan
62b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan/* multiple interface support */
63b1b7080deea42aa533c3757b585cf765c6b76732Michael Chanwifi_error wifi_get_ifaces_stub(wifi_handle handle, int* num_ifaces,
64b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan                                wifi_interface_handle** ifaces) {
65b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan  return WIFI_ERROR_UNINITIALIZED;
66b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan}
67b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan
68b1b7080deea42aa533c3757b585cf765c6b76732Michael Chanwifi_error wifi_get_iface_name_stub(wifi_interface_handle iface, char* name,
69b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan                                    size_t size) {
70b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan  return WIFI_ERROR_UNINITIALIZED;
71b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan}
72b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan
73b1b7080deea42aa533c3757b585cf765c6b76732Michael Chanwifi_error wifi_set_iface_event_handler_stub(wifi_request_id id,
74b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan                                             wifi_interface_handle iface,
75b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan                                             wifi_event_handler eh) {
76b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan  return WIFI_ERROR_UNINITIALIZED;
77b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan}
78b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan
79b1b7080deea42aa533c3757b585cf765c6b76732Michael Chanwifi_error wifi_reset_iface_event_handler_stub(wifi_request_id id,
80b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan                                               wifi_interface_handle iface) {
81b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan  return WIFI_ERROR_UNINITIALIZED;
82b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan}
83b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan
84b1b7080deea42aa533c3757b585cf765c6b76732Michael Chanwifi_error wifi_start_gscan_stub(wifi_request_id id,
85b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan                                 wifi_interface_handle iface,
86b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan                                 wifi_scan_cmd_params params,
87b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan                                 wifi_scan_result_handler handler) {
88b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan  return WIFI_ERROR_UNINITIALIZED;
89b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan}
90b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan
91b1b7080deea42aa533c3757b585cf765c6b76732Michael Chanwifi_error wifi_stop_gscan_stub(wifi_request_id id,
92b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan                                wifi_interface_handle iface) {
93b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan  return WIFI_ERROR_UNINITIALIZED;
94b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan}
95b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan
96b1b7080deea42aa533c3757b585cf765c6b76732Michael Chanwifi_error wifi_get_cached_gscan_results_stub(wifi_interface_handle iface,
97b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan                                              byte flush, int max,
98b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan                                              wifi_cached_scan_results* results,
99b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan                                              int* num) {
100b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan  return WIFI_ERROR_UNINITIALIZED;
101b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan}
102a8dd2dfa92587e5fc11e6c24da91be9e7bf3afb7James Kung
103a8dd2dfa92587e5fc11e6c24da91be9e7bf3afb7James Kungwifi_error wifi_set_bssid_hotlist_stub(wifi_request_id id,
104a8dd2dfa92587e5fc11e6c24da91be9e7bf3afb7James Kung                                       wifi_interface_handle iface,
105a8dd2dfa92587e5fc11e6c24da91be9e7bf3afb7James Kung                                       wifi_bssid_hotlist_params params,
106a8dd2dfa92587e5fc11e6c24da91be9e7bf3afb7James Kung                                       wifi_hotlist_ap_found_handler handler) {
107a8dd2dfa92587e5fc11e6c24da91be9e7bf3afb7James Kung  return WIFI_ERROR_UNINITIALIZED;
108a8dd2dfa92587e5fc11e6c24da91be9e7bf3afb7James Kung}
109a8dd2dfa92587e5fc11e6c24da91be9e7bf3afb7James Kung
110a8dd2dfa92587e5fc11e6c24da91be9e7bf3afb7James Kungwifi_error wifi_reset_bssid_hotlist_stub(wifi_request_id id,
111a8dd2dfa92587e5fc11e6c24da91be9e7bf3afb7James Kung                                         wifi_interface_handle iface) {
112a8dd2dfa92587e5fc11e6c24da91be9e7bf3afb7James Kung  return WIFI_ERROR_UNINITIALIZED;
113a8dd2dfa92587e5fc11e6c24da91be9e7bf3afb7James Kung}
114a8dd2dfa92587e5fc11e6c24da91be9e7bf3afb7James Kung
115a8dd2dfa92587e5fc11e6c24da91be9e7bf3afb7James Kungwifi_error wifi_set_significant_change_handler_stub(
116a8dd2dfa92587e5fc11e6c24da91be9e7bf3afb7James Kung    wifi_request_id id, wifi_interface_handle iface,
117a8dd2dfa92587e5fc11e6c24da91be9e7bf3afb7James Kung    wifi_significant_change_params params,
118b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan    wifi_significant_change_handler handler) {
119b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan  return WIFI_ERROR_UNINITIALIZED;
120b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan}
121a8dd2dfa92587e5fc11e6c24da91be9e7bf3afb7James Kung
122a8dd2dfa92587e5fc11e6c24da91be9e7bf3afb7James Kungwifi_error wifi_reset_significant_change_handler_stub(
123a8dd2dfa92587e5fc11e6c24da91be9e7bf3afb7James Kung    wifi_request_id id, wifi_interface_handle iface) {
124a8dd2dfa92587e5fc11e6c24da91be9e7bf3afb7James Kung  return WIFI_ERROR_UNINITIALIZED;
125a8dd2dfa92587e5fc11e6c24da91be9e7bf3afb7James Kung}
126a8dd2dfa92587e5fc11e6c24da91be9e7bf3afb7James Kung
127a8dd2dfa92587e5fc11e6c24da91be9e7bf3afb7James Kungwifi_error wifi_get_gscan_capabilities_stub(
128b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan    wifi_interface_handle handle, wifi_gscan_capabilities* capabilities) {
129b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan  return WIFI_ERROR_UNINITIALIZED;
130b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan}
131b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan
132b1b7080deea42aa533c3757b585cf765c6b76732Michael Chanwifi_error wifi_set_link_stats_stub(wifi_interface_handle iface,
133b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan                                    wifi_link_layer_params params) {
13496e8dde991e426d0cd44f5b4eb76118fd7374ac0Sam Blitzstein  return WIFI_ERROR_UNINITIALIZED;
135b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan}
136b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan
137b1b7080deea42aa533c3757b585cf765c6b76732Michael Chanwifi_error wifi_get_link_stats_stub(wifi_request_id id,
138b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan                                    wifi_interface_handle iface,
139b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan                                    wifi_stats_result_handler handler) {
140b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan  return WIFI_ERROR_UNINITIALIZED;
141b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan}
142b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan
143b1b7080deea42aa533c3757b585cf765c6b76732Michael Chanwifi_error wifi_clear_link_stats_stub(wifi_interface_handle iface,
144b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan                                      u32 stats_clear_req_mask,
145b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan                                      u32* stats_clear_rsp_mask, u8 stop_req,
146b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan                                      u8* stop_rsp) {
147b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan  return WIFI_ERROR_UNINITIALIZED;
148b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan}
149b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan
150b1b7080deea42aa533c3757b585cf765c6b76732Michael Chanwifi_error wifi_get_valid_channels_stub(wifi_interface_handle handle, int band,
151b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan                                        int max_channels,
152b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan                                        wifi_channel* channels,
153b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan                                        int* num_channels) {
154b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan  return WIFI_ERROR_UNINITIALIZED;
155b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan}
156b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan
157b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan/* API to request RTT measurement */
158b1b7080deea42aa533c3757b585cf765c6b76732Michael Chanwifi_error wifi_rtt_range_request_stub(wifi_request_id id,
159b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan                                       wifi_interface_handle iface,
160b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan                                       unsigned num_rtt_config,
161b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan                                       wifi_rtt_config rtt_config[],
162b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan                                       wifi_rtt_event_handler handler) {
163b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan  return WIFI_ERROR_NOT_SUPPORTED;
164b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan}
165b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan
166b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan/* API to cancel RTT measurements */
167b1b7080deea42aa533c3757b585cf765c6b76732Michael Chanwifi_error wifi_rtt_range_cancel_stub(wifi_request_id id,
168b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan                                      wifi_interface_handle iface,
169b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan                                      unsigned num_devices, mac_addr addr[]) {
170b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan  return WIFI_ERROR_NOT_SUPPORTED;
171b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan}
172b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan
173b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan/* API to get RTT capability */
174b1b7080deea42aa533c3757b585cf765c6b76732Michael Chanwifi_error wifi_get_rtt_capabilities_stub(wifi_interface_handle iface,
175b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan                                          wifi_rtt_capabilities* capabilities) {
176b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan  return WIFI_ERROR_NOT_SUPPORTED;
177b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan}
178b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan
179b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan/* API to enable RTT responder role */
180b1b7080deea42aa533c3757b585cf765c6b76732Michael Chanwifi_error wifi_enable_responder_stub(wifi_request_id id,
181b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan                                      wifi_interface_handle iface,
182b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan                                      wifi_channel_info channel_hint,
183a8dd2dfa92587e5fc11e6c24da91be9e7bf3afb7James Kung                                      unsigned max_duration_seconds,
184a8dd2dfa92587e5fc11e6c24da91be9e7bf3afb7James Kung                                      wifi_channel_info* channel_used) {
185b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan  return WIFI_ERROR_NOT_SUPPORTED;
186b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan}
187b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan
188b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan/* API to disable RTT responder role */
189b1b7080deea42aa533c3757b585cf765c6b76732Michael Chanwifi_error wifi_disable_responder_stub(wifi_request_id id,
190b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan                                       wifi_interface_handle iface) {
191b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan  return WIFI_ERROR_NOT_SUPPORTED;
192b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan}
193b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan
194b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan/* API to get available channel for RTT responder role */
195b1b7080deea42aa533c3757b585cf765c6b76732Michael Chanwifi_error wifi_rtt_get_available_channel_stub(wifi_interface_handle iface,
196b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan                                               wifi_channel_info* channel) {
197b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan  return WIFI_ERROR_NOT_SUPPORTED;
198b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan}
199b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan
200b1b7080deea42aa533c3757b585cf765c6b76732Michael Chanwifi_error wifi_set_nodfs_flag_stub(wifi_interface_handle iface, u32 nodfs) {
201b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan  return WIFI_ERROR_NOT_SUPPORTED;
202b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan}
203143a7e20a46dbd66bec4e4d7e8e0dcb693d343d3Michael Chan
204143a7e20a46dbd66bec4e4d7e8e0dcb693d343d3Michael Chanwifi_error wifi_start_logging_stub(wifi_interface_handle iface,
205143a7e20a46dbd66bec4e4d7e8e0dcb693d343d3Michael Chan                                   u32 verbose_level, u32 flags,
206143a7e20a46dbd66bec4e4d7e8e0dcb693d343d3Michael Chan                                   u32 max_interval_sec, u32 min_data_size,
207143a7e20a46dbd66bec4e4d7e8e0dcb693d343d3Michael Chan                                   char* buffer_name) {
208b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan  return WIFI_ERROR_NOT_SUPPORTED;
209b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan}
210b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan
2111db8933b4e7e0190f59344c86e92d56607658089Michael Chanwifi_error wifi_set_epno_list_stub(int id, wifi_interface_info* iface,
212b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan                                   const wifi_epno_params* params,
2131db8933b4e7e0190f59344c86e92d56607658089Michael Chan                                   wifi_epno_handler handler) {
2141db8933b4e7e0190f59344c86e92d56607658089Michael Chan  return WIFI_ERROR_NOT_SUPPORTED;
2151db8933b4e7e0190f59344c86e92d56607658089Michael Chan}
2161db8933b4e7e0190f59344c86e92d56607658089Michael Chan
2171db8933b4e7e0190f59344c86e92d56607658089Michael Chanwifi_error wifi_reset_epno_list_stub(int id, wifi_interface_info* iface) {
218b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan  return WIFI_ERROR_NOT_SUPPORTED;
219b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan}
220b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan
221b1b7080deea42aa533c3757b585cf765c6b76732Michael Chanwifi_error wifi_set_country_code_stub(wifi_interface_handle iface,
222b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan                                      const char* code) {
223b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan  return WIFI_ERROR_NOT_SUPPORTED;
224b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan}
225b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan
226b1b7080deea42aa533c3757b585cf765c6b76732Michael Chanwifi_error wifi_get_firmware_memory_dump_stub(
227b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan    wifi_interface_handle iface, wifi_firmware_memory_dump_handler handler) {
228b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan  return WIFI_ERROR_NOT_SUPPORTED;
229b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan}
230b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan
231b1b7080deea42aa533c3757b585cf765c6b76732Michael Chanwifi_error wifi_set_log_handler_stub(wifi_request_id id,
232b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan                                     wifi_interface_handle iface,
233b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan                                     wifi_ring_buffer_data_handler handler) {
234b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan  return WIFI_ERROR_NOT_SUPPORTED;
235b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan}
236b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan
237b1b7080deea42aa533c3757b585cf765c6b76732Michael Chanwifi_error wifi_reset_log_handler_stub(wifi_request_id id,
238b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan                                       wifi_interface_handle iface) {
239b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan  return WIFI_ERROR_NOT_SUPPORTED;
240b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan}
241b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan
242b1b7080deea42aa533c3757b585cf765c6b76732Michael Chanwifi_error wifi_set_alert_handler_stub(wifi_request_id id,
243215ec1009ae3b52ed491fde7b2aa0a13dd4387beMichael Chan                                       wifi_interface_handle iface,
244b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan                                       wifi_alert_handler handler) {
245b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan  return WIFI_ERROR_NOT_SUPPORTED;
246b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan}
247b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan
248b1b7080deea42aa533c3757b585cf765c6b76732Michael Chanwifi_error wifi_reset_alert_handler_stub(wifi_request_id id,
249b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan                                         wifi_interface_handle iface) {
250b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan  return WIFI_ERROR_NOT_SUPPORTED;
251b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan}
252b064db0d1a7ffcedddd691b35d57e2cdb0268883Michael Chan
253b064db0d1a7ffcedddd691b35d57e2cdb0268883Michael Chanwifi_error wifi_get_firmware_version_stub(wifi_interface_handle iface,
254b064db0d1a7ffcedddd691b35d57e2cdb0268883Michael Chan                                          char* buffer, int buffer_size) {
255b064db0d1a7ffcedddd691b35d57e2cdb0268883Michael Chan  return WIFI_ERROR_NOT_SUPPORTED;
256b064db0d1a7ffcedddd691b35d57e2cdb0268883Michael Chan}
257215ec1009ae3b52ed491fde7b2aa0a13dd4387beMichael Chan
258215ec1009ae3b52ed491fde7b2aa0a13dd4387beMichael Chanwifi_error wifi_get_ring_buffers_status_stub(wifi_interface_handle iface,
259215ec1009ae3b52ed491fde7b2aa0a13dd4387beMichael Chan                                             u32* num_rings,
260215ec1009ae3b52ed491fde7b2aa0a13dd4387beMichael Chan                                             wifi_ring_buffer_status* status) {
261215ec1009ae3b52ed491fde7b2aa0a13dd4387beMichael Chan  return WIFI_ERROR_NOT_SUPPORTED;
262b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan}
263b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan
264b1b7080deea42aa533c3757b585cf765c6b76732Michael Chanwifi_error wifi_get_logger_supported_feature_set_stub(
265b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan    wifi_interface_handle iface, unsigned int* support) {
266b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan  return WIFI_ERROR_NOT_SUPPORTED;
267b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan}
268b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan
269b1b7080deea42aa533c3757b585cf765c6b76732Michael Chanwifi_error wifi_get_ring_data_stub(wifi_interface_handle iface,
27096e8dde991e426d0cd44f5b4eb76118fd7374ac0Sam Blitzstein                                   char* ring_name) {
27196e8dde991e426d0cd44f5b4eb76118fd7374ac0Sam Blitzstein  return WIFI_ERROR_NOT_SUPPORTED;
27296e8dde991e426d0cd44f5b4eb76118fd7374ac0Sam Blitzstein}
27396e8dde991e426d0cd44f5b4eb76118fd7374ac0Sam Blitzstein
27496e8dde991e426d0cd44f5b4eb76118fd7374ac0Sam Blitzsteinwifi_error wifi_get_driver_version_stub(wifi_interface_handle iface,
27596e8dde991e426d0cd44f5b4eb76118fd7374ac0Sam Blitzstein                                        char* buffer, int buffer_size) {
27696e8dde991e426d0cd44f5b4eb76118fd7374ac0Sam Blitzstein  return WIFI_ERROR_NOT_SUPPORTED;
277b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan}
278b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan
279b1b7080deea42aa533c3757b585cf765c6b76732Michael Chanwifi_error wifi_enable_tdls_stub(wifi_interface_handle iface, mac_addr addr,
280b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan                                 wifi_tdls_params* params,
281b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan                                 wifi_tdls_handler handler) {
282b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan  return WIFI_ERROR_NOT_SUPPORTED;
283143a7e20a46dbd66bec4e4d7e8e0dcb693d343d3Michael Chan}
284143a7e20a46dbd66bec4e4d7e8e0dcb693d343d3Michael Chan
285215ec1009ae3b52ed491fde7b2aa0a13dd4387beMichael Chanwifi_error wifi_disable_tdls_stub(wifi_interface_handle iface, mac_addr addr) {
286143a7e20a46dbd66bec4e4d7e8e0dcb693d343d3Michael Chan  return WIFI_ERROR_NOT_SUPPORTED;
287215ec1009ae3b52ed491fde7b2aa0a13dd4387beMichael Chan}
288143a7e20a46dbd66bec4e4d7e8e0dcb693d343d3Michael Chan
289b1b7080deea42aa533c3757b585cf765c6b76732Michael Chanwifi_error wifi_get_tdls_status_stub(wifi_interface_handle iface, mac_addr addr,
290143a7e20a46dbd66bec4e4d7e8e0dcb693d343d3Michael Chan                                     wifi_tdls_status* status) {
291143a7e20a46dbd66bec4e4d7e8e0dcb693d343d3Michael Chan  return WIFI_ERROR_NOT_SUPPORTED;
292143a7e20a46dbd66bec4e4d7e8e0dcb693d343d3Michael Chan}
293b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan
294143a7e20a46dbd66bec4e4d7e8e0dcb693d343d3Michael Chanwifi_error wifi_get_tdls_capabilities_stub(
295143a7e20a46dbd66bec4e4d7e8e0dcb693d343d3Michael Chan    wifi_interface_handle iface, wifi_tdls_capabilities* capabilities) {
296b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan  return WIFI_ERROR_NOT_SUPPORTED;
297b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan}
298b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan
299b1b7080deea42aa533c3757b585cf765c6b76732Michael Chanwifi_error wifi_set_bssid_blacklist_stub(wifi_request_id id,
300b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan                                         wifi_interface_handle iface,
301b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan                                         wifi_bssid_params params) {
302b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan  return WIFI_ERROR_NOT_SUPPORTED;
303b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan}
304b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan
305b1b7080deea42aa533c3757b585cf765c6b76732Michael Chanwifi_error wifi_start_sending_offloaded_packet_stub(
306b064db0d1a7ffcedddd691b35d57e2cdb0268883Michael Chan    wifi_request_id id, wifi_interface_handle iface, u8* ip_packet,
307b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan    u16 ip_packet_len, u8* src_mac_addr, u8* dst_mac_addr, u32 period_msec) {
308b064db0d1a7ffcedddd691b35d57e2cdb0268883Michael Chan  return WIFI_ERROR_NOT_SUPPORTED;
309b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan}
310b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan
311334894dfa40899042e20d35235624c37ffa10b45Paul Sliwowskiwifi_error wifi_stop_sending_offloaded_packet_stub(
312334894dfa40899042e20d35235624c37ffa10b45Paul Sliwowski    wifi_request_id id, wifi_interface_handle iface) {
313334894dfa40899042e20d35235624c37ffa10b45Paul Sliwowski  return WIFI_ERROR_NOT_SUPPORTED;
314334894dfa40899042e20d35235624c37ffa10b45Paul Sliwowski}
315b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan
316b1b7080deea42aa533c3757b585cf765c6b76732Michael Chanwifi_error wifi_get_wake_reason_stats_stub(
317b1b7080deea42aa533c3757b585cf765c6b76732Michael Chan    wifi_interface_handle iface,
318    WLAN_DRIVER_WAKE_REASON_CNT* wifi_wake_reason_cnt) {
319  return WIFI_ERROR_NOT_SUPPORTED;
320}
321
322wifi_error wifi_configure_nd_offload_stub(wifi_interface_handle iface,
323                                          u8 enable) {
324  return WIFI_ERROR_NOT_SUPPORTED;
325}
326
327wifi_error wifi_get_driver_memory_dump_stub(
328    wifi_interface_handle iface, wifi_driver_memory_dump_callbacks callbacks) {
329  return WIFI_ERROR_NOT_SUPPORTED;
330}
331
332wifi_error wifi_start_pkt_fate_monitoring_stub(wifi_interface_handle iface) {
333  return WIFI_ERROR_NOT_SUPPORTED;
334}
335
336wifi_error wifi_get_tx_pkt_fates_stub(wifi_interface_handle handle,
337                                      wifi_tx_report* tx_report_bufs,
338                                      size_t n_requested_fates,
339                                      size_t* n_provided_fates) {
340  return WIFI_ERROR_NOT_SUPPORTED;
341}
342
343wifi_error wifi_get_rx_pkt_fates_stub(wifi_interface_handle handle,
344                                      wifi_rx_report* rx_report_bufs,
345                                      size_t n_requested_fates,
346                                      size_t* n_provided_fates) {
347  return WIFI_ERROR_NOT_SUPPORTED;
348}
349wifi_error wifi_nan_enable_request_stub(transaction_id id,
350                                        wifi_interface_handle iface,
351                                        NanEnableRequest* msg) {
352  return WIFI_ERROR_NOT_SUPPORTED;
353}
354
355wifi_error wifi_nan_disable_request_stub(transaction_id id,
356                                         wifi_interface_handle iface) {
357  return WIFI_ERROR_NOT_SUPPORTED;
358}
359
360wifi_error wifi_nan_publish_request_stub(transaction_id id,
361                                         wifi_interface_handle iface,
362                                         NanPublishRequest* msg) {
363  return WIFI_ERROR_NOT_SUPPORTED;
364}
365
366wifi_error wifi_nan_publish_cancel_request_stub(transaction_id id,
367                                                wifi_interface_handle iface,
368                                                NanPublishCancelRequest* msg) {
369  return WIFI_ERROR_NOT_SUPPORTED;
370}
371
372wifi_error wifi_nan_subscribe_request_stub(transaction_id id,
373                                           wifi_interface_handle iface,
374                                           NanSubscribeRequest* msg) {
375  return WIFI_ERROR_NOT_SUPPORTED;
376}
377
378wifi_error wifi_nan_subscribe_cancel_request_stub(
379    transaction_id id, wifi_interface_handle iface,
380    NanSubscribeCancelRequest* msg) {
381  return WIFI_ERROR_NOT_SUPPORTED;
382}
383
384wifi_error wifi_nan_transmit_followup_request_stub(
385    transaction_id id, wifi_interface_handle iface,
386    NanTransmitFollowupRequest* msg) {
387  return WIFI_ERROR_NOT_SUPPORTED;
388}
389
390wifi_error wifi_nan_stats_request_stub(transaction_id id,
391                                       wifi_interface_handle iface,
392                                       NanStatsRequest* msg) {
393  return WIFI_ERROR_NOT_SUPPORTED;
394}
395
396wifi_error wifi_nan_config_request_stub(transaction_id id,
397                                        wifi_interface_handle iface,
398                                        NanConfigRequest* msg) {
399  return WIFI_ERROR_NOT_SUPPORTED;
400}
401
402wifi_error wifi_nan_tca_request_stub(transaction_id id,
403                                     wifi_interface_handle iface,
404                                     NanTCARequest* msg) {
405  return WIFI_ERROR_NOT_SUPPORTED;
406}
407
408wifi_error wifi_nan_beacon_sdf_payload_request_stub(
409    transaction_id id, wifi_interface_handle iface,
410    NanBeaconSdfPayloadRequest* msg) {
411  return WIFI_ERROR_NOT_SUPPORTED;
412}
413
414wifi_error wifi_nan_register_handler_stub(wifi_interface_handle iface,
415                                          NanCallbackHandler handlers) {
416  return WIFI_ERROR_NOT_SUPPORTED;
417}
418
419wifi_error wifi_nan_get_version_stub(wifi_handle handle, NanVersion* version) {
420  return WIFI_ERROR_NOT_SUPPORTED;
421}
422
423wifi_error wifi_nan_get_capabilities_stub(transaction_id id,
424                                          wifi_interface_handle iface) {
425  return WIFI_ERROR_NOT_SUPPORTED;
426}
427
428wifi_error wifi_nan_data_interface_create_stub(transaction_id id,
429                                               wifi_interface_handle iface,
430                                               char* iface_name) {
431  return WIFI_ERROR_NOT_SUPPORTED;
432}
433
434wifi_error wifi_nan_data_interface_delete_stub(transaction_id id,
435                                               wifi_interface_handle iface,
436                                               char* iface_name) {
437  return WIFI_ERROR_NOT_SUPPORTED;
438}
439
440wifi_error wifi_nan_data_request_initiator_stub(
441    transaction_id id, wifi_interface_handle iface,
442    NanDataPathInitiatorRequest* msg) {
443  return WIFI_ERROR_NOT_SUPPORTED;
444}
445
446wifi_error wifi_nan_data_indication_response_stub(
447    transaction_id id, wifi_interface_handle iface,
448    NanDataPathIndicationResponse* msg) {
449  return WIFI_ERROR_NOT_SUPPORTED;
450}
451
452wifi_error wifi_nan_data_end_stub(transaction_id id,
453                                  wifi_interface_handle iface,
454                                  NanDataPathEndRequest* msg) {
455  return WIFI_ERROR_NOT_SUPPORTED;
456}
457
458wifi_error wifi_get_packet_filter_capabilities_stub(
459    wifi_interface_handle handle, u32* version, u32* max_len) {
460  return WIFI_ERROR_NOT_SUPPORTED;
461}
462
463wifi_error wifi_set_packet_filter_stub(wifi_interface_handle handle,
464                                       const u8* program, u32 len) {
465  return WIFI_ERROR_NOT_SUPPORTED;
466}
467
468bool init_wifi_stub_hal_func_table(wifi_hal_fn* hal_fn) {
469  if (hal_fn == NULL) {
470    return false;
471  }
472  hal_fn->wifi_initialize = wifi_initialize_stub;
473  hal_fn->wifi_cleanup = wifi_cleanup_stub;
474  hal_fn->wifi_event_loop = wifi_event_loop_stub;
475  hal_fn->wifi_get_error_info = wifi_get_error_info_stub;
476  hal_fn->wifi_get_supported_feature_set = wifi_get_supported_feature_set_stub;
477  hal_fn->wifi_get_concurrency_matrix = wifi_get_concurrency_matrix_stub;
478  hal_fn->wifi_set_scanning_mac_oui = wifi_set_scanning_mac_oui_stub;
479  hal_fn->wifi_get_supported_channels = wifi_get_supported_channels_stub;
480  hal_fn->wifi_is_epr_supported = wifi_is_epr_supported_stub;
481  hal_fn->wifi_get_ifaces = wifi_get_ifaces_stub;
482  hal_fn->wifi_get_iface_name = wifi_get_iface_name_stub;
483  hal_fn->wifi_reset_iface_event_handler = wifi_reset_iface_event_handler_stub;
484  hal_fn->wifi_start_gscan = wifi_start_gscan_stub;
485  hal_fn->wifi_stop_gscan = wifi_stop_gscan_stub;
486  hal_fn->wifi_get_cached_gscan_results = wifi_get_cached_gscan_results_stub;
487  hal_fn->wifi_set_bssid_hotlist = wifi_set_bssid_hotlist_stub;
488  hal_fn->wifi_reset_bssid_hotlist = wifi_reset_bssid_hotlist_stub;
489  hal_fn->wifi_set_significant_change_handler =
490      wifi_set_significant_change_handler_stub;
491  hal_fn->wifi_reset_significant_change_handler =
492      wifi_reset_significant_change_handler_stub;
493  hal_fn->wifi_get_gscan_capabilities = wifi_get_gscan_capabilities_stub;
494  hal_fn->wifi_set_link_stats = wifi_set_link_stats_stub;
495  hal_fn->wifi_get_link_stats = wifi_get_link_stats_stub;
496  hal_fn->wifi_clear_link_stats = wifi_clear_link_stats_stub;
497  hal_fn->wifi_get_valid_channels = wifi_get_valid_channels_stub;
498  hal_fn->wifi_rtt_range_request = wifi_rtt_range_request_stub;
499  hal_fn->wifi_rtt_range_cancel = wifi_rtt_range_cancel_stub;
500  hal_fn->wifi_get_rtt_capabilities = wifi_get_rtt_capabilities_stub;
501  hal_fn->wifi_start_logging = wifi_start_logging_stub;
502  hal_fn->wifi_set_epno_list = wifi_set_epno_list_stub;
503  hal_fn->wifi_set_country_code = wifi_set_country_code_stub;
504  hal_fn->wifi_enable_tdls = wifi_enable_tdls_stub;
505  hal_fn->wifi_disable_tdls = wifi_disable_tdls_stub;
506  hal_fn->wifi_get_tdls_status = wifi_get_tdls_status_stub;
507  hal_fn->wifi_get_tdls_capabilities = wifi_get_tdls_capabilities_stub;
508  hal_fn->wifi_set_nodfs_flag = wifi_set_nodfs_flag_stub;
509  hal_fn->wifi_get_firmware_memory_dump = wifi_get_firmware_memory_dump_stub;
510  hal_fn->wifi_set_log_handler = wifi_set_log_handler_stub;
511  hal_fn->wifi_reset_log_handler = wifi_reset_log_handler_stub;
512  hal_fn->wifi_set_alert_handler = wifi_set_alert_handler_stub;
513  hal_fn->wifi_reset_alert_handler = wifi_reset_alert_handler_stub;
514  hal_fn->wifi_get_firmware_version = wifi_get_firmware_version_stub;
515  hal_fn->wifi_get_ring_buffers_status = wifi_get_ring_buffers_status_stub;
516  hal_fn->wifi_get_logger_supported_feature_set =
517      wifi_get_logger_supported_feature_set_stub;
518  hal_fn->wifi_get_ring_data = wifi_get_ring_data_stub;
519  hal_fn->wifi_get_driver_version = wifi_get_driver_version_stub;
520  hal_fn->wifi_set_bssid_blacklist = wifi_set_bssid_blacklist_stub;
521  hal_fn->wifi_start_sending_offloaded_packet =
522      wifi_start_sending_offloaded_packet_stub;
523  hal_fn->wifi_stop_sending_offloaded_packet =
524      wifi_stop_sending_offloaded_packet_stub;
525  hal_fn->wifi_get_wake_reason_stats = wifi_get_wake_reason_stats_stub;
526  hal_fn->wifi_configure_nd_offload = wifi_configure_nd_offload_stub;
527  hal_fn->wifi_get_driver_memory_dump = wifi_get_driver_memory_dump_stub;
528  hal_fn->wifi_start_pkt_fate_monitoring = wifi_start_pkt_fate_monitoring_stub;
529  hal_fn->wifi_get_tx_pkt_fates = wifi_get_tx_pkt_fates_stub;
530  hal_fn->wifi_get_rx_pkt_fates = wifi_get_rx_pkt_fates_stub;
531  hal_fn->wifi_nan_enable_request = wifi_nan_enable_request_stub;
532  hal_fn->wifi_nan_disable_request = wifi_nan_disable_request_stub;
533  hal_fn->wifi_nan_publish_request = wifi_nan_publish_request_stub;
534  hal_fn->wifi_nan_publish_cancel_request =
535      wifi_nan_publish_cancel_request_stub;
536  hal_fn->wifi_nan_subscribe_request = wifi_nan_subscribe_request_stub;
537  hal_fn->wifi_nan_subscribe_cancel_request =
538      wifi_nan_subscribe_cancel_request_stub;
539  hal_fn->wifi_nan_transmit_followup_request =
540      wifi_nan_transmit_followup_request_stub;
541  hal_fn->wifi_nan_stats_request = wifi_nan_stats_request_stub;
542  hal_fn->wifi_nan_config_request = wifi_nan_config_request_stub;
543  hal_fn->wifi_nan_tca_request = wifi_nan_tca_request_stub;
544  hal_fn->wifi_nan_beacon_sdf_payload_request =
545      wifi_nan_beacon_sdf_payload_request_stub;
546  hal_fn->wifi_nan_register_handler = wifi_nan_register_handler_stub;
547  hal_fn->wifi_nan_get_version = wifi_nan_get_version_stub;
548  hal_fn->wifi_nan_get_capabilities = wifi_nan_get_capabilities_stub;
549  hal_fn->wifi_nan_data_interface_create = wifi_nan_data_interface_create_stub;
550  hal_fn->wifi_nan_data_interface_delete = wifi_nan_data_interface_delete_stub;
551  hal_fn->wifi_nan_data_request_initiator =
552      wifi_nan_data_request_initiator_stub;
553  hal_fn->wifi_nan_data_indication_response =
554      wifi_nan_data_indication_response_stub;
555  hal_fn->wifi_nan_data_end = wifi_nan_data_end_stub;
556  hal_fn->wifi_get_packet_filter_capabilities =
557      wifi_get_packet_filter_capabilities_stub;
558  hal_fn->wifi_set_packet_filter = wifi_set_packet_filter_stub;
559
560  return true;
561}
562
563}  // namespace
564
565bool init_wifi_hal_function_table(wifi_hal_fn* hal_fn) {
566  if (!init_wifi_stub_hal_func_table(hal_fn)) {
567    ALOGE("Can not initialize the basic function pointer table");
568    return false;
569  }
570
571  if (init_wifi_vendor_hal_func_table(hal_fn) != WIFI_SUCCESS) {
572    ALOGE("Can not initialize the vendor function pointer table");
573    return false;
574  }
575
576  return true;
577}
578
579bool wifi_hal_can_get_valid_channels(wifi_hal_fn* hal_fn) {
580  return hal_fn &&
581         (hal_fn->wifi_get_valid_channels != wifi_get_valid_channels_stub);
582}
583
584}  // namespace wifi_system
585}  // namespace android
586