2 * IEEE 802.11 -- shared defines for 80211.o and hostapd
3 * Copyright 2002, Jouni Malinen <jkmaline@cc.hut.fi>
4 * Copyright 2002-2004, Instant802 Networks, Inc.
5 * Copyright 2005, Devicescape Software, Inc.
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
12 #ifndef D802_11_MGMT_H
13 #define D802_11_MGMT_H
15 #include <linux/types.h>
17 struct ieee80211_mgmt
{
27 __le16 auth_transaction
;
29 /* possibly followed by Challenge text */
31 } __attribute__ ((packed
)) auth
;
34 } __attribute__ ((packed
)) deauth
;
37 __le16 listen_interval
;
38 /* followed by SSID and Supported rates */
40 } __attribute__ ((packed
)) assoc_req
;
45 /* followed by Supported rates */
47 } __attribute__ ((packed
)) assoc_resp
, reassoc_resp
;
50 __le16 listen_interval
;
52 /* followed by SSID and Supported rates */
54 } __attribute__ ((packed
)) reassoc_req
;
57 } __attribute__ ((packed
)) disassoc
;
62 /* followed by some of SSID, Supported rates,
63 * FH Params, DS Params, CF Params, IBSS Params, TIM */
65 } __attribute__ ((packed
)) beacon
;
67 /* only variable items: SSID, Supported rates */
69 } __attribute__ ((packed
)) probe_req
;
74 /* followed by some of SSID, Supported rates,
75 * FH Params, DS Params, CF Params, IBSS Params */
77 } __attribute__ ((packed
)) probe_resp
;
86 } __attribute__ ((packed
)) wme_action
;
94 } __attribute__((packed
)) chan_switch
;
96 } __attribute__ ((packed
)) action
;
98 } __attribute__ ((packed
));
101 /* Authentication algorithms */
102 #define WLAN_AUTH_OPEN 0
103 #define WLAN_AUTH_SHARED_KEY 1
104 #define WLAN_AUTH_LEAP 128
106 #define WLAN_AUTH_CHALLENGE_LEN 128
108 #define WLAN_CAPABILITY_ESS BIT(0)
109 #define WLAN_CAPABILITY_IBSS BIT(1)
110 #define WLAN_CAPABILITY_CF_POLLABLE BIT(2)
111 #define WLAN_CAPABILITY_CF_POLL_REQUEST BIT(3)
112 #define WLAN_CAPABILITY_PRIVACY BIT(4)
113 #define WLAN_CAPABILITY_SHORT_PREAMBLE BIT(5)
114 #define WLAN_CAPABILITY_PBCC BIT(6)
115 #define WLAN_CAPABILITY_CHANNEL_AGILITY BIT(7)
117 #define WLAN_CAPABILITY_SPECTRUM_MGMT BIT(8)
118 #define WLAN_CAPABILITY_SHORT_SLOT_TIME BIT(10)
119 #define WLAN_CAPABILITY_DSSS_OFDM BIT(13)
122 enum ieee80211_statuscode
{
123 WLAN_STATUS_SUCCESS
= 0,
124 WLAN_STATUS_UNSPECIFIED_FAILURE
= 1,
125 WLAN_STATUS_CAPS_UNSUPPORTED
= 10,
126 WLAN_STATUS_REASSOC_NO_ASSOC
= 11,
127 WLAN_STATUS_ASSOC_DENIED_UNSPEC
= 12,
128 WLAN_STATUS_NOT_SUPPORTED_AUTH_ALG
= 13,
129 WLAN_STATUS_UNKNOWN_AUTH_TRANSACTION
= 14,
130 WLAN_STATUS_CHALLENGE_FAIL
= 15,
131 WLAN_STATUS_AUTH_TIMEOUT
= 16,
132 WLAN_STATUS_AP_UNABLE_TO_HANDLE_NEW_STA
= 17,
133 WLAN_STATUS_ASSOC_DENIED_RATES
= 18,
135 WLAN_STATUS_ASSOC_DENIED_NOSHORTPREAMBLE
= 19,
136 WLAN_STATUS_ASSOC_DENIED_NOPBCC
= 20,
137 WLAN_STATUS_ASSOC_DENIED_NOAGILITY
= 21,
139 WLAN_STATUS_ASSOC_DENIED_NOSPECTRUM
= 22,
140 WLAN_STATUS_ASSOC_REJECTED_BAD_POWER
= 23,
141 WLAN_STATUS_ASSOC_REJECTED_BAD_SUPP_CHAN
= 24,
143 WLAN_STATUS_ASSOC_DENIED_NOSHORTTIME
= 25,
144 WLAN_STATUS_ASSOC_DENIED_NODSSSOFDM
= 26,
146 WLAN_STATUS_INVALID_IE
= 40,
147 WLAN_STATUS_INVALID_GROUP_CIPHER
= 41,
148 WLAN_STATUS_INVALID_PAIRWISE_CIPHER
= 42,
149 WLAN_STATUS_INVALID_AKMP
= 43,
150 WLAN_STATUS_UNSUPP_RSN_VERSION
= 44,
151 WLAN_STATUS_INVALID_RSN_IE_CAP
= 45,
152 WLAN_STATUS_CIPHER_SUITE_REJECTED
= 46,
157 enum ieee80211_reasoncode
{
158 WLAN_REASON_UNSPECIFIED
= 1,
159 WLAN_REASON_PREV_AUTH_NOT_VALID
= 2,
160 WLAN_REASON_DEAUTH_LEAVING
= 3,
161 WLAN_REASON_DISASSOC_DUE_TO_INACTIVITY
= 4,
162 WLAN_REASON_DISASSOC_AP_BUSY
= 5,
163 WLAN_REASON_CLASS2_FRAME_FROM_NONAUTH_STA
= 6,
164 WLAN_REASON_CLASS3_FRAME_FROM_NONASSOC_STA
= 7,
165 WLAN_REASON_DISASSOC_STA_HAS_LEFT
= 8,
166 WLAN_REASON_STA_REQ_ASSOC_WITHOUT_AUTH
= 9,
168 WLAN_REASON_DISASSOC_BAD_POWER
= 10,
169 WLAN_REASON_DISASSOC_BAD_SUPP_CHAN
= 11,
171 WLAN_REASON_INVALID_IE
= 13,
172 WLAN_REASON_MIC_FAILURE
= 14,
173 WLAN_REASON_4WAY_HANDSHAKE_TIMEOUT
= 15,
174 WLAN_REASON_GROUP_KEY_HANDSHAKE_TIMEOUT
= 16,
175 WLAN_REASON_IE_DIFFERENT
= 17,
176 WLAN_REASON_INVALID_GROUP_CIPHER
= 18,
177 WLAN_REASON_INVALID_PAIRWISE_CIPHER
= 19,
178 WLAN_REASON_INVALID_AKMP
= 20,
179 WLAN_REASON_UNSUPP_RSN_VERSION
= 21,
180 WLAN_REASON_INVALID_RSN_IE_CAP
= 22,
181 WLAN_REASON_IEEE8021X_FAILED
= 23,
182 WLAN_REASON_CIPHER_SUITE_REJECTED
= 24,
186 /* Information Element IDs */
189 WLAN_EID_SUPP_RATES
= 1,
190 WLAN_EID_FH_PARAMS
= 2,
191 WLAN_EID_DS_PARAMS
= 3,
192 WLAN_EID_CF_PARAMS
= 4,
194 WLAN_EID_IBSS_PARAMS
= 6,
195 WLAN_EID_CHALLENGE
= 16,
197 WLAN_EID_COUNTRY
= 7,
198 WLAN_EID_HP_PARAMS
= 8,
199 WLAN_EID_HP_TABLE
= 9,
200 WLAN_EID_REQUEST
= 10,
202 WLAN_EID_PWR_CONSTRAINT
= 32,
203 WLAN_EID_PWR_CAPABILITY
= 33,
204 WLAN_EID_TPC_REQUEST
= 34,
205 WLAN_EID_TPC_REPORT
= 35,
206 WLAN_EID_SUPPORTED_CHANNELS
= 36,
207 WLAN_EID_CHANNEL_SWITCH
= 37,
208 WLAN_EID_MEASURE_REQUEST
= 38,
209 WLAN_EID_MEASURE_REPORT
= 39,
211 WLAN_EID_IBSS_DFS
= 41,
213 WLAN_EID_ERP_INFO
= 42,
214 WLAN_EID_EXT_SUPP_RATES
= 50,
218 WLAN_EID_GENERIC
= 221,
219 WLAN_EID_VENDOR_SPECIFIC
= 221,
220 WLAN_EID_QOS_PARAMETER
= 222
223 #endif /* D802_11_MGMT_H */