ieee80211.h revision 1.6 1 /* $NetBSD: ieee80211.h,v 1.6 2004/04/30 23:51:53 dyoung Exp $ */
2 /*-
3 * Copyright (c) 2001 Atsushi Onoe
4 * Copyright (c) 2002, 2003 Sam Leffler, Errno Consulting
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
9 * are met:
10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15 * 3. The name of the author may not be used to endorse or promote products
16 * derived from this software without specific prior written permission.
17 *
18 * Alternatively, this software may be distributed under the terms of the
19 * GNU General Public License ("GPL") version 2 as published by the Free
20 * Software Foundation.
21 *
22 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
23 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
24 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
25 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
26 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
27 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
31 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 *
33 * $FreeBSD: src/sys/net80211/ieee80211.h,v 1.5 2004/04/05 17:47:40 sam Exp $
34 */
35 #ifndef _NET80211_IEEE80211_H_
36 #define _NET80211_IEEE80211_H_
37
38 /*
39 * 802.11 protocol definitions.
40 */
41
42 #define IEEE80211_ADDR_LEN 6 /* size of 802.11 address */
43 /* is 802.11 address multicast/broadcast? */
44 #define IEEE80211_IS_MULTICAST(_a) (*(_a) & 0x01)
45
46 /* IEEE 802.11 PLCP header */
47 struct ieee80211_plcp_hdr {
48 u_int16_t i_sfd;
49 u_int8_t i_signal;
50 u_int8_t i_service;
51 u_int16_t i_length;
52 u_int16_t i_crc;
53 } __attribute__((__packed__));
54
55 #define IEEE80211_PLCP_SFD 0xF3A0
56 #define IEEE80211_PLCP_SERVICE 0x00
57
58 /*
59 * generic definitions for IEEE 802.11 frames
60 */
61 struct ieee80211_frame {
62 u_int8_t i_fc[2];
63 u_int8_t i_dur[2];
64 u_int8_t i_addr1[IEEE80211_ADDR_LEN];
65 u_int8_t i_addr2[IEEE80211_ADDR_LEN];
66 u_int8_t i_addr3[IEEE80211_ADDR_LEN];
67 u_int8_t i_seq[2];
68 /* possibly followed by addr4[IEEE80211_ADDR_LEN]; */
69 /* see below */
70 } __attribute__((__packed__));
71
72 struct ieee80211_qosframe {
73 u_int8_t i_fc[2];
74 u_int8_t i_dur[2];
75 u_int8_t i_addr1[IEEE80211_ADDR_LEN];
76 u_int8_t i_addr2[IEEE80211_ADDR_LEN];
77 u_int8_t i_addr3[IEEE80211_ADDR_LEN];
78 u_int8_t i_seq[2];
79 u_int8_t i_qos[2];
80 /* possibly followed by addr4[IEEE80211_ADDR_LEN]; */
81 /* see below */
82 } __attribute__((__packed__));
83
84 struct ieee80211_qoscntl {
85 u_int8_t i_qos[2];
86 };
87
88 struct ieee80211_frame_addr4 {
89 u_int8_t i_fc[2];
90 u_int8_t i_dur[2];
91 u_int8_t i_addr1[IEEE80211_ADDR_LEN];
92 u_int8_t i_addr2[IEEE80211_ADDR_LEN];
93 u_int8_t i_addr3[IEEE80211_ADDR_LEN];
94 u_int8_t i_seq[2];
95 u_int8_t i_addr4[IEEE80211_ADDR_LEN];
96 } __attribute__((__packed__));
97
98
99 struct ieee80211_qosframe_addr4 {
100 u_int8_t i_fc[2];
101 u_int8_t i_dur[2];
102 u_int8_t i_addr1[IEEE80211_ADDR_LEN];
103 u_int8_t i_addr2[IEEE80211_ADDR_LEN];
104 u_int8_t i_addr3[IEEE80211_ADDR_LEN];
105 u_int8_t i_seq[2];
106 u_int8_t i_addr4[IEEE80211_ADDR_LEN];
107 u_int8_t i_qos[2];
108 } __attribute__((__packed__));
109
110 /*
111 * Management Notification Frame
112 */
113 struct ieee80211_mnf {
114 u_int8_t mnf_category;
115 u_int8_t mnf_action;
116 u_int8_t mnf_dialog;
117 u_int8_t mnf_status;
118 } __attribute__((__packed__));
119 #define MNF_SETUP_REQ 0
120 #define MNF_SETUP_RESP 1
121 #define MNF_TEARDOWN 2
122
123 /*
124 * WME/802.11e Tspec Element
125 */
126 struct ieee80211_wme_tspec {
127 u_int8_t ts_id;
128 u_int8_t ts_len;
129 u_int8_t ts_oui[3];
130 u_int8_t ts_oui_type;
131 u_int8_t ts_oui_subtype;
132 u_int8_t ts_version;
133 u_int8_t ts_tsinfo[3];
134 u_int8_t ts_nom_msdu[2];
135 u_int8_t ts_max_msdu[2];
136 u_int8_t ts_min_svc[4];
137 u_int8_t ts_max_svc[4];
138 u_int8_t ts_inactv_intv[4];
139 u_int8_t ts_susp_intv[4];
140 u_int8_t ts_start_svc[4];
141 u_int8_t ts_min_rate[4];
142 u_int8_t ts_mean_rate[4];
143 u_int8_t ts_max_burst[4];
144 u_int8_t ts_min_phy[4];
145 u_int8_t ts_peak_rate[4];
146 u_int8_t ts_delay[4];
147 u_int8_t ts_surplus[2];
148 u_int8_t ts_medium_time[2];
149 } __attribute__((__packed__));
150
151 #define IEEE80211_FC0_VERSION_MASK 0x03
152 #define IEEE80211_FC0_VERSION_SHIFT 0
153 #define IEEE80211_FC0_VERSION_0 0x00
154 #define IEEE80211_FC0_TYPE_MASK 0x0c
155 #define IEEE80211_FC0_TYPE_SHIFT 2
156 #define IEEE80211_FC0_TYPE_MGT 0x00
157 #define IEEE80211_FC0_TYPE_CTL 0x04
158 #define IEEE80211_FC0_TYPE_DATA 0x08
159
160 #define IEEE80211_FC0_SUBTYPE_MASK 0xf0
161 #define IEEE80211_FC0_SUBTYPE_SHIFT 4
162 /* for TYPE_MGT */
163 #define IEEE80211_FC0_SUBTYPE_ASSOC_REQ 0x00
164 #define IEEE80211_FC0_SUBTYPE_ASSOC_RESP 0x10
165 #define IEEE80211_FC0_SUBTYPE_REASSOC_REQ 0x20
166 #define IEEE80211_FC0_SUBTYPE_REASSOC_RESP 0x30
167 #define IEEE80211_FC0_SUBTYPE_PROBE_REQ 0x40
168 #define IEEE80211_FC0_SUBTYPE_PROBE_RESP 0x50
169 #define IEEE80211_FC0_SUBTYPE_BEACON 0x80
170 #define IEEE80211_FC0_SUBTYPE_ATIM 0x90
171 #define IEEE80211_FC0_SUBTYPE_DISASSOC 0xa0
172 #define IEEE80211_FC0_SUBTYPE_AUTH 0xb0
173 #define IEEE80211_FC0_SUBTYPE_DEAUTH 0xc0
174 /* for TYPE_CTL */
175 #define IEEE80211_FC0_SUBTYPE_PS_POLL 0xa0
176 #define IEEE80211_FC0_SUBTYPE_RTS 0xb0
177 #define IEEE80211_FC0_SUBTYPE_CTS 0xc0
178 #define IEEE80211_FC0_SUBTYPE_ACK 0xd0
179 #define IEEE80211_FC0_SUBTYPE_CF_END 0xe0
180 #define IEEE80211_FC0_SUBTYPE_CF_END_ACK 0xf0
181 /* for TYPE_DATA (bit combination) */
182 #define IEEE80211_FC0_SUBTYPE_DATA 0x00
183 #define IEEE80211_FC0_SUBTYPE_CF_ACK 0x10
184 #define IEEE80211_FC0_SUBTYPE_CF_POLL 0x20
185 #define IEEE80211_FC0_SUBTYPE_CF_ACPL 0x30
186 #define IEEE80211_FC0_SUBTYPE_NODATA 0x40
187 #define IEEE80211_FC0_SUBTYPE_CFACK 0x50
188 #define IEEE80211_FC0_SUBTYPE_CFPOLL 0x60
189 #define IEEE80211_FC0_SUBTYPE_CF_ACK_CF_ACK 0x70
190 #define IEEE80211_FC0_SUBTYPE_QOS 0x80
191
192 #define IEEE80211_FC1_DIR_MASK 0x03
193 #define IEEE80211_FC1_DIR_NODS 0x00 /* STA->STA */
194 #define IEEE80211_FC1_DIR_TODS 0x01 /* STA->AP */
195 #define IEEE80211_FC1_DIR_FROMDS 0x02 /* AP ->STA */
196 #define IEEE80211_FC1_DIR_DSTODS 0x03 /* AP ->AP */
197
198 #define IEEE80211_FC1_MORE_FRAG 0x04
199 #define IEEE80211_FC1_RETRY 0x08
200 #define IEEE80211_FC1_PWR_MGT 0x10
201 #define IEEE80211_FC1_MORE_DATA 0x20
202 #define IEEE80211_FC1_WEP 0x40
203 #define IEEE80211_FC1_ORDER 0x80
204
205 #define IEEE80211_SEQ_FRAG_MASK 0x000f
206 #define IEEE80211_SEQ_FRAG_SHIFT 0
207 #define IEEE80211_SEQ_SEQ_MASK 0xfff0
208 #define IEEE80211_SEQ_SEQ_SHIFT 4
209
210 #define IEEE80211_NWID_LEN 32
211
212 #define IEEE80211_QOS_TXOP 0x00ff
213 /* bit 8 is reserved */
214 #define IEEE80211_QOS_ACKPOLICY 0x0600
215 #define IEEE80211_QOS_ESOP 0x0800
216 #define IEEE80211_QOS_TID 0xf000
217
218 /*
219 * Control frames.
220 */
221 struct ieee80211_frame_min {
222 u_int8_t i_fc[2];
223 u_int8_t i_dur[2];
224 u_int8_t i_addr1[IEEE80211_ADDR_LEN];
225 u_int8_t i_addr2[IEEE80211_ADDR_LEN];
226 /* FCS */
227 } __attribute__((__packed__));
228
229 struct ieee80211_frame_rts {
230 u_int8_t i_fc[2];
231 u_int8_t i_dur[2];
232 u_int8_t i_ra[IEEE80211_ADDR_LEN];
233 u_int8_t i_ta[IEEE80211_ADDR_LEN];
234 /* FCS */
235 } __attribute__((__packed__));
236
237 struct ieee80211_frame_cts {
238 u_int8_t i_fc[2];
239 u_int8_t i_dur[2];
240 u_int8_t i_ra[IEEE80211_ADDR_LEN];
241 /* FCS */
242 } __attribute__((__packed__));
243
244 struct ieee80211_frame_ack {
245 u_int8_t i_fc[2];
246 u_int8_t i_dur[2];
247 u_int8_t i_ra[IEEE80211_ADDR_LEN];
248 /* FCS */
249 } __attribute__((__packed__));
250
251 struct ieee80211_frame_pspoll {
252 u_int8_t i_fc[2];
253 u_int8_t i_aid[2];
254 u_int8_t i_bssid[IEEE80211_ADDR_LEN];
255 u_int8_t i_ta[IEEE80211_ADDR_LEN];
256 /* FCS */
257 } __attribute__((__packed__));
258
259 struct ieee80211_frame_cfend { /* NB: also CF-End+CF-Ack */
260 u_int8_t i_fc[2];
261 u_int8_t i_dur[2]; /* should be zero */
262 u_int8_t i_ra[IEEE80211_ADDR_LEN];
263 u_int8_t i_bssid[IEEE80211_ADDR_LEN];
264 /* FCS */
265 } __attribute__((__packed__));
266
267 /*
268 * BEACON management packets
269 *
270 * octet timestamp[8]
271 * octet beacon interval[2]
272 * octet capability information[2]
273 * information element
274 * octet elemid
275 * octet length
276 * octet information[length]
277 */
278
279 typedef uint8_t *ieee80211_mgt_beacon_t;
280
281 #define IEEE80211_BEACON_INTERVAL(beacon) \
282 ((beacon)[8] | ((beacon)[9] << 8))
283 #define IEEE80211_BEACON_CAPABILITY(beacon) \
284 ((beacon)[10] | ((beacon)[11] << 8))
285
286 #define IEEE80211_CAPINFO_ESS 0x0001
287 #define IEEE80211_CAPINFO_IBSS 0x0002
288 #define IEEE80211_CAPINFO_CF_POLLABLE 0x0004
289 #define IEEE80211_CAPINFO_CF_POLLREQ 0x0008
290 #define IEEE80211_CAPINFO_PRIVACY 0x0010
291 #define IEEE80211_CAPINFO_SHORT_PREAMBLE 0x0020
292 #define IEEE80211_CAPINFO_PBCC 0x0040
293 #define IEEE80211_CAPINFO_CHNL_AGILITY 0x0080
294 /* bits 8-9 are reserved */
295 #define IEEE80211_CAPINFO_SHORT_SLOTTIME 0x0400
296 #define IEEE80211_CAPINFO_RSN 0x0800
297 /* bit 12 is reserved */
298 #define IEEE80211_CAPINFO_DSSSOFDM 0x2000
299 /* bits 14-15 are reserved */
300
301 /*
302 * 802.11i/WPA information element (maximally sized).
303 */
304 struct ieee80211_ie_wpa {
305 u_int8_t wpa_oui[3]; /* 0x00, 0x50, 0xf2 */
306 u_int8_t wpa_type; /* OUI type */
307 u_int16_t wpa_version; /* spec revision */
308 u_int32_t wpa_mcipher[1]; /* multicast/group key cipher */
309 u_int16_t wpa_uciphercnt; /* # pairwise key ciphers */
310 u_int32_t wpa_uciphers[8];/* ciphers */
311 u_int16_t wpa_authselcnt; /* authentication selector cnt*/
312 u_int32_t wpa_authsels[8];/* selectors */
313 } __attribute__((__packed__));
314
315 /*
316 * Management information elements
317 */
318 struct ieee80211_information {
319 char ssid[IEEE80211_NWID_LEN+1];
320 struct rates {
321 u_int8_t *p;
322 } rates;
323 struct fh {
324 u_int16_t dwell;
325 u_int8_t set;
326 u_int8_t pattern;
327 u_int8_t index;
328 } fh;
329 struct ds {
330 u_int8_t channel;
331 } ds;
332 struct cf {
333 u_int8_t count;
334 u_int8_t period;
335 u_int8_t maxdur[2];
336 u_int8_t dur[2];
337 } cf;
338 struct tim {
339 u_int8_t count;
340 u_int8_t period;
341 u_int8_t bitctl;
342 /* u_int8_t pvt[251]; The driver needs to use this. */
343 } tim;
344 struct ibss {
345 u_int16_t atim;
346 } ibss;
347 struct challenge {
348 u_int8_t *p;
349 u_int8_t len;
350 } challenge;
351 struct erp {
352 u_int8_t flags;
353 } erp;
354 struct country {
355 u_int8_t cc[3]; /* ISO CC+(I)ndoor/(O)utdoor */
356 struct {
357 u_int8_t schan; /* starting channel */
358 u_int8_t nchan; /* number channels */
359 u_int8_t maxtxpwr;
360 } band[4]; /* up to 4 sub bands */
361 } country;
362 struct ath {
363 u_int8_t flags;
364 } ath;
365 struct ieee80211_ie_wpa wpa;
366 };
367
368 enum {
369 IEEE80211_ELEMID_SSID = 0,
370 IEEE80211_ELEMID_RATES = 1,
371 IEEE80211_ELEMID_FHPARMS = 2,
372 IEEE80211_ELEMID_DSPARMS = 3,
373 IEEE80211_ELEMID_CFPARMS = 4,
374 IEEE80211_ELEMID_TIM = 5,
375 IEEE80211_ELEMID_IBSSPARMS = 6,
376 IEEE80211_ELEMID_COUNTRY = 7,
377 IEEE80211_ELEMID_CHALLENGE = 16,
378 /* 17-31 reserved for challenge text extension */
379 IEEE80211_ELEMID_ERP = 42,
380 IEEE80211_ELEMID_XRATES = 50,
381 IEEE80211_ELEMID_TPC = 150,
382 IEEE80211_ELEMID_CCKM = 156,
383 IEEE80211_ELEMID_VENDOR = 221, /* vendor private */
384 };
385
386 #define IEEE80211_CHALLENGE_LEN 128
387
388 #define IEEE80211_RATE_BASIC 0x80
389 #define IEEE80211_RATE_VAL 0x7f
390
391 /* EPR information element flags */
392 #define IEEE80211_ERP_NON_ERP_PRESENT 0x01
393 #define IEEE80211_ERP_USE_PROTECTION 0x02
394 #define IEEE80211_ERP_BARKER_MODE 0x04
395
396 /* Atheros private advanced capabilities info */
397 #define ATHEROS_CAP_TURBO_PRIME 0x01
398 #define ATHEROS_CAP_COMPRESSION 0x02
399 #define ATHEROS_CAP_FAST_FRAME 0x04
400 /* bits 3-6 reserved */
401 #define ATHEROS_CAP_BOOST 0x80
402
403 #define ATH_OUI 0x7f0300 /* Atheros OUI */
404 #define ATH_OUI_TYPE 0x01
405 #define ATH_OUI_VERSION 0x01
406
407 #define WPA_OUI 0xf25000
408 #define WPA_OUI_TYPE 0x01
409 #define WPA_OUI_VERSION 1 /* current supported version */
410
411 #define WPA_CSE_NULL 0x00
412 #define WPA_CSE_WEP40 0x01
413 #define WPA_CSE_TKIP 0x02
414 #define WPA_CSE_WRAP 0x03 /* WPA2/802.11i */
415 #define WPA_CSE_CCMP 0x04
416 #define WPA_CSE_WEP104 0x05
417
418 #define WPA_ASE_NONE 0x00
419 #define WPA_ASE_8021X_UNSPEC 0x01
420 #define WPA_ASE_8021X_PSK 0x02
421
422 /*
423 * AUTH management packets
424 *
425 * octet algo[2]
426 * octet seq[2]
427 * octet status[2]
428 * octet chal.id
429 * octet chal.length
430 * octet chal.text[253]
431 */
432
433 typedef u_int8_t *ieee80211_mgt_auth_t;
434
435 #define IEEE80211_AUTH_ALGORITHM(auth) \
436 ((auth)[0] | ((auth)[1] << 8))
437 #define IEEE80211_AUTH_TRANSACTION(auth) \
438 ((auth)[2] | ((auth)[3] << 8))
439 #define IEEE80211_AUTH_STATUS(auth) \
440 ((auth)[4] | ((auth)[5] << 8))
441
442 #define IEEE80211_AUTH_ALG_OPEN 0x0000
443 #define IEEE80211_AUTH_ALG_SHARED 0x0001
444 #define IEEE80211_AUTH_ALG_LEAP 0x0080
445
446 enum {
447 IEEE80211_AUTH_OPEN_REQUEST = 1,
448 IEEE80211_AUTH_OPEN_RESPONSE = 2,
449 };
450
451 enum {
452 IEEE80211_AUTH_SHARED_REQUEST = 1,
453 IEEE80211_AUTH_SHARED_CHALLENGE = 2,
454 IEEE80211_AUTH_SHARED_RESPONSE = 3,
455 IEEE80211_AUTH_SHARED_PASS = 4,
456 };
457
458 /*
459 * Reason codes
460 *
461 * Unlisted codes are reserved
462 */
463
464 enum {
465 IEEE80211_REASON_UNSPECIFIED = 1,
466 IEEE80211_REASON_AUTH_EXPIRE = 2,
467 IEEE80211_REASON_AUTH_LEAVE = 3,
468 IEEE80211_REASON_ASSOC_EXPIRE = 4,
469 IEEE80211_REASON_ASSOC_TOOMANY = 5,
470 IEEE80211_REASON_NOT_AUTHED = 6,
471 IEEE80211_REASON_NOT_ASSOCED = 7,
472 IEEE80211_REASON_ASSOC_LEAVE = 8,
473 IEEE80211_REASON_ASSOC_NOT_AUTHED = 9,
474
475 IEEE80211_REASON_RSN_REQUIRED = 11,
476 IEEE80211_REASON_RSN_INCONSISTENT = 12,
477 IEEE80211_REASON_IE_INVALID = 13,
478 IEEE80211_REASON_MIC_FAILURE = 14,
479
480 IEEE80211_STATUS_SUCCESS = 0,
481 IEEE80211_STATUS_UNSPECIFIED = 1,
482 IEEE80211_STATUS_CAPINFO = 10,
483 IEEE80211_STATUS_NOT_ASSOCED = 11,
484 IEEE80211_STATUS_OTHER = 12,
485 IEEE80211_STATUS_ALG = 13,
486 IEEE80211_STATUS_SEQUENCE = 14,
487 IEEE80211_STATUS_CHALLENGE = 15,
488 IEEE80211_STATUS_TIMEOUT = 16,
489 IEEE80211_STATUS_TOOMANY = 17,
490 IEEE80211_STATUS_BASIC_RATE = 18,
491 IEEE80211_STATUS_SP_REQUIRED = 19,
492 IEEE80211_STATUS_PBCC_REQUIRED = 20,
493 IEEE80211_STATUS_CA_REQUIRED = 21,
494 IEEE80211_STATUS_TOO_MANY_STATIONS = 22,
495 IEEE80211_STATUS_RATES = 23,
496 IEEE80211_STATUS_SHORTSLOT_REQUIRED = 25,
497 IEEE80211_STATUS_DSSSOFDM_REQUIRED = 26,
498 };
499
500 #define IEEE80211_WEP_KEYLEN 5 /* 40bit */
501 #define IEEE80211_WEP_IVLEN 3 /* 24bit */
502 #define IEEE80211_WEP_KIDLEN 1 /* 1 octet */
503 #define IEEE80211_WEP_CRCLEN 4 /* CRC-32 */
504 #define IEEE80211_WEP_NKID 4 /* number of key ids */
505
506 #define IEEE80211_CRC_LEN 4
507
508 /*
509 * Maximum acceptable MTU is:
510 * IEEE80211_MAX_LEN - WEP overhead - CRC -
511 * QoS overhead - RSN/WPA overhead
512 * Min is arbitrarily chosen > IEEE80211_MIN_LEN. The default
513 * mtu is Ethernet-compatible; it's set by ether_ifattach.
514 */
515 #define IEEE80211_MTU_MAX 2290
516 #define IEEE80211_MTU_MIN 32
517
518 #define IEEE80211_MAX_LEN (2300 + IEEE80211_CRC_LEN + \
519 (IEEE80211_WEP_IVLEN + IEEE80211_WEP_KIDLEN + IEEE80211_WEP_CRCLEN))
520 #define IEEE80211_MIN_LEN \
521 (sizeof(struct ieee80211_frame_min) + IEEE80211_CRC_LEN)
522
523 #define IEEE80211_MAX_AID 2007
524
525 #define IEEE80211_AID_SET(b, w) \
526 ((w)[((b) & ~0xc000) / 32] |= (1 << (((b) & ~0xc000) % 32)))
527 #define IEEE80211_AID_CLR(b, w) \
528 ((w)[((b) & ~0xc000) / 32] &= ~(1 << (((b) & ~0xc000) % 32)))
529 #define IEEE80211_AID_ISSET(b, w) \
530 ((w)[((b) & ~0xc000) / 32] & (1 << (((b) & ~0xc000) % 32)))
531
532 /*
533 * RTS frame length parameters. The default is specified in
534 * the 802.11 spec. The max may be wrong for jumbo frames.
535 */
536 #define IEEE80211_RTS_DEFAULT 512
537 #define IEEE80211_RTS_MIN 1
538 #define IEEE80211_RTS_MAX IEEE80211_MAX_LEN
539
540 enum {
541 IEEE80211_AUTH_NONE = 0,
542 IEEE80211_AUTH_OPEN = 1,
543 IEEE80211_AUTH_SHARED = 2,
544 };
545
546 #endif /* _NET80211_IEEE80211_H_ */
547