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