On Tue, Nov 06, 2007 at 02:33:53AM -0800, akpm@linux-foundation.org wrote:
[mmotm.git] / drivers / staging / vt6656 / 80211mgr.h
bloba4ea824921676ac1c539184b42f0d64d1fa82fcd
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 managment 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 //DavidWang
70 #define WLAN_EID_CCX_IP 149 //DavidWang
71 #define WLAN_EID_CCX_Ver 221 //DavidWang
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
227 /*--------------------- Export Classes ----------------------------*/
229 /*--------------------- Export Variables --------------------------*/
231 /*--------------------- Export Types ------------------------------*/
234 // Information Element Types
236 #pragma pack(1)
237 typedef struct tagWLAN_IE {
238 BYTE byElementID;
239 BYTE len;
240 }__attribute__ ((__packed__))
241 WLAN_IE, *PWLAN_IE;
244 // Service Set Identity (SSID)
245 #pragma pack(1)
246 typedef struct tagWLAN_IE_SSID {
247 BYTE byElementID;
248 BYTE len;
249 BYTE abySSID[1];
250 }__attribute__ ((__packed__))
251 WLAN_IE_SSID, *PWLAN_IE_SSID;
254 // Supported Rates
255 #pragma pack(1)
256 typedef struct tagWLAN_IE_SUPP_RATES {
257 BYTE byElementID;
258 BYTE len;
259 BYTE abyRates[1];
260 }__attribute__ ((__packed__))
261 WLAN_IE_SUPP_RATES, *PWLAN_IE_SUPP_RATES;
265 // FH Parameter Set
266 #pragma pack(1)
267 typedef struct _WLAN_IE_FH_PARMS {
268 BYTE byElementID;
269 BYTE len;
270 WORD wDwellTime;
271 BYTE byHopSet;
272 BYTE byHopPattern;
273 BYTE byHopIndex;
274 } WLAN_IE_FH_PARMS, *PWLAN_IE_FH_PARMS;
276 // DS Parameter Set
277 #pragma pack(1)
278 typedef struct tagWLAN_IE_DS_PARMS {
279 BYTE byElementID;
280 BYTE len;
281 BYTE byCurrChannel;
282 }__attribute__ ((__packed__))
283 WLAN_IE_DS_PARMS, *PWLAN_IE_DS_PARMS;
286 // CF Parameter Set
287 #pragma pack(1)
288 typedef struct tagWLAN_IE_CF_PARMS {
289 BYTE byElementID;
290 BYTE len;
291 BYTE byCFPCount;
292 BYTE byCFPPeriod;
293 WORD wCFPMaxDuration;
294 WORD wCFPDurRemaining;
295 }__attribute__ ((__packed__))
296 WLAN_IE_CF_PARMS, *PWLAN_IE_CF_PARMS;
299 // TIM
300 #pragma pack(1)
301 typedef struct tagWLAN_IE_TIM {
302 BYTE byElementID;
303 BYTE len;
304 BYTE byDTIMCount;
305 BYTE byDTIMPeriod;
306 BYTE byBitMapCtl;
307 BYTE byVirtBitMap[1];
308 }__attribute__ ((__packed__))
309 WLAN_IE_TIM, *PWLAN_IE_TIM;
312 // IBSS Parameter Set
313 #pragma pack(1)
314 typedef struct tagWLAN_IE_IBSS_PARMS {
315 BYTE byElementID;
316 BYTE len;
317 WORD wATIMWindow;
318 }__attribute__ ((__packed__))
319 WLAN_IE_IBSS_PARMS, *PWLAN_IE_IBSS_PARMS;
322 // Challenge Text
323 #pragma pack(1)
324 typedef struct tagWLAN_IE_CHALLENGE {
325 BYTE byElementID;
326 BYTE len;
327 BYTE abyChallenge[1];
328 }__attribute__ ((__packed__))
329 WLAN_IE_CHALLENGE, *PWLAN_IE_CHALLENGE;
332 #pragma pack(1)
333 typedef struct tagWLAN_IE_RSN_EXT {
334 BYTE byElementID;
335 BYTE len;
336 BYTE abyOUI[4];
337 WORD wVersion;
338 BYTE abyMulticast[4];
339 WORD wPKCount;
340 struct {
341 BYTE abyOUI[4];
342 } PKSList[1]; // the rest is variable so need to
343 // overlay ieauth structure
344 } WLAN_IE_RSN_EXT, *PWLAN_IE_RSN_EXT;
346 #pragma pack(1)
347 typedef struct tagWLAN_IE_RSN_AUTH {
348 WORD wAuthCount;
349 struct {
350 BYTE abyOUI[4];
351 } AuthKSList[1];
352 } WLAN_IE_RSN_AUTH, *PWLAN_IE_RSN_AUTH;
354 // RSN Identity
355 #pragma pack(1)
356 typedef struct tagWLAN_IE_RSN {
357 BYTE byElementID;
358 BYTE len;
359 WORD wVersion;
360 BYTE abyRSN[WLAN_MIN_ARRAY];
361 } WLAN_IE_RSN, *PWLAN_IE_RSN;
363 //DavidWang
364 // CCX Identity DavidWang
365 #pragma pack(1)
366 typedef struct tagWLAN_IE_CCX {
367 BYTE byElementID;
368 BYTE len;
369 BYTE abyCCX[30];
370 } WLAN_IE_CCX, *PWLAN_IE_CCX;
371 #pragma pack(1)
372 typedef struct tagWLAN_IE_CCX_IP {
373 BYTE byElementID;
374 BYTE len;
375 BYTE abyCCXOUI[4];
376 BYTE abyCCXIP[4];
377 BYTE abyCCXREV[2];
378 } WLAN_IE_CCX_IP, *PWLAN_IE_CCX_IP;
379 #pragma pack(1)
380 typedef struct tagWLAN_IE_CCX_Ver {
381 BYTE byElementID;
382 BYTE len;
383 BYTE abyCCXVer[5];
384 } WLAN_IE_CCX_Ver, *PWLAN_IE_CCX_Ver;
386 //DavidWang
388 // ERP
389 #pragma pack(1)
390 typedef struct tagWLAN_IE_ERP {
391 BYTE byElementID;
392 BYTE len;
393 BYTE byContext;
394 }__attribute__ ((__packed__))
395 WLAN_IE_ERP, *PWLAN_IE_ERP;
398 #pragma pack(1)
399 typedef struct _MEASEURE_REQ {
400 BYTE byChannel;
401 BYTE abyStartTime[8];
402 BYTE abyDuration[2];
403 } MEASEURE_REQ, *PMEASEURE_REQ,
404 MEASEURE_REQ_BASIC, *PMEASEURE_REQ_BASIC,
405 MEASEURE_REQ_CCA, *PMEASEURE_REQ_CCA,
406 MEASEURE_REQ_RPI, *PMEASEURE_REQ_RPI;
408 typedef struct _MEASEURE_REP_BASIC {
409 BYTE byChannel;
410 BYTE abyStartTime[8];
411 BYTE abyDuration[2];
412 BYTE byMap;
413 } MEASEURE_REP_BASIC, *PMEASEURE_REP_BASIC;
415 typedef struct _MEASEURE_REP_CCA {
416 BYTE byChannel;
417 BYTE abyStartTime[8];
418 BYTE abyDuration[2];
419 BYTE byCCABusyFraction;
420 } MEASEURE_REP_CCA, *PMEASEURE_REP_CCA;
422 typedef struct _MEASEURE_REP_RPI {
423 BYTE byChannel;
424 BYTE abyStartTime[8];
425 BYTE abyDuration[2];
426 BYTE abyRPIdensity[8];
427 } MEASEURE_REP_RPI, *PMEASEURE_REP_RPI;
429 typedef union _MEASEURE_REP {
431 MEASEURE_REP_BASIC sBasic;
432 MEASEURE_REP_CCA sCCA;
433 MEASEURE_REP_RPI sRPI;
435 } MEASEURE_REP, *PMEASEURE_REP;
437 typedef struct _WLAN_IE_MEASURE_REQ {
438 BYTE byElementID;
439 BYTE len;
440 BYTE byToken;
441 BYTE byMode;
442 BYTE byType;
443 MEASEURE_REQ sReq;
444 } WLAN_IE_MEASURE_REQ, *PWLAN_IE_MEASURE_REQ;
446 typedef struct _WLAN_IE_MEASURE_REP {
447 BYTE byElementID;
448 BYTE len;
449 BYTE byToken;
450 BYTE byMode;
451 BYTE byType;
452 MEASEURE_REP sRep;
453 } WLAN_IE_MEASURE_REP, *PWLAN_IE_MEASURE_REP;
455 typedef struct _WLAN_IE_CH_SW {
456 BYTE byElementID;
457 BYTE len;
458 BYTE byMode;
459 BYTE byChannel;
460 BYTE byCount;
461 } WLAN_IE_CH_SW, *PWLAN_IE_CH_SW;
463 typedef struct _WLAN_IE_QUIET {
464 BYTE byElementID;
465 BYTE len;
466 BYTE byQuietCount;
467 BYTE byQuietPeriod;
468 BYTE abyQuietDuration[2];
469 BYTE abyQuietOffset[2];
470 } WLAN_IE_QUIET, *PWLAN_IE_QUIET;
472 typedef struct _WLAN_IE_COUNTRY {
473 BYTE byElementID;
474 BYTE len;
475 BYTE abyCountryString[3];
476 BYTE abyCountryInfo[3];
477 } WLAN_IE_COUNTRY, *PWLAN_IE_COUNTRY;
479 typedef struct _WLAN_IE_PW_CONST {
480 BYTE byElementID;
481 BYTE len;
482 BYTE byPower;
483 } WLAN_IE_PW_CONST, *PWLAN_IE_PW_CONST;
485 typedef struct _WLAN_IE_PW_CAP {
486 BYTE byElementID;
487 BYTE len;
488 BYTE byMinPower;
489 BYTE byMaxPower;
490 } WLAN_IE_PW_CAP, *PWLAN_IE_PW_CAP;
492 typedef struct _WLAN_IE_SUPP_CH {
493 BYTE byElementID;
494 BYTE len;
495 BYTE abyChannelTuple[2];
496 } WLAN_IE_SUPP_CH, *PWLAN_IE_SUPP_CH;
498 typedef struct _WLAN_IE_TPC_REQ {
499 BYTE byElementID;
500 BYTE len;
501 } WLAN_IE_TPC_REQ, *PWLAN_IE_TPC_REQ;
503 typedef struct _WLAN_IE_TPC_REP {
504 BYTE byElementID;
505 BYTE len;
506 BYTE byTxPower;
507 BYTE byLinkMargin;
508 } WLAN_IE_TPC_REP, *PWLAN_IE_TPC_REP;
511 typedef struct _WLAN_IE_IBSS_DFS {
512 BYTE byElementID;
513 BYTE len;
514 BYTE abyDFSOwner[6];
515 BYTE byDFSRecovery;
516 BYTE abyChannelMap[2];
517 } WLAN_IE_IBSS_DFS, *PWLAN_IE_IBSS_DFS;
519 #pragma pack()
523 // Frame Types
524 // prototype structure, all mgmt frame types will start with these members
525 typedef struct tagWLAN_FR_MGMT {
527 UINT uType;
528 UINT len;
529 PBYTE pBuf;
530 PUWLAN_80211HDR pHdr;
532 } WLAN_FR_MGMT, *PWLAN_FR_MGMT;
534 // Beacon frame
535 typedef struct tagWLAN_FR_BEACON {
537 UINT uType;
538 UINT len;
539 PBYTE pBuf;
540 PUWLAN_80211HDR pHdr;
541 // fixed fields
542 PQWORD pqwTimestamp;
543 PWORD pwBeaconInterval;
544 PWORD pwCapInfo;
545 /*-- info elements ----------*/
546 PWLAN_IE_SSID pSSID;
547 PWLAN_IE_SUPP_RATES pSuppRates;
548 // PWLAN_IE_FH_PARMS pFHParms;
549 PWLAN_IE_DS_PARMS pDSParms;
550 PWLAN_IE_CF_PARMS pCFParms;
551 PWLAN_IE_TIM pTIM;
552 PWLAN_IE_IBSS_PARMS pIBSSParms;
553 PWLAN_IE_RSN pRSN;
554 PWLAN_IE_RSN_EXT pRSNWPA;
555 PWLAN_IE_ERP pERP;
556 PWLAN_IE_SUPP_RATES pExtSuppRates;
557 PWLAN_IE_COUNTRY pIE_Country;
558 PWLAN_IE_PW_CONST pIE_PowerConstraint;
559 PWLAN_IE_CH_SW pIE_CHSW;
560 PWLAN_IE_IBSS_DFS pIE_IBSSDFS;
561 PWLAN_IE_QUIET pIE_Quiet;
563 } WLAN_FR_BEACON, *PWLAN_FR_BEACON;
566 // IBSS ATIM frame
567 typedef struct tagWLAN_FR_IBSSATIM {
569 UINT uType;
570 UINT len;
571 PBYTE pBuf;
572 PUWLAN_80211HDR pHdr;
574 // fixed fields
575 // info elements
576 // this frame type has a null body
578 } WLAN_FR_IBSSATIM, *PWLAN_FR_IBSSATIM;
580 // Disassociation
581 typedef struct tagWLAN_FR_DISASSOC {
583 UINT uType;
584 UINT len;
585 PBYTE pBuf;
586 PUWLAN_80211HDR pHdr;
587 /*-- fixed fields -----------*/
588 PWORD pwReason;
589 /*-- info elements ----------*/
591 } WLAN_FR_DISASSOC, *PWLAN_FR_DISASSOC;
593 // Association Request
594 typedef struct tagWLAN_FR_ASSOCREQ {
596 UINT uType;
597 UINT len;
598 PBYTE pBuf;
599 PUWLAN_80211HDR pHdr;
600 /*-- fixed fields -----------*/
601 PWORD pwCapInfo;
602 PWORD pwListenInterval;
603 /*-- info elements ----------*/
604 PWLAN_IE_SSID pSSID;
605 PWLAN_IE_SUPP_RATES pSuppRates;
606 PWLAN_IE_RSN pRSN;
607 PWLAN_IE_CCX pCCX;
608 PWLAN_IE_CCX_IP pCCXIP;
609 PWLAN_IE_CCX_Ver pCCXVER;
610 PWLAN_IE_RSN_EXT pRSNWPA;
611 PWLAN_IE_SUPP_RATES pExtSuppRates;
612 PWLAN_IE_PW_CAP pCurrPowerCap;
613 PWLAN_IE_SUPP_CH pCurrSuppCh;
615 } WLAN_FR_ASSOCREQ, *PWLAN_FR_ASSOCREQ;
617 // Association Response
618 typedef struct tagWLAN_FR_ASSOCRESP {
620 UINT uType;
621 UINT len;
622 PBYTE pBuf;
623 PUWLAN_80211HDR pHdr;
624 /*-- fixed fields -----------*/
625 PWORD pwCapInfo;
626 PWORD pwStatus;
627 PWORD pwAid;
628 /*-- info elements ----------*/
629 PWLAN_IE_SUPP_RATES pSuppRates;
630 PWLAN_IE_SUPP_RATES pExtSuppRates;
632 } WLAN_FR_ASSOCRESP, *PWLAN_FR_ASSOCRESP;
634 // Reassociation Request
635 typedef struct tagWLAN_FR_REASSOCREQ {
637 UINT uType;
638 UINT len;
639 PBYTE pBuf;
640 PUWLAN_80211HDR pHdr;
642 /*-- fixed fields -----------*/
643 PWORD pwCapInfo;
644 PWORD pwListenInterval;
645 PIEEE_ADDR pAddrCurrAP;
647 /*-- info elements ----------*/
648 PWLAN_IE_SSID pSSID;
649 PWLAN_IE_SUPP_RATES pSuppRates;
650 PWLAN_IE_RSN pRSN;
651 PWLAN_IE_CCX pCCX;
652 PWLAN_IE_CCX_IP pCCXIP;
653 PWLAN_IE_CCX_Ver pCCXVER;
654 PWLAN_IE_RSN_EXT pRSNWPA;
655 PWLAN_IE_SUPP_RATES pExtSuppRates;
657 } WLAN_FR_REASSOCREQ, *PWLAN_FR_REASSOCREQ;
659 // Reassociation Response
660 typedef struct tagWLAN_FR_REASSOCRESP {
662 UINT uType;
663 UINT len;
664 PBYTE pBuf;
665 PUWLAN_80211HDR pHdr;
666 /*-- fixed fields -----------*/
667 PWORD pwCapInfo;
668 PWORD pwStatus;
669 PWORD pwAid;
670 /*-- info elements ----------*/
671 PWLAN_IE_SUPP_RATES pSuppRates;
672 PWLAN_IE_SUPP_RATES pExtSuppRates;
674 } WLAN_FR_REASSOCRESP, *PWLAN_FR_REASSOCRESP;
676 // Probe Request
677 typedef struct tagWLAN_FR_PROBEREQ {
679 UINT uType;
680 UINT len;
681 PBYTE pBuf;
682 PUWLAN_80211HDR pHdr;
683 /*-- fixed fields -----------*/
684 /*-- info elements ----------*/
685 PWLAN_IE_SSID pSSID;
686 PWLAN_IE_SUPP_RATES pSuppRates;
687 PWLAN_IE_SUPP_RATES pExtSuppRates;
689 } WLAN_FR_PROBEREQ, *PWLAN_FR_PROBEREQ;
691 // Probe Response
692 typedef struct tagWLAN_FR_PROBERESP {
694 UINT uType;
695 UINT len;
696 PBYTE pBuf;
697 PUWLAN_80211HDR pHdr;
698 /*-- fixed fields -----------*/
699 PQWORD pqwTimestamp;
700 PWORD pwBeaconInterval;
701 PWORD pwCapInfo;
702 /*-- info elements ----------*/
703 PWLAN_IE_SSID pSSID;
704 PWLAN_IE_SUPP_RATES pSuppRates;
705 PWLAN_IE_DS_PARMS pDSParms;
706 PWLAN_IE_CF_PARMS pCFParms;
707 PWLAN_IE_IBSS_PARMS pIBSSParms;
708 PWLAN_IE_RSN pRSN;
709 PWLAN_IE_RSN_EXT pRSNWPA;
710 PWLAN_IE_ERP pERP;
711 PWLAN_IE_SUPP_RATES pExtSuppRates;
712 PWLAN_IE_COUNTRY pIE_Country;
713 PWLAN_IE_PW_CONST pIE_PowerConstraint;
714 PWLAN_IE_CH_SW pIE_CHSW;
715 PWLAN_IE_IBSS_DFS pIE_IBSSDFS;
716 PWLAN_IE_QUIET pIE_Quiet;
718 } WLAN_FR_PROBERESP, *PWLAN_FR_PROBERESP;
720 // Authentication
721 typedef struct tagWLAN_FR_AUTHEN {
723 UINT uType;
724 UINT len;
725 PBYTE pBuf;
726 PUWLAN_80211HDR pHdr;
727 /*-- fixed fields -----------*/
728 PWORD pwAuthAlgorithm;
729 PWORD pwAuthSequence;
730 PWORD pwStatus;
731 /*-- info elements ----------*/
732 PWLAN_IE_CHALLENGE pChallenge;
734 } WLAN_FR_AUTHEN, *PWLAN_FR_AUTHEN;
736 // Deauthenication
737 typedef struct tagWLAN_FR_DEAUTHEN {
739 UINT uType;
740 UINT len;
741 PBYTE pBuf;
742 PUWLAN_80211HDR pHdr;
743 /*-- fixed fields -----------*/
744 PWORD pwReason;
746 /*-- info elements ----------*/
748 } WLAN_FR_DEAUTHEN, *PWLAN_FR_DEAUTHEN;
750 /*--------------------- Export Functions --------------------------*/
751 VOID
752 vMgrEncodeBeacon(
753 IN PWLAN_FR_BEACON pFrame
756 VOID
757 vMgrDecodeBeacon(
758 IN PWLAN_FR_BEACON pFrame
761 VOID
762 vMgrEncodeIBSSATIM(
763 IN PWLAN_FR_IBSSATIM pFrame
766 VOID
767 vMgrDecodeIBSSATIM(
768 IN PWLAN_FR_IBSSATIM pFrame
771 VOID
772 vMgrEncodeDisassociation(
773 IN PWLAN_FR_DISASSOC pFrame
776 VOID
777 vMgrDecodeDisassociation(
778 IN PWLAN_FR_DISASSOC pFrame
781 VOID
782 vMgrEncodeAssocRequest(
783 IN PWLAN_FR_ASSOCREQ pFrame
786 VOID
787 vMgrDecodeAssocRequest(
788 IN PWLAN_FR_ASSOCREQ pFrame
791 VOID
792 vMgrEncodeAssocResponse(
793 IN PWLAN_FR_ASSOCRESP pFrame
796 VOID
797 vMgrDecodeAssocResponse(
798 IN PWLAN_FR_ASSOCRESP pFrame
801 VOID
802 vMgrEncodeReassocRequest(
803 IN PWLAN_FR_REASSOCREQ pFrame
806 VOID
807 vMgrDecodeReassocRequest(
808 IN PWLAN_FR_REASSOCREQ pFrame
811 VOID
812 vMgrEncodeProbeRequest(
813 IN PWLAN_FR_PROBEREQ pFrame
816 VOID
817 vMgrDecodeProbeRequest(
818 IN PWLAN_FR_PROBEREQ pFrame
821 VOID
822 vMgrEncodeProbeResponse(
823 IN PWLAN_FR_PROBERESP pFrame
826 VOID
827 vMgrDecodeProbeResponse(
828 IN PWLAN_FR_PROBERESP pFrame
831 VOID
832 vMgrEncodeAuthen(
833 IN PWLAN_FR_AUTHEN pFrame
836 VOID
837 vMgrDecodeAuthen(
838 IN PWLAN_FR_AUTHEN pFrame
841 VOID
842 vMgrEncodeDeauthen(
843 IN PWLAN_FR_DEAUTHEN pFrame
846 VOID
847 vMgrDecodeDeauthen(
848 IN PWLAN_FR_DEAUTHEN pFrame
851 VOID
852 vMgrEncodeReassocResponse(
853 IN PWLAN_FR_REASSOCRESP pFrame
856 VOID
857 vMgrDecodeReassocResponse(
858 IN PWLAN_FR_REASSOCRESP pFrame
861 #endif// __80211MGR_H__