1 /*
2  * Copyright (C) 2019-2020 Alibaba Group Holding Limited
3  */
4 
5 #ifndef WIFI_INTER_H
6 #define WIFI_INTER_H
7 
8 #include <stdio.h>
9 #include <stdlib.h>
10 #include <string.h>
11 #include <stdbool.h>
12 
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
16 
17 int hal_wifi_init(netdev_t *dev);
18 int hal_wifi_deinit(netdev_t *dev);
19 int hal_wifi_get_base_info(netdev_t *dev, wifi_base_info_t* info);
20 int hal_wifi_set_mode(netdev_t *dev, wifi_mode_t mode);
21 int hal_wifi_get_mode(netdev_t *dev, wifi_mode_t *mode);
22 int hal_wifi_set_mac_addr(netdev_t *dev, const uint8_t *mac);
23 int hal_wifi_get_mac_addr(netdev_t *dev, uint8_t *mac);
24 int hal_wifi_sta_get_link_status(netdev_t *dev, wifi_ap_record_t *ap_info);
25 int hal_wifi_start_scan(netdev_t *dev, wifi_scan_config_t *config, bool block);
26 int hal_wifi_set_channel(netdev_t *dev, int channel);
27 int hal_wifi_get_channel(netdev_t *dev, int *channel);
28 int hal_wifi_start_monitor(netdev_t *dev, wifi_promiscuous_cb_t cb);
29 int hal_wifi_stop_monitor(netdev_t *dev);
30 int hal_wifi_send_80211_raw_frame(netdev_t *dev, void *buffer, uint16_t len);
31 int hal_wifi_install_event_cb(netdev_t *dev, wifi_event_func *evt_cb);
32 int hal_wifi_set_lpm(netdev_t *dev, wifi_lpm_mode_t mode);
33 int hal_wifi_get_lpm(netdev_t *dev, wifi_lpm_mode_t *mode);
34 int hal_wifi_notify_ip_state2drv(netdev_t *dev, wifi_ip_stat_t *out_net_para, wifi_mode_t wifi_type);
35 int hal_wifi_connect(netdev_t *dev, wifi_config_t *config);
36 int hal_wifi_disconnect(netdev_t *dev);
37 int hal_wifi_cancel_connect(netdev_t *dev);
38 int hal_wifi_ap_get_sta_list(netdev_t *dev, wifi_sta_list_t *sta);
39 int hal_wifi_start_specified_scan(netdev_t *dev, ap_list_t *ap_list, int ap_num);
40 int hal_wifi_register_monitor_cb(netdev_t *dev, monitor_data_cb_t fn);
41 int hal_wifi_start_mgnt_monitor(netdev_t *dev);
42 int hal_wifi_stop_mgnt_monitor(netdev_t *dev);
43 int hal_wifi_register_mgnt_monitor_cb(netdev_t *dev, monitor_data_cb_t fn);
44 int hal_wifi_set_smartcfg(netdev_t *dev, int enable);
45 
46 #ifdef __cplusplus
47 }
48 #endif
49 
50 #endif
51