blob: cb3cc9bbc1f481a9a02b78a8a61e5f220d30fbdb [file] [log] [blame]
Greg Kroah-Hartman91980992008-10-28 14:48:09 -07001/*
2 *************************************************************************
3 * Ralink Tech Inc.
4 * 5F., No.36, Taiyuan St., Jhubei City,
5 * Hsinchu County 302,
6 * Taiwan, R.O.C.
7 *
8 * (c) Copyright 2002-2007, Ralink Technology, Inc.
9 *
10 * This program is free software; you can redistribute it and/or modify *
11 * it under the terms of the GNU General Public License as published by *
12 * the Free Software Foundation; either version 2 of the License, or *
13 * (at your option) any later version. *
14 * *
15 * This program is distributed in the hope that it will be useful, *
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
18 * GNU General Public License for more details. *
19 * *
20 * You should have received a copy of the GNU General Public License *
21 * along with this program; if not, write to the *
22 * Free Software Foundation, Inc., *
23 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
24 * *
25 *************************************************************************
26
27 Module Name:
28 mlme.h
29
30 Abstract:
31
32 Revision History:
33 Who When What
34 -------- ---------- ----------------------------------------------
35 John Chang 2003-08-28 Created
36 John Chang 2004-09-06 modified for RT2600
37
38*/
39#ifndef __MLME_H__
40#define __MLME_H__
41
Bartlomiej Zolnierkiewiczca97b832009-09-22 20:44:07 +020042#include "rtmp_dot11.h"
43
Greg Kroah-Hartman91980992008-10-28 14:48:09 -070044// maximum supported capability information -
45// ESS, IBSS, Privacy, Short Preamble, Spectrum mgmt, Short Slot
46#define SUPPORTED_CAPABILITY_INFO 0x0533
47
48#define END_OF_ARGS -1
49#define LFSR_MASK 0x80000057
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -080050#define MLME_TASK_EXEC_INTV 100/*200*/ //
Greg Kroah-Hartman91980992008-10-28 14:48:09 -070051#define LEAD_TIME 5
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -080052#define MLME_TASK_EXEC_MULTIPLE 10 /*5*/ // MLME_TASK_EXEC_MULTIPLE * MLME_TASK_EXEC_INTV = 1 sec
53#define REORDER_EXEC_INTV 100 // 0.1 sec
Greg Kroah-Hartman91980992008-10-28 14:48:09 -070054
55// The definition of Radar detection duration region
56#define CE 0
57#define FCC 1
58#define JAP 2
59#define JAP_W53 3
60#define JAP_W56 4
61#define MAX_RD_REGION 5
62
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -080063#define BEACON_LOST_TIME 4 * OS_HZ // 2048 msec = 2 sec
Greg Kroah-Hartman91980992008-10-28 14:48:09 -070064
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -080065#define DLS_TIMEOUT 1200 // unit: msec
66#define AUTH_TIMEOUT 300 // unit: msec
67#define ASSOC_TIMEOUT 300 // unit: msec
68#define JOIN_TIMEOUT 2000 // unit: msec
69#define SHORT_CHANNEL_TIME 90 // unit: msec
70#define MIN_CHANNEL_TIME 110 // unit: msec, for dual band scan
71#define MAX_CHANNEL_TIME 140 // unit: msec, for single band scan
72#define FAST_ACTIVE_SCAN_TIME 30 // Active scan waiting for probe response time
73#define CW_MIN_IN_BITS 4 // actual CwMin = 2^CW_MIN_IN_BITS - 1
74#define LINK_DOWN_TIMEOUT 20000 // unit: msec
75#define AUTO_WAKEUP_TIMEOUT 70 //unit: msec
Bartlomiej Zolnierkiewiczca97b832009-09-22 20:44:07 +020076
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -080077#define CW_MAX_IN_BITS 10 // actual CwMax = 2^CW_MAX_IN_BITS - 1
Bartlomiej Zolnierkiewiczca97b832009-09-22 20:44:07 +020078
Greg Kroah-Hartman91980992008-10-28 14:48:09 -070079// Note: RSSI_TO_DBM_OFFSET has been changed to variable for new RF (2004-0720).
80// SHould not refer to this constant anymore
81//#define RSSI_TO_DBM_OFFSET 120 // for RT2530 RSSI-115 = dBm
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -080082#define RSSI_FOR_MID_TX_POWER -55 // -55 db is considered mid-distance
83#define RSSI_FOR_LOW_TX_POWER -45 // -45 db is considered very short distance and
84 // eligible to use a lower TX power
Greg Kroah-Hartman91980992008-10-28 14:48:09 -070085#define RSSI_FOR_LOWEST_TX_POWER -30
86//#define MID_TX_POWER_DELTA 0 // 0 db from full TX power upon mid-distance to AP
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -080087#define LOW_TX_POWER_DELTA 6 // -3 db from full TX power upon very short distance. 1 grade is 0.5 db
88#define LOWEST_TX_POWER_DELTA 16 // -8 db from full TX power upon shortest distance. 1 grade is 0.5 db
Greg Kroah-Hartman91980992008-10-28 14:48:09 -070089
90#define RSSI_TRIGGERED_UPON_BELOW_THRESHOLD 0
91#define RSSI_TRIGGERED_UPON_EXCCEED_THRESHOLD 1
92#define RSSI_THRESHOLD_FOR_ROAMING 25
93#define RSSI_DELTA 5
94
95// Channel Quality Indication
96#define CQI_IS_GOOD(cqi) ((cqi) >= 50)
97//#define CQI_IS_FAIR(cqi) (((cqi) >= 20) && ((cqi) < 50))
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -080098#define CQI_IS_POOR(cqi) (cqi < 50) //(((cqi) >= 5) && ((cqi) < 20))
Greg Kroah-Hartman91980992008-10-28 14:48:09 -070099#define CQI_IS_BAD(cqi) (cqi < 5)
100#define CQI_IS_DEAD(cqi) (cqi == 0)
101
102// weighting factor to calculate Channel quality, total should be 100%
103#define RSSI_WEIGHTING 50
104#define TX_WEIGHTING 30
105#define RX_WEIGHTING 20
106
107#define BSS_NOT_FOUND 0xFFFFFFFF
108
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800109#define MAX_LEN_OF_MLME_QUEUE 40 //10
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700110
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800111#define SCAN_PASSIVE 18 // scan with no probe request, only wait beacon and probe response
112#define SCAN_ACTIVE 19 // scan with probe request, and wait beacon and probe response
113#define SCAN_CISCO_PASSIVE 20 // Single channel passive scan
114#define SCAN_CISCO_ACTIVE 21 // Single channel active scan
115#define SCAN_CISCO_NOISE 22 // Single channel passive scan for noise histogram collection
116#define SCAN_CISCO_CHANNEL_LOAD 23 // Single channel passive scan for channel load collection
117#define FAST_SCAN_ACTIVE 24 // scan with probe request, and wait beacon and probe response
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700118
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700119#define MAC_ADDR_IS_GROUP(Addr) (((Addr[0]) & 0x01))
120#define MAC_ADDR_HASH(Addr) (Addr[0] ^ Addr[1] ^ Addr[2] ^ Addr[3] ^ Addr[4] ^ Addr[5])
121#define MAC_ADDR_HASH_INDEX(Addr) (MAC_ADDR_HASH(Addr) % HASH_TABLE_SIZE)
122#define TID_MAC_HASH(Addr,TID) (TID^Addr[0] ^ Addr[1] ^ Addr[2] ^ Addr[3] ^ Addr[4] ^ Addr[5])
123#define TID_MAC_HASH_INDEX(Addr,TID) (TID_MAC_HASH(Addr,TID) % HASH_TABLE_SIZE)
124
125// LED Control
126// assoiation ON. one LED ON. another blinking when TX, OFF when idle
127// no association, both LED off
128#define ASIC_LED_ACT_ON(pAd) RTMP_IO_WRITE32(pAd, MAC_CSR14, 0x00031e46)
129#define ASIC_LED_ACT_OFF(pAd) RTMP_IO_WRITE32(pAd, MAC_CSR14, 0x00001e46)
130
131// bit definition of the 2-byte pBEACON->Capability field
132#define CAP_IS_ESS_ON(x) (((x) & 0x0001) != 0)
133#define CAP_IS_IBSS_ON(x) (((x) & 0x0002) != 0)
134#define CAP_IS_CF_POLLABLE_ON(x) (((x) & 0x0004) != 0)
135#define CAP_IS_CF_POLL_REQ_ON(x) (((x) & 0x0008) != 0)
136#define CAP_IS_PRIVACY_ON(x) (((x) & 0x0010) != 0)
137#define CAP_IS_SHORT_PREAMBLE_ON(x) (((x) & 0x0020) != 0)
138#define CAP_IS_PBCC_ON(x) (((x) & 0x0040) != 0)
139#define CAP_IS_AGILITY_ON(x) (((x) & 0x0080) != 0)
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800140#define CAP_IS_SPECTRUM_MGMT(x) (((x) & 0x0100) != 0) // 802.11e d9
141#define CAP_IS_QOS(x) (((x) & 0x0200) != 0) // 802.11e d9
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700142#define CAP_IS_SHORT_SLOT(x) (((x) & 0x0400) != 0)
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800143#define CAP_IS_APSD(x) (((x) & 0x0800) != 0) // 802.11e d9
144#define CAP_IS_IMMED_BA(x) (((x) & 0x1000) != 0) // 802.11e d9
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700145#define CAP_IS_DSSS_OFDM(x) (((x) & 0x2000) != 0)
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800146#define CAP_IS_DELAY_BA(x) (((x) & 0x4000) != 0) // 802.11e d9
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700147
148#define CAP_GENERATE(ess,ibss,priv,s_pre,s_slot,spectrum) (((ess) ? 0x0001 : 0x0000) | ((ibss) ? 0x0002 : 0x0000) | ((priv) ? 0x0010 : 0x0000) | ((s_pre) ? 0x0020 : 0x0000) | ((s_slot) ? 0x0400 : 0x0000) | ((spectrum) ? 0x0100 : 0x0000))
149
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800150#define ERP_IS_NON_ERP_PRESENT(x) (((x) & 0x01) != 0) // 802.11g
151#define ERP_IS_USE_PROTECTION(x) (((x) & 0x02) != 0) // 802.11g
152#define ERP_IS_USE_BARKER_PREAMBLE(x) (((x) & 0x04) != 0) // 802.11g
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700153
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800154#define DRS_TX_QUALITY_WORST_BOUND 8 // 3 // just test by gary
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700155#define DRS_PENALTY 8
156
157#define BA_NOTUSE 2
158//BA Policy subfiled value in ADDBA frame
159#define IMMED_BA 1
160#define DELAY_BA 0
161
162// BA Initiator subfield in DELBA frame
163#define ORIGINATOR 1
164#define RECIPIENT 0
165
166// ADDBA Status Code
167#define ADDBA_RESULTCODE_SUCCESS 0
168#define ADDBA_RESULTCODE_REFUSED 37
169#define ADDBA_RESULTCODE_INVALID_PARAMETERS 38
170
171// DELBA Reason Code
172#define DELBA_REASONCODE_QSTA_LEAVING 36
173#define DELBA_REASONCODE_END_BA 37
174#define DELBA_REASONCODE_UNKNOWN_BA 38
175#define DELBA_REASONCODE_TIMEOUT 39
176
177// reset all OneSecTx counters
178#define RESET_ONE_SEC_TX_CNT(__pEntry) \
179if (((__pEntry)) != NULL) \
180{ \
181 (__pEntry)->OneSecTxRetryOkCount = 0; \
182 (__pEntry)->OneSecTxFailCount = 0; \
183 (__pEntry)->OneSecTxNoRetryOkCount = 0; \
184}
185
186//
187// 802.11 frame formats
188//
189// HT Capability INFO field in HT Cap IE .
190typedef struct PACKED {
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800191 USHORT AdvCoding:1;
192 USHORT ChannelWidth:1;
193 USHORT MimoPs:2; //momi power safe
194 USHORT GF:1; //green field
195 USHORT ShortGIfor20:1;
196 USHORT ShortGIfor40:1; //for40MHz
197 USHORT TxSTBC:1;
198 USHORT RxSTBC:2;
199 USHORT DelayedBA:1; //rt2860c not support
200 USHORT AMsduSize:1; // only support as zero
201 USHORT CCKmodein40:1;
202 USHORT PSMP:1;
203 USHORT Forty_Mhz_Intolerant:1;
204 USHORT LSIGTxopProSup:1;
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700205} HT_CAP_INFO, *PHT_CAP_INFO;
206
207// HT Capability INFO field in HT Cap IE .
208typedef struct PACKED {
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800209 UCHAR MaxRAmpduFactor:2;
210 UCHAR MpduDensity:3;
211 UCHAR rsv:3; //momi power safe
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700212} HT_CAP_PARM, *PHT_CAP_PARM;
213
214// HT Capability INFO field in HT Cap IE .
215typedef struct PACKED {
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800216 UCHAR MCSSet[10];
217 UCHAR SupRate[2]; // unit : 1Mbps
218 UCHAR TxMCSSetDefined:1;
219 UCHAR TxRxNotEqual:1;
220 UCHAR TxStream:2;
221 UCHAR MpduDensity:1;
222 UCHAR rsv:3;
223 UCHAR rsv3[3];
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700224} HT_MCS_SET, *PHT_MCS_SET;
225
226// HT Capability INFO field in HT Cap IE .
227typedef struct PACKED {
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800228 USHORT Pco:1;
229 USHORT TranTime:2;
230 USHORT rsv:5; //momi power safe
231 USHORT MCSFeedback:2; //0:no MCS feedback, 2:unsolicited MCS feedback, 3:Full MCS feedback, 1:rsv.
232 USHORT PlusHTC:1; //+HTC control field support
233 USHORT RDGSupport:1; //reverse Direction Grant support
234 USHORT rsv2:4;
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700235} EXT_HT_CAP_INFO, *PEXT_HT_CAP_INFO;
236
237// HT Beamforming field in HT Cap IE .
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800238typedef struct PACKED _HT_BF_CAP {
239 ULONG TxBFRecCapable:1;
240 ULONG RxSoundCapable:1;
241 ULONG TxSoundCapable:1;
242 ULONG RxNDPCapable:1;
243 ULONG TxNDPCapable:1;
244 ULONG ImpTxBFCapable:1;
245 ULONG Calibration:2;
246 ULONG ExpCSICapable:1;
247 ULONG ExpNoComSteerCapable:1;
248 ULONG ExpComSteerCapable:1;
249 ULONG ExpCSIFbk:2;
250 ULONG ExpNoComBF:2;
251 ULONG ExpComBF:2;
252 ULONG MinGrouping:2;
253 ULONG CSIBFAntSup:2;
254 ULONG NoComSteerBFAntSup:2;
255 ULONG ComSteerBFAntSup:2;
256 ULONG CSIRowBFSup:2;
257 ULONG ChanEstimation:2;
258 ULONG rsv:3;
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700259} HT_BF_CAP, *PHT_BF_CAP;
260
261// HT antenna selection field in HT Cap IE .
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800262typedef struct PACKED _HT_AS_CAP {
263 UCHAR AntSelect:1;
264 UCHAR ExpCSIFbkTxASEL:1;
265 UCHAR AntIndFbkTxASEL:1;
266 UCHAR ExpCSIFbk:1;
267 UCHAR AntIndFbk:1;
268 UCHAR RxASel:1;
269 UCHAR TxSoundPPDU:1;
270 UCHAR rsv:1;
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700271} HT_AS_CAP, *PHT_AS_CAP;
272
273// Draft 1.0 set IE length 26, but is extensible..
274#define SIZE_HT_CAP_IE 26
275// The structure for HT Capability IE.
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800276typedef struct PACKED _HT_CAPABILITY_IE {
277 HT_CAP_INFO HtCapInfo;
278 HT_CAP_PARM HtCapParm;
279// HT_MCS_SET HtMCSSet;
280 UCHAR MCSSet[16];
281 EXT_HT_CAP_INFO ExtHtCapInfo;
282 HT_BF_CAP TxBFCap; // beamforming cap. rt2860c not support beamforming.
283 HT_AS_CAP ASCap; //antenna selection.
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700284} HT_CAPABILITY_IE, *PHT_CAPABILITY_IE;
285
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700286// 802.11n draft3 related structure definitions.
287// 7.3.2.60
288#define dot11OBSSScanPassiveDwell 20 // in TU. min amount of time that the STA continously scans each channel when performing an active OBSS scan.
289#define dot11OBSSScanActiveDwell 10 // in TU.min amount of time that the STA continously scans each channel when performing an passive OBSS scan.
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800290#define dot11BSSWidthTriggerScanInterval 300 // in sec. max interval between scan operations to be performed to detect BSS channel width trigger events.
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700291#define dot11OBSSScanPassiveTotalPerChannel 200 // in TU. min total amount of time that the STA scans each channel when performing a passive OBSS scan.
292#define dot11OBSSScanActiveTotalPerChannel 20 //in TU. min total amount of time that the STA scans each channel when performing a active OBSS scan
Bartlomiej Zolnierkiewiczca97b832009-09-22 20:44:07 +0200293#define dot11BSSWidthChannelTransactionDelayFactor 5 // min ratio between the delay time in performing a switch from 20MHz BSS to 20/40 BSS operation and the maximum
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800294 // interval between overlapping BSS scan operations.
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700295#define dot11BSSScanActivityThreshold 25 // in %%, max total time that a STA may be active on the medium during a period of
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800296 // (dot11BSSWidthChannelTransactionDelayFactor * dot11BSSWidthTriggerScanInterval) seconds without
297 // being obligated to perform OBSS Scan operations. default is 25(== 0.25%)
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700298
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800299typedef struct PACKED _OVERLAP_BSS_SCAN_IE {
300 USHORT ScanPassiveDwell;
301 USHORT ScanActiveDwell;
302 USHORT TriggerScanInt; // Trigger scan interval
303 USHORT PassiveTalPerChannel; // passive total per channel
304 USHORT ActiveTalPerChannel; // active total per channel
305 USHORT DelayFactor; // BSS width channel transition delay factor
306 USHORT ScanActThre; // Scan Activity threshold
307} OVERLAP_BSS_SCAN_IE, *POVERLAP_BSS_SCAN_IE;
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700308
309// 7.3.2.56. 20/40 Coexistence element used in Element ID = 72 = IE_2040_BSS_COEXIST
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800310typedef union PACKED _BSS_2040_COEXIST_IE {
311 struct PACKED {
312 UCHAR InfoReq:1;
313 UCHAR Intolerant40:1; // Inter-BSS. set 1 when prohibits a receiving BSS from operating as a 20/40 Mhz BSS.
314 UCHAR BSS20WidthReq:1; // Intra-BSS set 1 when prohibits a receiving AP from operating its BSS as a 20/40MHz BSS.
315 UCHAR rsv:5;
316 } field;
317 UCHAR word;
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700318} BSS_2040_COEXIST_IE, *PBSS_2040_COEXIST_IE;
319
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800320typedef struct _TRIGGER_EVENTA {
321 BOOLEAN bValid;
322 UCHAR BSSID[6];
323 UCHAR RegClass; // Regulatory Class
324 USHORT Channel;
325 ULONG CDCounter; // Maintain a seperate count down counter for each Event A.
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700326} TRIGGER_EVENTA, *PTRIGGER_EVENTA;
327
328// 20/40 trigger event table
329// If one Event A delete or created, or if Event B is detected or not detected, STA should send 2040BSSCoexistence to AP.
330#define MAX_TRIGGER_EVENT 64
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800331typedef struct _TRIGGER_EVENT_TAB {
332 UCHAR EventANo;
333 TRIGGER_EVENTA EventA[MAX_TRIGGER_EVENT];
334 ULONG EventBCountDown; // Count down counter for Event B.
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700335} TRIGGER_EVENT_TAB, *PTRIGGER_EVENT_TAB;
336
337// 7.3.27 20/40 Bss Coexistence Mgmt capability used in extended capabilities information IE( ID = 127 = IE_EXT_CAPABILITY).
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800338// This is the first octet and was defined in 802.11n D3.03 and 802.11yD9.0
339typedef struct PACKED _EXT_CAP_INFO_ELEMENT {
340 UCHAR BssCoexistMgmtSupport:1;
341 UCHAR rsv:1;
342 UCHAR ExtendChannelSwitch:1;
343 UCHAR rsv2:5;
344} EXT_CAP_INFO_ELEMENT, *PEXT_CAP_INFO_ELEMENT;
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700345
346// 802.11n 7.3.2.61
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800347typedef struct PACKED _BSS_2040_COEXIST_ELEMENT {
348 UCHAR ElementID; // ID = IE_2040_BSS_COEXIST = 72
349 UCHAR Len;
350 BSS_2040_COEXIST_IE BssCoexistIe;
351} BSS_2040_COEXIST_ELEMENT, *PBSS_2040_COEXIST_ELEMENT;
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700352
353//802.11n 7.3.2.59
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800354typedef struct PACKED _BSS_2040_INTOLERANT_CH_REPORT {
355 UCHAR ElementID; // ID = IE_2040_BSS_INTOLERANT_REPORT = 73
356 UCHAR Len;
357 UCHAR RegulatoryClass;
358 UCHAR ChList[0];
359} BSS_2040_INTOLERANT_CH_REPORT, *PBSS_2040_INTOLERANT_CH_REPORT;
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700360
361// The structure for channel switch annoucement IE. This is in 802.11n D3.03
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800362typedef struct PACKED _CHA_SWITCH_ANNOUNCE_IE {
363 UCHAR SwitchMode; //channel switch mode
364 UCHAR NewChannel; //
365 UCHAR SwitchCount; //
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700366} CHA_SWITCH_ANNOUNCE_IE, *PCHA_SWITCH_ANNOUNCE_IE;
367
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700368// The structure for channel switch annoucement IE. This is in 802.11n D3.03
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800369typedef struct PACKED _SEC_CHA_OFFSET_IE {
370 UCHAR SecondaryChannelOffset; // 1: Secondary above, 3: Secondary below, 0: no Secondary
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700371} SEC_CHA_OFFSET_IE, *PSEC_CHA_OFFSET_IE;
372
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700373// This structure is extracted from struct RT_HT_CAPABILITY
374typedef struct {
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800375 BOOLEAN bHtEnable; // If we should use ht rate.
376 BOOLEAN bPreNHt; // If we should use ht rate.
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700377 //Substract from HT Capability IE
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800378 UCHAR MCSSet[16];
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700379} RT_HT_PHY_INFO, *PRT_HT_PHY_INFO;
380
381//This structure substracts ralink supports from all 802.11n-related features.
382//Features not listed here but contained in 802.11n spec are not supported in rt2860.
383typedef struct {
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800384 USHORT ChannelWidth:1;
385 USHORT MimoPs:2; //mimo power safe MMPS_
386 USHORT GF:1; //green field
387 USHORT ShortGIfor20:1;
388 USHORT ShortGIfor40:1; //for40MHz
389 USHORT TxSTBC:1;
390 USHORT RxSTBC:2; // 2 bits
391 USHORT AmsduEnable:1; // Enable to transmit A-MSDU. Suggest disable. We should use A-MPDU to gain best benifit of 802.11n
392 USHORT AmsduSize:1; // Max receiving A-MSDU size
393 USHORT rsv:5;
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700394
395 //Substract from Addiont HT INFO IE
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800396 UCHAR MaxRAmpduFactor:2;
397 UCHAR MpduDensity:3;
398 UCHAR ExtChanOffset:2; // Please not the difference with following UCHAR NewExtChannelOffset; from 802.11n
399 UCHAR RecomWidth:1;
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700400
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800401 USHORT OperaionMode:2;
402 USHORT NonGfPresent:1;
403 USHORT rsv3:1;
404 USHORT OBSS_NonHTExist:1;
405 USHORT rsv2:11;
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700406
407 // New Extension Channel Offset IE
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800408 UCHAR NewExtChannelOffset;
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700409 // Extension Capability IE = 127
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800410 UCHAR BSSCoexist2040;
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700411} RT_HT_CAPABILITY, *PRT_HT_CAPABILITY;
412
413// field in Addtional HT Information IE .
414typedef struct PACKED {
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800415 UCHAR ExtChanOffset:2;
416 UCHAR RecomWidth:1;
417 UCHAR RifsMode:1;
418 UCHAR S_PSMPSup:1; //Indicate support for scheduled PSMP
419 UCHAR SerInterGranu:3; //service interval granularity
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700420} ADD_HTINFO, *PADD_HTINFO;
421
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800422typedef struct PACKED {
423 USHORT OperaionMode:2;
424 USHORT NonGfPresent:1;
425 USHORT rsv:1;
426 USHORT OBSS_NonHTExist:1;
427 USHORT rsv2:11;
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700428} ADD_HTINFO2, *PADD_HTINFO2;
429
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700430// TODO: Need sync with spec about the definition of StbcMcs. In Draft 3.03, it's reserved.
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800431typedef struct PACKED {
432 USHORT StbcMcs:6;
433 USHORT DualBeacon:1;
434 USHORT DualCTSProtect:1;
435 USHORT STBCBeacon:1;
436 USHORT LsigTxopProt:1; // L-SIG TXOP protection full support
437 USHORT PcoActive:1;
438 USHORT PcoPhase:1;
439 USHORT rsv:4;
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700440} ADD_HTINFO3, *PADD_HTINFO3;
441
442#define SIZE_ADD_HT_INFO_IE 22
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800443typedef struct PACKED {
444 UCHAR ControlChan;
445 ADD_HTINFO AddHtInfo;
446 ADD_HTINFO2 AddHtInfo2;
447 ADD_HTINFO3 AddHtInfo3;
448 UCHAR MCSSet[16]; // Basic MCS set
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700449} ADD_HT_INFO_IE, *PADD_HT_INFO_IE;
450
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800451typedef struct PACKED {
452 UCHAR NewExtChanOffset;
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700453} NEW_EXT_CHAN_IE, *PNEW_EXT_CHAN_IE;
454
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700455typedef struct PACKED _FRAME_802_11 {
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800456 HEADER_802_11 Hdr;
457 UCHAR Octet[1];
458} FRAME_802_11, *PFRAME_802_11;
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700459
460// QoSNull embedding of management action. When HT Control MA field set to 1.
461typedef struct PACKED _MA_BODY {
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800462 UCHAR Category;
463 UCHAR Action;
464 UCHAR Octet[1];
465} MA_BODY, *PMA_BODY;
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700466
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800467typedef struct PACKED _HEADER_802_3 {
468 UCHAR DAAddr1[MAC_ADDR_LEN];
469 UCHAR SAAddr2[MAC_ADDR_LEN];
470 UCHAR Octet[2];
471} HEADER_802_3, *PHEADER_802_3;
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700472////Block ACK related format
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800473// 2-byte BA Parameter field in DELBA frames to terminate an already set up bA
474typedef struct PACKED {
475 USHORT Rsv:11; // always set to 0
476 USHORT Initiator:1; // 1: originator 0:recipient
477 USHORT TID:4; // value of TC os TS
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700478} DELBA_PARM, *PDELBA_PARM;
479
480// 2-byte BA Parameter Set field in ADDBA frames to signal parm for setting up a BA
481typedef struct PACKED {
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800482 USHORT AMSDUSupported:1; // 0: not permitted 1: permitted
483 USHORT BAPolicy:1; // 1: immediately BA 0:delayed BA
484 USHORT TID:4; // value of TC os TS
485 USHORT BufSize:10; // number of buffe of size 2304 octetsr
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700486} BA_PARM, *PBA_PARM;
487
488// 2-byte BA Starting Seq CONTROL field
489typedef union PACKED {
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800490 struct PACKED {
491 USHORT FragNum:4; // always set to 0
492 USHORT StartSeq:12; // sequence number of the 1st MSDU for which this BAR is sent
493 } field;
494 USHORT word;
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700495} BASEQ_CONTROL, *PBASEQ_CONTROL;
496
497//BAControl and BARControl are the same
498// 2-byte BA CONTROL field in BA frame
499typedef struct PACKED {
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800500 USHORT ACKPolicy:1; // only related to N-Delayed BA. But not support in RT2860b. 0:NormalACK 1:No ACK
501 USHORT MTID:1; //EWC V1.24
502 USHORT Compressed:1;
503 USHORT Rsv:9;
504 USHORT TID:4;
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700505} BA_CONTROL, *PBA_CONTROL;
506
507// 2-byte BAR CONTROL field in BAR frame
508typedef struct PACKED {
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800509 USHORT ACKPolicy:1; // 0:normal ack, 1:no ack.
510 USHORT MTID:1; //if this bit1, use FRAME_MTBA_REQ, if 0, use FRAME_BA_REQ
511 USHORT Compressed:1;
512 USHORT Rsv1:9;
513 USHORT TID:4;
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700514} BAR_CONTROL, *PBAR_CONTROL;
515
516// BARControl in MTBAR frame
517typedef struct PACKED {
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800518 USHORT ACKPolicy:1;
519 USHORT MTID:1;
520 USHORT Compressed:1;
521 USHORT Rsv1:9;
522 USHORT NumTID:4;
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700523} MTBAR_CONTROL, *PMTBAR_CONTROL;
524
525typedef struct PACKED {
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800526 USHORT Rsv1:12;
527 USHORT TID:4;
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700528} PER_TID_INFO, *PPER_TID_INFO;
529
530typedef struct {
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800531 PER_TID_INFO PerTID;
532 BASEQ_CONTROL BAStartingSeq;
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700533} EACH_TID, *PEACH_TID;
534
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700535// BAREQ AND MTBAREQ have the same subtype BAR, 802.11n BAR use compressed bitmap.
536typedef struct PACKED _FRAME_BA_REQ {
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800537 FRAME_CONTROL FC;
538 USHORT Duration;
539 UCHAR Addr1[MAC_ADDR_LEN];
540 UCHAR Addr2[MAC_ADDR_LEN];
541 BAR_CONTROL BARControl;
542 BASEQ_CONTROL BAStartingSeq;
543} FRAME_BA_REQ, *PFRAME_BA_REQ;
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700544
545typedef struct PACKED _FRAME_MTBA_REQ {
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800546 FRAME_CONTROL FC;
547 USHORT Duration;
548 UCHAR Addr1[MAC_ADDR_LEN];
549 UCHAR Addr2[MAC_ADDR_LEN];
550 MTBAR_CONTROL MTBARControl;
551 PER_TID_INFO PerTIDInfo;
552 BASEQ_CONTROL BAStartingSeq;
553} FRAME_MTBA_REQ, *PFRAME_MTBA_REQ;
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700554
555// Compressed format is mandantory in HT STA
556typedef struct PACKED _FRAME_MTBA {
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800557 FRAME_CONTROL FC;
558 USHORT Duration;
559 UCHAR Addr1[MAC_ADDR_LEN];
560 UCHAR Addr2[MAC_ADDR_LEN];
561 BA_CONTROL BAControl;
562 BASEQ_CONTROL BAStartingSeq;
563 UCHAR BitMap[8];
564} FRAME_MTBA, *PFRAME_MTBA;
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700565
566typedef struct PACKED _FRAME_PSMP_ACTION {
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800567 HEADER_802_11 Hdr;
568 UCHAR Category;
569 UCHAR Action;
570 UCHAR Psmp; // 7.3.1.25
571} FRAME_PSMP_ACTION, *PFRAME_PSMP_ACTION;
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700572
573typedef struct PACKED _FRAME_ACTION_HDR {
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800574 HEADER_802_11 Hdr;
575 UCHAR Category;
576 UCHAR Action;
577} FRAME_ACTION_HDR, *PFRAME_ACTION_HDR;
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700578
579//Action Frame
580//Action Frame Category:Spectrum, Action:Channel Switch. 7.3.2.20
581typedef struct PACKED _CHAN_SWITCH_ANNOUNCE {
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800582 UCHAR ElementID; // ID = IE_CHANNEL_SWITCH_ANNOUNCEMENT = 37
583 UCHAR Len;
584 CHA_SWITCH_ANNOUNCE_IE CSAnnounceIe;
585} CHAN_SWITCH_ANNOUNCE, *PCHAN_SWITCH_ANNOUNCE;
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700586
587//802.11n : 7.3.2.20a
588typedef struct PACKED _SECOND_CHAN_OFFSET {
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800589 UCHAR ElementID; // ID = IE_SECONDARY_CH_OFFSET = 62
590 UCHAR Len;
591 SEC_CHA_OFFSET_IE SecChOffsetIe;
592} SECOND_CHAN_OFFSET, *PSECOND_CHAN_OFFSET;
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700593
594typedef struct PACKED _FRAME_SPETRUM_CS {
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800595 HEADER_802_11 Hdr;
596 UCHAR Category;
597 UCHAR Action;
598 CHAN_SWITCH_ANNOUNCE CSAnnounce;
599 SECOND_CHAN_OFFSET SecondChannel;
600} FRAME_SPETRUM_CS, *PFRAME_SPETRUM_CS;
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700601
602typedef struct PACKED _FRAME_ADDBA_REQ {
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800603 HEADER_802_11 Hdr;
604 UCHAR Category;
605 UCHAR Action;
606 UCHAR Token; // 1
607 BA_PARM BaParm; // 2 - 10
608 USHORT TimeOutValue; // 0 - 0
609 BASEQ_CONTROL BaStartSeq; // 0-0
610} FRAME_ADDBA_REQ, *PFRAME_ADDBA_REQ;
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700611
612typedef struct PACKED _FRAME_ADDBA_RSP {
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800613 HEADER_802_11 Hdr;
614 UCHAR Category;
615 UCHAR Action;
616 UCHAR Token;
617 USHORT StatusCode;
618 BA_PARM BaParm; //0 - 2
619 USHORT TimeOutValue;
620} FRAME_ADDBA_RSP, *PFRAME_ADDBA_RSP;
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700621
622typedef struct PACKED _FRAME_DELBA_REQ {
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800623 HEADER_802_11 Hdr;
624 UCHAR Category;
625 UCHAR Action;
626 DELBA_PARM DelbaParm;
627 USHORT ReasonCode;
628} FRAME_DELBA_REQ, *PFRAME_DELBA_REQ;
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700629
630//7.2.1.7
631typedef struct PACKED _FRAME_BAR {
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800632 FRAME_CONTROL FC;
633 USHORT Duration;
634 UCHAR Addr1[MAC_ADDR_LEN];
635 UCHAR Addr2[MAC_ADDR_LEN];
636 BAR_CONTROL BarControl;
637 BASEQ_CONTROL StartingSeq;
638} FRAME_BAR, *PFRAME_BAR;
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700639
640//7.2.1.7
641typedef struct PACKED _FRAME_BA {
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800642 FRAME_CONTROL FC;
643 USHORT Duration;
644 UCHAR Addr1[MAC_ADDR_LEN];
645 UCHAR Addr2[MAC_ADDR_LEN];
646 BAR_CONTROL BarControl;
647 BASEQ_CONTROL StartingSeq;
648 UCHAR bitmask[8];
649} FRAME_BA, *PFRAME_BA;
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700650
651// Radio Measuement Request Frame Format
652typedef struct PACKED _FRAME_RM_REQ_ACTION {
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800653 HEADER_802_11 Hdr;
654 UCHAR Category;
655 UCHAR Action;
656 UCHAR Token;
657 USHORT Repetition;
658 UCHAR data[0];
659} FRAME_RM_REQ_ACTION, *PFRAME_RM_REQ_ACTION;
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700660
661typedef struct PACKED {
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800662 UCHAR ID;
663 UCHAR Length;
664 UCHAR ChannelSwitchMode;
665 UCHAR NewRegClass;
666 UCHAR NewChannelNum;
667 UCHAR ChannelSwitchCount;
668} HT_EXT_CHANNEL_SWITCH_ANNOUNCEMENT_IE,
669 *PHT_EXT_CHANNEL_SWITCH_ANNOUNCEMENT_IE;
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700670
671//
672// _Limit must be the 2**n - 1
673// _SEQ1 , _SEQ2 must be within 0 ~ _Limit
674//
675#define SEQ_STEPONE(_SEQ1, _SEQ2, _Limit) ((_SEQ1 == ((_SEQ2+1) & _Limit)))
676#define SEQ_SMALLER(_SEQ1, _SEQ2, _Limit) (((_SEQ1-_SEQ2) & ((_Limit+1)>>1)))
677#define SEQ_LARGER(_SEQ1, _SEQ2, _Limit) ((_SEQ1 != _SEQ2) && !(((_SEQ1-_SEQ2) & ((_Limit+1)>>1))))
678#define SEQ_WITHIN_WIN(_SEQ1, _SEQ2, _WIN, _Limit) (SEQ_LARGER(_SEQ1, _SEQ2, _Limit) && \
679 SEQ_SMALLER(_SEQ1, ((_SEQ2+_WIN+1)&_Limit), _Limit))
680
681//
682// Contention-free parameter (without ID and Length)
683//
684typedef struct PACKED {
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800685 BOOLEAN bValid; // 1: variable contains valid value
686 UCHAR CfpCount;
687 UCHAR CfpPeriod;
688 USHORT CfpMaxDuration;
689 USHORT CfpDurRemaining;
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700690} CF_PARM, *PCF_PARM;
691
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800692typedef struct _CIPHER_SUITE {
693 NDIS_802_11_ENCRYPTION_STATUS PairCipher; // Unicast cipher 1, this one has more secured cipher suite
694 NDIS_802_11_ENCRYPTION_STATUS PairCipherAux; // Unicast cipher 2 if AP announce two unicast cipher suite
695 NDIS_802_11_ENCRYPTION_STATUS GroupCipher; // Group cipher
696 USHORT RsnCapability; // RSN capability from beacon
697 BOOLEAN bMixMode; // Indicate Pair & Group cipher might be different
698} CIPHER_SUITE, *PCIPHER_SUITE;
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700699
700// EDCA configuration from AP's BEACON/ProbeRsp
701typedef struct {
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800702 BOOLEAN bValid; // 1: variable contains valid value
703 BOOLEAN bAdd; // 1: variable contains valid value
704 BOOLEAN bQAck;
705 BOOLEAN bQueueRequest;
706 BOOLEAN bTxopRequest;
707 BOOLEAN bAPSDCapable;
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700708// BOOLEAN bMoreDataAck;
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800709 UCHAR EdcaUpdateCount;
710 UCHAR Aifsn[4]; // 0:AC_BK, 1:AC_BE, 2:AC_VI, 3:AC_VO
711 UCHAR Cwmin[4];
712 UCHAR Cwmax[4];
713 USHORT Txop[4]; // in unit of 32-us
714 BOOLEAN bACM[4]; // 1: Admission Control of AC_BK is mandattory
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700715} EDCA_PARM, *PEDCA_PARM;
716
717// QBSS LOAD information from QAP's BEACON/ProbeRsp
718typedef struct {
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800719 BOOLEAN bValid; // 1: variable contains valid value
720 USHORT StaNum;
721 UCHAR ChannelUtilization;
722 USHORT RemainingAdmissionControl; // in unit of 32-us
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700723} QBSS_LOAD_PARM, *PQBSS_LOAD_PARM;
724
725// QBSS Info field in QSTA's assoc req
726typedef struct PACKED {
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800727 UCHAR UAPSD_AC_VO:1;
728 UCHAR UAPSD_AC_VI:1;
729 UCHAR UAPSD_AC_BK:1;
730 UCHAR UAPSD_AC_BE:1;
731 UCHAR Rsv1:1;
732 UCHAR MaxSPLength:2;
733 UCHAR Rsv2:1;
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700734} QBSS_STA_INFO_PARM, *PQBSS_STA_INFO_PARM;
735
736// QBSS Info field in QAP's Beacon/ProbeRsp
737typedef struct PACKED {
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800738 UCHAR ParamSetCount:4;
739 UCHAR Rsv:3;
740 UCHAR UAPSD:1;
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700741} QBSS_AP_INFO_PARM, *PQBSS_AP_INFO_PARM;
742
743// QOS Capability reported in QAP's BEACON/ProbeRsp
744// QOS Capability sent out in QSTA's AssociateReq/ReAssociateReq
745typedef struct {
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800746 BOOLEAN bValid; // 1: variable contains valid value
747 BOOLEAN bQAck;
748 BOOLEAN bQueueRequest;
749 BOOLEAN bTxopRequest;
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700750// BOOLEAN bMoreDataAck;
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800751 UCHAR EdcaUpdateCount;
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700752} QOS_CAPABILITY_PARM, *PQOS_CAPABILITY_PARM;
753
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700754typedef struct {
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800755 UCHAR IELen;
756 UCHAR IE[MAX_CUSTOM_LEN];
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700757} WPA_IE_;
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700758
759typedef struct {
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800760 UCHAR Bssid[MAC_ADDR_LEN];
761 UCHAR Channel;
762 UCHAR CentralChannel; //Store the wide-band central channel for 40MHz. .used in 40MHz AP. Or this is the same as Channel.
763 UCHAR BssType;
764 USHORT AtimWin;
765 USHORT BeaconPeriod;
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700766
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800767 UCHAR SupRate[MAX_LEN_OF_SUPPORTED_RATES];
768 UCHAR SupRateLen;
769 UCHAR ExtRate[MAX_LEN_OF_SUPPORTED_RATES];
770 UCHAR ExtRateLen;
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700771 HT_CAPABILITY_IE HtCapability;
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800772 UCHAR HtCapabilityLen;
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700773 ADD_HT_INFO_IE AddHtInfo; // AP might use this additional ht info IE
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800774 UCHAR AddHtInfoLen;
775 UCHAR NewExtChanOffset;
776 CHAR Rssi;
777 UCHAR Privacy; // Indicate security function ON/OFF. Don't mess up with auth mode.
778 UCHAR Hidden;
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700779
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800780 USHORT DtimPeriod;
781 USHORT CapabilityInfo;
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700782
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800783 USHORT CfpCount;
784 USHORT CfpPeriod;
785 USHORT CfpMaxDuration;
786 USHORT CfpDurRemaining;
787 UCHAR SsidLen;
788 CHAR Ssid[MAX_LEN_OF_SSID];
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700789
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800790 ULONG LastBeaconRxTime; // OS's timestamp
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700791
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800792 BOOLEAN bSES;
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700793
794 // New for WPA2
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800795 CIPHER_SUITE WPA; // AP announced WPA cipher suite
796 CIPHER_SUITE WPA2; // AP announced WPA2 cipher suite
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700797
798 // New for microsoft WPA support
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800799 NDIS_802_11_FIXED_IEs FixIEs;
800 NDIS_802_11_AUTHENTICATION_MODE AuthModeAux; // Addition mode for WPA2 / WPA capable AP
801 NDIS_802_11_AUTHENTICATION_MODE AuthMode;
802 NDIS_802_11_WEP_STATUS WepStatus; // Unicast Encryption Algorithm extract from VAR_IE
803 USHORT VarIELen; // Length of next VIE include EID & Length
804 UCHAR VarIEs[MAX_VIE_LEN];
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700805
806 // CCX Ckip information
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800807 UCHAR CkipFlag;
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700808
809 // CCX 2 TSF
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800810 UCHAR PTSF[4]; // Parent TSF
811 UCHAR TTSF[8]; // Target TSF
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700812
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800813 // 802.11e d9, and WMM
814 EDCA_PARM EdcaParm;
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700815 QOS_CAPABILITY_PARM QosCapability;
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800816 QBSS_LOAD_PARM QbssLoad;
817 WPA_IE_ WpaIE;
818 WPA_IE_ RsnIE;
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700819} BSS_ENTRY, *PBSS_ENTRY;
820
821typedef struct {
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800822 UCHAR BssNr;
823 UCHAR BssOverlapNr;
824 BSS_ENTRY BssEntry[MAX_LEN_OF_BSS_TABLE];
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700825} BSS_TABLE, *PBSS_TABLE;
826
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700827typedef struct _MLME_QUEUE_ELEM {
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800828 ULONG Machine;
829 ULONG MsgType;
830 ULONG MsgLen;
831 UCHAR Msg[MGMT_DMA_BUFFER_SIZE];
832 LARGE_INTEGER TimeStamp;
833 UCHAR Rssi0;
834 UCHAR Rssi1;
835 UCHAR Rssi2;
836 UCHAR Signal;
837 UCHAR Channel;
838 UCHAR Wcid;
839 BOOLEAN Occupied;
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700840} MLME_QUEUE_ELEM, *PMLME_QUEUE_ELEM;
841
842typedef struct _MLME_QUEUE {
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800843 ULONG Num;
844 ULONG Head;
845 ULONG Tail;
846 NDIS_SPIN_LOCK Lock;
847 MLME_QUEUE_ELEM Entry[MAX_LEN_OF_MLME_QUEUE];
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700848} MLME_QUEUE, *PMLME_QUEUE;
849
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800850typedef VOID(*STATE_MACHINE_FUNC) (VOID * Adaptor, MLME_QUEUE_ELEM * Elem);
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700851
852typedef struct _STATE_MACHINE {
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800853 ULONG Base;
854 ULONG NrState;
855 ULONG NrMsg;
856 ULONG CurrState;
857 STATE_MACHINE_FUNC *TransFunc;
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700858} STATE_MACHINE, *PSTATE_MACHINE;
859
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700860// MLME AUX data structure that hold temporarliy settings during a connection attempt.
861// Once this attemp succeeds, all settings will be copy to pAd->StaActive.
862// A connection attempt (user set OID, roaming, CCX fast roaming,..) consists of
863// several steps (JOIN, AUTH, ASSOC or REASSOC) and may fail at any step. We purposely
864// separate this under-trial settings away from pAd->StaActive so that once
865// this new attempt failed, driver can auto-recover back to the active settings.
866typedef struct _MLME_AUX {
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800867 UCHAR BssType;
868 UCHAR Ssid[MAX_LEN_OF_SSID];
869 UCHAR SsidLen;
870 UCHAR Bssid[MAC_ADDR_LEN];
871 UCHAR AutoReconnectSsid[MAX_LEN_OF_SSID];
872 UCHAR AutoReconnectSsidLen;
873 USHORT Alg;
874 UCHAR ScanType;
875 UCHAR Channel;
876 UCHAR CentralChannel;
877 USHORT Aid;
878 USHORT CapabilityInfo;
879 USHORT BeaconPeriod;
880 USHORT CfpMaxDuration;
881 USHORT CfpPeriod;
882 USHORT AtimWin;
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700883
884 // Copy supported rate from desired AP's beacon. We are trying to match
885 // AP's supported and extended rate settings.
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800886 UCHAR SupRate[MAX_LEN_OF_SUPPORTED_RATES];
887 UCHAR ExtRate[MAX_LEN_OF_SUPPORTED_RATES];
888 UCHAR SupRateLen;
889 UCHAR ExtRateLen;
890 HT_CAPABILITY_IE HtCapability;
891 UCHAR HtCapabilityLen;
892 ADD_HT_INFO_IE AddHtInfo; // AP might use this additional ht info IE
893 UCHAR NewExtChannelOffset;
894 //RT_HT_CAPABILITY SupportedHtPhy;
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700895
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800896 // new for QOS
897 QOS_CAPABILITY_PARM APQosCapability; // QOS capability of the current associated AP
898 EDCA_PARM APEdcaParm; // EDCA parameters of the current associated AP
899 QBSS_LOAD_PARM APQbssLoad; // QBSS load of the current associated AP
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700900
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800901 // new to keep Ralink specific feature
902 ULONG APRalinkIe;
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700903
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800904 BSS_TABLE SsidBssTab; // AP list for the same SSID
905 BSS_TABLE RoamTab; // AP list eligible for roaming
906 ULONG BssIdx;
907 ULONG RoamIdx;
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700908
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800909 BOOLEAN CurrReqIsFromNdis;
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700910
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800911 RALINK_TIMER_STRUCT BeaconTimer, ScanTimer;
912 RALINK_TIMER_STRUCT AuthTimer;
913 RALINK_TIMER_STRUCT AssocTimer, ReassocTimer, DisassocTimer;
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700914} MLME_AUX, *PMLME_AUX;
915
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800916typedef struct _MLME_ADDBA_REQ_STRUCT {
917 UCHAR Wcid; //
918 UCHAR pAddr[MAC_ADDR_LEN];
919 UCHAR BaBufSize;
920 USHORT TimeOutValue;
921 UCHAR TID;
922 UCHAR Token;
923 USHORT BaStartSeq;
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700924} MLME_ADDBA_REQ_STRUCT, *PMLME_ADDBA_REQ_STRUCT;
925
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800926typedef struct _MLME_DELBA_REQ_STRUCT {
927 UCHAR Wcid; //
928 UCHAR Addr[MAC_ADDR_LEN];
929 UCHAR TID;
930 UCHAR Initiator;
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700931} MLME_DELBA_REQ_STRUCT, *PMLME_DELBA_REQ_STRUCT;
932
933// assoc struct is equal to reassoc
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800934typedef struct _MLME_ASSOC_REQ_STRUCT {
935 UCHAR Addr[MAC_ADDR_LEN];
936 USHORT CapabilityInfo;
937 USHORT ListenIntv;
938 ULONG Timeout;
939} MLME_ASSOC_REQ_STRUCT, *PMLME_ASSOC_REQ_STRUCT, MLME_REASSOC_REQ_STRUCT,
940 *PMLME_REASSOC_REQ_STRUCT;
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700941
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800942typedef struct _MLME_DISASSOC_REQ_STRUCT {
943 UCHAR Addr[MAC_ADDR_LEN];
944 USHORT Reason;
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700945} MLME_DISASSOC_REQ_STRUCT, *PMLME_DISASSOC_REQ_STRUCT;
946
947typedef struct _MLME_AUTH_REQ_STRUCT {
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800948 UCHAR Addr[MAC_ADDR_LEN];
949 USHORT Alg;
950 ULONG Timeout;
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700951} MLME_AUTH_REQ_STRUCT, *PMLME_AUTH_REQ_STRUCT;
952
953typedef struct _MLME_DEAUTH_REQ_STRUCT {
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800954 UCHAR Addr[MAC_ADDR_LEN];
955 USHORT Reason;
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700956} MLME_DEAUTH_REQ_STRUCT, *PMLME_DEAUTH_REQ_STRUCT;
957
958typedef struct {
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800959 ULONG BssIdx;
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700960} MLME_JOIN_REQ_STRUCT;
961
962typedef struct _MLME_SCAN_REQ_STRUCT {
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800963 UCHAR Bssid[MAC_ADDR_LEN];
964 UCHAR BssType;
965 UCHAR ScanType;
966 UCHAR SsidLen;
967 CHAR Ssid[MAX_LEN_OF_SSID];
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700968} MLME_SCAN_REQ_STRUCT, *PMLME_SCAN_REQ_STRUCT;
969
970typedef struct _MLME_START_REQ_STRUCT {
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800971 CHAR Ssid[MAX_LEN_OF_SSID];
972 UCHAR SsidLen;
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700973} MLME_START_REQ_STRUCT, *PMLME_START_REQ_STRUCT;
974
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700975typedef struct PACKED {
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800976 UCHAR Eid;
977 UCHAR Len;
978 UCHAR Octet[1];
979} EID_STRUCT, *PEID_STRUCT, BEACON_EID_STRUCT, *PBEACON_EID_STRUCT;
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700980
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800981typedef struct PACKED _RTMP_TX_RATE_SWITCH {
982 UCHAR ItemNo;
983 UCHAR STBC:1;
984 UCHAR ShortGI:1;
985 UCHAR BW:1;
986 UCHAR Rsv1:1;
987 UCHAR Mode:2;
988 UCHAR Rsv2:2;
989 UCHAR CurrMCS;
990 UCHAR TrainUp;
991 UCHAR TrainDown;
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700992} RRTMP_TX_RATE_SWITCH, *PRTMP_TX_RATE_SWITCH;
993
994// ========================== AP mlme.h ===============================
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800995#define TBTT_PRELOAD_TIME 384 // usec. LomgPreamble + 24-byte at 1Mbps
Greg Kroah-Hartman91980992008-10-28 14:48:09 -0700996#define DEFAULT_DTIM_PERIOD 1
997
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -0800998#define MAC_TABLE_AGEOUT_TIME 300 // unit: sec
999#define MAC_TABLE_ASSOC_TIMEOUT 5 // unit: sec
Greg Kroah-Hartman91980992008-10-28 14:48:09 -07001000#define MAC_TABLE_FULL(Tab) ((Tab).size == MAX_LEN_OF_MAC_TABLE)
1001
1002// AP shall drop the sta if contine Tx fail count reach it.
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -08001003#define MAC_ENTRY_LIFE_CHECK_CNT 20 // packet cnt.
Greg Kroah-Hartman91980992008-10-28 14:48:09 -07001004
1005// Value domain of pMacEntry->Sst
1006typedef enum _Sst {
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -08001007 SST_NOT_AUTH, // 0: equivalent to IEEE 802.11/1999 state 1
1008 SST_AUTH, // 1: equivalent to IEEE 802.11/1999 state 2
1009 SST_ASSOC // 2: equivalent to IEEE 802.11/1999 state 3
Greg Kroah-Hartman91980992008-10-28 14:48:09 -07001010} SST;
1011
1012// value domain of pMacEntry->AuthState
1013typedef enum _AuthState {
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -08001014 AS_NOT_AUTH,
1015 AS_AUTH_OPEN, // STA has been authenticated using OPEN SYSTEM
1016 AS_AUTH_KEY, // STA has been authenticated using SHARED KEY
1017 AS_AUTHENTICATING // STA is waiting for AUTH seq#3 using SHARED KEY
Greg Kroah-Hartman91980992008-10-28 14:48:09 -07001018} AUTH_STATE;
1019
1020//for-wpa value domain of pMacEntry->WpaState 802.1i D3 p.114
1021typedef enum _ApWpaState {
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -08001022 AS_NOTUSE, // 0
1023 AS_DISCONNECT, // 1
1024 AS_DISCONNECTED, // 2
1025 AS_INITIALIZE, // 3
1026 AS_AUTHENTICATION, // 4
1027 AS_AUTHENTICATION2, // 5
1028 AS_INITPMK, // 6
1029 AS_INITPSK, // 7
1030 AS_PTKSTART, // 8
1031 AS_PTKINIT_NEGOTIATING, // 9
1032 AS_PTKINITDONE, // 10
1033 AS_UPDATEKEYS, // 11
1034 AS_INTEGRITY_FAILURE, // 12
1035 AS_KEYUPDATE, // 13
Greg Kroah-Hartman91980992008-10-28 14:48:09 -07001036} AP_WPA_STATE;
1037
1038// for-wpa value domain of pMacEntry->WpaState 802.1i D3 p.114
1039typedef enum _GTKState {
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -08001040 REKEY_NEGOTIATING,
1041 REKEY_ESTABLISHED,
1042 KEYERROR,
Greg Kroah-Hartman91980992008-10-28 14:48:09 -07001043} GTK_STATE;
1044
1045// for-wpa value domain of pMacEntry->WpaState 802.1i D3 p.114
1046typedef enum _WpaGTKState {
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -08001047 SETKEYS,
1048 SETKEYS_DONE,
Greg Kroah-Hartman91980992008-10-28 14:48:09 -07001049} WPA_GTK_STATE;
1050// ====================== end of AP mlme.h ============================
1051
Bartlomiej Zolnierkiewicz52b81c82009-12-11 12:23:14 -08001052#endif // MLME_H__