blob: 5ddb01c6320c6c93f276b520e430fb49522c02b1 [file] [log] [blame]
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001/*
2 * Copyright (c) 2011-2015 The Linux Foundation. All rights reserved.
3 *
4 * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
5 *
6 *
7 * Permission to use, copy, modify, and/or distribute this software for
8 * any purpose with or without fee is hereby granted, provided that the
9 * above copyright notice and this permission notice appear in all
10 * copies.
11 *
12 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
13 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
14 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
15 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
16 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
17 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
18 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
19 * PERFORMANCE OF THIS SOFTWARE.
20 */
21
22/*
23 * This file was originally distributed by Qualcomm Atheros, Inc.
24 * under proprietary terms before Copyright ownership was assigned
25 * to the Linux Foundation.
26 */
27
28/*
29 *
30 * This file lim_global.h contains the definitions exported by
31 * LIM module.
32 * Author: Chandra Modumudi
33 * Date: 02/11/02
34 * History:-
35 * Date Modified by Modification Information
36 * --------------------------------------------------------------------
37 *
38 */
39#ifndef __LIM_GLOBAL_H
40#define __LIM_GLOBAL_H
41
42#include "wni_api.h"
43#include "sir_api.h"
44#include "sir_mac_prot_def.h"
45#include "sir_mac_prop_exts.h"
46#include "sir_common.h"
47#include "sir_debug.h"
48#include "wni_cfg.h"
49#include "csr_api.h"
50#include "sap_api.h"
51#include "dot11f.h"
52#include "wma_if.h"
53
54/* / Maximum number of scan hash table entries */
55#define LIM_MAX_NUM_OF_SCAN_RESULTS 256
56
57/* Sending Disassociate frames threshold */
58#define LIM_SEND_DISASSOC_FRAME_THRESHOLD 2
59#define LIM_HASH_MISS_TIMER_MS 10000
60
61/* Deferred Message Queue Length */
62#define MAX_DEFERRED_QUEUE_LEN 80
63
64/* Maximum number of PS - TIM's to be sent with out wakeup from STA */
65#define LIM_TIM_WAIT_COUNT_FACTOR 5
66
67/*
68 * Use this count if (LIM_TIM_WAIT_FACTOR * ListenInterval)
69 * is less than LIM_MIN_TIM_WAIT_CNT
70 */
71#define LIM_MIN_TIM_WAIT_COUNT 50
72
73#define GET_TIM_WAIT_COUNT(LIntrvl) \
74 ((LIntrvl * LIM_TIM_WAIT_COUNT_FACTOR) > LIM_MIN_TIM_WAIT_COUNT ? \
75 (LIntrvl * LIM_TIM_WAIT_COUNT_FACTOR) : LIM_MIN_TIM_WAIT_COUNT)
76
77#define IS_5G_BAND(__rfBand) ((__rfBand & 0x3) == 0x2)
78#define IS_24G_BAND(__rfBand) ((__rfBand & 0x3) == 0x1)
79
80#define LIM_MAX_CSA_IE_UPDATES (5)
81
82/* enums exported by LIM are as follows */
83
84/*System role definition */
85typedef enum eLimSystemRole {
86 eLIM_UNKNOWN_ROLE,
87 eLIM_AP_ROLE,
88 eLIM_STA_IN_IBSS_ROLE,
89 eLIM_STA_ROLE,
90 eLIM_BT_AMP_STA_ROLE,
91 eLIM_BT_AMP_AP_ROLE,
92 eLIM_P2P_DEVICE_ROLE,
93 eLIM_P2P_DEVICE_GO,
94 eLIM_P2P_DEVICE_CLIENT
95} tLimSystemRole;
96
97/*
98 * SME state definition accessible across all Sirius modules.
99 * AP only states are LIM_SME_CHANNEL_SCAN_STATE &
100 * LIM_SME_NORMAL_CHANNEL_SCAN_STATE.
101 * Note that these states may also be present in STA
102 * side too when DFS support is present for a STA in IBSS mode.
103 */
104typedef enum eLimSmeStates {
105 eLIM_SME_OFFLINE_STATE,
106 eLIM_SME_IDLE_STATE,
107 eLIM_SME_SUSPEND_STATE,
108 eLIM_SME_WT_SCAN_STATE,
109 eLIM_SME_WT_JOIN_STATE,
110 eLIM_SME_WT_AUTH_STATE,
111 eLIM_SME_WT_ASSOC_STATE,
112 eLIM_SME_WT_REASSOC_STATE,
113 eLIM_SME_WT_REASSOC_LINK_FAIL_STATE,
114 eLIM_SME_JOIN_FAILURE_STATE,
115 eLIM_SME_ASSOCIATED_STATE,
116 eLIM_SME_REASSOCIATED_STATE,
117 eLIM_SME_LINK_EST_STATE,
118 eLIM_SME_LINK_EST_WT_SCAN_STATE,
119 eLIM_SME_WT_PRE_AUTH_STATE,
120 eLIM_SME_WT_DISASSOC_STATE,
121 eLIM_SME_WT_DEAUTH_STATE,
122 eLIM_SME_WT_START_BSS_STATE,
123 eLIM_SME_WT_STOP_BSS_STATE,
124 eLIM_SME_NORMAL_STATE,
125 eLIM_SME_CHANNEL_SCAN_STATE,
126 eLIM_SME_NORMAL_CHANNEL_SCAN_STATE
127} tLimSmeStates;
128
129/*
130 * MLM state definition.
131 * While these states are present on AP too when it is
132 * STA mode, per-STA MLM state exclusive to AP is:
133 * eLIM_MLM_WT_AUTH_FRAME3.
134 */
135typedef enum eLimMlmStates {
136 eLIM_MLM_OFFLINE_STATE,
137 eLIM_MLM_IDLE_STATE,
138 eLIM_MLM_WT_PROBE_RESP_STATE,
139 eLIM_MLM_PASSIVE_SCAN_STATE,
140 eLIM_MLM_WT_JOIN_BEACON_STATE,
141 eLIM_MLM_JOINED_STATE,
142 eLIM_MLM_BSS_STARTED_STATE,
143 eLIM_MLM_WT_AUTH_FRAME2_STATE,
144 eLIM_MLM_WT_AUTH_FRAME3_STATE,
145 eLIM_MLM_WT_AUTH_FRAME4_STATE,
146 eLIM_MLM_AUTH_RSP_TIMEOUT_STATE,
147 eLIM_MLM_AUTHENTICATED_STATE,
148 eLIM_MLM_WT_ASSOC_RSP_STATE,
149 eLIM_MLM_WT_REASSOC_RSP_STATE,
150 eLIM_MLM_ASSOCIATED_STATE,
151 eLIM_MLM_REASSOCIATED_STATE,
152 eLIM_MLM_LINK_ESTABLISHED_STATE,
153 eLIM_MLM_WT_ASSOC_CNF_STATE,
154 eLIM_MLM_LEARN_STATE,
155 eLIM_MLM_WT_ADD_BSS_RSP_STATE,
156 eLIM_MLM_WT_DEL_BSS_RSP_STATE,
157 eLIM_MLM_WT_ADD_BSS_RSP_ASSOC_STATE,
158 eLIM_MLM_WT_ADD_BSS_RSP_REASSOC_STATE,
159 eLIM_MLM_WT_ADD_BSS_RSP_PREASSOC_STATE,
160 eLIM_MLM_WT_ADD_STA_RSP_STATE,
161 eLIM_MLM_WT_DEL_STA_RSP_STATE,
162 /*
163 * MLM goes to this state when LIM initiates DELETE_STA
164 * as processing of Assoc req because the entry already exists.
165 * LIM comes out of this state when DELETE_STA response from
166 * HAL is received. LIM needs to maintain this state so that ADD_STA
167 * can be issued while processing DELETE_STA response from HAL.
168 */
169 eLIM_MLM_WT_ASSOC_DEL_STA_RSP_STATE,
170 eLIM_MLM_WT_SET_BSS_KEY_STATE,
171 eLIM_MLM_WT_SET_STA_KEY_STATE,
172 eLIM_MLM_WT_SET_STA_BCASTKEY_STATE,
173 eLIM_MLM_WT_SET_MIMOPS_STATE,
174#if defined WLAN_FEATURE_VOWIFI_11R
175 eLIM_MLM_WT_ADD_BSS_RSP_FT_REASSOC_STATE,
176 eLIM_MLM_WT_FT_REASSOC_RSP_STATE,
177#endif
178 eLIM_MLM_P2P_LISTEN_STATE,
179} tLimMlmStates;
180
181/* 11h channel quiet states */
182
183/*
184 * This enum indicates in which state the device is in
185 * when it receives quiet element in beacon or probe-response.
186 * The default quiet state of the device is always INIT
187 * eLIM_QUIET_BEGIN - When Quiet period is started
188 * eLIM_QUIET_CHANGED - When Quiet period is updated
189 * eLIM_QUIET_RUNNING - Between two successive Quiet updates
190 * eLIM_QUIET_END - When quiet period ends
191 */
192typedef enum eLimQuietStates {
193 eLIM_QUIET_INIT,
194 eLIM_QUIET_BEGIN,
195 eLIM_QUIET_CHANGED,
196 eLIM_QUIET_RUNNING,
197 eLIM_QUIET_END
198} tLimQuietStates;
199
200/* 11h channel switch states */
201
202/*
203 * This enum indicates in which state the channel-swith
204 * is presently operating.
205 * eLIM_11H_CHANSW_INIT - Default state
206 * eLIM_11H_CHANSW_RUNNING - When channel switch is running
207 * eLIM_11H_CHANSW_END - After channel switch is complete
208 */
209typedef enum eLimDot11hChanSwStates {
210 eLIM_11H_CHANSW_INIT,
211 eLIM_11H_CHANSW_RUNNING,
212 eLIM_11H_CHANSW_END
213} tLimDot11hChanSwStates;
214
215
216/* WLAN_SUSPEND_LINK Related */
217typedef void (*SUSPEND_RESUME_LINK_CALLBACK)(tpAniSirGlobal pMac,
218 CDF_STATUS status,
219 uint32_t *data);
220
221/* LIM to HAL SCAN Management Message Interface states */
222typedef enum eLimHalScanState {
223 eLIM_HAL_IDLE_SCAN_STATE,
224 eLIM_HAL_INIT_SCAN_WAIT_STATE,
225 eLIM_HAL_START_SCAN_WAIT_STATE,
226 eLIM_HAL_END_SCAN_WAIT_STATE,
227 eLIM_HAL_FINISH_SCAN_WAIT_STATE,
228 eLIM_HAL_INIT_LEARN_WAIT_STATE,
229 eLIM_HAL_START_LEARN_WAIT_STATE,
230 eLIM_HAL_END_LEARN_WAIT_STATE,
231 eLIM_HAL_FINISH_LEARN_WAIT_STATE,
232 eLIM_HAL_SCANNING_STATE,
233/* WLAN_SUSPEND_LINK Related */
234 eLIM_HAL_SUSPEND_LINK_WAIT_STATE,
235 eLIM_HAL_SUSPEND_LINK_STATE,
236 eLIM_HAL_RESUME_LINK_WAIT_STATE,
237/* end WLAN_SUSPEND_LINK Related */
238} tLimLimHalScanState;
239
240/* MLM Req/Cnf structure definitions */
241typedef struct sLimMlmAuthReq {
242 tSirMacAddr peerMacAddr;
243 tAniAuthType authType;
244 uint32_t authFailureTimeout;
245 uint8_t sessionId;
246} tLimMlmAuthReq, *tpLimMlmAuthReq;
247
248typedef struct sLimMlmJoinReq {
249 uint32_t joinFailureTimeout;
250 tSirMacRateSet operationalRateSet;
251 uint8_t sessionId;
252 tSirBssDescription bssDescription;
253} tLimMlmJoinReq, *tpLimMlmJoinReq;
254
255typedef struct sLimMlmScanReq {
256 tSirBssType bssType;
257 tSirMacAddr bssId;
258 tSirMacSSid ssId[SIR_SCAN_MAX_NUM_SSID];
259 tSirScanType scanType;
260 uint32_t minChannelTime;
261 uint32_t maxChannelTime;
262 uint32_t dot11mode;
263 /* Number of SSIDs to scan(send Probe request) */
264 uint8_t numSsid;
265
266 bool p2pSearch;
267 uint16_t uIEFieldLen;
268 uint16_t uIEFieldOffset;
269
270 uint8_t sessionId;
271 /* channelList MUST be the last field of this structure */
272 tSirChannelList channelList;
273 /*-----------------------------
274 tLimMlmScanReq....
275 -----------------------------
276 uIEFiledLen
277 -----------------------------
278 uIEFiledOffset ----+
279 ----------------------------- |
280 channelList.numChannels |
281 ----------------------------- |
282 ... variable size up to |
283 channelNumber[numChannels-1] |
284 This can be zero, if |
285 numChannel is zero. |
286 ----------------------------- <--+
287 ... variable size uIEFiled
288 up to uIEFieldLen (can be 0)
289 -----------------------------*/
290} tLimMlmScanReq, *tpLimMlmScanReq;
291
292typedef struct tLimScanResultNode tLimScanResultNode;
293struct tLimScanResultNode {
294 tLimScanResultNode *next;
295 tSirBssDescription bssDescription;
296};
297
298#ifdef FEATURE_OEM_DATA_SUPPORT
299
300#ifndef OEM_DATA_REQ_SIZE
301#define OEM_DATA_REQ_SIZE 280
302#endif
303#ifndef OEM_DATA_RSP_SIZE
304#define OEM_DATA_RSP_SIZE 1724
305#endif
306
307/* OEM Data related structure definitions */
308typedef struct sLimMlmOemDataReq {
309 tSirMacAddr selfMacAddr;
310 uint8_t oemDataReq[OEM_DATA_REQ_SIZE];
311} tLimMlmOemDataReq, *tpLimMlmOemDataReq;
312
313typedef struct sLimMlmOemDataRsp {
314 uint8_t oemDataRsp[OEM_DATA_RSP_SIZE];
315} tLimMlmOemDataRsp, *tpLimMlmOemDataRsp;
316#endif
317
318/* Pre-authentication structure definition */
319typedef struct tLimPreAuthNode {
320 struct tLimPreAuthNode *next;
321 tSirMacAddr peerMacAddr;
322 tAniAuthType authType;
323 tLimMlmStates mlmState;
324 uint8_t authNodeIdx;
325 uint8_t challengeText[SIR_MAC_AUTH_CHALLENGE_LENGTH];
326 uint8_t fTimerStarted:1;
327 uint8_t fSeen:1;
328 uint8_t fFree:1;
329 uint8_t rsvd:5;
330 TX_TIMER timer;
331 uint16_t seq_num;
332 v_TIME_t timestamp;
333} tLimPreAuthNode, *tpLimPreAuthNode;
334
335/* Pre-authentication table definition */
336typedef struct tLimPreAuthTable {
337 uint32_t numEntry;
338 tpLimPreAuthNode pTable;
339} tLimPreAuthTable, *tpLimPreAuthTable;
340
341/* / Per STA context structure definition */
342typedef struct sLimMlmStaContext {
343 tLimMlmStates mlmState;
344 tAniAuthType authType;
345 uint16_t listenInterval;
346 tSirMacCapabilityInfo capabilityInfo;
347 tSirMacPropRateSet propRateSet;
348 tSirMacReasonCodes disassocReason;
349 uint16_t cleanupTrigger;
350
351 tSirResultCodes resultCode;
352 uint16_t protStatusCode;
353
354 uint8_t subType:1; /* Indicates ASSOC (0) or REASSOC (1) */
355 uint8_t updateContext:1;
356 uint8_t schClean:1;
357 /* 802.11n HT Capability in Station: Enabled 1 or DIsabled 0 */
358 uint8_t htCapability:1;
359#ifdef WLAN_FEATURE_11AC
360 uint8_t vhtCapability:1;
361#endif
362} tLimMlmStaContext, *tpLimMlmStaContext;
363
364/* Structure definition to hold deferred messages queue parameters */
365typedef struct sLimDeferredMsgQParams {
366 tSirMsgQ deferredQueue[MAX_DEFERRED_QUEUE_LEN];
367 uint16_t size;
368 uint16_t read;
369 uint16_t write;
370} tLimDeferredMsgQParams, *tpLimDeferredMsgQParams;
371
372typedef struct sCfgProtection {
373 uint32_t overlapFromlla:1;
374 uint32_t overlapFromllb:1;
375 uint32_t overlapFromllg:1;
376 uint32_t overlapHt20:1;
377 uint32_t overlapNonGf:1;
378 uint32_t overlapLsigTxop:1;
379 uint32_t overlapRifs:1;
380 uint32_t overlapOBSS:1; /* added for obss */
381 uint32_t fromlla:1;
382 uint32_t fromllb:1;
383 uint32_t fromllg:1;
384 uint32_t ht20:1;
385 uint32_t nonGf:1;
386 uint32_t lsigTxop:1;
387 uint32_t rifs:1;
388 uint32_t obss:1; /* added for Obss */
389} tCfgProtection, *tpCfgProtection;
390
391typedef enum eLimProtStaCacheType {
392 eLIM_PROT_STA_CACHE_TYPE_INVALID,
393 eLIM_PROT_STA_CACHE_TYPE_llB,
394 eLIM_PROT_STA_CACHE_TYPE_llG,
395 eLIM_PROT_STA_CACHE_TYPE_HT20
396} tLimProtStaCacheType;
397
398typedef struct sCacheParams {
399 uint8_t active;
400 tSirMacAddr addr;
401 tLimProtStaCacheType protStaCacheType;
402
403} tCacheParams, *tpCacheParams;
404
405#define LIM_PROT_STA_OVERLAP_CACHE_SIZE HAL_NUM_ASSOC_STA
406#define LIM_PROT_STA_CACHE_SIZE HAL_NUM_ASSOC_STA
407
408typedef struct sLimProtStaParams {
409 uint8_t numSta;
410 uint8_t protectionEnabled;
411} tLimProtStaParams, *tpLimProtStaParams;
412
413typedef struct sLimNoShortParams {
414 uint8_t numNonShortPreambleSta;
415 tCacheParams staNoShortCache[LIM_PROT_STA_CACHE_SIZE];
416} tLimNoShortParams, *tpLimNoShortParams;
417
418typedef struct sLimNoShortSlotParams {
419 uint8_t numNonShortSlotSta;
420 tCacheParams staNoShortSlotCache[LIM_PROT_STA_CACHE_SIZE];
421} tLimNoShortSlotParams, *tpLimNoShortSlotParams;
422
423typedef struct tLimIbssPeerNode tLimIbssPeerNode;
424struct tLimIbssPeerNode {
425 tLimIbssPeerNode *next;
426 tSirMacAddr peerMacAddr;
427 uint8_t extendedRatesPresent:1;
428 uint8_t edcaPresent:1;
429 uint8_t wmeEdcaPresent:1;
430 uint8_t wmeInfoPresent:1;
431 uint8_t htCapable:1;
432 uint8_t vhtCapable:1;
433 uint8_t rsvd:2;
434 uint8_t htSecondaryChannelOffset;
435 tSirMacCapabilityInfo capabilityInfo;
436 tSirMacRateSet supportedRates;
437 tSirMacRateSet extendedRates;
438 uint8_t supportedMCSSet[SIZE_OF_SUPPORTED_MCS_SET];
439 tSirMacEdcaParamSetIE edcaParams;
440 uint8_t erpIePresent;
441
442 /* HT Capabilities of IBSS Peer */
443 uint8_t htGreenfield;
444 uint8_t htShortGI40Mhz;
445 uint8_t htShortGI20Mhz;
446
447 /* DSSS/CCK at 40 MHz: Enabled 1 or Disabled */
448 uint8_t htDsssCckRate40MHzSupport;
449
450 /* MIMO Power Save */
451 tSirMacHTMIMOPowerSaveState htMIMOPSState;
452
453 /* */
454 /* A-MPDU Density */
455 /* 000 - No restriction */
456 /* 001 - 1/8 usec */
457 /* 010 - 1/4 usec */
458 /* 011 - 1/2 usec */
459 /* 100 - 1 usec */
460 /* 101 - 2 usec */
461 /* 110 - 4 usec */
462 /* 111 - 8 usec */
463 /* */
464 uint8_t htAMpduDensity;
465
466 /* Maximum Rx A-MPDU factor */
467 uint8_t htMaxRxAMpduFactor;
468
469 /* Set to 0 for 3839 octets */
470 /* Set to 1 for 7935 octets */
471 uint8_t htMaxAmsduLength;
472
473 /* */
474 /* Recommended Tx Width Set */
475 /* 0 - use 20 MHz channel (control channel) */
476 /* 1 - use 40 Mhz channel */
477 /* */
478 uint8_t htSupportedChannelWidthSet;
479
480 uint8_t htLdpcCapable;
481
482 uint8_t beaconHBCount;
483 uint8_t heartbeatFailure;
484
485 uint8_t *beacon; /* Hold beacon to be sent to HDD/CSR */
486 uint16_t beaconLen;
487
488#ifdef WLAN_FEATURE_11AC
489 tDot11fIEVHTCaps VHTCaps;
490 uint8_t vhtSupportedChannelWidthSet;
491 uint8_t vhtBeamFormerCapable;
492#endif
493 /*
494 * Peer Atim Info
495 */
496 uint8_t atimIePresent;
497 uint32_t peerAtimWindowLength;
498};
499
500/* Enums used for channel switching. */
501typedef enum eLimChannelSwitchState {
502 eLIM_CHANNEL_SWITCH_IDLE,
503 eLIM_CHANNEL_SWITCH_PRIMARY_ONLY,
504 eLIM_CHANNEL_SWITCH_PRIMARY_AND_SECONDARY
505} tLimChannelSwitchState;
506
507/* Channel Switch Info */
508typedef struct sLimChannelSwitchInfo {
509 tLimChannelSwitchState state;
510 uint8_t primaryChannel;
511 uint8_t ch_center_freq_seg0;
512 uint8_t ch_center_freq_seg1;
513 phy_ch_width ch_width;
514 int8_t switchCount;
515 uint32_t switchTimeoutValue;
516 uint8_t switchMode;
517} tLimChannelSwitchInfo, *tpLimChannelSwitchInfo;
518
519#ifdef WLAN_FEATURE_11AC
520typedef struct sLimOperatingModeInfo {
521 uint8_t present;
522 uint8_t chanWidth:2;
523 uint8_t reserved:2;
524 uint8_t rxNSS:3;
525 uint8_t rxNSSType:1;
526} tLimOperatingModeInfo, *tpLimOperatingModeInfo;
527#endif
528
529typedef struct sLimWiderBWChannelSwitch {
530 uint8_t newChanWidth;
531 uint8_t newCenterChanFreq0;
532 uint8_t newCenterChanFreq1;
533} tLimWiderBWChannelSwitchInfo, *tpLimWiderBWChannelSwitchInfo;
534
535/* Enums used when stopping the Tx. */
536typedef enum eLimQuietTxMode {
537 /* Stop/resume transmission of all stations,Uses the global flag */
538 eLIM_TX_ALL = 0,
539 /*
540 * Stops/resumes the transmission of specific stations identified
541 * by staId.
542 */
543 eLIM_TX_STA,
544 /* Stops/resumes the transmission of all the packets in BSS */
545 eLIM_TX_BSS,
546 /*
547 * Stops/resumes the transmission of all packets except beacons in BSS
548 * This is used when radar is detected in the current operating channel.
549 * Beacon has to be sent to notify the stations associated about the
550 * scheduled channel switch
551 */
552 eLIM_TX_BSS_BUT_BEACON
553} tLimQuietTxMode;
554
555typedef enum eLimControlTx {
556 eLIM_RESUME_TX = 0,
557 eLIM_STOP_TX
558} tLimControlTx;
559
560/* -------------------------------------------------------------------- */
561
562typedef struct sLimTspecInfo {
563 /* 0==free, else used */
564 uint8_t inuse;
565 /* index in list */
566 uint8_t idx;
567 tSirMacAddr staAddr;
568 uint16_t assocId;
569 tSirMacTspecIE tspec;
570 /* number of Tclas elements */
571 uint8_t numTclas;
572 tSirTclasInfo tclasInfo[SIR_MAC_TCLASIE_MAXNUM];
573 uint8_t tclasProc;
574 /* tclassProc is valid only if this is set to 1. */
575 uint8_t tclasProcPresent:1;
576} cdf_packed tLimTspecInfo, *tpLimTspecInfo;
577
578typedef struct sLimAdmitPolicyInfo {
579 /* admit control policy type */
580 uint8_t type;
581 /* oversubscription factor : 0 means nothing is allowed */
582 uint8_t bw_factor;
583 /* valid only when 'type' is set BW_FACTOR */
584} tLimAdmitPolicyInfo, *tpLimAdmitPolicyInfo;
585
586typedef enum eLimWscEnrollState {
587 eLIM_WSC_ENROLL_NOOP,
588 eLIM_WSC_ENROLL_BEGIN,
589 eLIM_WSC_ENROLL_IN_PROGRESS,
590 eLIM_WSC_ENROLL_END
591} tLimWscEnrollState;
592
593#define WSC_PASSWD_ID_PUSH_BUTTON (0x0004)
594
595typedef struct sLimWscIeInfo {
596 bool apSetupLocked;
597 bool selectedRegistrar;
598 uint16_t selectedRegistrarConfigMethods;
599 tLimWscEnrollState wscEnrollmentState;
600 tLimWscEnrollState probeRespWscEnrollmentState;
601 uint8_t reqType;
602 uint8_t respType;
603} tLimWscIeInfo, *tpLimWscIeInfo;
604
605/* maximum number of tspec's supported */
606#define LIM_NUM_TSPEC_MAX 15
607
608/* structure to hold all 11h specific data */
609typedef struct sLimSpecMgmtInfo {
610 tLimQuietStates quietState;
611 uint32_t quietCount;
612 /* This is in units of system TICKS */
613 uint32_t quietDuration;
614 /* This is in units of TU, for over the air transmission */
615 uint32_t quietDuration_TU;
616 /* After this timeout, actual quiet starts */
617 uint32_t quietTimeoutValue;
618 /* Used on AP, if quiet is enabled during learning */
619 bool fQuietEnabled;
620 tLimDot11hChanSwStates dot11hChanSwState;
621 /* Radar detected in cur oper chan on AP */
622 bool fRadarDetCurOperChan;
623 /* Whether radar interrupt has been configured */
624 bool fRadarIntrConfigured;
625} tLimSpecMgmtInfo, *tpLimSpecMgmtInfo;
626
627#ifdef FEATURE_WLAN_TDLS
628/*
629 * Peer info needed for TDLS setup..
630 */
631typedef struct tLimTDLSPeerSta {
632 struct tLimTDLSPeerSta *next;
633 uint8_t dialog;
634 tSirMacAddr peerMac;
635 tSirMacCapabilityInfo capabilityInfo;
636 tSirMacRateSet supportedRates;
637 tSirMacRateSet extendedRates;
638 tSirMacQosCapabilityStaIE qosCaps;
639 tSirMacEdcaParamSetIE edcaParams;
640 uint8_t mcsSet[SIZE_OF_SUPPORTED_MCS_SET];
641 uint8_t tdls_bIsResponder;
642 /* HT Capabilties */
643 tDot11fIEHTCaps tdlsPeerHTCaps;
644 tDot11fIEExtCap tdlsPeerExtCaps;
645 uint8_t tdls_flags;
646 uint8_t tdls_link_state;
647 uint8_t tdls_prev_link_state;
648 uint8_t tdls_sessionId;
649 uint8_t ExtRatesPresent;
650 TX_TIMER gLimTdlsLinkSetupRspTimeoutTimer;
651 TX_TIMER gLimTdlsLinkSetupCnfTimeoutTimer;
652} tLimTdlsLinkSetupPeer, *tpLimTdlsLinkSetupPeer;
653
654typedef struct tLimTdlsLinkSetupInfo {
655 tLimTdlsLinkSetupPeer *tdlsLinkSetupList;
656 uint8_t num_tdls_peers;
657 uint8_t tdls_flags;
658 uint8_t tdls_state;
659 uint8_t tdls_prev_state;
660} tLimTdlsLinkSetupInfo, *tpLimTdlsLinkSetupInfo;
661
662typedef enum tdlsLinkMode {
663 TDLS_LINK_MODE_BG,
664 TDLS_LINK_MODE_N,
665 TDLS_LINK_MODE_AC,
666 TDLS_LINK_MODE_NONE
667} eLimTdlsLinkMode;
668#endif /* FEATURE_WLAN_TDLS */
669
670#endif