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