1 /* 2 * Copyright (C) 2021 HiSilicon (Shanghai) Technologies CO., LIMITED. 3 * 4 * This program is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU General Public License 6 * as published by the Free Software Foundation; either version 2 7 * of the License, or (at your option) any later version. 8 * 9 * This program is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU General Public License for more details. 13 * 14 * You should have received a copy of the GNU General Public License 15 * along with this program; if not, write to the Free Software 16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 */ 18 #ifndef __WAL_WPA_IOCTL_H__ 19 #define __WAL_WPA_IOCTL_H__ 20 21 /* **************************************************************************** 22 1 其他头文件包含 23 **************************************************************************** */ 24 #if (_PRE_OS_VERSION_LITEOS == _PRE_OS_VERSION) 25 #ifndef HAVE_PCLINT_CHECK 26 #include "hi_wifi_driver_wpa_if.h" 27 #endif 28 #endif 29 #include "oam_ext_if.h" 30 #include "wal_main.h" 31 #include "oal_net.h" 32 #ifdef __cplusplus 33 #if __cplusplus 34 extern "C" { 35 #endif 36 #endif 37 #include "hi_wifi_driver_wpa_if.h" 38 /* **************************************************************************** 39 2 宏定义 40 **************************************************************************** */ 41 /* Driver supports AP mode */ 42 #define HISI_DRIVER_FLAGS_AP 0x00000040 43 /* Driver supports concurrent P2P operations */ 44 #define HISI_DRIVER_FLAGS_P2P_CONCURRENT 0x00000200 45 /* 46 * Driver uses the initial interface as a 47 * dedicated management interface, i.e., it cannot 48 * be used for P2P group operations or non-P2P purposes. 49 */ 50 #define HISI_DRIVER_FLAGS_P2P_DEDICATED_INTERFACE 0x00000400 51 /* P2P capable (P2P GO or P2P Client) */ 52 #define HISI_DRIVER_FLAGS_P2P_CAPABLE 0x00000800 53 /* Driver supports a dedicated interface for P2P Device */ 54 #define HISI_DRIVER_FLAGS_DEDICATED_P2P_DEVICE 0x20000000 55 56 #define MAX_ACTION_DATA_LEN 1024 57 58 /* **************************************************************************** 59 3 枚举定义 60 **************************************************************************** */ 61 typedef enum { 62 HISI_CHAN_DISABLED = 1<<0, 63 HISI_CHAN_PASSIVE_SCAN = 1<<1, 64 HISI_CHAN_NO_IBSS = 1<<2, 65 HISI_CHAN_RADAR = 1<<3, 66 HISI_CHAN_NO_HT40PLUS = 1<<4, 67 HISI_CHAN_NO_HT40MINUS = 1<<5, 68 HISI_CHAN_NO_OFDM = 1<<6, 69 HISI_CHAN_NO_80MHZ = 1<<7, 70 HISI_CHAN_NO_160MHZ = 1<<8, 71 } hisi_channel_flags_enum; 72 typedef hi_u8 hisi_channel_flags_enum_uint8; 73 /* **************************************************************************** 74 4 全局变量声明 75 **************************************************************************** */ 76 /* **************************************************************************** 77 5 消息头定义 78 **************************************************************************** */ 79 /* **************************************************************************** 80 6 消息定义 81 **************************************************************************** */ 82 /* **************************************************************************** 83 7 STRUCT定义 84 **************************************************************************** */ 85 typedef hi_s32 (*hwal_ioctl_handler)(hi_char *puc_ifname, hi_void *p_buf); 86 87 /* **************************************************************************** 88 8 UNION定义 89 **************************************************************************** */ 90 /* **************************************************************************** 91 9 OTHERS定义 92 **************************************************************************** */ 93 /* **************************************************************************** 94 10 函数声明 95 **************************************************************************** */ 96 #if (_PRE_OS_VERSION_LINUX == _PRE_OS_VERSION) 97 hi_s32 hwal_ioctl_set_power(hi_char *puc_ifname, hi_void *buf); 98 hi_s32 hwal_ioctl_del_virtual_intf(hi_char *puc_ifname, hi_void *buf); 99 hi_s32 hwal_ioctl_ip_notify(const hi_char *puc_ifname, const hi_void *buf); 100 hi_s32 hwal_ioctl_set_max_sta(hi_char *puc_ifname, hi_void *max_sta_num); 101 hi_s32 hwal_ioctl_stop_ap(hi_char *puc_ifname, hi_void *buf); 102 #endif 103 hi_s32 hwal_ioctl_set_pm_switch(const hi_char *puc_ifname, const hi_void *buf); 104 hi_s32 hwal_ioctl_set_key(const hi_char *puc_ifname, hi_void *buf); 105 hi_s32 hwal_ioctl_new_key(const hi_char *puc_ifname, hi_void *buf); 106 hi_s32 hwal_ioctl_del_key(const hi_char *puc_ifname, hi_void *buf); 107 hi_s32 hwal_ioctl_set_ap(const hi_char *puc_ifname, hi_void *buf); 108 hi_s32 hwal_ioctl_change_beacon(const hi_char *puc_ifname, hi_void *buf); 109 hi_s32 hwal_ioctl_send_mlme(const hi_char *puc_ifname, hi_void *buf); 110 hi_s32 hwal_ioctl_send_eapol(const hi_char *puc_ifname, hi_void *buf); 111 hi_s32 hwal_ioctl_set_mode(const hi_char *puc_ifname, hi_void *buf); 112 hi_s32 hwal_ioctl_receive_eapol(const hi_char *puc_ifname, hi_void *buf); 113 hi_s32 hwal_ioctl_enable_eapol(const hi_char *puc_ifname, hi_void *buf); 114 hi_s32 hwal_ioctl_disable_eapol(const hi_char *puc_ifname, const hi_void *buf); 115 hi_s32 hwal_ioctl_get_addr(const hi_char *puc_ifname, hi_void *buf); 116 hi_s32 hwal_ioctl_get_hw_feature(const hi_char *puc_ifname, hi_void *buf); 117 hi_s32 hisi_hwal_wpa_ioctl(hi_char *pc_ifname, hisi_ioctl_command_stru *cmd); 118 hi_s32 hwal_ioctl_scan(const hi_char *puc_ifname, hi_void *buf); 119 hi_s32 hwal_ioctl_disconnect(const hi_char *puc_ifname, const hi_void *buf); 120 hi_s32 hwal_ioctl_assoc(const hi_char *puc_ifname, hi_void *buf); 121 hi_s32 hwal_ioctl_set_netdev(const hi_char *puc_ifname, const hi_void *buf); 122 hi_u8 hwal_is_valid_ie_attr(const hi_u8 *puc_ie, hi_u32 ie_len); 123 hi_s32 hwal_ioctl_sta_remove(const hi_char *puc_ifname, hi_void *buf); 124 hi_s32 hwal_ioctl_send_action(const hi_char *puc_ifname, hi_void *buf); 125 hi_s32 hwal_ioctl_set_delay_report(const hi_char *puc_ifname, hi_void *buf); 126 #ifdef _PRE_WLAN_FEATURE_MESH 127 hi_s32 hwal_ioctl_set_mesh_user(const hi_char *puc_ifname, hi_void *buf); 128 hi_s32 hwal_ioctl_enable_auto_peer(const hi_char *puc_ifname, hi_void *buf); 129 hi_s32 hwal_ioctl_set_mesh_gtk(const hi_char *puc_ifname, hi_void *buf); 130 hi_s32 hwal_ioctl_set_accept_peer(const hi_char *puc_ifname, hi_void *buf); 131 hi_s32 hwal_ioctl_set_accept_sta(const hi_char *puc_ifname, hi_void *buf); 132 #endif 133 #ifdef _PRE_WLAN_FEATURE_P2P 134 hi_s32 hwal_ioctl_add_if(const hi_char *puc_ifname, hi_void *buf); 135 hi_s32 hwal_ioctl_remove_if(const hi_char *puc_ifname, hi_void *buf); 136 hi_s32 hwal_ioctl_probe_req_report(const hi_char *puc_ifname, const hi_void *buf); 137 hi_s32 hwal_ioctl_remain_on_channel(const hi_char *puc_ifname, hi_void *buf); 138 hi_s32 hwal_ioctl_cancel_remain_on_channel(const hi_char *puc_ifname, const hi_void *buf); 139 hi_s32 hwal_ioctl_set_ap_wps_p2p_ie(const hi_char *puc_ifname, hi_void *buf); 140 hi_s32 hwal_ioctl_set_p2p_noa(const hi_char *puc_ifname, hi_void *buf); 141 hi_s32 hwal_ioctl_set_p2p_powersave(const hi_char *puc_ifname, hi_void *buf); 142 hi_s32 hwal_ioctl_get_p2p_addr(const hi_char *puc_ifname, hi_void *buf); 143 #endif 144 hi_s32 hwal_ioctl_get_drv_flags(const hi_char *puc_ifname, hi_void *buf); 145 146 #ifdef _PRE_WLAN_FEATURE_REKEY_OFFLOAD 147 hi_s32 hwal_ioctl_set_rekey_info(const hi_char *puc_ifname, hi_void *buf); 148 #endif 149 #ifdef __cplusplus 150 #if __cplusplus 151 } 152 #endif 153 #endif 154 155 #endif /* end of wal_wpa_ioctl.h */ 156