| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 1 | /**************************************************************************** | 
 | 2 |  **************************************************************************** | 
 | 3 |  *** | 
 | 4 |  ***   This header was automatically generated from a Linux kernel header | 
 | 5 |  ***   of the same name, to make information necessary for userspace to | 
 | 6 |  ***   call into the kernel available to libc.  It contains only constants, | 
 | 7 |  ***   structures, and macros generated from the original header, and thus, | 
 | 8 |  ***   contains no copyrightable information. | 
 | 9 |  *** | 
 | 10 |  ***   To edit the content of this header, modify the corresponding | 
 | 11 |  ***   source file (e.g. under external/kernel-headers/original/) then | 
 | 12 |  ***   run bionic/libc/kernel/tools/update_all.py | 
 | 13 |  *** | 
 | 14 |  ***   Any manual change here will be lost the next time this script will | 
 | 15 |  ***   be run. You've been warned! | 
 | 16 |  *** | 
 | 17 |  **************************************************************************** | 
 | 18 |  ****************************************************************************/ | 
 | 19 | #ifndef _UAPI_LINUX_WIRELESS_H | 
 | 20 | #define _UAPI_LINUX_WIRELESS_H | 
 | 21 | #include <linux/types.h> | 
 | 22 | #include <linux/socket.h> | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 23 | #include <linux/if.h> | 
| Christopher Ferris | af09c70 | 2020-06-01 20:29:29 -0700 | [diff] [blame] | 24 | #include <stddef.h> | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 25 | #define WIRELESS_EXT 22 | 
 | 26 | #define SIOCSIWCOMMIT 0x8B00 | 
 | 27 | #define SIOCGIWNAME 0x8B01 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 28 | #define SIOCSIWNWID 0x8B02 | 
 | 29 | #define SIOCGIWNWID 0x8B03 | 
 | 30 | #define SIOCSIWFREQ 0x8B04 | 
 | 31 | #define SIOCGIWFREQ 0x8B05 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 32 | #define SIOCSIWMODE 0x8B06 | 
 | 33 | #define SIOCGIWMODE 0x8B07 | 
 | 34 | #define SIOCSIWSENS 0x8B08 | 
 | 35 | #define SIOCGIWSENS 0x8B09 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 36 | #define SIOCSIWRANGE 0x8B0A | 
 | 37 | #define SIOCGIWRANGE 0x8B0B | 
 | 38 | #define SIOCSIWPRIV 0x8B0C | 
 | 39 | #define SIOCGIWPRIV 0x8B0D | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 40 | #define SIOCSIWSTATS 0x8B0E | 
 | 41 | #define SIOCGIWSTATS 0x8B0F | 
 | 42 | #define SIOCSIWSPY 0x8B10 | 
 | 43 | #define SIOCGIWSPY 0x8B11 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 44 | #define SIOCSIWTHRSPY 0x8B12 | 
 | 45 | #define SIOCGIWTHRSPY 0x8B13 | 
 | 46 | #define SIOCSIWAP 0x8B14 | 
 | 47 | #define SIOCGIWAP 0x8B15 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 48 | #define SIOCGIWAPLIST 0x8B17 | 
 | 49 | #define SIOCSIWSCAN 0x8B18 | 
 | 50 | #define SIOCGIWSCAN 0x8B19 | 
 | 51 | #define SIOCSIWESSID 0x8B1A | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 52 | #define SIOCGIWESSID 0x8B1B | 
 | 53 | #define SIOCSIWNICKN 0x8B1C | 
 | 54 | #define SIOCGIWNICKN 0x8B1D | 
 | 55 | #define SIOCSIWRATE 0x8B20 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 56 | #define SIOCGIWRATE 0x8B21 | 
 | 57 | #define SIOCSIWRTS 0x8B22 | 
 | 58 | #define SIOCGIWRTS 0x8B23 | 
 | 59 | #define SIOCSIWFRAG 0x8B24 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 60 | #define SIOCGIWFRAG 0x8B25 | 
 | 61 | #define SIOCSIWTXPOW 0x8B26 | 
 | 62 | #define SIOCGIWTXPOW 0x8B27 | 
 | 63 | #define SIOCSIWRETRY 0x8B28 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 64 | #define SIOCGIWRETRY 0x8B29 | 
 | 65 | #define SIOCSIWENCODE 0x8B2A | 
 | 66 | #define SIOCGIWENCODE 0x8B2B | 
 | 67 | #define SIOCSIWPOWER 0x8B2C | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 68 | #define SIOCGIWPOWER 0x8B2D | 
 | 69 | #define SIOCSIWGENIE 0x8B30 | 
 | 70 | #define SIOCGIWGENIE 0x8B31 | 
 | 71 | #define SIOCSIWMLME 0x8B16 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 72 | #define SIOCSIWAUTH 0x8B32 | 
 | 73 | #define SIOCGIWAUTH 0x8B33 | 
 | 74 | #define SIOCSIWENCODEEXT 0x8B34 | 
 | 75 | #define SIOCGIWENCODEEXT 0x8B35 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 76 | #define SIOCSIWPMKSA 0x8B36 | 
 | 77 | #define SIOCIWFIRSTPRIV 0x8BE0 | 
 | 78 | #define SIOCIWLASTPRIV 0x8BFF | 
 | 79 | #define SIOCIWFIRST 0x8B00 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 80 | #define SIOCIWLAST SIOCIWLASTPRIV | 
 | 81 | #define IW_IOCTL_IDX(cmd) ((cmd) - SIOCIWFIRST) | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 82 | #define IW_HANDLER(id,func) [IW_IOCTL_IDX(id)] = func | 
 | 83 | #define IW_IS_SET(cmd) (! ((cmd) & 0x1)) | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 84 | #define IW_IS_GET(cmd) ((cmd) & 0x1) | 
 | 85 | #define IWEVTXDROP 0x8C00 | 
 | 86 | #define IWEVQUAL 0x8C01 | 
 | 87 | #define IWEVCUSTOM 0x8C02 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 88 | #define IWEVREGISTERED 0x8C03 | 
 | 89 | #define IWEVEXPIRED 0x8C04 | 
 | 90 | #define IWEVGENIE 0x8C05 | 
 | 91 | #define IWEVMICHAELMICFAILURE 0x8C06 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 92 | #define IWEVASSOCREQIE 0x8C07 | 
 | 93 | #define IWEVASSOCRESPIE 0x8C08 | 
 | 94 | #define IWEVPMKIDCAND 0x8C09 | 
 | 95 | #define IWEVFIRST 0x8C00 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 96 | #define IW_EVENT_IDX(cmd) ((cmd) - IWEVFIRST) | 
 | 97 | #define IW_PRIV_TYPE_MASK 0x7000 | 
 | 98 | #define IW_PRIV_TYPE_NONE 0x0000 | 
 | 99 | #define IW_PRIV_TYPE_BYTE 0x1000 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 100 | #define IW_PRIV_TYPE_CHAR 0x2000 | 
 | 101 | #define IW_PRIV_TYPE_INT 0x4000 | 
 | 102 | #define IW_PRIV_TYPE_FLOAT 0x5000 | 
 | 103 | #define IW_PRIV_TYPE_ADDR 0x6000 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 104 | #define IW_PRIV_SIZE_FIXED 0x0800 | 
 | 105 | #define IW_PRIV_SIZE_MASK 0x07FF | 
 | 106 | #define IW_MAX_FREQUENCIES 32 | 
 | 107 | #define IW_MAX_BITRATES 32 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 108 | #define IW_MAX_TXPOWER 8 | 
 | 109 | #define IW_MAX_SPY 8 | 
 | 110 | #define IW_MAX_AP 64 | 
 | 111 | #define IW_ESSID_MAX_SIZE 32 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 112 | #define IW_MODE_AUTO 0 | 
 | 113 | #define IW_MODE_ADHOC 1 | 
 | 114 | #define IW_MODE_INFRA 2 | 
 | 115 | #define IW_MODE_MASTER 3 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 116 | #define IW_MODE_REPEAT 4 | 
 | 117 | #define IW_MODE_SECOND 5 | 
 | 118 | #define IW_MODE_MONITOR 6 | 
 | 119 | #define IW_MODE_MESH 7 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 120 | #define IW_QUAL_QUAL_UPDATED 0x01 | 
 | 121 | #define IW_QUAL_LEVEL_UPDATED 0x02 | 
 | 122 | #define IW_QUAL_NOISE_UPDATED 0x04 | 
 | 123 | #define IW_QUAL_ALL_UPDATED 0x07 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 124 | #define IW_QUAL_DBM 0x08 | 
 | 125 | #define IW_QUAL_QUAL_INVALID 0x10 | 
 | 126 | #define IW_QUAL_LEVEL_INVALID 0x20 | 
 | 127 | #define IW_QUAL_NOISE_INVALID 0x40 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 128 | #define IW_QUAL_RCPI 0x80 | 
 | 129 | #define IW_QUAL_ALL_INVALID 0x70 | 
 | 130 | #define IW_FREQ_AUTO 0x00 | 
 | 131 | #define IW_FREQ_FIXED 0x01 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 132 | #define IW_MAX_ENCODING_SIZES 8 | 
 | 133 | #define IW_ENCODING_TOKEN_MAX 64 | 
 | 134 | #define IW_ENCODE_INDEX 0x00FF | 
 | 135 | #define IW_ENCODE_FLAGS 0xFF00 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 136 | #define IW_ENCODE_MODE 0xF000 | 
 | 137 | #define IW_ENCODE_DISABLED 0x8000 | 
 | 138 | #define IW_ENCODE_ENABLED 0x0000 | 
 | 139 | #define IW_ENCODE_RESTRICTED 0x4000 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 140 | #define IW_ENCODE_OPEN 0x2000 | 
 | 141 | #define IW_ENCODE_NOKEY 0x0800 | 
 | 142 | #define IW_ENCODE_TEMP 0x0400 | 
 | 143 | #define IW_POWER_ON 0x0000 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 144 | #define IW_POWER_TYPE 0xF000 | 
 | 145 | #define IW_POWER_PERIOD 0x1000 | 
 | 146 | #define IW_POWER_TIMEOUT 0x2000 | 
 | 147 | #define IW_POWER_MODE 0x0F00 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 148 | #define IW_POWER_UNICAST_R 0x0100 | 
 | 149 | #define IW_POWER_MULTICAST_R 0x0200 | 
 | 150 | #define IW_POWER_ALL_R 0x0300 | 
 | 151 | #define IW_POWER_FORCE_S 0x0400 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 152 | #define IW_POWER_REPEATER 0x0800 | 
 | 153 | #define IW_POWER_MODIFIER 0x000F | 
 | 154 | #define IW_POWER_MIN 0x0001 | 
 | 155 | #define IW_POWER_MAX 0x0002 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 156 | #define IW_POWER_RELATIVE 0x0004 | 
 | 157 | #define IW_TXPOW_TYPE 0x00FF | 
 | 158 | #define IW_TXPOW_DBM 0x0000 | 
 | 159 | #define IW_TXPOW_MWATT 0x0001 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 160 | #define IW_TXPOW_RELATIVE 0x0002 | 
 | 161 | #define IW_TXPOW_RANGE 0x1000 | 
 | 162 | #define IW_RETRY_ON 0x0000 | 
 | 163 | #define IW_RETRY_TYPE 0xF000 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 164 | #define IW_RETRY_LIMIT 0x1000 | 
 | 165 | #define IW_RETRY_LIFETIME 0x2000 | 
 | 166 | #define IW_RETRY_MODIFIER 0x00FF | 
 | 167 | #define IW_RETRY_MIN 0x0001 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 168 | #define IW_RETRY_MAX 0x0002 | 
 | 169 | #define IW_RETRY_RELATIVE 0x0004 | 
 | 170 | #define IW_RETRY_SHORT 0x0010 | 
 | 171 | #define IW_RETRY_LONG 0x0020 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 172 | #define IW_SCAN_DEFAULT 0x0000 | 
 | 173 | #define IW_SCAN_ALL_ESSID 0x0001 | 
 | 174 | #define IW_SCAN_THIS_ESSID 0x0002 | 
 | 175 | #define IW_SCAN_ALL_FREQ 0x0004 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 176 | #define IW_SCAN_THIS_FREQ 0x0008 | 
 | 177 | #define IW_SCAN_ALL_MODE 0x0010 | 
 | 178 | #define IW_SCAN_THIS_MODE 0x0020 | 
 | 179 | #define IW_SCAN_ALL_RATE 0x0040 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 180 | #define IW_SCAN_THIS_RATE 0x0080 | 
 | 181 | #define IW_SCAN_TYPE_ACTIVE 0 | 
 | 182 | #define IW_SCAN_TYPE_PASSIVE 1 | 
 | 183 | #define IW_SCAN_MAX_DATA 4096 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 184 | #define IW_SCAN_CAPA_NONE 0x00 | 
 | 185 | #define IW_SCAN_CAPA_ESSID 0x01 | 
 | 186 | #define IW_SCAN_CAPA_BSSID 0x02 | 
 | 187 | #define IW_SCAN_CAPA_CHANNEL 0x04 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 188 | #define IW_SCAN_CAPA_MODE 0x08 | 
 | 189 | #define IW_SCAN_CAPA_RATE 0x10 | 
 | 190 | #define IW_SCAN_CAPA_TYPE 0x20 | 
 | 191 | #define IW_SCAN_CAPA_TIME 0x40 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 192 | #define IW_CUSTOM_MAX 256 | 
 | 193 | #define IW_GENERIC_IE_MAX 1024 | 
 | 194 | #define IW_MLME_DEAUTH 0 | 
 | 195 | #define IW_MLME_DISASSOC 1 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 196 | #define IW_MLME_AUTH 2 | 
 | 197 | #define IW_MLME_ASSOC 3 | 
 | 198 | #define IW_AUTH_INDEX 0x0FFF | 
 | 199 | #define IW_AUTH_FLAGS 0xF000 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 200 | #define IW_AUTH_WPA_VERSION 0 | 
 | 201 | #define IW_AUTH_CIPHER_PAIRWISE 1 | 
 | 202 | #define IW_AUTH_CIPHER_GROUP 2 | 
 | 203 | #define IW_AUTH_KEY_MGMT 3 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 204 | #define IW_AUTH_TKIP_COUNTERMEASURES 4 | 
 | 205 | #define IW_AUTH_DROP_UNENCRYPTED 5 | 
 | 206 | #define IW_AUTH_80211_AUTH_ALG 6 | 
 | 207 | #define IW_AUTH_WPA_ENABLED 7 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 208 | #define IW_AUTH_RX_UNENCRYPTED_EAPOL 8 | 
 | 209 | #define IW_AUTH_ROAMING_CONTROL 9 | 
 | 210 | #define IW_AUTH_PRIVACY_INVOKED 10 | 
 | 211 | #define IW_AUTH_CIPHER_GROUP_MGMT 11 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 212 | #define IW_AUTH_MFP 12 | 
 | 213 | #define IW_AUTH_WPA_VERSION_DISABLED 0x00000001 | 
 | 214 | #define IW_AUTH_WPA_VERSION_WPA 0x00000002 | 
 | 215 | #define IW_AUTH_WPA_VERSION_WPA2 0x00000004 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 216 | #define IW_AUTH_CIPHER_NONE 0x00000001 | 
 | 217 | #define IW_AUTH_CIPHER_WEP40 0x00000002 | 
 | 218 | #define IW_AUTH_CIPHER_TKIP 0x00000004 | 
 | 219 | #define IW_AUTH_CIPHER_CCMP 0x00000008 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 220 | #define IW_AUTH_CIPHER_WEP104 0x00000010 | 
 | 221 | #define IW_AUTH_CIPHER_AES_CMAC 0x00000020 | 
 | 222 | #define IW_AUTH_KEY_MGMT_802_1X 1 | 
 | 223 | #define IW_AUTH_KEY_MGMT_PSK 2 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 224 | #define IW_AUTH_ALG_OPEN_SYSTEM 0x00000001 | 
 | 225 | #define IW_AUTH_ALG_SHARED_KEY 0x00000002 | 
 | 226 | #define IW_AUTH_ALG_LEAP 0x00000004 | 
 | 227 | #define IW_AUTH_ROAMING_ENABLE 0 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 228 | #define IW_AUTH_ROAMING_DISABLE 1 | 
 | 229 | #define IW_AUTH_MFP_DISABLED 0 | 
 | 230 | #define IW_AUTH_MFP_OPTIONAL 1 | 
 | 231 | #define IW_AUTH_MFP_REQUIRED 2 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 232 | #define IW_ENCODE_SEQ_MAX_SIZE 8 | 
 | 233 | #define IW_ENCODE_ALG_NONE 0 | 
 | 234 | #define IW_ENCODE_ALG_WEP 1 | 
 | 235 | #define IW_ENCODE_ALG_TKIP 2 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 236 | #define IW_ENCODE_ALG_CCMP 3 | 
 | 237 | #define IW_ENCODE_ALG_PMK 4 | 
 | 238 | #define IW_ENCODE_ALG_AES_CMAC 5 | 
 | 239 | #define IW_ENCODE_EXT_TX_SEQ_VALID 0x00000001 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 240 | #define IW_ENCODE_EXT_RX_SEQ_VALID 0x00000002 | 
 | 241 | #define IW_ENCODE_EXT_GROUP_KEY 0x00000004 | 
 | 242 | #define IW_ENCODE_EXT_SET_TX_KEY 0x00000008 | 
 | 243 | #define IW_MICFAILURE_KEY_ID 0x00000003 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 244 | #define IW_MICFAILURE_GROUP 0x00000004 | 
 | 245 | #define IW_MICFAILURE_PAIRWISE 0x00000008 | 
 | 246 | #define IW_MICFAILURE_STAKEY 0x00000010 | 
 | 247 | #define IW_MICFAILURE_COUNT 0x00000060 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 248 | #define IW_ENC_CAPA_WPA 0x00000001 | 
 | 249 | #define IW_ENC_CAPA_WPA2 0x00000002 | 
 | 250 | #define IW_ENC_CAPA_CIPHER_TKIP 0x00000004 | 
 | 251 | #define IW_ENC_CAPA_CIPHER_CCMP 0x00000008 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 252 | #define IW_ENC_CAPA_4WAY_HANDSHAKE 0x00000010 | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 253 | #define IW_EVENT_CAPA_BASE(cmd) ((cmd >= SIOCIWFIRSTPRIV) ? (cmd - SIOCIWFIRSTPRIV + 0x60) : (cmd - SIOCIWFIRST)) | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 254 | #define IW_EVENT_CAPA_INDEX(cmd) (IW_EVENT_CAPA_BASE(cmd) >> 5) | 
 | 255 | #define IW_EVENT_CAPA_MASK(cmd) (1 << (IW_EVENT_CAPA_BASE(cmd) & 0x1F)) | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 256 | #define IW_EVENT_CAPA_K_0 (IW_EVENT_CAPA_MASK(0x8B04) | IW_EVENT_CAPA_MASK(0x8B06) | IW_EVENT_CAPA_MASK(0x8B1A)) | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 257 | #define IW_EVENT_CAPA_K_1 (IW_EVENT_CAPA_MASK(0x8B2A)) | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 258 | #define IW_EVENT_CAPA_SET(event_capa,cmd) (event_capa[IW_EVENT_CAPA_INDEX(cmd)] |= IW_EVENT_CAPA_MASK(cmd)) | 
 | 259 | #define IW_EVENT_CAPA_SET_KERNEL(event_capa) { event_capa[0] |= IW_EVENT_CAPA_K_0; event_capa[1] |= IW_EVENT_CAPA_K_1; } | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 260 | struct iw_param { | 
 | 261 |   __s32 value; | 
 | 262 |   __u8 fixed; | 
 | 263 |   __u8 disabled; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 264 |   __u16 flags; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 265 | }; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 266 | struct iw_point { | 
 | 267 |   void __user * pointer; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 268 |   __u16 length; | 
 | 269 |   __u16 flags; | 
 | 270 | }; | 
 | 271 | struct iw_freq { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 272 |   __s32 m; | 
 | 273 |   __s16 e; | 
 | 274 |   __u8 i; | 
 | 275 |   __u8 flags; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 276 | }; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 277 | struct iw_quality { | 
 | 278 |   __u8 qual; | 
 | 279 |   __u8 level; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 280 |   __u8 noise; | 
 | 281 |   __u8 updated; | 
 | 282 | }; | 
 | 283 | struct iw_discarded { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 284 |   __u32 nwid; | 
 | 285 |   __u32 code; | 
 | 286 |   __u32 fragment; | 
 | 287 |   __u32 retries; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 288 |   __u32 misc; | 
 | 289 | }; | 
 | 290 | struct iw_missed { | 
 | 291 |   __u32 beacon; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 292 | }; | 
 | 293 | struct iw_thrspy { | 
 | 294 |   struct sockaddr addr; | 
 | 295 |   struct iw_quality qual; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 296 |   struct iw_quality low; | 
 | 297 |   struct iw_quality high; | 
 | 298 | }; | 
 | 299 | struct iw_scan_req { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 300 |   __u8 scan_type; | 
 | 301 |   __u8 essid_len; | 
 | 302 |   __u8 num_channels; | 
 | 303 |   __u8 flags; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 304 |   struct sockaddr bssid; | 
 | 305 |   __u8 essid[IW_ESSID_MAX_SIZE]; | 
 | 306 |   __u32 min_channel_time; | 
 | 307 |   __u32 max_channel_time; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 308 |   struct iw_freq channel_list[IW_MAX_FREQUENCIES]; | 
 | 309 | }; | 
 | 310 | struct iw_encode_ext { | 
 | 311 |   __u32 ext_flags; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 312 |   __u8 tx_seq[IW_ENCODE_SEQ_MAX_SIZE]; | 
 | 313 |   __u8 rx_seq[IW_ENCODE_SEQ_MAX_SIZE]; | 
 | 314 |   struct sockaddr addr; | 
 | 315 |   __u16 alg; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 316 |   __u16 key_len; | 
 | 317 |   __u8 key[0]; | 
 | 318 | }; | 
 | 319 | struct iw_mlme { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 320 |   __u16 cmd; | 
 | 321 |   __u16 reason_code; | 
 | 322 |   struct sockaddr addr; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 323 | }; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 324 | #define IW_PMKSA_ADD 1 | 
 | 325 | #define IW_PMKSA_REMOVE 2 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 326 | #define IW_PMKSA_FLUSH 3 | 
 | 327 | #define IW_PMKID_LEN 16 | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 328 | struct iw_pmksa { | 
 | 329 |   __u32 cmd; | 
 | 330 |   struct sockaddr bssid; | 
 | 331 |   __u8 pmkid[IW_PMKID_LEN]; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 332 | }; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 333 | struct iw_michaelmicfailure { | 
 | 334 |   __u32 flags; | 
 | 335 |   struct sockaddr src_addr; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 336 |   __u8 tsc[IW_ENCODE_SEQ_MAX_SIZE]; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 337 | }; | 
 | 338 | #define IW_PMKID_CAND_PREAUTH 0x00000001 | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 339 | struct iw_pmkid_cand { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 340 |   __u32 flags; | 
 | 341 |   __u32 index; | 
 | 342 |   struct sockaddr bssid; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 343 | }; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 344 | struct iw_statistics { | 
 | 345 |   __u16 status; | 
 | 346 |   struct iw_quality qual; | 
 | 347 |   struct iw_discarded discard; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 348 |   struct iw_missed miss; | 
 | 349 | }; | 
 | 350 | union iwreq_data { | 
 | 351 |   char name[IFNAMSIZ]; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 352 |   struct iw_point essid; | 
 | 353 |   struct iw_param nwid; | 
 | 354 |   struct iw_freq freq; | 
 | 355 |   struct iw_param sens; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 356 |   struct iw_param bitrate; | 
 | 357 |   struct iw_param txpower; | 
 | 358 |   struct iw_param rts; | 
 | 359 |   struct iw_param frag; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 360 |   __u32 mode; | 
 | 361 |   struct iw_param retry; | 
 | 362 |   struct iw_point encoding; | 
 | 363 |   struct iw_param power; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 364 |   struct iw_quality qual; | 
 | 365 |   struct sockaddr ap_addr; | 
 | 366 |   struct sockaddr addr; | 
 | 367 |   struct iw_param param; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 368 |   struct iw_point data; | 
 | 369 | }; | 
 | 370 | struct iwreq { | 
 | 371 |   union { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 372 |     char ifrn_name[IFNAMSIZ]; | 
 | 373 |   } ifr_ifrn; | 
 | 374 |   union iwreq_data u; | 
 | 375 | }; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 376 | struct iw_range { | 
 | 377 |   __u32 throughput; | 
 | 378 |   __u32 min_nwid; | 
 | 379 |   __u32 max_nwid; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 380 |   __u16 old_num_channels; | 
 | 381 |   __u8 old_num_frequency; | 
 | 382 |   __u8 scan_capa; | 
 | 383 |   __u32 event_capa[6]; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 384 |   __s32 sensitivity; | 
 | 385 |   struct iw_quality max_qual; | 
 | 386 |   struct iw_quality avg_qual; | 
 | 387 |   __u8 num_bitrates; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 388 |   __s32 bitrate[IW_MAX_BITRATES]; | 
 | 389 |   __s32 min_rts; | 
 | 390 |   __s32 max_rts; | 
 | 391 |   __s32 min_frag; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 392 |   __s32 max_frag; | 
 | 393 |   __s32 min_pmp; | 
 | 394 |   __s32 max_pmp; | 
 | 395 |   __s32 min_pmt; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 396 |   __s32 max_pmt; | 
 | 397 |   __u16 pmp_flags; | 
 | 398 |   __u16 pmt_flags; | 
 | 399 |   __u16 pm_capa; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 400 |   __u16 encoding_size[IW_MAX_ENCODING_SIZES]; | 
 | 401 |   __u8 num_encoding_sizes; | 
 | 402 |   __u8 max_encoding_tokens; | 
 | 403 |   __u8 encoding_login_index; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 404 |   __u16 txpower_capa; | 
 | 405 |   __u8 num_txpower; | 
 | 406 |   __s32 txpower[IW_MAX_TXPOWER]; | 
 | 407 |   __u8 we_version_compiled; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 408 |   __u8 we_version_source; | 
 | 409 |   __u16 retry_capa; | 
 | 410 |   __u16 retry_flags; | 
 | 411 |   __u16 r_time_flags; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 412 |   __s32 min_retry; | 
 | 413 |   __s32 max_retry; | 
 | 414 |   __s32 min_r_time; | 
 | 415 |   __s32 max_r_time; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 416 |   __u16 num_channels; | 
 | 417 |   __u8 num_frequency; | 
 | 418 |   struct iw_freq freq[IW_MAX_FREQUENCIES]; | 
 | 419 |   __u32 enc_capa; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 420 | }; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 421 | struct iw_priv_args { | 
 | 422 |   __u32 cmd; | 
 | 423 |   __u16 set_args; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 424 |   __u16 get_args; | 
 | 425 |   char name[IFNAMSIZ]; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 426 | }; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 427 | struct iw_event { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 428 |   __u16 len; | 
 | 429 |   __u16 cmd; | 
 | 430 |   union iwreq_data u; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 431 | }; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 432 | #define IW_EV_LCP_LEN (sizeof(struct iw_event) - sizeof(union iwreq_data)) | 
 | 433 | #define IW_EV_CHAR_LEN (IW_EV_LCP_LEN + IFNAMSIZ) | 
 | 434 | #define IW_EV_UINT_LEN (IW_EV_LCP_LEN + sizeof(__u32)) | 
 | 435 | #define IW_EV_FREQ_LEN (IW_EV_LCP_LEN + sizeof(struct iw_freq)) | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 436 | #define IW_EV_PARAM_LEN (IW_EV_LCP_LEN + sizeof(struct iw_param)) | 
 | 437 | #define IW_EV_ADDR_LEN (IW_EV_LCP_LEN + sizeof(struct sockaddr)) | 
 | 438 | #define IW_EV_QUAL_LEN (IW_EV_LCP_LEN + sizeof(struct iw_quality)) | 
| Christopher Ferris | af09c70 | 2020-06-01 20:29:29 -0700 | [diff] [blame] | 439 | #define IW_EV_POINT_OFF offsetof(struct iw_point, length) | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 440 | #define IW_EV_POINT_LEN (IW_EV_LCP_LEN + sizeof(struct iw_point) - IW_EV_POINT_OFF) | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 441 | #define IW_EV_LCP_PK_LEN (4) | 
 | 442 | #define IW_EV_CHAR_PK_LEN (IW_EV_LCP_PK_LEN + IFNAMSIZ) | 
 | 443 | #define IW_EV_UINT_PK_LEN (IW_EV_LCP_PK_LEN + sizeof(__u32)) | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 444 | #define IW_EV_FREQ_PK_LEN (IW_EV_LCP_PK_LEN + sizeof(struct iw_freq)) | 
 | 445 | #define IW_EV_PARAM_PK_LEN (IW_EV_LCP_PK_LEN + sizeof(struct iw_param)) | 
 | 446 | #define IW_EV_ADDR_PK_LEN (IW_EV_LCP_PK_LEN + sizeof(struct sockaddr)) | 
 | 447 | #define IW_EV_QUAL_PK_LEN (IW_EV_LCP_PK_LEN + sizeof(struct iw_quality)) | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 448 | #define IW_EV_POINT_PK_LEN (IW_EV_LCP_PK_LEN + 4) | 
 | 449 | #endif |