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