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