blob: 1d59b17b8a761384bea7ea11921679d0f7d8bccd [file] [log] [blame]
Gabriel Birenf3262f92022-07-15 23:25:39 +00001/*
2 * Copyright (C) 2022 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_LEGACY_HAL_H_
18#define WIFI_LEGACY_HAL_H_
19
20#include <hardware_legacy/wifi_hal.h>
21#include <wifi_system/interface_tool.h>
22
23#include <condition_variable>
24#include <functional>
25#include <map>
26#include <mutex>
27#include <thread>
28#include <vector>
29
30namespace aidl {
31namespace android {
32namespace hardware {
33namespace wifi {
34// This is in a separate namespace to prevent typename conflicts between
35// the legacy HAL types and the AIDL interface types.
36namespace legacy_hal {
37// Import all the types defined inside the legacy HAL header files into this
38// namespace.
39using ::chre_nan_rtt_state;
40using ::frame_info;
41using ::frame_type;
42using ::FRAME_TYPE_80211_MGMT;
43using ::FRAME_TYPE_ETHERNET_II;
44using ::FRAME_TYPE_UNKNOWN;
45using ::fw_roaming_state_t;
46using ::mac_addr;
Nate Jiang38e8db52022-12-02 17:30:27 -080047using ::NAN_BOOTSTRAPPING_INITIATOR_RESPONSE;
48using ::NAN_BOOTSTRAPPING_RESPONDER_RESPONSE;
Gabriel Birenf3262f92022-07-15 23:25:39 +000049using ::NAN_CHANNEL_24G_BAND;
50using ::NAN_CHANNEL_5G_BAND_HIGH;
51using ::NAN_CHANNEL_5G_BAND_LOW;
52using ::NAN_DISABLE_RANGE_REPORT;
53using ::NAN_DO_NOT_USE_SRF;
54using ::NAN_DP_CHANNEL_NOT_REQUESTED;
55using ::NAN_DP_CONFIG_NO_SECURITY;
56using ::NAN_DP_CONFIG_SECURITY;
57using ::NAN_DP_END;
58using ::NAN_DP_FORCE_CHANNEL_SETUP;
59using ::NAN_DP_INITIATOR_RESPONSE;
60using ::NAN_DP_INTERFACE_CREATE;
61using ::NAN_DP_INTERFACE_DELETE;
62using ::NAN_DP_REQUEST_ACCEPT;
63using ::NAN_DP_REQUEST_CHANNEL_SETUP;
64using ::NAN_DP_REQUEST_REJECT;
65using ::NAN_DP_RESPONDER_RESPONSE;
66using ::NAN_GET_CAPABILITIES;
67using ::NAN_MATCH_ALG_MATCH_CONTINUOUS;
68using ::NAN_MATCH_ALG_MATCH_NEVER;
69using ::NAN_MATCH_ALG_MATCH_ONCE;
Nate Jiangbae6fdd2023-02-10 17:16:40 -080070using ::NAN_PAIRING_END;
Nate Jiang38e8db52022-12-02 17:30:27 -080071using ::NAN_PAIRING_INITIATOR_RESPONSE;
72using ::NAN_PAIRING_RESPONDER_RESPONSE;
73using ::NAN_PAIRING_SETUP;
74using ::NAN_PAIRING_VERIFICATION;
Gabriel Birenf3262f92022-07-15 23:25:39 +000075using ::NAN_PUBLISH_TYPE_SOLICITED;
76using ::NAN_PUBLISH_TYPE_UNSOLICITED;
77using ::NAN_PUBLISH_TYPE_UNSOLICITED_SOLICITED;
78using ::NAN_RANGING_AUTO_RESPONSE_DISABLE;
79using ::NAN_RANGING_AUTO_RESPONSE_ENABLE;
80using ::NAN_RANGING_DISABLE;
81using ::NAN_RANGING_ENABLE;
82using ::NAN_RESPONSE_BEACON_SDF_PAYLOAD;
83using ::NAN_RESPONSE_CONFIG;
84using ::NAN_RESPONSE_DISABLED;
85using ::NAN_RESPONSE_ENABLED;
86using ::NAN_RESPONSE_ERROR;
87using ::NAN_RESPONSE_PUBLISH;
88using ::NAN_RESPONSE_PUBLISH_CANCEL;
89using ::NAN_RESPONSE_STATS;
90using ::NAN_RESPONSE_SUBSCRIBE;
91using ::NAN_RESPONSE_SUBSCRIBE_CANCEL;
92using ::NAN_RESPONSE_TCA;
93using ::NAN_RESPONSE_TRANSMIT_FOLLOWUP;
Nate Jiangd6cc3312023-02-14 16:37:54 -080094using ::NAN_RESUME_REQUEST_RESPONSE;
Gabriel Birenf3262f92022-07-15 23:25:39 +000095using ::NAN_SECURITY_KEY_INPUT_PASSPHRASE;
96using ::NAN_SECURITY_KEY_INPUT_PMK;
97using ::NAN_SERVICE_ACCEPT_POLICY_ALL;
98using ::NAN_SERVICE_ACCEPT_POLICY_NONE;
99using ::NAN_SRF_ATTR_BLOOM_FILTER;
100using ::NAN_SRF_ATTR_PARTIAL_MAC_ADDR;
101using ::NAN_SRF_INCLUDE_DO_NOT_RESPOND;
102using ::NAN_SRF_INCLUDE_RESPOND;
103using ::NAN_SSI_NOT_REQUIRED_IN_MATCH_IND;
104using ::NAN_SSI_REQUIRED_IN_MATCH_IND;
105using ::NAN_STATUS_ALREADY_ENABLED;
106using ::NAN_STATUS_FOLLOWUP_QUEUE_FULL;
107using ::NAN_STATUS_INTERNAL_FAILURE;
Nate Jiang38e8db52022-12-02 17:30:27 -0800108using ::NAN_STATUS_INVALID_BOOTSTRAPPING_ID;
Gabriel Birenf3262f92022-07-15 23:25:39 +0000109using ::NAN_STATUS_INVALID_NDP_ID;
Nate Jiang38e8db52022-12-02 17:30:27 -0800110using ::NAN_STATUS_INVALID_PAIRING_ID;
Gabriel Birenf3262f92022-07-15 23:25:39 +0000111using ::NAN_STATUS_INVALID_PARAM;
112using ::NAN_STATUS_INVALID_PUBLISH_SUBSCRIBE_ID;
113using ::NAN_STATUS_INVALID_REQUESTOR_INSTANCE_ID;
114using ::NAN_STATUS_NAN_NOT_ALLOWED;
Nate Jiangd6cc3312023-02-14 16:37:54 -0800115using ::NAN_STATUS_NO_CONNECTION;
Gabriel Birenf3262f92022-07-15 23:25:39 +0000116using ::NAN_STATUS_NO_OTA_ACK;
117using ::NAN_STATUS_NO_RESOURCE_AVAILABLE;
Nate Jiangd6cc3312023-02-14 16:37:54 -0800118using ::NAN_STATUS_NOT_SUPPORTED;
Gabriel Birenf3262f92022-07-15 23:25:39 +0000119using ::NAN_STATUS_PROTOCOL_FAILURE;
Nate Jiangd6cc3312023-02-14 16:37:54 -0800120using ::NAN_STATUS_REDUNDANT_REQUEST;
Gabriel Birenf3262f92022-07-15 23:25:39 +0000121using ::NAN_STATUS_SUCCESS;
122using ::NAN_STATUS_UNSUPPORTED_CONCURRENCY_NAN_DISABLED;
123using ::NAN_SUBSCRIBE_TYPE_ACTIVE;
124using ::NAN_SUBSCRIBE_TYPE_PASSIVE;
Nate Jiangd6cc3312023-02-14 16:37:54 -0800125using ::NAN_SUSPEND_REQUEST_RESPONSE;
Gabriel Birenf3262f92022-07-15 23:25:39 +0000126using ::NAN_TRANSMIT_IN_DW;
127using ::NAN_TRANSMIT_IN_FAW;
128using ::NAN_TX_PRIORITY_HIGH;
129using ::NAN_TX_PRIORITY_NORMAL;
130using ::NAN_TX_TYPE_BROADCAST;
131using ::NAN_TX_TYPE_UNICAST;
132using ::NAN_USE_SRF;
Nate Jiangbae6fdd2023-02-10 17:16:40 -0800133using ::NanAkm;
Gabriel Birenf3262f92022-07-15 23:25:39 +0000134using ::NanBeaconSdfPayloadInd;
Nate Jiang38e8db52022-12-02 17:30:27 -0800135using ::NanBootstrappingConfirmInd;
136using ::NanBootstrappingIndicationResponse;
137using ::NanBootstrappingRequest;
138using ::NanBootstrappingRequestInd;
139using ::NanBootstrappingRequestResponse;
140using ::NanBootstrappingResponseCode;
Gabriel Birenf3262f92022-07-15 23:25:39 +0000141using ::NanCapabilities;
142using ::NanChannelInfo;
143using ::NanConfigRequest;
144using ::NanDataPathChannelCfg;
145using ::NanDataPathConfirmInd;
146using ::NanDataPathEndInd;
147using ::NanDataPathIndicationResponse;
148using ::NanDataPathInitiatorRequest;
149using ::NanDataPathRequestInd;
150using ::NanDataPathScheduleUpdateInd;
151using ::NanDisabledInd;
152using ::NanDiscEngEventInd;
153using ::NanEnableRequest;
154using ::NanFollowupInd;
Nate Jiang38e8db52022-12-02 17:30:27 -0800155using ::NanIdentityResolutionAttribute;
Gabriel Birenf3262f92022-07-15 23:25:39 +0000156using ::NanMatchAlg;
157using ::NanMatchExpiredInd;
158using ::NanMatchInd;
Nate Jiang38e8db52022-12-02 17:30:27 -0800159using ::NanPairingConfig;
160using ::NanPairingConfirmInd;
Nate Jiangbae6fdd2023-02-10 17:16:40 -0800161using ::NanPairingEndRequest;
Nate Jiang38e8db52022-12-02 17:30:27 -0800162using ::NanPairingIndicationResponse;
163using ::NanPairingRequest;
164using ::NanPairingRequestInd;
165using ::NanPairingRequestResponse;
166using ::NanPairingRequestType;
167using ::NanPairingResponseCode;
Gabriel Birenf3262f92022-07-15 23:25:39 +0000168using ::NanPublishCancelRequest;
169using ::NanPublishRequest;
170using ::NanPublishTerminatedInd;
171using ::NanPublishType;
172using ::NanRangeReportInd;
173using ::NanRangeRequestInd;
174using ::NanResponseMsg;
Phill Hayers02a97242022-12-15 16:05:14 +0000175using ::NanResumeRequest;
Gabriel Birenf3262f92022-07-15 23:25:39 +0000176using ::NanSRFType;
177using ::NanStatusType;
178using ::NanSubscribeCancelRequest;
179using ::NanSubscribeRequest;
180using ::NanSubscribeTerminatedInd;
181using ::NanSubscribeType;
Phill Hayers02a97242022-12-15 16:05:14 +0000182using ::NanSuspendRequest;
Nate Jiangd6cc3312023-02-14 16:37:54 -0800183using ::NanSuspensionModeChangeInd;
Gabriel Birenf3262f92022-07-15 23:25:39 +0000184using ::NanTransmitFollowupInd;
185using ::NanTransmitFollowupRequest;
186using ::NanTxType;
Nate Jiang38e8db52022-12-02 17:30:27 -0800187using ::NpkSecurityAssociation;
188using ::PASN;
Gabriel Birenf3262f92022-07-15 23:25:39 +0000189using ::ROAMING_DISABLE;
190using ::ROAMING_ENABLE;
191using ::RTT_PEER_AP;
192using ::RTT_PEER_NAN;
193using ::RTT_PEER_P2P_CLIENT;
194using ::RTT_PEER_P2P_GO;
195using ::RTT_PEER_STA;
196using ::rtt_peer_type;
197using ::RTT_STATUS_ABORTED;
198using ::RTT_STATUS_FAIL_AP_ON_DIFF_CHANNEL;
199using ::RTT_STATUS_FAIL_BUSY_TRY_LATER;
200using ::RTT_STATUS_FAIL_FTM_PARAM_OVERRIDE;
201using ::RTT_STATUS_FAIL_INVALID_TS;
202using ::RTT_STATUS_FAIL_NO_CAPABILITY;
203using ::RTT_STATUS_FAIL_NO_RSP;
204using ::RTT_STATUS_FAIL_NOT_SCHEDULED_YET;
205using ::RTT_STATUS_FAIL_PROTOCOL;
206using ::RTT_STATUS_FAIL_REJECTED;
207using ::RTT_STATUS_FAIL_SCHEDULE;
208using ::RTT_STATUS_FAIL_TM_TIMEOUT;
209using ::RTT_STATUS_FAILURE;
210using ::RTT_STATUS_INVALID_REQ;
211using ::RTT_STATUS_NAN_RANGING_CONCURRENCY_NOT_SUPPORTED;
212using ::RTT_STATUS_NAN_RANGING_PROTOCOL_FAILURE;
213using ::RTT_STATUS_NO_WIFI;
214using ::RTT_STATUS_SUCCESS;
215using ::RTT_TYPE_1_SIDED;
216using ::RTT_TYPE_2_SIDED;
217using ::RX_PKT_FATE_DRV_DROP_FILTER;
218using ::RX_PKT_FATE_DRV_DROP_INVALID;
219using ::RX_PKT_FATE_DRV_DROP_NOBUFS;
220using ::RX_PKT_FATE_DRV_DROP_OTHER;
221using ::RX_PKT_FATE_DRV_QUEUED;
222using ::RX_PKT_FATE_FW_DROP_FILTER;
223using ::RX_PKT_FATE_FW_DROP_INVALID;
224using ::RX_PKT_FATE_FW_DROP_NOBUFS;
225using ::RX_PKT_FATE_FW_DROP_OTHER;
226using ::RX_PKT_FATE_FW_QUEUED;
227using ::RX_PKT_FATE_SUCCESS;
Nate Jiang38e8db52022-12-02 17:30:27 -0800228using ::SAE;
Gabriel Birenf3262f92022-07-15 23:25:39 +0000229using ::ssid_t;
230using ::transaction_id;
231using ::TX_PKT_FATE_ACKED;
232using ::TX_PKT_FATE_DRV_DROP_INVALID;
233using ::TX_PKT_FATE_DRV_DROP_NOBUFS;
234using ::TX_PKT_FATE_DRV_DROP_OTHER;
235using ::TX_PKT_FATE_DRV_QUEUED;
236using ::TX_PKT_FATE_FW_DROP_INVALID;
237using ::TX_PKT_FATE_FW_DROP_NOBUFS;
238using ::TX_PKT_FATE_FW_DROP_OTHER;
239using ::TX_PKT_FATE_FW_QUEUED;
240using ::TX_PKT_FATE_SENT;
241using ::WIFI_AC_BE;
242using ::WIFI_AC_BK;
243using ::WIFI_AC_VI;
244using ::WIFI_AC_VO;
245using ::WIFI_ANTENNA_1X1;
246using ::WIFI_ANTENNA_2X2;
247using ::WIFI_ANTENNA_3X3;
248using ::WIFI_ANTENNA_4X4;
249using ::WIFI_ANTENNA_UNSPECIFIED;
250using ::wifi_band;
251using ::WIFI_BAND_A;
252using ::WIFI_BAND_A_DFS;
253using ::WIFI_BAND_A_WITH_DFS;
254using ::WIFI_BAND_ABG;
255using ::WIFI_BAND_ABG_WITH_DFS;
256using ::WIFI_BAND_BG;
257using ::WIFI_BAND_UNSPECIFIED;
258using ::wifi_cached_scan_report;
259using ::wifi_cached_scan_results;
260using ::WIFI_CHAN_WIDTH_10;
261using ::WIFI_CHAN_WIDTH_160;
262using ::WIFI_CHAN_WIDTH_20;
263using ::WIFI_CHAN_WIDTH_320;
264using ::WIFI_CHAN_WIDTH_40;
265using ::WIFI_CHAN_WIDTH_5;
266using ::WIFI_CHAN_WIDTH_80;
267using ::WIFI_CHAN_WIDTH_80P80;
268using ::WIFI_CHAN_WIDTH_INVALID;
Shuibing Daie5fbcab2022-12-19 15:37:19 -0800269using ::wifi_channel_category;
Gabriel Birenf3262f92022-07-15 23:25:39 +0000270using ::wifi_channel_info;
271using ::wifi_channel_stat;
272using ::wifi_channel_width;
Mahesh KKVc84d3772022-12-02 16:53:28 -0800273using ::wifi_chip_capabilities;
Gabriel Birenf3262f92022-07-15 23:25:39 +0000274using ::wifi_coex_restriction;
275using ::wifi_coex_unsafe_channel;
Shuibing Daie5fbcab2022-12-19 15:37:19 -0800276using ::WIFI_DFS_CHANNEL;
Gabriel Birenf3262f92022-07-15 23:25:39 +0000277using ::WIFI_DUAL_STA_NON_TRANSIENT_UNBIASED;
278using ::WIFI_DUAL_STA_TRANSIENT_PREFER_PRIMARY;
279using ::wifi_error;
280using ::WIFI_ERROR_BUSY;
281using ::WIFI_ERROR_INVALID_ARGS;
282using ::WIFI_ERROR_INVALID_REQUEST_ID;
283using ::WIFI_ERROR_NONE;
284using ::WIFI_ERROR_NOT_AVAILABLE;
285using ::WIFI_ERROR_NOT_SUPPORTED;
286using ::WIFI_ERROR_OUT_OF_MEMORY;
287using ::WIFI_ERROR_TIMED_OUT;
288using ::WIFI_ERROR_TOO_MANY_REQUESTS;
289using ::WIFI_ERROR_UNINITIALIZED;
290using ::WIFI_ERROR_UNKNOWN;
291using ::wifi_gscan_capabilities;
292using ::wifi_hal_fn;
Shuibing Daie5fbcab2022-12-19 15:37:19 -0800293using ::WIFI_INDOOR_CHANNEL;
Gabriel Birenf3262f92022-07-15 23:25:39 +0000294using ::wifi_information_element;
295using ::WIFI_INTERFACE_IBSS;
296using ::WIFI_INTERFACE_MESH;
297using ::wifi_interface_mode;
298using ::WIFI_INTERFACE_NAN;
299using ::WIFI_INTERFACE_P2P_CLIENT;
300using ::WIFI_INTERFACE_P2P_GO;
301using ::WIFI_INTERFACE_SOFTAP;
302using ::WIFI_INTERFACE_STA;
303using ::WIFI_INTERFACE_TDLS;
304using ::wifi_interface_type;
305using ::WIFI_INTERFACE_TYPE_AP;
306using ::WIFI_INTERFACE_TYPE_NAN;
307using ::WIFI_INTERFACE_TYPE_P2P;
308using ::WIFI_INTERFACE_TYPE_STA;
309using ::WIFI_INTERFACE_UNKNOWN;
310using ::wifi_latency_mode;
311using ::WIFI_LATENCY_MODE_LOW;
312using ::WIFI_LATENCY_MODE_NORMAL;
313using ::wifi_lci_information;
314using ::wifi_lcr_information;
315using ::WIFI_LOGGER_CONNECT_EVENT_SUPPORTED;
316using ::WIFI_LOGGER_DRIVER_DUMP_SUPPORTED;
317using ::WIFI_LOGGER_MEMORY_DUMP_SUPPORTED;
318using ::WIFI_LOGGER_PACKET_FATE_SUPPORTED;
319using ::WIFI_LOGGER_POWER_EVENT_SUPPORTED;
320using ::WIFI_LOGGER_WAKE_LOCK_SUPPORTED;
maheshkkva8aba172023-02-13 12:33:26 -0800321using ::wifi_mlo_mode;
Gabriel Birenf3262f92022-07-15 23:25:39 +0000322using ::WIFI_MOTION_EXPECTED;
323using ::WIFI_MOTION_NOT_EXPECTED;
324using ::wifi_motion_pattern;
325using ::WIFI_MOTION_UNKNOWN;
326using ::wifi_multi_sta_use_case;
327using ::wifi_power_scenario;
328using ::WIFI_POWER_SCENARIO_ON_BODY_CELL_OFF;
329using ::WIFI_POWER_SCENARIO_ON_BODY_CELL_ON;
330using ::WIFI_POWER_SCENARIO_ON_HEAD_CELL_OFF;
331using ::WIFI_POWER_SCENARIO_ON_HEAD_CELL_ON;
332using ::WIFI_POWER_SCENARIO_VOICE_CALL;
333using ::wifi_radio_combination;
334using ::wifi_radio_combination_matrix;
335using ::wifi_radio_configuration;
336using ::wifi_rate;
337using ::wifi_request_id;
338using ::wifi_ring_buffer_status;
339using ::wifi_roaming_capabilities;
340using ::wifi_roaming_config;
341using ::wifi_rtt_bw;
342using ::WIFI_RTT_BW_10;
343using ::WIFI_RTT_BW_160;
344using ::WIFI_RTT_BW_20;
345using ::WIFI_RTT_BW_320;
346using ::WIFI_RTT_BW_40;
347using ::WIFI_RTT_BW_5;
348using ::WIFI_RTT_BW_80;
Sunil Ravif8fc2372022-11-10 18:37:41 +0000349using ::WIFI_RTT_BW_UNSPECIFIED;
Gabriel Birenf3262f92022-07-15 23:25:39 +0000350using ::wifi_rtt_capabilities;
351using ::wifi_rtt_config;
352using ::wifi_rtt_preamble;
353using ::WIFI_RTT_PREAMBLE_EHT;
354using ::WIFI_RTT_PREAMBLE_HE;
355using ::WIFI_RTT_PREAMBLE_HT;
356using ::WIFI_RTT_PREAMBLE_LEGACY;
357using ::WIFI_RTT_PREAMBLE_VHT;
358using ::wifi_rtt_responder;
359using ::wifi_rtt_result;
Sunil Ravif8fc2372022-11-10 18:37:41 +0000360using ::wifi_rtt_result_v2;
Gabriel Birenf3262f92022-07-15 23:25:39 +0000361using ::wifi_rtt_status;
362using ::wifi_rtt_type;
363using ::wifi_rx_packet_fate;
364using ::wifi_rx_report;
365using ::wifi_scan_bucket_spec;
366using ::wifi_scan_cmd_params;
367using ::WIFI_SCAN_FLAG_INTERRUPTED;
368using ::wifi_scan_result;
369using ::WIFI_SUCCESS;
370using ::wifi_tx_packet_fate;
371using ::wifi_tx_report;
372using ::wifi_usable_channel;
373using ::WIFI_USABLE_CHANNEL_FILTER_CELLULAR_COEXISTENCE;
374using ::WIFI_USABLE_CHANNEL_FILTER_CONCURRENCY;
375using ::WLAN_MAC_2_4_BAND;
376using ::WLAN_MAC_5_0_BAND;
377using ::WLAN_MAC_60_0_BAND;
378using ::WLAN_MAC_6_0_BAND;
379
380// APF capabilities supported by the iface.
381struct PacketFilterCapabilities {
382 uint32_t version;
383 uint32_t max_len;
384};
385
386// WARNING: We don't care about the variable sized members of either
387// |wifi_iface_stat|, |wifi_radio_stat| structures. So, using the pragma
388// to escape the compiler warnings regarding this.
389#pragma GCC diagnostic push
390#pragma GCC diagnostic ignored "-Wgnu-variable-sized-type-not-at-end"
391// The |wifi_radio_stat.tx_time_per_levels| stats is provided as a pointer in
392// |wifi_radio_stat| structure in the legacy HAL API. Separate that out
393// into a separate return element to avoid passing pointers around.
394struct LinkLayerRadioStats {
395 wifi_radio_stat stats;
396 std::vector<uint32_t> tx_time_per_levels;
397 std::vector<wifi_channel_stat> channel_stats;
398};
399
400struct WifiPeerInfo {
401 wifi_peer_info peer_info;
402 std::vector<wifi_rate_stat> rate_stats;
403};
404
405struct LinkLayerStats {
406 wifi_iface_stat iface;
407 std::vector<LinkLayerRadioStats> radios;
408 std::vector<WifiPeerInfo> peers;
Mahesh KKV5f30d332022-10-26 14:07:44 -0700409 bool valid;
Gabriel Birenf3262f92022-07-15 23:25:39 +0000410};
Mahesh KKV5f30d332022-10-26 14:07:44 -0700411
412struct LinkStats {
413 wifi_link_stat stat;
414 std::vector<WifiPeerInfo> peers;
415};
416
417struct LinkLayerMlStats {
418 wifi_iface_ml_stat iface;
419 std::vector<LinkStats> links;
420 std::vector<LinkLayerRadioStats> radios;
421 bool valid;
422};
423
Gabriel Birenf3262f92022-07-15 23:25:39 +0000424#pragma GCC diagnostic pop
425
426// The |WLAN_DRIVER_WAKE_REASON_CNT.cmd_event_wake_cnt| and
427// |WLAN_DRIVER_WAKE_REASON_CNT.driver_fw_local_wake_cnt| stats is provided
428// as a pointer in |WLAN_DRIVER_WAKE_REASON_CNT| structure in the legacy HAL
429// API. Separate that out into a separate return elements to avoid passing
430// pointers around.
431struct WakeReasonStats {
432 WLAN_DRIVER_WAKE_REASON_CNT wake_reason_cnt;
433 std::vector<uint32_t> cmd_event_wake_cnt;
434 std::vector<uint32_t> driver_fw_local_wake_cnt;
435};
436
437// NAN response and event callbacks struct.
438struct NanCallbackHandlers {
439 // NotifyResponse invoked to notify the status of the Request.
440 std::function<void(transaction_id, const NanResponseMsg&)> on_notify_response;
441 // Various event callbacks.
442 std::function<void(const NanPublishTerminatedInd&)> on_event_publish_terminated;
443 std::function<void(const NanMatchInd&)> on_event_match;
444 std::function<void(const NanMatchExpiredInd&)> on_event_match_expired;
445 std::function<void(const NanSubscribeTerminatedInd&)> on_event_subscribe_terminated;
446 std::function<void(const NanFollowupInd&)> on_event_followup;
447 std::function<void(const NanDiscEngEventInd&)> on_event_disc_eng_event;
448 std::function<void(const NanDisabledInd&)> on_event_disabled;
449 std::function<void(const NanTCAInd&)> on_event_tca;
450 std::function<void(const NanBeaconSdfPayloadInd&)> on_event_beacon_sdf_payload;
451 std::function<void(const NanDataPathRequestInd&)> on_event_data_path_request;
452 std::function<void(const NanDataPathConfirmInd&)> on_event_data_path_confirm;
453 std::function<void(const NanDataPathEndInd&)> on_event_data_path_end;
454 std::function<void(const NanTransmitFollowupInd&)> on_event_transmit_follow_up;
455 std::function<void(const NanRangeRequestInd&)> on_event_range_request;
456 std::function<void(const NanRangeReportInd&)> on_event_range_report;
457 std::function<void(const NanDataPathScheduleUpdateInd&)> on_event_schedule_update;
Nate Jiang38e8db52022-12-02 17:30:27 -0800458 std::function<void(const NanPairingRequestInd&)> on_event_pairing_request;
459 std::function<void(const NanPairingConfirmInd&)> on_event_pairing_confirm;
460 std::function<void(const NanBootstrappingRequestInd&)> on_event_bootstrapping_request;
461 std::function<void(const NanBootstrappingConfirmInd&)> on_event_bootstrapping_confirm;
Nate Jiangd6cc3312023-02-14 16:37:54 -0800462 std::function<void(const NanSuspensionModeChangeInd&)> on_event_suspension_mode_change;
Gabriel Birenf3262f92022-07-15 23:25:39 +0000463};
464
465// Full scan results contain IE info and are hence passed by reference, to
466// preserve the variable length array member |ie_data|. Callee must not retain
467// the pointer.
468using on_gscan_full_result_callback =
469 std::function<void(wifi_request_id, const wifi_scan_result*, uint32_t)>;
470// These scan results don't contain any IE info, so no need to pass by
471// reference.
472using on_gscan_results_callback =
473 std::function<void(wifi_request_id, const std::vector<wifi_cached_scan_results>&)>;
474
475// Invoked when the rssi value breaches the thresholds set.
476using on_rssi_threshold_breached_callback =
477 std::function<void(wifi_request_id, std::array<uint8_t, ETH_ALEN>, int8_t)>;
478
479// Callback for RTT range request results.
480// Rtt results contain IE info and are hence passed by reference, to
481// preserve the |LCI| and |LCR| pointers. Callee must not retain
482// the pointer.
483using on_rtt_results_callback =
484 std::function<void(wifi_request_id, const std::vector<const wifi_rtt_result*>&)>;
Sunil Ravif8fc2372022-11-10 18:37:41 +0000485using on_rtt_results_callback_v2 =
486 std::function<void(wifi_request_id, const std::vector<const wifi_rtt_result_v2*>&)>;
Gabriel Birenf3262f92022-07-15 23:25:39 +0000487
488// Callback for ring buffer data.
489using on_ring_buffer_data_callback = std::function<void(
490 const std::string&, const std::vector<uint8_t>&, const wifi_ring_buffer_status&)>;
491
492// Callback for alerts.
493using on_error_alert_callback = std::function<void(int32_t, const std::vector<uint8_t>&)>;
494
495// Callback for subsystem restart
496using on_subsystem_restart_callback = std::function<void(const std::string&)>;
497
498// Struct for the mac info from the legacy HAL. This is a cleaner version
499// of the |wifi_mac_info| & |wifi_iface_info|.
500typedef struct {
501 std::string name;
502 wifi_channel channel;
503} WifiIfaceInfo;
504
505typedef struct {
506 uint32_t wlan_mac_id;
507 /* BIT MASK of BIT(WLAN_MAC*) as represented by wlan_mac_band */
508 uint32_t mac_band;
509 /* Represents the connected Wi-Fi interfaces associated with each MAC */
510 std::vector<WifiIfaceInfo> iface_infos;
511} WifiMacInfo;
512
513// Callback for radio mode change
514using on_radio_mode_change_callback = std::function<void(const std::vector<WifiMacInfo>&)>;
515
516// TWT response and event callbacks struct.
517struct TwtCallbackHandlers {
518 // Callback for TWT setup response
519 std::function<void(const TwtSetupResponse&)> on_setup_response;
520 // Callback for TWT teardown completion
521 std::function<void(const TwtTeardownCompletion&)> on_teardown_completion;
522 // Callback for TWT info frame received event
523 std::function<void(const TwtInfoFrameReceived&)> on_info_frame_received;
524 // Callback for TWT notification from the device
525 std::function<void(const TwtDeviceNotify&)> on_device_notify;
526};
527
528// CHRE response and event callbacks struct.
529struct ChreCallbackHandlers {
530 // Callback for CHRE NAN RTT
531 std::function<void(chre_nan_rtt_state)> on_wifi_chre_nan_rtt_state;
532};
533
534// Cached Scan Results response and event callbacks struct.
535struct CachedScanResultsCallbackHandlers {
536 // Callback for Cached Scan Results
537 std::function<void(wifi_cached_scan_report*)> on_cached_scan_results;
538};
539
540/**
541 * Class that encapsulates all legacy HAL interactions.
542 * This class manages the lifetime of the event loop thread used by legacy HAL.
543 *
544 * Note: There will only be a single instance of this class created in the Wifi
545 * object and will be valid for the lifetime of the process.
546 */
547class WifiLegacyHal {
548 public:
549 WifiLegacyHal(const std::weak_ptr<::android::wifi_system::InterfaceTool> iface_tool,
550 const wifi_hal_fn& fn, bool is_primary);
551 virtual ~WifiLegacyHal() = default;
552
553 // Initialize the legacy HAL function table.
554 virtual wifi_error initialize();
555 // Start the legacy HAL and the event looper thread.
556 virtual wifi_error start();
557 // Deinitialize the legacy HAL and wait for the event loop thread to exit
558 // using a predefined timeout.
559 virtual wifi_error stop(std::unique_lock<std::recursive_mutex>* lock,
560 const std::function<void()>& on_complete_callback);
561 virtual wifi_error waitForDriverReady();
562 // Checks if legacy HAL has successfully started
563 bool isStarted();
564 // Wrappers for all the functions in the legacy HAL function table.
565 virtual std::pair<wifi_error, std::string> getDriverVersion(const std::string& iface_name);
566 virtual std::pair<wifi_error, std::string> getFirmwareVersion(const std::string& iface_name);
567 std::pair<wifi_error, std::vector<uint8_t>> requestDriverMemoryDump(
568 const std::string& iface_name);
569 std::pair<wifi_error, std::vector<uint8_t>> requestFirmwareMemoryDump(
570 const std::string& iface_name);
571 virtual std::pair<wifi_error, uint64_t> getSupportedFeatureSet(const std::string& iface_name);
572 // APF functions.
573 std::pair<wifi_error, PacketFilterCapabilities> getPacketFilterCapabilities(
574 const std::string& iface_name);
575 wifi_error setPacketFilter(const std::string& iface_name, const std::vector<uint8_t>& program);
576 std::pair<wifi_error, std::vector<uint8_t>> readApfPacketFilterData(
577 const std::string& iface_name);
578 // Gscan functions.
579 std::pair<wifi_error, wifi_gscan_capabilities> getGscanCapabilities(
580 const std::string& iface_name);
581 // These API's provides a simplified interface over the legacy Gscan API's:
582 // a) All scan events from the legacy HAL API other than the
583 // |WIFI_SCAN_FAILED| are treated as notification of results.
584 // This method then retrieves the cached scan results from the legacy
585 // HAL API and triggers the externally provided
586 // |on_results_user_callback| on success.
587 // b) |WIFI_SCAN_FAILED| scan event or failure to retrieve cached scan
588 // results
589 // Triggers the externally provided |on_failure_user_callback|.
590 // c) Full scan result event triggers the externally provided
591 // |on_full_result_user_callback|.
592 wifi_error startGscan(const std::string& iface_name, wifi_request_id id,
593 const wifi_scan_cmd_params& params,
594 const std::function<void(wifi_request_id)>& on_failure_callback,
595 const on_gscan_results_callback& on_results_callback,
596 const on_gscan_full_result_callback& on_full_result_callback);
597 wifi_error stopGscan(const std::string& iface_name, wifi_request_id id);
598 std::pair<wifi_error, std::vector<uint32_t>> getValidFrequenciesForBand(
599 const std::string& iface_name, wifi_band band);
600 virtual wifi_error setDfsFlag(const std::string& iface_name, bool dfs_on);
601 // Link layer stats functions.
602 wifi_error enableLinkLayerStats(const std::string& iface_name, bool debug);
603 wifi_error disableLinkLayerStats(const std::string& iface_name);
Mahesh KKV5f30d332022-10-26 14:07:44 -0700604 wifi_error getLinkLayerStats(const std::string& iface_name,
605 legacy_hal::LinkLayerStats& legacy_stats,
606 legacy_hal::LinkLayerMlStats& legacy_ml_stats);
Gabriel Birenf3262f92022-07-15 23:25:39 +0000607 // RSSI monitor functions.
608 wifi_error startRssiMonitoring(
609 const std::string& iface_name, wifi_request_id id, int8_t max_rssi, int8_t min_rssi,
610 const on_rssi_threshold_breached_callback& on_threshold_breached_callback);
611 wifi_error stopRssiMonitoring(const std::string& iface_name, wifi_request_id id);
612 std::pair<wifi_error, wifi_roaming_capabilities> getRoamingCapabilities(
613 const std::string& iface_name);
614 wifi_error configureRoaming(const std::string& iface_name, const wifi_roaming_config& config);
615 wifi_error enableFirmwareRoaming(const std::string& iface_name, fw_roaming_state_t state);
616 wifi_error configureNdOffload(const std::string& iface_name, bool enable);
617 wifi_error startSendingOffloadedPacket(const std::string& iface_name, int32_t cmd_id,
618 uint16_t ether_type,
619 const std::vector<uint8_t>& ip_packet_data,
620 const std::array<uint8_t, 6>& src_address,
621 const std::array<uint8_t, 6>& dst_address,
622 int32_t period_in_ms);
623 wifi_error stopSendingOffloadedPacket(const std::string& iface_name, uint32_t cmd_id);
624 virtual wifi_error selectTxPowerScenario(const std::string& iface_name,
625 wifi_power_scenario scenario);
626 virtual wifi_error resetTxPowerScenario(const std::string& iface_name);
627 wifi_error setLatencyMode(const std::string& iface_name, wifi_latency_mode mode);
628 wifi_error setThermalMitigationMode(wifi_thermal_mode mode, uint32_t completion_window);
629 wifi_error setDscpToAccessCategoryMapping(uint32_t start, uint32_t end,
630 uint32_t access_category);
631 wifi_error resetDscpToAccessCategoryMapping();
632 // Logger/debug functions.
633 std::pair<wifi_error, uint32_t> getLoggerSupportedFeatureSet(const std::string& iface_name);
634 wifi_error startPktFateMonitoring(const std::string& iface_name);
635 std::pair<wifi_error, std::vector<wifi_tx_report>> getTxPktFates(const std::string& iface_name);
636 std::pair<wifi_error, std::vector<wifi_rx_report>> getRxPktFates(const std::string& iface_name);
637 std::pair<wifi_error, WakeReasonStats> getWakeReasonStats(const std::string& iface_name);
638 wifi_error registerRingBufferCallbackHandler(
639 const std::string& iface_name, const on_ring_buffer_data_callback& on_data_callback);
640 wifi_error deregisterRingBufferCallbackHandler(const std::string& iface_name);
641 virtual wifi_error registerSubsystemRestartCallbackHandler(
642 const on_subsystem_restart_callback& on_restart_callback);
643 std::pair<wifi_error, std::vector<wifi_ring_buffer_status>> getRingBuffersStatus(
644 const std::string& iface_name);
645 wifi_error startRingBufferLogging(const std::string& iface_name, const std::string& ring_name,
646 uint32_t verbose_level, uint32_t max_interval_sec,
647 uint32_t min_data_size);
648 wifi_error getRingBufferData(const std::string& iface_name, const std::string& ring_name);
649 wifi_error registerErrorAlertCallbackHandler(const std::string& iface_name,
650 const on_error_alert_callback& on_alert_callback);
651 wifi_error deregisterErrorAlertCallbackHandler(const std::string& iface_name);
652 // Radio mode functions.
653 virtual wifi_error registerRadioModeChangeCallbackHandler(
654 const std::string& iface_name,
655 const on_radio_mode_change_callback& on_user_change_callback);
656 // RTT functions.
657 wifi_error startRttRangeRequest(const std::string& iface_name, wifi_request_id id,
658 const std::vector<wifi_rtt_config>& rtt_configs,
Sunil Ravif8fc2372022-11-10 18:37:41 +0000659 const on_rtt_results_callback& on_results_callback,
660 const on_rtt_results_callback_v2& on_results_callback_v2);
Gabriel Birenf3262f92022-07-15 23:25:39 +0000661 wifi_error cancelRttRangeRequest(const std::string& iface_name, wifi_request_id id,
662 const std::vector<std::array<uint8_t, ETH_ALEN>>& mac_addrs);
663 std::pair<wifi_error, wifi_rtt_capabilities> getRttCapabilities(const std::string& iface_name);
664 std::pair<wifi_error, wifi_rtt_responder> getRttResponderInfo(const std::string& iface_name);
665 wifi_error enableRttResponder(const std::string& iface_name, wifi_request_id id,
666 const wifi_channel_info& channel_hint, uint32_t max_duration_secs,
667 const wifi_rtt_responder& info);
668 wifi_error disableRttResponder(const std::string& iface_name, wifi_request_id id);
669 wifi_error setRttLci(const std::string& iface_name, wifi_request_id id,
670 const wifi_lci_information& info);
671 wifi_error setRttLcr(const std::string& iface_name, wifi_request_id id,
672 const wifi_lcr_information& info);
673 // NAN functions.
674 virtual wifi_error nanRegisterCallbackHandlers(const std::string& iface_name,
675 const NanCallbackHandlers& callbacks);
676 wifi_error nanEnableRequest(const std::string& iface_name, transaction_id id,
677 const NanEnableRequest& msg);
678 virtual wifi_error nanDisableRequest(const std::string& iface_name, transaction_id id);
679 wifi_error nanPublishRequest(const std::string& iface_name, transaction_id id,
680 const NanPublishRequest& msg);
681 wifi_error nanPublishCancelRequest(const std::string& iface_name, transaction_id id,
682 const NanPublishCancelRequest& msg);
683 wifi_error nanSubscribeRequest(const std::string& iface_name, transaction_id id,
684 const NanSubscribeRequest& msg);
685 wifi_error nanSubscribeCancelRequest(const std::string& iface_name, transaction_id id,
686 const NanSubscribeCancelRequest& msg);
687 wifi_error nanTransmitFollowupRequest(const std::string& iface_name, transaction_id id,
688 const NanTransmitFollowupRequest& msg);
689 wifi_error nanStatsRequest(const std::string& iface_name, transaction_id id,
690 const NanStatsRequest& msg);
691 wifi_error nanConfigRequest(const std::string& iface_name, transaction_id id,
692 const NanConfigRequest& msg);
693 wifi_error nanTcaRequest(const std::string& iface_name, transaction_id id,
694 const NanTCARequest& msg);
695 wifi_error nanBeaconSdfPayloadRequest(const std::string& iface_name, transaction_id id,
696 const NanBeaconSdfPayloadRequest& msg);
697 std::pair<wifi_error, NanVersion> nanGetVersion();
698 wifi_error nanGetCapabilities(const std::string& iface_name, transaction_id id);
699 wifi_error nanDataInterfaceCreate(const std::string& iface_name, transaction_id id,
700 const std::string& data_iface_name);
701 virtual wifi_error nanDataInterfaceDelete(const std::string& iface_name, transaction_id id,
702 const std::string& data_iface_name);
703 wifi_error nanDataRequestInitiator(const std::string& iface_name, transaction_id id,
704 const NanDataPathInitiatorRequest& msg);
705 wifi_error nanDataIndicationResponse(const std::string& iface_name, transaction_id id,
706 const NanDataPathIndicationResponse& msg);
Nate Jiang38e8db52022-12-02 17:30:27 -0800707 wifi_error nanPairingRequest(const std::string& iface_name, transaction_id id,
708 const NanPairingRequest& msg);
709 wifi_error nanPairingIndicationResponse(const std::string& iface_name, transaction_id id,
710 const NanPairingIndicationResponse& msg);
711 wifi_error nanBootstrappingRequest(const std::string& iface_name, transaction_id id,
712 const NanBootstrappingRequest& msg);
713 wifi_error nanBootstrappingIndicationResponse(const std::string& iface_name, transaction_id id,
714 const NanBootstrappingIndicationResponse& msg);
Gabriel Birenf3262f92022-07-15 23:25:39 +0000715 wifi_error nanDataEnd(const std::string& iface_name, transaction_id id, uint32_t ndpInstanceId);
Nate Jiangbae6fdd2023-02-10 17:16:40 -0800716 wifi_error nanPairingEnd(const std::string& iface_name, transaction_id id, uint32_t pairingId);
Phill Hayers02a97242022-12-15 16:05:14 +0000717 wifi_error nanSuspendRequest(const std::string& iface_name, transaction_id id,
718 const NanSuspendRequest& msg);
719 wifi_error nanResumeRequest(const std::string& iface_name, transaction_id id,
720 const NanResumeRequest& msg);
Gabriel Birenf3262f92022-07-15 23:25:39 +0000721 // AP functions.
722 wifi_error setCountryCode(const std::string& iface_name, const std::array<uint8_t, 2> code);
723
724 // Interface functions.
725 virtual wifi_error createVirtualInterface(const std::string& ifname,
726 wifi_interface_type iftype);
727 virtual wifi_error deleteVirtualInterface(const std::string& ifname);
728 virtual wifi_error getSupportedIfaceName(uint32_t iface_type, std::string& ifname);
729
730 // STA + STA functions
731 virtual wifi_error multiStaSetPrimaryConnection(const std::string& ifname);
732 virtual wifi_error multiStaSetUseCase(wifi_multi_sta_use_case use_case);
733
734 // Coex functions.
735 virtual wifi_error setCoexUnsafeChannels(std::vector<wifi_coex_unsafe_channel> unsafe_channels,
736 uint32_t restrictions);
737
738 wifi_error setVoipMode(const std::string& iface_name, wifi_voip_mode mode);
739
740 wifi_error twtRegisterHandler(const std::string& iface_name,
741 const TwtCallbackHandlers& handler);
742
743 std::pair<wifi_error, TwtCapabilitySet> twtGetCapability(const std::string& iface_name);
744
745 wifi_error twtSetupRequest(const std::string& iface_name, const TwtSetupRequest& msg);
746
747 wifi_error twtTearDownRequest(const std::string& iface_name, const TwtTeardownRequest& msg);
748
749 wifi_error twtInfoFrameRequest(const std::string& iface_name, const TwtInfoFrameRequest& msg);
750
751 std::pair<wifi_error, TwtStats> twtGetStats(const std::string& iface_name, uint8_t configId);
752
753 wifi_error twtClearStats(const std::string& iface_name, uint8_t configId);
754
Ye Jiao50274f72023-01-17 14:53:22 +0800755 wifi_error setScanMode(const std::string& iface_name, bool enable);
756
Gabriel Birenf3262f92022-07-15 23:25:39 +0000757 wifi_error setDtimConfig(const std::string& iface_name, uint32_t multiplier);
758
759 // Retrieve the list of usable channels in the requested bands
760 // for the requested modes
761 std::pair<wifi_error, std::vector<wifi_usable_channel>> getUsableChannels(
762 uint32_t band_mask, uint32_t iface_mode_mask, uint32_t filter_mask);
763
764 wifi_error triggerSubsystemRestart();
765
766 wifi_error setIndoorState(bool isIndoor);
767
768 std::pair<wifi_error, wifi_radio_combination_matrix*> getSupportedRadioCombinationsMatrix();
769
770 // CHRE NAN RTT function
771 wifi_error chreNanRttRequest(const std::string& iface_name, bool enable);
772
773 wifi_error chreRegisterHandler(const std::string& iface_name,
774 const ChreCallbackHandlers& handler);
775
776 wifi_error enableWifiTxPowerLimits(const std::string& iface_name, bool enable);
777 wifi_error getWifiCachedScanResults(const std::string& iface_name,
778 const CachedScanResultsCallbackHandlers& handler);
Mahesh KKVc84d3772022-12-02 16:53:28 -0800779 std::pair<wifi_error, wifi_chip_capabilities> getWifiChipCapabilities();
Shuibing Daie5fbcab2022-12-19 15:37:19 -0800780 wifi_error enableStaChannelForPeerNetwork(uint32_t channelCategoryEnableFlag);
maheshkkva8aba172023-02-13 12:33:26 -0800781 wifi_error setMloMode(wifi_mlo_mode mode);
Gabriel Birenf3262f92022-07-15 23:25:39 +0000782
783 private:
784 // Retrieve interface handles for all the available interfaces.
785 wifi_error retrieveIfaceHandles();
786 wifi_interface_handle getIfaceHandle(const std::string& iface_name);
787 // Run the legacy HAL event loop thread.
788 void runEventLoop();
789 // Retrieve the cached gscan results to pass the results back to the
790 // external callbacks.
791 std::pair<wifi_error, std::vector<wifi_cached_scan_results>> getGscanCachedResults(
792 const std::string& iface_name);
793 void invalidate();
794 // Handles wifi (error) status of Virtual interface create/delete
795 wifi_error handleVirtualInterfaceCreateOrDeleteStatus(const std::string& ifname,
796 wifi_error status);
Ye Jiaodec38702023-02-10 11:37:58 +0800797 wifi_link_stat* copyLinkStat(wifi_link_stat* stat_ptr, std::vector<LinkStats>& stats);
798 wifi_peer_info* copyPeerInfo(wifi_peer_info* peer_ptr, std::vector<WifiPeerInfo>& peers);
Gabriel Birenf3262f92022-07-15 23:25:39 +0000799
800 // Global function table of legacy HAL.
801 wifi_hal_fn global_func_table_;
802 // Opaque handle to be used for all global operations.
803 wifi_handle global_handle_;
804 // Map of interface name to handle that is to be used for all interface
805 // specific operations.
806 std::map<std::string, wifi_interface_handle> iface_name_to_handle_;
807 // Flag to indicate if we have initiated the cleanup of legacy HAL.
808 std::atomic<bool> awaiting_event_loop_termination_;
809 std::condition_variable_any stop_wait_cv_;
810 // Flag to indicate if the legacy HAL has been started.
811 bool is_started_;
812 std::weak_ptr<::android::wifi_system::InterfaceTool> iface_tool_;
813 // Flag to indicate if this HAL is for the primary chip. This is used
814 // in order to avoid some hard-coded behavior used with older HALs,
815 // such as bring wlan0 interface up/down on start/stop HAL.
816 // it may be removed once vendor HALs are updated.
817 bool is_primary_;
818};
819
820} // namespace legacy_hal
821} // namespace wifi
822} // namespace hardware
823} // namespace android
824} // namespace aidl
825
826#endif // WIFI_LEGACY_HAL_H_