aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/ieee80211.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/ieee80211.h')
-rw-r--r--include/net/ieee80211.h112
1 files changed, 2 insertions, 110 deletions
diff --git a/include/net/ieee80211.h b/include/net/ieee80211.h
index afa34d3be721..738734a4653b 100644
--- a/include/net/ieee80211.h
+++ b/include/net/ieee80211.h
@@ -28,6 +28,7 @@
28#include <linux/if_ether.h> /* ETH_ALEN */ 28#include <linux/if_ether.h> /* ETH_ALEN */
29#include <linux/kernel.h> /* ARRAY_SIZE */ 29#include <linux/kernel.h> /* ARRAY_SIZE */
30#include <linux/wireless.h> 30#include <linux/wireless.h>
31#include <linux/ieee80211.h>
31 32
32#define IEEE80211_VERSION "git-1.1.13" 33#define IEEE80211_VERSION "git-1.1.13"
33 34
@@ -214,94 +215,6 @@ struct ieee80211_snap_hdr {
214#define WLAN_GET_SEQ_FRAG(seq) ((seq) & IEEE80211_SCTL_FRAG) 215#define WLAN_GET_SEQ_FRAG(seq) ((seq) & IEEE80211_SCTL_FRAG)
215#define WLAN_GET_SEQ_SEQ(seq) (((seq) & IEEE80211_SCTL_SEQ) >> 4) 216#define WLAN_GET_SEQ_SEQ(seq) (((seq) & IEEE80211_SCTL_SEQ) >> 4)
216 217
217/* Authentication algorithms */
218#define WLAN_AUTH_OPEN 0
219#define WLAN_AUTH_SHARED_KEY 1
220#define WLAN_AUTH_LEAP 2
221
222#define WLAN_AUTH_CHALLENGE_LEN 128
223
224#define WLAN_CAPABILITY_ESS (1<<0)
225#define WLAN_CAPABILITY_IBSS (1<<1)
226#define WLAN_CAPABILITY_CF_POLLABLE (1<<2)
227#define WLAN_CAPABILITY_CF_POLL_REQUEST (1<<3)
228#define WLAN_CAPABILITY_PRIVACY (1<<4)
229#define WLAN_CAPABILITY_SHORT_PREAMBLE (1<<5)
230#define WLAN_CAPABILITY_PBCC (1<<6)
231#define WLAN_CAPABILITY_CHANNEL_AGILITY (1<<7)
232#define WLAN_CAPABILITY_SPECTRUM_MGMT (1<<8)
233#define WLAN_CAPABILITY_QOS (1<<9)
234#define WLAN_CAPABILITY_SHORT_SLOT_TIME (1<<10)
235#define WLAN_CAPABILITY_DSSS_OFDM (1<<13)
236
237/* 802.11g ERP information element */
238#define WLAN_ERP_NON_ERP_PRESENT (1<<0)
239#define WLAN_ERP_USE_PROTECTION (1<<1)
240#define WLAN_ERP_BARKER_PREAMBLE (1<<2)
241
242/* Status codes */
243enum ieee80211_statuscode {
244 WLAN_STATUS_SUCCESS = 0,
245 WLAN_STATUS_UNSPECIFIED_FAILURE = 1,
246 WLAN_STATUS_CAPS_UNSUPPORTED = 10,
247 WLAN_STATUS_REASSOC_NO_ASSOC = 11,
248 WLAN_STATUS_ASSOC_DENIED_UNSPEC = 12,
249 WLAN_STATUS_NOT_SUPPORTED_AUTH_ALG = 13,
250 WLAN_STATUS_UNKNOWN_AUTH_TRANSACTION = 14,
251 WLAN_STATUS_CHALLENGE_FAIL = 15,
252 WLAN_STATUS_AUTH_TIMEOUT = 16,
253 WLAN_STATUS_AP_UNABLE_TO_HANDLE_NEW_STA = 17,
254 WLAN_STATUS_ASSOC_DENIED_RATES = 18,
255 /* 802.11b */
256 WLAN_STATUS_ASSOC_DENIED_NOSHORTPREAMBLE = 19,
257 WLAN_STATUS_ASSOC_DENIED_NOPBCC = 20,
258 WLAN_STATUS_ASSOC_DENIED_NOAGILITY = 21,
259 /* 802.11h */
260 WLAN_STATUS_ASSOC_DENIED_NOSPECTRUM = 22,
261 WLAN_STATUS_ASSOC_REJECTED_BAD_POWER = 23,
262 WLAN_STATUS_ASSOC_REJECTED_BAD_SUPP_CHAN = 24,
263 /* 802.11g */
264 WLAN_STATUS_ASSOC_DENIED_NOSHORTTIME = 25,
265 WLAN_STATUS_ASSOC_DENIED_NODSSSOFDM = 26,
266 /* 802.11i */
267 WLAN_STATUS_INVALID_IE = 40,
268 WLAN_STATUS_INVALID_GROUP_CIPHER = 41,
269 WLAN_STATUS_INVALID_PAIRWISE_CIPHER = 42,
270 WLAN_STATUS_INVALID_AKMP = 43,
271 WLAN_STATUS_UNSUPP_RSN_VERSION = 44,
272 WLAN_STATUS_INVALID_RSN_IE_CAP = 45,
273 WLAN_STATUS_CIPHER_SUITE_REJECTED = 46,
274};
275
276/* Reason codes */
277enum ieee80211_reasoncode {
278 WLAN_REASON_UNSPECIFIED = 1,
279 WLAN_REASON_PREV_AUTH_NOT_VALID = 2,
280 WLAN_REASON_DEAUTH_LEAVING = 3,
281 WLAN_REASON_DISASSOC_DUE_TO_INACTIVITY = 4,
282 WLAN_REASON_DISASSOC_AP_BUSY = 5,
283 WLAN_REASON_CLASS2_FRAME_FROM_NONAUTH_STA = 6,
284 WLAN_REASON_CLASS3_FRAME_FROM_NONASSOC_STA = 7,
285 WLAN_REASON_DISASSOC_STA_HAS_LEFT = 8,
286 WLAN_REASON_STA_REQ_ASSOC_WITHOUT_AUTH = 9,
287 /* 802.11h */
288 WLAN_REASON_DISASSOC_BAD_POWER = 10,
289 WLAN_REASON_DISASSOC_BAD_SUPP_CHAN = 11,
290 /* 802.11i */
291 WLAN_REASON_INVALID_IE = 13,
292 WLAN_REASON_MIC_FAILURE = 14,
293 WLAN_REASON_4WAY_HANDSHAKE_TIMEOUT = 15,
294 WLAN_REASON_GROUP_KEY_HANDSHAKE_TIMEOUT = 16,
295 WLAN_REASON_IE_DIFFERENT = 17,
296 WLAN_REASON_INVALID_GROUP_CIPHER = 18,
297 WLAN_REASON_INVALID_PAIRWISE_CIPHER = 19,
298 WLAN_REASON_INVALID_AKMP = 20,
299 WLAN_REASON_UNSUPP_RSN_VERSION = 21,
300 WLAN_REASON_INVALID_RSN_IE_CAP = 22,
301 WLAN_REASON_IEEE8021X_FAILED = 23,
302 WLAN_REASON_CIPHER_SUITE_REJECTED = 24,
303};
304
305/* Action categories - 802.11h */ 218/* Action categories - 802.11h */
306enum ieee80211_actioncategories { 219enum ieee80211_actioncategories {
307 WLAN_ACTION_SPECTRUM_MGMT = 0, 220 WLAN_ACTION_SPECTRUM_MGMT = 0,
@@ -530,15 +443,6 @@ enum ieee80211_mfie {
530 MFIE_TYPE_QOS_PARAMETER = 222, 443 MFIE_TYPE_QOS_PARAMETER = 222,
531}; 444};
532 445
533/* Minimal header; can be used for passing 802.11 frames with sufficient
534 * information to determine what type of underlying data type is actually
535 * stored in the data. */
536struct ieee80211_hdr {
537 __le16 frame_ctl;
538 __le16 duration_id;
539 u8 payload[0];
540} __attribute__ ((packed));
541
542struct ieee80211_hdr_1addr { 446struct ieee80211_hdr_1addr {
543 __le16 frame_ctl; 447 __le16 frame_ctl;
544 __le16 duration_id; 448 __le16 duration_id;
@@ -586,18 +490,6 @@ struct ieee80211_hdr_3addrqos {
586 __le16 qos_ctl; 490 __le16 qos_ctl;
587} __attribute__ ((packed)); 491} __attribute__ ((packed));
588 492
589struct ieee80211_hdr_4addrqos {
590 __le16 frame_ctl;
591 __le16 duration_id;
592 u8 addr1[ETH_ALEN];
593 u8 addr2[ETH_ALEN];
594 u8 addr3[ETH_ALEN];
595 __le16 seq_ctl;
596 u8 addr4[ETH_ALEN];
597 u8 payload[0];
598 __le16 qos_ctl;
599} __attribute__ ((packed));
600
601struct ieee80211_info_element { 493struct ieee80211_info_element {
602 u8 id; 494 u8 id;
603 u8 len; 495 u8 len;
@@ -1187,7 +1079,7 @@ static inline int ieee80211_get_hdrlen(u16 fc)
1187 1079
1188static inline u8 *ieee80211_get_payload(struct ieee80211_hdr *hdr) 1080static inline u8 *ieee80211_get_payload(struct ieee80211_hdr *hdr)
1189{ 1081{
1190 switch (ieee80211_get_hdrlen(le16_to_cpu(hdr->frame_ctl))) { 1082 switch (ieee80211_get_hdrlen(le16_to_cpu(hdr->frame_control))) {
1191 case IEEE80211_1ADDR_LEN: 1083 case IEEE80211_1ADDR_LEN:
1192 return ((struct ieee80211_hdr_1addr *)hdr)->payload; 1084 return ((struct ieee80211_hdr_1addr *)hdr)->payload;
1193 case IEEE80211_2ADDR_LEN: 1085 case IEEE80211_2ADDR_LEN: