Merge remote-tracking branch 'moduleh/module.h-split'
[linux-2.6/next.git] / drivers / staging / vt6656 / 80211mgr.h
blob515b9c1d4d101cedbd21b4b0398f618f9fab9c72
1 /*
2 * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc.
3 * All rights reserved.
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License along
16 * with this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20 * File: 80211mgr.h
22 * Purpose: 802.11 management frames pre-defines.
25 * Author: Lyndon Chen
27 * Date: May 8, 2002
31 #ifndef __80211MGR_H__
32 #define __80211MGR_H__
34 #include "ttype.h"
35 #include "80211hdr.h"
37 /*--------------------- Export Definitions -------------------------*/
39 #define WLAN_MIN_ARRAY 1
41 // Information Element ID value
42 #define WLAN_EID_SSID 0
43 #define WLAN_EID_SUPP_RATES 1
44 #define WLAN_EID_FH_PARMS 2
45 #define WLAN_EID_DS_PARMS 3
46 #define WLAN_EID_CF_PARMS 4
47 #define WLAN_EID_TIM 5
48 #define WLAN_EID_IBSS_PARMS 6
49 #define WLAN_EID_COUNTRY 7
50 #define WLAN_EID_CHALLENGE 16
51 #define WLAN_EID_PWR_CONSTRAINT 32
52 #define WLAN_EID_PWR_CAPABILITY 33
53 #define WLAN_EID_TPC_REQ 34
54 #define WLAN_EID_TPC_REP 35
55 #define WLAN_EID_SUPP_CH 36
56 #define WLAN_EID_CH_SWITCH 37
57 #define WLAN_EID_MEASURE_REQ 38
58 #define WLAN_EID_MEASURE_REP 39
59 #define WLAN_EID_QUIET 40
60 #define WLAN_EID_IBSS_DFS 41
61 #define WLAN_EID_ERP 42
62 // reference 802.11i 7.3.2 table 20
63 #define WLAN_EID_RSN 48
64 #define WLAN_EID_EXTSUPP_RATES 50
65 // reference WiFi WPA spec.
66 #define WLAN_EID_RSN_WPA 221
68 #ifdef Cisco_ccx
69 #define WLAN_EID_CCX 133
70 #define WLAN_EID_CCX_IP 149
71 #define WLAN_EID_CCX_Ver 221
72 #endif
74 #define WLAN_EID_ERP_NONERP_PRESENT 0x01
75 #define WLAN_EID_ERP_USE_PROTECTION 0x02
76 #define WLAN_EID_ERP_BARKER_MODE 0x04
78 // Reason Codes
79 #define WLAN_MGMT_REASON_RSVD 0
80 #define WLAN_MGMT_REASON_UNSPEC 1
81 #define WLAN_MGMT_REASON_PRIOR_AUTH_INVALID 2
82 #define WLAN_MGMT_REASON_DEAUTH_LEAVING 3
83 #define WLAN_MGMT_REASON_DISASSOC_INACTIVE 4
84 #define WLAN_MGMT_REASON_DISASSOC_AP_BUSY 5
85 #define WLAN_MGMT_REASON_CLASS2_NONAUTH 6
86 #define WLAN_MGMT_REASON_CLASS3_NONASSOC 7
87 #define WLAN_MGMT_REASON_DISASSOC_STA_HASLEFT 8
88 #define WLAN_MGMT_REASON_CANT_ASSOC_NONAUTH 9
89 #define WLAN_MGMT_REASON_DISASSOC_PWR_CAP_UNACCEPT 10
90 #define WLAN_MGMT_REASON_DISASSOC_SUPP_CH_UNACCEPT 11
91 #define WLAN_MGMT_REASON_INVALID_IE 13
92 #define WLAN_MGMT_REASON_MIC_FAILURE 14
93 #define WLAN_MGMT_REASON_4WAY_HANDSHAKE_TIMEOUT 15
94 #define WLAN_MGMT_REASON_GRPKEY_UPDATE_TIMEOUT 16
95 #define WLAN_MGMT_REASON_4WAY_INFO_DIFFERENT 17
96 #define WLAN_MGMT_REASON_MULTCAST_CIPHER_INVALID 18
97 #define WLAN_MGMT_REASON_UNCAST_CIPHER_INVALID 19
98 #define WLAN_MGMT_REASON_AKMP_INVALID 20
99 #define WLAN_MGMT_REASON_RSNE_UNSUPPORTED 21
100 #define WLAN_MGMT_REASON_RSNE_CAP_INVALID 22
101 #define WLAN_MGMT_REASON_80211X_AUTH_FAILED 23
103 // Status Codes
104 #define WLAN_MGMT_STATUS_SUCCESS 0
105 #define WLAN_MGMT_STATUS_UNSPEC_FAILURE 1
106 #define WLAN_MGMT_STATUS_CAPS_UNSUPPORTED 10
107 #define WLAN_MGMT_STATUS_REASSOC_NO_ASSOC 11
108 #define WLAN_MGMT_STATUS_ASSOC_DENIED_UNSPEC 12
109 #define WLAN_MGMT_STATUS_UNSUPPORTED_AUTHALG 13
110 #define WLAN_MGMT_STATUS_RX_AUTH_NOSEQ 14
111 #define WLAN_MGMT_STATUS_CHALLENGE_FAIL 15
112 #define WLAN_MGMT_STATUS_AUTH_TIMEOUT 16
113 #define WLAN_MGMT_STATUS_ASSOC_DENIED_BUSY 17
114 #define WLAN_MGMT_STATUS_ASSOC_DENIED_RATES 18
115 #define WLAN_MGMT_STATUS_ASSOC_DENIED_SHORTPREAMBLE 19
116 #define WLAN_MGMT_STATUS_ASSOC_DENIED_PBCC 20
117 #define WLAN_MGMT_STATUS_ASSOC_DENIED_AGILITY 21
119 // reference 802.11h 7.3.1.9
121 #define WLAN_MGMT_STATUS_ASSOC_REJECT_BCS_SPECTRUM_MNG 22
122 #define WLAN_MGMT_STATUS_ASSOC_REJECT_BCS_PWR_CAP 23
123 #define WLAN_MGMT_STATUS_ASSOC_REJECT_BCS_SUPP_CH 24
125 // reference 802.11g 7.3.1.9
127 #define WLAN_MGMT_STATUS_SHORTSLOTTIME_UNSUPPORTED 25
128 #define WLAN_MGMT_STATUS_DSSSOFDM_UNSUPPORTED 26
130 // reference 802.11i 7.3.1.9 table 19
132 #define WLAN_MGMT_STATUS_INVALID_IE 40
133 #define WLAN_MGMT_STATUS_GROUP_CIPHER_INVALID 41
134 #define WLAN_MGMT_STATUS_PAIRWISE_CIPHER_INVALID 42
135 #define WLAN_MGMT_STATUS_AKMP_INVALID 43
136 #define WLAN_MGMT_STATUS_UNSUPPORT_RSN_IE_VER 44
137 #define WLAN_MGMT_STATUS_INVALID_RSN_IE_CAP 45
138 #define WLAN_MGMT_STATUS_CIPHER_REJECT 46
142 // Auth Algorithm
143 #define WLAN_AUTH_ALG_OPENSYSTEM 0
144 #define WLAN_AUTH_ALG_SHAREDKEY 1
148 // Management Frame Field Offsets
149 // Note: Not all fields are listed because of variable lengths.
150 // Note: These offsets are from the start of the frame data
152 #define WLAN_BEACON_OFF_TS 0
153 #define WLAN_BEACON_OFF_BCN_INT 8
154 #define WLAN_BEACON_OFF_CAPINFO 10
155 #define WLAN_BEACON_OFF_SSID 12
157 #define WLAN_DISASSOC_OFF_REASON 0
159 #define WLAN_ASSOCREQ_OFF_CAP_INFO 0
160 #define WLAN_ASSOCREQ_OFF_LISTEN_INT 2
161 #define WLAN_ASSOCREQ_OFF_SSID 4
163 #define WLAN_ASSOCRESP_OFF_CAP_INFO 0
164 #define WLAN_ASSOCRESP_OFF_STATUS 2
165 #define WLAN_ASSOCRESP_OFF_AID 4
166 #define WLAN_ASSOCRESP_OFF_SUPP_RATES 6
168 #define WLAN_REASSOCREQ_OFF_CAP_INFO 0
169 #define WLAN_REASSOCREQ_OFF_LISTEN_INT 2
170 #define WLAN_REASSOCREQ_OFF_CURR_AP 4
171 #define WLAN_REASSOCREQ_OFF_SSID 10
173 #define WLAN_REASSOCRESP_OFF_CAP_INFO 0
174 #define WLAN_REASSOCRESP_OFF_STATUS 2
175 #define WLAN_REASSOCRESP_OFF_AID 4
176 #define WLAN_REASSOCRESP_OFF_SUPP_RATES 6
178 #define WLAN_PROBEREQ_OFF_SSID 0
180 #define WLAN_PROBERESP_OFF_TS 0
181 #define WLAN_PROBERESP_OFF_BCN_INT 8
182 #define WLAN_PROBERESP_OFF_CAP_INFO 10
183 #define WLAN_PROBERESP_OFF_SSID 12
185 #define WLAN_AUTHEN_OFF_AUTH_ALG 0
186 #define WLAN_AUTHEN_OFF_AUTH_SEQ 2
187 #define WLAN_AUTHEN_OFF_STATUS 4
188 #define WLAN_AUTHEN_OFF_CHALLENGE 6
190 #define WLAN_DEAUTHEN_OFF_REASON 0
194 // Cipher Suite Selectors defiened in 802.11i
196 #define WLAN_11i_CSS_USE_GROUP 0
197 #define WLAN_11i_CSS_WEP40 1
198 #define WLAN_11i_CSS_TKIP 2
199 #define WLAN_11i_CSS_CCMP 4
200 #define WLAN_11i_CSS_WEP104 5
201 #define WLAN_11i_CSS_UNKNOWN 255
204 // Authentication and Key Management Suite Selectors defined in 802.11i
206 #define WLAN_11i_AKMSS_802_1X 1
207 #define WLAN_11i_AKMSS_PSK 2
208 #define WLAN_11i_AKMSS_UNKNOWN 255
210 // Measurement type definitions reference ieee 802.11h Table 20b
211 #define MEASURE_TYPE_BASIC 0
212 #define MEASURE_TYPE_CCA 1
213 #define MEASURE_TYPE_RPI 2
215 // Measurement request mode definitions reference ieee 802.11h Figure 46h
216 #define MEASURE_MODE_ENABLE 0x02
217 #define MEASURE_MODE_REQ 0x04
218 #define MEASURE_MODE_REP 0x08
220 // Measurement report mode definitions reference ieee 802.11h Figure 46m
221 #define MEASURE_MODE_LATE 0x01
222 #define MEASURE_MODE_INCAPABLE 0x02
223 #define MEASURE_MODE_REFUSED 0x04
225 /*--------------------- Export Classes ----------------------------*/
227 /*--------------------- Export Variables --------------------------*/
229 /*--------------------- Export Types ------------------------------*/
231 // Information Element Types
233 #pragma pack(1)
234 typedef struct tagWLAN_IE {
235 BYTE byElementID;
236 BYTE len;
237 } __attribute__ ((__packed__))
238 WLAN_IE, *PWLAN_IE;
240 // Service Set Identity (SSID)
241 #pragma pack(1)
242 typedef struct tagWLAN_IE_SSID {
243 BYTE byElementID;
244 BYTE len;
245 BYTE abySSID[1];
246 } __attribute__ ((__packed__))
247 WLAN_IE_SSID, *PWLAN_IE_SSID;
249 // Supported Rates
250 #pragma pack(1)
251 typedef struct tagWLAN_IE_SUPP_RATES {
252 BYTE byElementID;
253 BYTE len;
254 BYTE abyRates[1];
255 } __attribute__ ((__packed__))
256 WLAN_IE_SUPP_RATES, *PWLAN_IE_SUPP_RATES;
258 // FH Parameter Set
259 #pragma pack(1)
260 typedef struct _WLAN_IE_FH_PARMS {
261 BYTE byElementID;
262 BYTE len;
263 WORD wDwellTime;
264 BYTE byHopSet;
265 BYTE byHopPattern;
266 BYTE byHopIndex;
267 } WLAN_IE_FH_PARMS, *PWLAN_IE_FH_PARMS;
269 // DS Parameter Set
270 #pragma pack(1)
271 typedef struct tagWLAN_IE_DS_PARMS {
272 BYTE byElementID;
273 BYTE len;
274 BYTE byCurrChannel;
275 } __attribute__ ((__packed__))
276 WLAN_IE_DS_PARMS, *PWLAN_IE_DS_PARMS;
278 // CF Parameter Set
279 #pragma pack(1)
280 typedef struct tagWLAN_IE_CF_PARMS {
281 BYTE byElementID;
282 BYTE len;
283 BYTE byCFPCount;
284 BYTE byCFPPeriod;
285 WORD wCFPMaxDuration;
286 WORD wCFPDurRemaining;
287 } __attribute__ ((__packed__))
288 WLAN_IE_CF_PARMS, *PWLAN_IE_CF_PARMS;
290 // TIM
291 #pragma pack(1)
292 typedef struct tagWLAN_IE_TIM {
293 BYTE byElementID;
294 BYTE len;
295 BYTE byDTIMCount;
296 BYTE byDTIMPeriod;
297 BYTE byBitMapCtl;
298 BYTE byVirtBitMap[1];
299 } __attribute__ ((__packed__))
300 WLAN_IE_TIM, *PWLAN_IE_TIM;
302 // IBSS Parameter Set
303 #pragma pack(1)
304 typedef struct tagWLAN_IE_IBSS_PARMS {
305 BYTE byElementID;
306 BYTE len;
307 WORD wATIMWindow;
308 } __attribute__ ((__packed__))
309 WLAN_IE_IBSS_PARMS, *PWLAN_IE_IBSS_PARMS;
311 // Challenge Text
312 #pragma pack(1)
313 typedef struct tagWLAN_IE_CHALLENGE {
314 BYTE byElementID;
315 BYTE len;
316 BYTE abyChallenge[1];
317 } __attribute__ ((__packed__))
318 WLAN_IE_CHALLENGE, *PWLAN_IE_CHALLENGE;
320 #pragma pack(1)
321 typedef struct tagWLAN_IE_RSN_EXT {
322 BYTE byElementID;
323 BYTE len;
324 BYTE abyOUI[4];
325 WORD wVersion;
326 BYTE abyMulticast[4];
327 WORD wPKCount;
328 struct {
329 BYTE abyOUI[4];
330 } PKSList[1]; // the rest is variable so need to
331 // overlay ieauth structure
332 } WLAN_IE_RSN_EXT, *PWLAN_IE_RSN_EXT;
334 #pragma pack(1)
335 typedef struct tagWLAN_IE_RSN_AUTH {
336 WORD wAuthCount;
337 struct {
338 BYTE abyOUI[4];
339 } AuthKSList[1];
340 } WLAN_IE_RSN_AUTH, *PWLAN_IE_RSN_AUTH;
342 // RSN Identity
343 #pragma pack(1)
344 typedef struct tagWLAN_IE_RSN {
345 BYTE byElementID;
346 BYTE len;
347 WORD wVersion;
348 BYTE abyRSN[WLAN_MIN_ARRAY];
349 } WLAN_IE_RSN, *PWLAN_IE_RSN;
352 // CCX Identity DavidWang
353 #pragma pack(1)
354 typedef struct tagWLAN_IE_CCX {
355 BYTE byElementID;
356 BYTE len;
357 BYTE abyCCX[30];
358 } WLAN_IE_CCX, *PWLAN_IE_CCX;
359 #pragma pack(1)
360 typedef struct tagWLAN_IE_CCX_IP {
361 BYTE byElementID;
362 BYTE len;
363 BYTE abyCCXOUI[4];
364 BYTE abyCCXIP[4];
365 BYTE abyCCXREV[2];
366 } WLAN_IE_CCX_IP, *PWLAN_IE_CCX_IP;
367 #pragma pack(1)
368 typedef struct tagWLAN_IE_CCX_Ver {
369 BYTE byElementID;
370 BYTE len;
371 BYTE abyCCXVer[5];
372 } WLAN_IE_CCX_Ver, *PWLAN_IE_CCX_Ver;
376 // ERP
377 #pragma pack(1)
378 typedef struct tagWLAN_IE_ERP {
379 BYTE byElementID;
380 BYTE len;
381 BYTE byContext;
382 } __attribute__ ((__packed__))
383 WLAN_IE_ERP, *PWLAN_IE_ERP;
385 #pragma pack(1)
386 typedef struct _MEASEURE_REQ {
387 BYTE byChannel;
388 BYTE abyStartTime[8];
389 BYTE abyDuration[2];
390 } MEASEURE_REQ, *PMEASEURE_REQ,
391 MEASEURE_REQ_BASIC, *PMEASEURE_REQ_BASIC,
392 MEASEURE_REQ_CCA, *PMEASEURE_REQ_CCA,
393 MEASEURE_REQ_RPI, *PMEASEURE_REQ_RPI;
395 typedef struct _MEASEURE_REP_BASIC {
396 BYTE byChannel;
397 BYTE abyStartTime[8];
398 BYTE abyDuration[2];
399 BYTE byMap;
400 } MEASEURE_REP_BASIC, *PMEASEURE_REP_BASIC;
402 typedef struct _MEASEURE_REP_CCA {
403 BYTE byChannel;
404 BYTE abyStartTime[8];
405 BYTE abyDuration[2];
406 BYTE byCCABusyFraction;
407 } MEASEURE_REP_CCA, *PMEASEURE_REP_CCA;
409 typedef struct _MEASEURE_REP_RPI {
410 BYTE byChannel;
411 BYTE abyStartTime[8];
412 BYTE abyDuration[2];
413 BYTE abyRPIdensity[8];
414 } MEASEURE_REP_RPI, *PMEASEURE_REP_RPI;
416 typedef union _MEASEURE_REP {
418 MEASEURE_REP_BASIC sBasic;
419 MEASEURE_REP_CCA sCCA;
420 MEASEURE_REP_RPI sRPI;
422 } MEASEURE_REP, *PMEASEURE_REP;
424 typedef struct _WLAN_IE_MEASURE_REQ {
425 BYTE byElementID;
426 BYTE len;
427 BYTE byToken;
428 BYTE byMode;
429 BYTE byType;
430 MEASEURE_REQ sReq;
431 } WLAN_IE_MEASURE_REQ, *PWLAN_IE_MEASURE_REQ;
433 typedef struct _WLAN_IE_MEASURE_REP {
434 BYTE byElementID;
435 BYTE len;
436 BYTE byToken;
437 BYTE byMode;
438 BYTE byType;
439 MEASEURE_REP sRep;
440 } WLAN_IE_MEASURE_REP, *PWLAN_IE_MEASURE_REP;
442 typedef struct _WLAN_IE_CH_SW {
443 BYTE byElementID;
444 BYTE len;
445 BYTE byMode;
446 BYTE byChannel;
447 BYTE byCount;
448 } WLAN_IE_CH_SW, *PWLAN_IE_CH_SW;
450 typedef struct _WLAN_IE_QUIET {
451 BYTE byElementID;
452 BYTE len;
453 BYTE byQuietCount;
454 BYTE byQuietPeriod;
455 BYTE abyQuietDuration[2];
456 BYTE abyQuietOffset[2];
457 } WLAN_IE_QUIET, *PWLAN_IE_QUIET;
459 typedef struct _WLAN_IE_COUNTRY {
460 BYTE byElementID;
461 BYTE len;
462 BYTE abyCountryString[3];
463 BYTE abyCountryInfo[3];
464 } WLAN_IE_COUNTRY, *PWLAN_IE_COUNTRY;
466 typedef struct _WLAN_IE_PW_CONST {
467 BYTE byElementID;
468 BYTE len;
469 BYTE byPower;
470 } WLAN_IE_PW_CONST, *PWLAN_IE_PW_CONST;
472 typedef struct _WLAN_IE_PW_CAP {
473 BYTE byElementID;
474 BYTE len;
475 BYTE byMinPower;
476 BYTE byMaxPower;
477 } WLAN_IE_PW_CAP, *PWLAN_IE_PW_CAP;
479 typedef struct _WLAN_IE_SUPP_CH {
480 BYTE byElementID;
481 BYTE len;
482 BYTE abyChannelTuple[2];
483 } WLAN_IE_SUPP_CH, *PWLAN_IE_SUPP_CH;
485 typedef struct _WLAN_IE_TPC_REQ {
486 BYTE byElementID;
487 BYTE len;
488 } WLAN_IE_TPC_REQ, *PWLAN_IE_TPC_REQ;
490 typedef struct _WLAN_IE_TPC_REP {
491 BYTE byElementID;
492 BYTE len;
493 BYTE byTxPower;
494 BYTE byLinkMargin;
495 } WLAN_IE_TPC_REP, *PWLAN_IE_TPC_REP;
498 typedef struct _WLAN_IE_IBSS_DFS {
499 BYTE byElementID;
500 BYTE len;
501 BYTE abyDFSOwner[6];
502 BYTE byDFSRecovery;
503 BYTE abyChannelMap[2];
504 } WLAN_IE_IBSS_DFS, *PWLAN_IE_IBSS_DFS;
506 #pragma pack()
510 // Frame Types
511 // prototype structure, all mgmt frame types will start with these members
512 typedef struct tagWLAN_FR_MGMT {
514 unsigned int uType;
515 unsigned int len;
516 PBYTE pBuf;
517 PUWLAN_80211HDR pHdr;
519 } WLAN_FR_MGMT, *PWLAN_FR_MGMT;
521 // Beacon frame
522 typedef struct tagWLAN_FR_BEACON {
524 unsigned int uType;
525 unsigned int len;
526 PBYTE pBuf;
527 PUWLAN_80211HDR pHdr;
528 // fixed fields
529 PQWORD pqwTimestamp;
530 PWORD pwBeaconInterval;
531 PWORD pwCapInfo;
532 /*-- info elements ----------*/
533 PWLAN_IE_SSID pSSID;
534 PWLAN_IE_SUPP_RATES pSuppRates;
535 // PWLAN_IE_FH_PARMS pFHParms;
536 PWLAN_IE_DS_PARMS pDSParms;
537 PWLAN_IE_CF_PARMS pCFParms;
538 PWLAN_IE_TIM pTIM;
539 PWLAN_IE_IBSS_PARMS pIBSSParms;
540 PWLAN_IE_RSN pRSN;
541 PWLAN_IE_RSN_EXT pRSNWPA;
542 PWLAN_IE_ERP pERP;
543 PWLAN_IE_SUPP_RATES pExtSuppRates;
544 PWLAN_IE_COUNTRY pIE_Country;
545 PWLAN_IE_PW_CONST pIE_PowerConstraint;
546 PWLAN_IE_CH_SW pIE_CHSW;
547 PWLAN_IE_IBSS_DFS pIE_IBSSDFS;
548 PWLAN_IE_QUIET pIE_Quiet;
550 } WLAN_FR_BEACON, *PWLAN_FR_BEACON;
553 // IBSS ATIM frame
554 typedef struct tagWLAN_FR_IBSSATIM {
556 unsigned int uType;
557 unsigned int len;
558 PBYTE pBuf;
559 PUWLAN_80211HDR pHdr;
561 // fixed fields
562 // info elements
563 // this frame type has a null body
565 } WLAN_FR_IBSSATIM, *PWLAN_FR_IBSSATIM;
567 // Disassociation
568 typedef struct tagWLAN_FR_DISASSOC {
570 unsigned int uType;
571 unsigned int len;
572 PBYTE pBuf;
573 PUWLAN_80211HDR pHdr;
574 /*-- fixed fields -----------*/
575 PWORD pwReason;
576 /*-- info elements ----------*/
578 } WLAN_FR_DISASSOC, *PWLAN_FR_DISASSOC;
580 // Association Request
581 typedef struct tagWLAN_FR_ASSOCREQ {
583 unsigned int uType;
584 unsigned int len;
585 PBYTE pBuf;
586 PUWLAN_80211HDR pHdr;
587 /*-- fixed fields -----------*/
588 PWORD pwCapInfo;
589 PWORD pwListenInterval;
590 /*-- info elements ----------*/
591 PWLAN_IE_SSID pSSID;
592 PWLAN_IE_SUPP_RATES pSuppRates;
593 PWLAN_IE_RSN pRSN;
594 PWLAN_IE_CCX pCCX;
595 PWLAN_IE_CCX_IP pCCXIP;
596 PWLAN_IE_CCX_Ver pCCXVER;
597 PWLAN_IE_RSN_EXT pRSNWPA;
598 PWLAN_IE_SUPP_RATES pExtSuppRates;
599 PWLAN_IE_PW_CAP pCurrPowerCap;
600 PWLAN_IE_SUPP_CH pCurrSuppCh;
602 } WLAN_FR_ASSOCREQ, *PWLAN_FR_ASSOCREQ;
604 // Association Response
605 typedef struct tagWLAN_FR_ASSOCRESP {
607 unsigned int uType;
608 unsigned int len;
609 PBYTE pBuf;
610 PUWLAN_80211HDR pHdr;
611 /*-- fixed fields -----------*/
612 PWORD pwCapInfo;
613 PWORD pwStatus;
614 PWORD pwAid;
615 /*-- info elements ----------*/
616 PWLAN_IE_SUPP_RATES pSuppRates;
617 PWLAN_IE_SUPP_RATES pExtSuppRates;
619 } WLAN_FR_ASSOCRESP, *PWLAN_FR_ASSOCRESP;
621 // Reassociation Request
622 typedef struct tagWLAN_FR_REASSOCREQ {
624 unsigned int uType;
625 unsigned int len;
626 PBYTE pBuf;
627 PUWLAN_80211HDR pHdr;
629 /*-- fixed fields -----------*/
630 PWORD pwCapInfo;
631 PWORD pwListenInterval;
632 PIEEE_ADDR pAddrCurrAP;
634 /*-- info elements ----------*/
635 PWLAN_IE_SSID pSSID;
636 PWLAN_IE_SUPP_RATES pSuppRates;
637 PWLAN_IE_RSN pRSN;
638 PWLAN_IE_CCX pCCX;
639 PWLAN_IE_CCX_IP pCCXIP;
640 PWLAN_IE_CCX_Ver pCCXVER;
641 PWLAN_IE_RSN_EXT pRSNWPA;
642 PWLAN_IE_SUPP_RATES pExtSuppRates;
644 } WLAN_FR_REASSOCREQ, *PWLAN_FR_REASSOCREQ;
646 // Reassociation Response
647 typedef struct tagWLAN_FR_REASSOCRESP {
649 unsigned int uType;
650 unsigned int len;
651 PBYTE pBuf;
652 PUWLAN_80211HDR pHdr;
653 /*-- fixed fields -----------*/
654 PWORD pwCapInfo;
655 PWORD pwStatus;
656 PWORD pwAid;
657 /*-- info elements ----------*/
658 PWLAN_IE_SUPP_RATES pSuppRates;
659 PWLAN_IE_SUPP_RATES pExtSuppRates;
661 } WLAN_FR_REASSOCRESP, *PWLAN_FR_REASSOCRESP;
663 // Probe Request
664 typedef struct tagWLAN_FR_PROBEREQ {
666 unsigned int uType;
667 unsigned int len;
668 PBYTE pBuf;
669 PUWLAN_80211HDR pHdr;
670 /*-- fixed fields -----------*/
671 /*-- info elements ----------*/
672 PWLAN_IE_SSID pSSID;
673 PWLAN_IE_SUPP_RATES pSuppRates;
674 PWLAN_IE_SUPP_RATES pExtSuppRates;
676 } WLAN_FR_PROBEREQ, *PWLAN_FR_PROBEREQ;
678 // Probe Response
679 typedef struct tagWLAN_FR_PROBERESP {
681 unsigned int uType;
682 unsigned int len;
683 PBYTE pBuf;
684 PUWLAN_80211HDR pHdr;
685 /*-- fixed fields -----------*/
686 PQWORD pqwTimestamp;
687 PWORD pwBeaconInterval;
688 PWORD pwCapInfo;
689 /*-- info elements ----------*/
690 PWLAN_IE_SSID pSSID;
691 PWLAN_IE_SUPP_RATES pSuppRates;
692 PWLAN_IE_DS_PARMS pDSParms;
693 PWLAN_IE_CF_PARMS pCFParms;
694 PWLAN_IE_IBSS_PARMS pIBSSParms;
695 PWLAN_IE_RSN pRSN;
696 PWLAN_IE_RSN_EXT pRSNWPA;
697 PWLAN_IE_ERP pERP;
698 PWLAN_IE_SUPP_RATES pExtSuppRates;
699 PWLAN_IE_COUNTRY pIE_Country;
700 PWLAN_IE_PW_CONST pIE_PowerConstraint;
701 PWLAN_IE_CH_SW pIE_CHSW;
702 PWLAN_IE_IBSS_DFS pIE_IBSSDFS;
703 PWLAN_IE_QUIET pIE_Quiet;
705 } WLAN_FR_PROBERESP, *PWLAN_FR_PROBERESP;
707 // Authentication
708 typedef struct tagWLAN_FR_AUTHEN {
710 unsigned int uType;
711 unsigned int len;
712 PBYTE pBuf;
713 PUWLAN_80211HDR pHdr;
714 /*-- fixed fields -----------*/
715 PWORD pwAuthAlgorithm;
716 PWORD pwAuthSequence;
717 PWORD pwStatus;
718 /*-- info elements ----------*/
719 PWLAN_IE_CHALLENGE pChallenge;
721 } WLAN_FR_AUTHEN, *PWLAN_FR_AUTHEN;
723 // Deauthenication
724 typedef struct tagWLAN_FR_DEAUTHEN {
726 unsigned int uType;
727 unsigned int len;
728 PBYTE pBuf;
729 PUWLAN_80211HDR pHdr;
730 /*-- fixed fields -----------*/
731 PWORD pwReason;
733 /*-- info elements ----------*/
735 } WLAN_FR_DEAUTHEN, *PWLAN_FR_DEAUTHEN;
737 /*--------------------- Export Functions --------------------------*/
738 void
739 vMgrEncodeBeacon(
740 PWLAN_FR_BEACON pFrame
743 void
744 vMgrDecodeBeacon(
745 PWLAN_FR_BEACON pFrame
748 void
749 vMgrEncodeIBSSATIM(
750 PWLAN_FR_IBSSATIM pFrame
753 void
754 vMgrDecodeIBSSATIM(
755 PWLAN_FR_IBSSATIM pFrame
758 void
759 vMgrEncodeDisassociation(
760 PWLAN_FR_DISASSOC pFrame
763 void
764 vMgrDecodeDisassociation(
765 PWLAN_FR_DISASSOC pFrame
768 void
769 vMgrEncodeAssocRequest(
770 PWLAN_FR_ASSOCREQ pFrame
773 void
774 vMgrDecodeAssocRequest(
775 PWLAN_FR_ASSOCREQ pFrame
778 void
779 vMgrEncodeAssocResponse(
780 PWLAN_FR_ASSOCRESP pFrame
783 void
784 vMgrDecodeAssocResponse(
785 PWLAN_FR_ASSOCRESP pFrame
788 void
789 vMgrEncodeReassocRequest(
790 PWLAN_FR_REASSOCREQ pFrame
793 void
794 vMgrDecodeReassocRequest(
795 PWLAN_FR_REASSOCREQ pFrame
798 void
799 vMgrEncodeProbeRequest(
800 PWLAN_FR_PROBEREQ pFrame
803 void
804 vMgrDecodeProbeRequest(
805 PWLAN_FR_PROBEREQ pFrame
808 void
809 vMgrEncodeProbeResponse(
810 PWLAN_FR_PROBERESP pFrame
813 void
814 vMgrDecodeProbeResponse(
815 PWLAN_FR_PROBERESP pFrame
818 void
819 vMgrEncodeAuthen(
820 PWLAN_FR_AUTHEN pFrame
823 void
824 vMgrDecodeAuthen(
825 PWLAN_FR_AUTHEN pFrame
828 void
829 vMgrEncodeDeauthen(
830 PWLAN_FR_DEAUTHEN pFrame
833 void
834 vMgrDecodeDeauthen(
835 PWLAN_FR_DEAUTHEN pFrame
838 void
839 vMgrEncodeReassocResponse(
840 PWLAN_FR_REASSOCRESP pFrame
843 void
844 vMgrDecodeReassocResponse(
845 PWLAN_FR_REASSOCRESP pFrame
848 #endif// __80211MGR_H__