]> Pileus Git - ~andy/linux/blob - drivers/staging/vt6656/80211mgr.h
Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[~andy/linux] / drivers / staging / vt6656 / 80211mgr.h
1 /*
2  * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc.
3  * All rights reserved.
4  *
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.
9  *
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.
14  *
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.
18  *
19  *
20  * File: 80211mgr.h
21  *
22  * Purpose: 802.11 management frames pre-defines.
23  *
24  *
25  * Author: Lyndon Chen
26  *
27  * Date: May 8, 2002
28  *
29  */
30
31 #ifndef __80211MGR_H__
32 #define __80211MGR_H__
33
34 #include "ttype.h"
35 #include "80211hdr.h"
36
37 /*---------------------  Export Definitions -------------------------*/
38
39 #define WLAN_MIN_ARRAY          1
40
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
67
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
73
74 #define WLAN_EID_ERP_NONERP_PRESENT             0x01
75 #define WLAN_EID_ERP_USE_PROTECTION             0x02
76 #define WLAN_EID_ERP_BARKER_MODE                0x04
77
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
102
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
118
119 /* reference 802.11h 7.3.1.9 */
120 #define WLAN_MGMT_STATUS_ASSOC_REJECT_BCS_SPECTRUM_MNG  22
121 #define WLAN_MGMT_STATUS_ASSOC_REJECT_BCS_PWR_CAP       23
122 #define WLAN_MGMT_STATUS_ASSOC_REJECT_BCS_SUPP_CH       24
123
124 /* reference 802.11g 7.3.1.9 */
125 #define WLAN_MGMT_STATUS_SHORTSLOTTIME_UNSUPPORTED      25
126 #define WLAN_MGMT_STATUS_DSSSOFDM_UNSUPPORTED           26
127
128 /* reference 802.11i 7.3.1.9 table 19 */
129 #define WLAN_MGMT_STATUS_INVALID_IE                     40
130 #define WLAN_MGMT_STATUS_GROUP_CIPHER_INVALID           41
131 #define WLAN_MGMT_STATUS_PAIRWISE_CIPHER_INVALID        42
132 #define WLAN_MGMT_STATUS_AKMP_INVALID                   43
133 #define WLAN_MGMT_STATUS_UNSUPPORT_RSN_IE_VER           44
134 #define WLAN_MGMT_STATUS_INVALID_RSN_IE_CAP             45
135 #define WLAN_MGMT_STATUS_CIPHER_REJECT                  46
136
137 /* auth algorithm */
138 #define WLAN_AUTH_ALG_OPENSYSTEM                0
139 #define WLAN_AUTH_ALG_SHAREDKEY                 1
140
141 /* management frame field offsets */
142
143 /*
144  * Note: Not all fields are listed because of variable lengths
145  * Note: These offsets are from the start of the frame data
146  */
147
148 #define WLAN_BEACON_OFF_TS                  0
149 #define WLAN_BEACON_OFF_BCN_INT             8
150 #define WLAN_BEACON_OFF_CAPINFO             10
151 #define WLAN_BEACON_OFF_SSID                12
152
153 #define WLAN_DISASSOC_OFF_REASON            0
154
155 #define WLAN_ASSOCREQ_OFF_CAP_INFO          0
156 #define WLAN_ASSOCREQ_OFF_LISTEN_INT        2
157 #define WLAN_ASSOCREQ_OFF_SSID              4
158
159 #define WLAN_ASSOCRESP_OFF_CAP_INFO         0
160 #define WLAN_ASSOCRESP_OFF_STATUS           2
161 #define WLAN_ASSOCRESP_OFF_AID              4
162 #define WLAN_ASSOCRESP_OFF_SUPP_RATES       6
163
164 #define WLAN_REASSOCREQ_OFF_CAP_INFO        0
165 #define WLAN_REASSOCREQ_OFF_LISTEN_INT      2
166 #define WLAN_REASSOCREQ_OFF_CURR_AP         4
167 #define WLAN_REASSOCREQ_OFF_SSID            10
168
169 #define WLAN_REASSOCRESP_OFF_CAP_INFO       0
170 #define WLAN_REASSOCRESP_OFF_STATUS         2
171 #define WLAN_REASSOCRESP_OFF_AID            4
172 #define WLAN_REASSOCRESP_OFF_SUPP_RATES     6
173
174 #define WLAN_PROBEREQ_OFF_SSID              0
175
176 #define WLAN_PROBERESP_OFF_TS               0
177 #define WLAN_PROBERESP_OFF_BCN_INT          8
178 #define WLAN_PROBERESP_OFF_CAP_INFO         10
179 #define WLAN_PROBERESP_OFF_SSID             12
180
181 #define WLAN_AUTHEN_OFF_AUTH_ALG            0
182 #define WLAN_AUTHEN_OFF_AUTH_SEQ            2
183 #define WLAN_AUTHEN_OFF_STATUS              4
184 #define WLAN_AUTHEN_OFF_CHALLENGE           6
185
186 #define WLAN_DEAUTHEN_OFF_REASON            0
187
188 /* cipher suite selectors defined in 802.11i */
189 #define WLAN_11i_CSS_USE_GROUP              0
190 #define WLAN_11i_CSS_WEP40                  1
191 #define WLAN_11i_CSS_TKIP                   2
192 #define WLAN_11i_CSS_CCMP                   4
193 #define WLAN_11i_CSS_WEP104                 5
194 #define WLAN_11i_CSS_UNKNOWN                255
195
196 /* authentication and key management suite selectors defined in 802.11i */
197 #define WLAN_11i_AKMSS_802_1X               1
198 #define WLAN_11i_AKMSS_PSK                  2
199 #define WLAN_11i_AKMSS_UNKNOWN              255
200
201 /* measurement type definitions reference IEEE 802.11h table 20b */
202 #define MEASURE_TYPE_BASIC      0
203 #define MEASURE_TYPE_CCA        1
204 #define MEASURE_TYPE_RPI        2
205
206 /* measurement request mode definitions reference IEEE 802.11h figure 46h */
207 #define MEASURE_MODE_ENABLE     0x02
208 #define MEASURE_MODE_REQ        0x04
209 #define MEASURE_MODE_REP        0x08
210
211 /* measurement report mode definitions reference IEEE 802.11h figure 46m */
212 #define MEASURE_MODE_LATE       0x01
213 #define MEASURE_MODE_INCAPABLE  0x02
214 #define MEASURE_MODE_REFUSED    0x04
215
216 /*---------------------  Export Classes  ----------------------------*/
217
218 /*---------------------  Export Variables  --------------------------*/
219
220 /*---------------------  Export Types  ------------------------------*/
221
222 /* Information Element types */
223
224 #pragma pack(1)
225 typedef struct tagWLAN_IE {
226     BYTE   byElementID;
227     BYTE   len;
228 } __attribute__ ((__packed__))
229 WLAN_IE, *PWLAN_IE;
230
231 /* Service Set IDentity (SSID) */
232 #pragma pack(1)
233 typedef struct tagWLAN_IE_SSID {
234     BYTE   byElementID;
235     BYTE   len;
236     BYTE   abySSID[1];
237 } __attribute__ ((__packed__))
238 WLAN_IE_SSID, *PWLAN_IE_SSID;
239
240 /* Supported Rates */
241 #pragma pack(1)
242 typedef struct tagWLAN_IE_SUPP_RATES {
243     BYTE   byElementID;
244     BYTE   len;
245     BYTE   abyRates[1];
246 } __attribute__ ((__packed__))
247 WLAN_IE_SUPP_RATES,  *PWLAN_IE_SUPP_RATES;
248
249 /* FH Parameter Set */
250 #pragma pack(1)
251 typedef struct _WLAN_IE_FH_PARMS {
252     BYTE    byElementID;
253     BYTE    len;
254     WORD    wDwellTime;
255     BYTE    byHopSet;
256     BYTE    byHopPattern;
257     BYTE    byHopIndex;
258 } WLAN_IE_FH_PARMS,  *PWLAN_IE_FH_PARMS;
259
260 /* DS Parameter Set */
261 #pragma pack(1)
262 typedef struct tagWLAN_IE_DS_PARMS {
263     BYTE   byElementID;
264     BYTE   len;
265     BYTE   byCurrChannel;
266 } __attribute__ ((__packed__))
267 WLAN_IE_DS_PARMS,  *PWLAN_IE_DS_PARMS;
268
269 /* CF Parameter Set */
270 #pragma pack(1)
271 typedef struct tagWLAN_IE_CF_PARMS {
272     BYTE   byElementID;
273     BYTE   len;
274     BYTE   byCFPCount;
275     BYTE   byCFPPeriod;
276     WORD   wCFPMaxDuration;
277     WORD   wCFPDurRemaining;
278 } __attribute__ ((__packed__))
279 WLAN_IE_CF_PARMS,  *PWLAN_IE_CF_PARMS;
280
281 /* TIM */
282 #pragma pack(1)
283 typedef struct tagWLAN_IE_TIM {
284     BYTE   byElementID;
285     BYTE   len;
286     BYTE   byDTIMCount;
287     BYTE   byDTIMPeriod;
288     BYTE   byBitMapCtl;
289     BYTE   byVirtBitMap[1];
290 } __attribute__ ((__packed__))
291 WLAN_IE_TIM,  *PWLAN_IE_TIM;
292
293 /* IBSS Parameter Set */
294 #pragma pack(1)
295 typedef struct tagWLAN_IE_IBSS_PARMS {
296     BYTE   byElementID;
297     BYTE   len;
298     WORD   wATIMWindow;
299 } __attribute__ ((__packed__))
300 WLAN_IE_IBSS_PARMS, *PWLAN_IE_IBSS_PARMS;
301
302 /* Challenge Text */
303 #pragma pack(1)
304 typedef struct tagWLAN_IE_CHALLENGE {
305     BYTE   byElementID;
306     BYTE   len;
307     BYTE   abyChallenge[1];
308 } __attribute__ ((__packed__))
309 WLAN_IE_CHALLENGE,  *PWLAN_IE_CHALLENGE;
310
311 #pragma pack(1)
312 typedef struct tagWLAN_IE_RSN_EXT {
313     BYTE byElementID;
314     BYTE len;
315     BYTE abyOUI[4];
316     WORD wVersion;
317     BYTE abyMulticast[4];
318     WORD wPKCount;
319         struct {
320                 BYTE abyOUI[4];
321         } PKSList[1];
322         /* the rest is variable so need to overlay ieauth structure */
323 } WLAN_IE_RSN_EXT, *PWLAN_IE_RSN_EXT;
324
325 #pragma pack(1)
326 typedef struct tagWLAN_IE_RSN_AUTH {
327     WORD wAuthCount;
328     struct {
329         BYTE abyOUI[4];
330     } AuthKSList[1];
331 } WLAN_IE_RSN_AUTH, *PWLAN_IE_RSN_AUTH;
332
333 /* RSN Identity */
334 #pragma pack(1)
335 typedef struct tagWLAN_IE_RSN {
336     BYTE   byElementID;
337     BYTE   len;
338     WORD   wVersion;
339     BYTE   abyRSN[WLAN_MIN_ARRAY];
340 } WLAN_IE_RSN, *PWLAN_IE_RSN;
341
342 /* CCX Identity DavidWang */
343 #pragma pack(1)
344 typedef struct tagWLAN_IE_CCX {
345 BYTE   byElementID;
346 BYTE   len;
347 BYTE   abyCCX[30];
348 } WLAN_IE_CCX, *PWLAN_IE_CCX;
349 #pragma pack(1)
350 typedef struct tagWLAN_IE_CCX_IP {
351 BYTE   byElementID;
352 BYTE   len;
353 BYTE   abyCCXOUI[4];
354 BYTE   abyCCXIP[4];
355 BYTE   abyCCXREV[2];
356 } WLAN_IE_CCX_IP, *PWLAN_IE_CCX_IP;
357 #pragma pack(1)
358 typedef struct tagWLAN_IE_CCX_Ver {
359 BYTE   byElementID;
360 BYTE   len;
361 BYTE   abyCCXVer[5];
362 } WLAN_IE_CCX_Ver, *PWLAN_IE_CCX_Ver;
363
364 /* ERP */
365 #pragma pack(1)
366 typedef struct tagWLAN_IE_ERP {
367     BYTE   byElementID;
368     BYTE   len;
369     BYTE   byContext;
370 } __attribute__ ((__packed__))
371 WLAN_IE_ERP,  *PWLAN_IE_ERP;
372
373 #pragma pack(1)
374 typedef struct _MEASEURE_REQ {
375     BYTE                byChannel;
376     BYTE                abyStartTime[8];
377     BYTE                abyDuration[2];
378 } MEASEURE_REQ, *PMEASEURE_REQ,
379   MEASEURE_REQ_BASIC, *PMEASEURE_REQ_BASIC,
380   MEASEURE_REQ_CCA, *PMEASEURE_REQ_CCA,
381   MEASEURE_REQ_RPI, *PMEASEURE_REQ_RPI;
382
383 typedef struct _MEASEURE_REP_BASIC {
384     BYTE                byChannel;
385     BYTE                abyStartTime[8];
386     BYTE                abyDuration[2];
387     BYTE                byMap;
388 } MEASEURE_REP_BASIC, *PMEASEURE_REP_BASIC;
389
390 typedef struct _MEASEURE_REP_CCA {
391     BYTE                byChannel;
392     BYTE                abyStartTime[8];
393     BYTE                abyDuration[2];
394     BYTE                byCCABusyFraction;
395 } MEASEURE_REP_CCA, *PMEASEURE_REP_CCA;
396
397 typedef struct _MEASEURE_REP_RPI {
398     BYTE                byChannel;
399     BYTE                abyStartTime[8];
400     BYTE                abyDuration[2];
401     BYTE                abyRPIdensity[8];
402 } MEASEURE_REP_RPI, *PMEASEURE_REP_RPI;
403
404 typedef union _MEASEURE_REP {
405
406     MEASEURE_REP_BASIC  sBasic;
407     MEASEURE_REP_CCA    sCCA;
408     MEASEURE_REP_RPI    sRPI;
409
410 } MEASEURE_REP, *PMEASEURE_REP;
411
412 typedef struct _WLAN_IE_MEASURE_REQ {
413     BYTE                byElementID;
414     BYTE                len;
415     BYTE                byToken;
416     BYTE                byMode;
417     BYTE                byType;
418     MEASEURE_REQ        sReq;
419 } WLAN_IE_MEASURE_REQ, *PWLAN_IE_MEASURE_REQ;
420
421 typedef struct _WLAN_IE_MEASURE_REP {
422     BYTE                byElementID;
423     BYTE                len;
424     BYTE                byToken;
425     BYTE                byMode;
426     BYTE                byType;
427     MEASEURE_REP        sRep;
428 } WLAN_IE_MEASURE_REP, *PWLAN_IE_MEASURE_REP;
429
430 typedef struct _WLAN_IE_CH_SW {
431     BYTE                byElementID;
432     BYTE                len;
433     BYTE                byMode;
434     BYTE                byChannel;
435     BYTE                byCount;
436 } WLAN_IE_CH_SW, *PWLAN_IE_CH_SW;
437
438 typedef struct _WLAN_IE_QUIET {
439     BYTE                byElementID;
440     BYTE                len;
441     BYTE                byQuietCount;
442     BYTE                byQuietPeriod;
443     BYTE                abyQuietDuration[2];
444     BYTE                abyQuietOffset[2];
445 } WLAN_IE_QUIET, *PWLAN_IE_QUIET;
446
447 typedef struct _WLAN_IE_COUNTRY {
448     BYTE                byElementID;
449     BYTE                len;
450     BYTE                abyCountryString[3];
451     BYTE                abyCountryInfo[3];
452 } WLAN_IE_COUNTRY, *PWLAN_IE_COUNTRY;
453
454 typedef struct _WLAN_IE_PW_CONST {
455     BYTE                byElementID;
456     BYTE                len;
457     BYTE                byPower;
458 } WLAN_IE_PW_CONST, *PWLAN_IE_PW_CONST;
459
460 typedef struct _WLAN_IE_PW_CAP {
461     BYTE                byElementID;
462     BYTE                len;
463     BYTE                byMinPower;
464     BYTE                byMaxPower;
465 } WLAN_IE_PW_CAP, *PWLAN_IE_PW_CAP;
466
467 typedef struct _WLAN_IE_SUPP_CH {
468     BYTE                byElementID;
469     BYTE                len;
470     BYTE                abyChannelTuple[2];
471 } WLAN_IE_SUPP_CH, *PWLAN_IE_SUPP_CH;
472
473 typedef struct _WLAN_IE_TPC_REQ {
474     BYTE                byElementID;
475     BYTE                len;
476 } WLAN_IE_TPC_REQ, *PWLAN_IE_TPC_REQ;
477
478 typedef struct _WLAN_IE_TPC_REP {
479     BYTE                byElementID;
480     BYTE                len;
481     BYTE                byTxPower;
482     BYTE                byLinkMargin;
483 } WLAN_IE_TPC_REP, *PWLAN_IE_TPC_REP;
484
485
486 typedef struct _WLAN_IE_IBSS_DFS {
487     BYTE                byElementID;
488     BYTE                len;
489     BYTE                abyDFSOwner[6];
490     BYTE                byDFSRecovery;
491     BYTE                abyChannelMap[2];
492 } WLAN_IE_IBSS_DFS, *PWLAN_IE_IBSS_DFS;
493
494 #pragma pack()
495
496 /* frame types */
497
498 /* prototype structure, all mgmt frame types will start with these members */
499 typedef struct tagWLAN_FR_MGMT {
500
501     unsigned int                  uType;
502     unsigned int                  len;
503     PBYTE                 pBuf;
504     PUWLAN_80211HDR       pHdr;
505
506 } WLAN_FR_MGMT,  *PWLAN_FR_MGMT;
507
508 /* beacon frame */
509 typedef struct tagWLAN_FR_BEACON {
510
511     unsigned int                    uType;
512     unsigned int                    len;
513     PBYTE                   pBuf;
514     PUWLAN_80211HDR         pHdr;
515         /* fixed fields */
516         u64 *pqwTimestamp;
517     PWORD                   pwBeaconInterval;
518     PWORD                   pwCapInfo;
519     /* info elements */
520     PWLAN_IE_SSID           pSSID;
521     PWLAN_IE_SUPP_RATES     pSuppRates;
522 /*  PWLAN_IE_FH_PARMS       pFHParms; */
523     PWLAN_IE_DS_PARMS       pDSParms;
524     PWLAN_IE_CF_PARMS       pCFParms;
525     PWLAN_IE_TIM            pTIM;
526     PWLAN_IE_IBSS_PARMS     pIBSSParms;
527     PWLAN_IE_RSN            pRSN;
528     PWLAN_IE_RSN_EXT        pRSNWPA;
529     PWLAN_IE_ERP            pERP;
530     PWLAN_IE_SUPP_RATES     pExtSuppRates;
531     PWLAN_IE_COUNTRY        pIE_Country;
532     PWLAN_IE_PW_CONST       pIE_PowerConstraint;
533     PWLAN_IE_CH_SW          pIE_CHSW;
534     PWLAN_IE_IBSS_DFS       pIE_IBSSDFS;
535     PWLAN_IE_QUIET          pIE_Quiet;
536
537 } WLAN_FR_BEACON, *PWLAN_FR_BEACON;
538
539 /* IBSS ATIM frame */
540 typedef struct tagWLAN_FR_IBSSATIM {
541
542     unsigned int                    uType;
543     unsigned int                    len;
544     PBYTE                   pBuf;
545     PUWLAN_80211HDR         pHdr;
546
547         /* fixed fields */
548         /* info elements */
549         /* this frame type has a null body */
550
551 } WLAN_FR_IBSSATIM, *PWLAN_FR_IBSSATIM;
552
553 /* disassociation */
554 typedef struct tagWLAN_FR_DISASSOC {
555
556     unsigned int                    uType;
557     unsigned int                    len;
558     PBYTE                   pBuf;
559     PUWLAN_80211HDR         pHdr;
560     /* fixed fields */
561     PWORD                   pwReason;
562     /* info elements */
563
564 } WLAN_FR_DISASSOC, *PWLAN_FR_DISASSOC;
565
566 /* association request */
567 typedef struct tagWLAN_FR_ASSOCREQ {
568
569     unsigned int                    uType;
570     unsigned int                    len;
571     PBYTE                   pBuf;
572     PUWLAN_80211HDR         pHdr;
573     /* fixed fields */
574     PWORD                   pwCapInfo;
575     PWORD                   pwListenInterval;
576     /* info elements */
577     PWLAN_IE_SSID           pSSID;
578     PWLAN_IE_SUPP_RATES     pSuppRates;
579     PWLAN_IE_RSN            pRSN;
580     PWLAN_IE_CCX            pCCX;
581     PWLAN_IE_CCX_IP            pCCXIP;
582     PWLAN_IE_CCX_Ver            pCCXVER;
583     PWLAN_IE_RSN_EXT        pRSNWPA;
584     PWLAN_IE_SUPP_RATES     pExtSuppRates;
585     PWLAN_IE_PW_CAP         pCurrPowerCap;
586     PWLAN_IE_SUPP_CH        pCurrSuppCh;
587
588 } WLAN_FR_ASSOCREQ, *PWLAN_FR_ASSOCREQ;
589
590 /* association response */
591 typedef struct tagWLAN_FR_ASSOCRESP {
592
593     unsigned int                    uType;
594     unsigned int                    len;
595     PBYTE                   pBuf;
596     PUWLAN_80211HDR         pHdr;
597     /* fixed fields */
598     PWORD                   pwCapInfo;
599     PWORD                   pwStatus;
600     PWORD                   pwAid;
601     /* info elements */
602     PWLAN_IE_SUPP_RATES     pSuppRates;
603     PWLAN_IE_SUPP_RATES     pExtSuppRates;
604
605 } WLAN_FR_ASSOCRESP, *PWLAN_FR_ASSOCRESP;
606
607 /* reassociation request */
608 typedef struct tagWLAN_FR_REASSOCREQ {
609
610     unsigned int                    uType;
611     unsigned int                    len;
612     PBYTE                   pBuf;
613     PUWLAN_80211HDR         pHdr;
614
615     /* fixed fields */
616     PWORD                   pwCapInfo;
617     PWORD                   pwListenInterval;
618     PIEEE_ADDR              pAddrCurrAP;
619
620     /* info elements */
621     PWLAN_IE_SSID           pSSID;
622     PWLAN_IE_SUPP_RATES     pSuppRates;
623     PWLAN_IE_RSN            pRSN;
624     PWLAN_IE_CCX            pCCX;
625     PWLAN_IE_CCX_IP            pCCXIP;
626     PWLAN_IE_CCX_Ver            pCCXVER;
627     PWLAN_IE_RSN_EXT        pRSNWPA;
628     PWLAN_IE_SUPP_RATES     pExtSuppRates;
629
630 } WLAN_FR_REASSOCREQ, *PWLAN_FR_REASSOCREQ;
631
632 /* reassociation response */
633 typedef struct tagWLAN_FR_REASSOCRESP {
634
635     unsigned int                    uType;
636     unsigned int                    len;
637     PBYTE                   pBuf;
638     PUWLAN_80211HDR         pHdr;
639     /* fixed fields */
640     PWORD                   pwCapInfo;
641     PWORD                   pwStatus;
642     PWORD                   pwAid;
643     /* info elements */
644     PWLAN_IE_SUPP_RATES     pSuppRates;
645     PWLAN_IE_SUPP_RATES     pExtSuppRates;
646
647 } WLAN_FR_REASSOCRESP, *PWLAN_FR_REASSOCRESP;
648
649 /* probe request */
650 typedef struct tagWLAN_FR_PROBEREQ {
651
652     unsigned int                    uType;
653     unsigned int                    len;
654     PBYTE                   pBuf;
655     PUWLAN_80211HDR         pHdr;
656     /* fixed fields */
657     /* info elements */
658     PWLAN_IE_SSID           pSSID;
659     PWLAN_IE_SUPP_RATES     pSuppRates;
660     PWLAN_IE_SUPP_RATES     pExtSuppRates;
661
662 } WLAN_FR_PROBEREQ, *PWLAN_FR_PROBEREQ;
663
664 /* probe response */
665 typedef struct tagWLAN_FR_PROBERESP {
666
667     unsigned int                    uType;
668     unsigned int                    len;
669     PBYTE                   pBuf;
670     PUWLAN_80211HDR         pHdr;
671     /* fixed fields */
672         u64 *pqwTimestamp;
673     PWORD                   pwBeaconInterval;
674     PWORD                   pwCapInfo;
675     /* info elements */
676     PWLAN_IE_SSID           pSSID;
677     PWLAN_IE_SUPP_RATES     pSuppRates;
678     PWLAN_IE_DS_PARMS       pDSParms;
679     PWLAN_IE_CF_PARMS       pCFParms;
680     PWLAN_IE_IBSS_PARMS     pIBSSParms;
681     PWLAN_IE_RSN            pRSN;
682     PWLAN_IE_RSN_EXT        pRSNWPA;
683     PWLAN_IE_ERP            pERP;
684     PWLAN_IE_SUPP_RATES     pExtSuppRates;
685     PWLAN_IE_COUNTRY        pIE_Country;
686     PWLAN_IE_PW_CONST       pIE_PowerConstraint;
687     PWLAN_IE_CH_SW          pIE_CHSW;
688     PWLAN_IE_IBSS_DFS       pIE_IBSSDFS;
689     PWLAN_IE_QUIET          pIE_Quiet;
690
691 } WLAN_FR_PROBERESP, *PWLAN_FR_PROBERESP;
692
693 /* authentication */
694 typedef struct tagWLAN_FR_AUTHEN {
695
696     unsigned int                    uType;
697     unsigned int                    len;
698     PBYTE                   pBuf;
699     PUWLAN_80211HDR         pHdr;
700     /* fixed fields */
701     PWORD                   pwAuthAlgorithm;
702     PWORD                   pwAuthSequence;
703     PWORD                   pwStatus;
704     /* info elements */
705     PWLAN_IE_CHALLENGE      pChallenge;
706
707 } WLAN_FR_AUTHEN, *PWLAN_FR_AUTHEN;
708
709 /* deauthentication */
710 typedef struct tagWLAN_FR_DEAUTHEN {
711
712     unsigned int                    uType;
713     unsigned int                    len;
714     PBYTE                   pBuf;
715     PUWLAN_80211HDR         pHdr;
716     /* fixed fields */
717     PWORD                   pwReason;
718
719     /* info elements */
720
721 } WLAN_FR_DEAUTHEN, *PWLAN_FR_DEAUTHEN;
722
723 /*---------------------  Export Functions  --------------------------*/
724
725 void
726 vMgrEncodeBeacon(
727       PWLAN_FR_BEACON  pFrame
728      );
729
730 void
731 vMgrDecodeBeacon(
732       PWLAN_FR_BEACON  pFrame
733     );
734
735 void
736 vMgrEncodeIBSSATIM(
737       PWLAN_FR_IBSSATIM   pFrame
738     );
739
740 void
741 vMgrDecodeIBSSATIM(
742       PWLAN_FR_IBSSATIM   pFrame
743     );
744
745 void
746 vMgrEncodeDisassociation(
747       PWLAN_FR_DISASSOC  pFrame
748     );
749
750 void
751 vMgrDecodeDisassociation(
752       PWLAN_FR_DISASSOC  pFrame
753     );
754
755 void
756 vMgrEncodeAssocRequest(
757       PWLAN_FR_ASSOCREQ  pFrame
758     );
759
760 void
761 vMgrDecodeAssocRequest(
762       PWLAN_FR_ASSOCREQ  pFrame
763     );
764
765 void
766 vMgrEncodeAssocResponse(
767       PWLAN_FR_ASSOCRESP  pFrame
768     );
769
770 void
771 vMgrDecodeAssocResponse(
772      PWLAN_FR_ASSOCRESP  pFrame
773     );
774
775 void
776 vMgrEncodeReassocRequest(
777       PWLAN_FR_REASSOCREQ  pFrame
778     );
779
780 void
781 vMgrDecodeReassocRequest(
782       PWLAN_FR_REASSOCREQ  pFrame
783     );
784
785 void
786 vMgrEncodeProbeRequest(
787      PWLAN_FR_PROBEREQ  pFrame
788     );
789
790 void
791 vMgrDecodeProbeRequest(
792      PWLAN_FR_PROBEREQ  pFrame
793     );
794
795 void
796 vMgrEncodeProbeResponse(
797      PWLAN_FR_PROBERESP  pFrame
798     );
799
800 void
801 vMgrDecodeProbeResponse(
802      PWLAN_FR_PROBERESP  pFrame
803     );
804
805 void
806 vMgrEncodeAuthen(
807       PWLAN_FR_AUTHEN  pFrame
808     );
809
810 void
811 vMgrDecodeAuthen(
812       PWLAN_FR_AUTHEN  pFrame
813     );
814
815 void
816 vMgrEncodeDeauthen(
817       PWLAN_FR_DEAUTHEN  pFrame
818     );
819
820 void
821 vMgrDecodeDeauthen(
822       PWLAN_FR_DEAUTHEN  pFrame
823     );
824
825 void
826 vMgrEncodeReassocResponse(
827       PWLAN_FR_REASSOCRESP  pFrame
828     );
829
830 void
831 vMgrDecodeReassocResponse(
832       PWLAN_FR_REASSOCRESP  pFrame
833     );
834
835 #endif /* __80211MGR_H__ */