• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2020 HiSilicon (Shanghai) Technologies CO., LIMITED.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  * Description: driver_soc_ioctl.header
15  */
16 
17 #ifndef __DRIVER_SOC_IOCTL_H__
18 #define __DRIVER_SOC_IOCTL_H__
19 
20 #include "driver_soc_common.h"
21 #include "wifi_api.h"
22 
23 #ifdef __cplusplus
24 #if __cplusplus
25 extern "C" {
26 #endif
27 #endif
28 
29 #ifdef LOS_CONFIG_WPA_ENTERPRISE
30 #define EAPOL_PKT_BUF_SIZE 1600
31 #else
32 #define EAPOL_PKT_BUF_SIZE 800
33 #endif /* LOS_CONFIG_WPA_ENTERPRISE */
34 
35 #ifndef EXT_CHECK_DHCP_TIME
36 #define EXT_CHECK_DHCP_TIME 30
37 #endif
38 
39 #ifndef NETDEV_UP
40 #define NETDEV_UP 0x0001
41 #endif
42 
43 typedef enum {
44 	EXT_CHAN_WIDTH_20_NOHT,
45 	EXT_CHAN_WIDTH_20,
46 	EXT_CHAN_WIDTH_40,
47 
48 	EXT_CHAN_WIDTH_BUTT
49 } ext_chan_width_enum;
50 typedef uint8 ext_chan_width_enum_uint8;
51 
52 typedef enum {
53 	EXT_WPA_VERSION_1 = 1 << 0,
54 	EXT_WPA_VERSION_2 = 1 << 1,
55 } ext_wpa_versions_enum;
56 typedef uint8 ext_wpa_versions_enum_uint8;
57 
58 typedef enum {
59 	EXT_DISCONNECT,
60 	EXT_CONNECT,
61 } ext_connect_status_enum;
62 typedef uint8 ext_connect_status_enum_uint8;
63 
64 int32 drv_soc_eapol_packet_send(const int8  *ifname, const uint8 *src_addr, const uint8 *dst_addr,
65                                 const uint8 *buf, uint32 length);
66 int32 drv_soc_eapol_packet_receive(const int8 *ifname, ext_rx_eapol_stru *rx_eapol);
67 int32 drv_soc_eapol_enable(const int8 *ifname, void (*notify_callback)(void *, void *context), void *context);
68 int32 drv_soc_eapol_disable(const int8 *ifname);
69 int32 drv_soc_ioctl_set_ap(const int8 *ifname, const void *buf);
70 int32 drv_soc_ioctl_change_beacon(const int8 *ifname, const void *buf);
71 int32 drv_soc_ioctl_send_mlme(const int8 *ifname, const void *buf);
72 int32 drv_soc_ioctl_new_key(const int8 *ifname, const void *buf);
73 int32 drv_soc_ioctl_del_key(const int8 *ifname, const void *buf);
74 int32 drv_soc_ioctl_set_key(const int8 *ifname, const void *buf);
75 int32 drv_soc_ioctl_set_mode(const int8 *ifname, const void *buf);
76 int32 drv_soc_ioctl_get_mode(const int8 *ifname, const void *buf);
77 int32 drv_soc_ioctl_del_beacon(const int8 *ifname, const void *buf);
78 int32 drv_soc_ioctl_set_csi_config(const int8 *ifname, const void *csi_config);
79 int32 drv_soc_ioctl_csi_switch(const int8 *ifname, const void *switch_flag);
80 
81 #ifdef CONFIG_ACS
82 int32 drv_soc_ioctl_get_survey(const int8 *ifname, const void *buf);
83 #endif
84 #ifdef CONFIG_IEEE80211R
85 int32 drv_soc_ioctl_update_ft_ies(const int8 *ifname, const void *buf);
86 #endif /* CONFIG_IEEE80211R */
87 int32 drv_soc_ioctl_get_own_mac(const int8 *ifname, const int8 *mac_addr);
88 int32 drv_soc_ioctl_get_hw_feature(const int8 *ifname, const void *buf);
89 int32 drv_soc_ioctl_scan(const int8 *ifname, const void *buf);
90 int32 drv_soc_ioctl_disconnet(const int8 *ifname, const void *buf);
91 int32 drv_soc_ioctl_assoc(const int8 *ifname, const void *buf);
92 #ifdef _PRE_WLAN_FEATURE_REKEY_OFFLOAD
93 extern int32 drv_soc_ioctl_set_rekey_info(const int8 *ifname, const void *buf);
94 #endif
95 int32 drv_soc_ioctl_set_max_sta_num(const int8 *ifname, const void *buf_max_sta_num);
96 int32 drv_soc_ioctl(const int8 *ifname, const ext_ioctl_command_stru *ioctl_cmd);
97 int32 drv_soc_ioctl_set_netdev(const int8 *ifname, const ext_bool_enum_uint8 *netdev);
98 int32 drv_soc_ioctl_ip_notify_driver(const int8 *ifname, const void *buf);
99 int32 drv_soc_ioctl_set_pm_on(const int8 *ifname, const void *buf);
100 int32 drv_soc_ioctl_sta_remove(const int8 *ifname, const void *buf_addr);
101 int32 drv_soc_ioctl_mesh_usr_add(const int8 *ifname, const void *buf_addr);
102 int32 drv_soc_ioctl_get_drv_flags(const int8 *ifname, const void *buf_addr);
103 int32 drv_soc_ioctl_set_delay_report(const int8 *ifname, const void *buf);
104 int32 drv_soc_ioctl_send_ext_auth_status(const int8 *ifname, const void *buf);
105 int32 drv_soc_ioctl_update_dh_ie(const int8 *ifname, const void *buf);
106 int32 drv_soc_ioctl_send_action(const int8 *ifname, const void *buf);
107 int32 drv_soc_ioctl_mesh_set_mgtk(const int8 *ifname, const void *buf_addr);
108 int32 drv_soc_ioctl_mesh_enable_flag(const int8 *ifname, enum ext_mesh_enable_flag_type flag_type,
109                                      const void *buf_addr);
110 int32 drv_soc_ioctl_set_usr_app_ie(const int8 *ifname, const void *usr_app_ie);
111 int32 drv_soc_ioctl_get_mac_by_iftype(const int8 *ifname, void *buf);
112 #ifdef LOS_CONFIG_P2P
113 #ifdef CONFIG_WPS_AP
114 int32 drv_soc_ioctl_set_ap_wps_p2p_ie(const int8 *ifname, const void *buf);
115 #endif
116 int32 drv_soc_ioctl_probe_request_report(const int8 *ifname, const void *buf_addr);
117 int32 drv_soc_ioctl_remain_on_channel(const int8 *ifname, const void *buf_addr);
118 int32 drv_soc_ioctl_cancel_remain_on_channel(const int8 *ifname, const void *buf_addr);
119 int32 drv_soc_ioctl_add_if(const int8 *ifname, const void *buf_addr);
120 int32 drv_soc_ioctl_remove_if(const int8 *ifname, const void *buf_addr);
121 int32 drv_soc_ioctl_get_p2p_addr(const int8 *ifname, const void *buf_addr);
122 int32 drv_soc_ioctl_set_p2p_noa(const int8 *ifname, const void *buf_addr);
123 int32 drv_soc_ioctl_set_p2p_powersave(const int8 *ifname, const void *buf_addr);
124 #endif /* LOS_CONFIG_P2P */
125 
126 int32 drv_soc_ioctl_add_pmkid(const int8 *ifname, const void *buf);
127 int32 drv_soc_ioctl_remove_pmkid(const int8 *ifname, const void *buf);
128 int32 drv_soc_ioctl_flush_pmkid(const int8 *ifname, const void *buf);
129 
130 #ifdef __cplusplus
131 #if __cplusplus
132 }
133 #endif
134 #endif
135 #endif /* end of driver_soc_ioctl.h */
136