blob: 6b715eb4b5b361d607ffe0ef43f3bd6ba70099f4 [file] [log] [blame]
Jeff Johnson295189b2012-06-20 16:38:30 -07001/*
Sridhar Selvarajb59cd8c2017-07-17 18:43:55 +05302 * Copyright (c) 2011-2017 The Linux Foundation. All rights reserved.
Kiet Lam842dad02014-02-18 18:44:02 -08003 *
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.
Jeff Johnson295189b2012-06-20 16:38:30 -070020 */
Kiet Lam842dad02014-02-18 18:44:02 -080021
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
Jeff Johnson295189b2012-06-20 16:38:30 -070028/*
29 *
Jeff Johnson295189b2012-06-20 16:38:30 -070030 * This file limGlobal.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 "wniApi.h"
43#include "sirApi.h"
44#include "sirMacProtDef.h"
45#include "sirMacPropExts.h"
46#include "sirCommon.h"
47#include "sirDebug.h"
Satyanarayana Dash6f438272015-03-03 18:01:06 +053048#include "wniCfg.h"
Jeff Johnson295189b2012-06-20 16:38:30 -070049#include "csrApi.h"
50#include "sapApi.h"
Mohit Khanna698ba2a2012-12-04 15:08:18 -080051#include "dot11f.h"
Jeff Johnson295189b2012-06-20 16:38:30 -070052
53/// Maximum number of scan hash table entries
54#define LIM_MAX_NUM_OF_SCAN_RESULTS 256
55
56// Link Test Report Status. This appears in the report frame
57#define LINK_TEST_STATUS_SUCCESS 0x1
58#define LINK_TEST_STATUS_UNSUPPORTED_RATE 0x2
59#define LINK_TEST_STATUS_INVALID_ADDR 0x3
60
61// Amount of time in nanosec to be sleep-waited before
62// enabling RHP (1 millisec)
63#define LIM_RHP_WORK_AROUND_DURATION 1000000
64
65// Maximum amount of Quiet duration in millisec
66#define LIM_MAX_QUIET_DURATION 32
67
68#define LIM_TX_WQ_EMPTY_SLEEP_NS 100000
69
Jeff Johnson295189b2012-06-20 16:38:30 -070070// Deferred Message Queue Length
71#define MAX_DEFERRED_QUEUE_LEN 20
72
73// Maximum Buffer size
74#define LIM_MAX_BUF_SIZE 8192
75
76// Maximum number of PS - TIM's to be sent with out wakeup from STA
77#define LIM_TIM_WAIT_COUNT_FACTOR 5
78
79/** Use this count if (LIM_TIM_WAIT_FACTOR * ListenInterval) is less than LIM_MIN_TIM_WAIT_CNT*/
80#define LIM_MIN_TIM_WAIT_COUNT 50
81
82#define GET_TIM_WAIT_COUNT(LIntrvl) ((LIntrvl * LIM_TIM_WAIT_COUNT_FACTOR) > LIM_MIN_TIM_WAIT_COUNT ? \
83 (LIntrvl * LIM_TIM_WAIT_COUNT_FACTOR) : LIM_MIN_TIM_WAIT_COUNT)
Kiran Kumar Lokere79540f92013-04-25 17:32:16 -070084#define IS_5G_BAND(__rfBand) ((__rfBand & 0x3) == 0x2)
85#define IS_24G_BAND(__rfBand) ((__rfBand & 0x3) == 0x1)
Jeff Johnson295189b2012-06-20 16:38:30 -070086
87// enums exported by LIM are as follows
88
89/// System role definition
90typedef enum eLimSystemRole
91{
92 eLIM_UNKNOWN_ROLE,
93 eLIM_AP_ROLE,
94 eLIM_STA_IN_IBSS_ROLE,
95 eLIM_STA_ROLE,
96 eLIM_BT_AMP_STA_ROLE,
Gopichand Nakkala48b4d7e2013-03-06 23:34:16 +053097 eLIM_BT_AMP_AP_ROLE,
98 eLIM_P2P_DEVICE_ROLE,
99 eLIM_P2P_DEVICE_GO,
Kiran Kumar Lokere458d7322013-05-29 14:29:43 -0700100 eLIM_P2P_DEVICE_CLIENT
Jeff Johnson295189b2012-06-20 16:38:30 -0700101} tLimSystemRole;
102
103/**
104 * SME state definition accessible across all Sirius modules.
105 * AP only states are LIM_SME_CHANNEL_SCAN_STATE &
106 * LIM_SME_NORMAL_CHANNEL_SCAN_STATE.
107 * Note that these states may also be present in STA
108 * side too when DFS support is present for a STA in IBSS mode.
109 */
110typedef enum eLimSmeStates
111{
112 eLIM_SME_OFFLINE_STATE,
113 eLIM_SME_IDLE_STATE,
114 eLIM_SME_SUSPEND_STATE,
115 eLIM_SME_WT_SCAN_STATE,
116 eLIM_SME_WT_JOIN_STATE,
117 eLIM_SME_WT_AUTH_STATE,
118 eLIM_SME_WT_ASSOC_STATE,
119 eLIM_SME_WT_REASSOC_STATE,
120 eLIM_SME_WT_REASSOC_LINK_FAIL_STATE,
121 eLIM_SME_JOIN_FAILURE_STATE,
122 eLIM_SME_ASSOCIATED_STATE,
123 eLIM_SME_REASSOCIATED_STATE,
124 eLIM_SME_LINK_EST_STATE,
125 eLIM_SME_LINK_EST_WT_SCAN_STATE,
126 eLIM_SME_WT_PRE_AUTH_STATE,
127 eLIM_SME_WT_DISASSOC_STATE,
128 eLIM_SME_WT_DEAUTH_STATE,
129 eLIM_SME_WT_START_BSS_STATE,
130 eLIM_SME_WT_STOP_BSS_STATE,
131 eLIM_SME_NORMAL_STATE,
132 eLIM_SME_CHANNEL_SCAN_STATE,
133 eLIM_SME_NORMAL_CHANNEL_SCAN_STATE
134} tLimSmeStates;
135
136/**
137 * MLM state definition.
138 * While these states are present on AP too when it is
139 * STA mode, per-STA MLM state exclusive to AP is:
140 * eLIM_MLM_WT_AUTH_FRAME3.
141 */
142typedef enum eLimMlmStates
143{
144 eLIM_MLM_OFFLINE_STATE,
145 eLIM_MLM_IDLE_STATE,
146 eLIM_MLM_WT_PROBE_RESP_STATE,
147 eLIM_MLM_PASSIVE_SCAN_STATE,
148 eLIM_MLM_WT_JOIN_BEACON_STATE,
149 eLIM_MLM_JOINED_STATE,
150 eLIM_MLM_BSS_STARTED_STATE,
151 eLIM_MLM_WT_AUTH_FRAME2_STATE,
152 eLIM_MLM_WT_AUTH_FRAME3_STATE,
153 eLIM_MLM_WT_AUTH_FRAME4_STATE,
154 eLIM_MLM_AUTH_RSP_TIMEOUT_STATE,
155 eLIM_MLM_AUTHENTICATED_STATE,
156 eLIM_MLM_WT_ASSOC_RSP_STATE,
157 eLIM_MLM_WT_REASSOC_RSP_STATE,
158 eLIM_MLM_ASSOCIATED_STATE,
159 eLIM_MLM_REASSOCIATED_STATE,
160 eLIM_MLM_LINK_ESTABLISHED_STATE,
161 eLIM_MLM_WT_ASSOC_CNF_STATE,
162 eLIM_MLM_LEARN_STATE,
163 eLIM_MLM_WT_ADD_BSS_RSP_STATE,
164 eLIM_MLM_WT_DEL_BSS_RSP_STATE,
165 eLIM_MLM_WT_ADD_BSS_RSP_ASSOC_STATE,
166 eLIM_MLM_WT_ADD_BSS_RSP_REASSOC_STATE,
167 eLIM_MLM_WT_ADD_BSS_RSP_PREASSOC_STATE,
168 eLIM_MLM_WT_ADD_STA_RSP_STATE,
169 eLIM_MLM_WT_DEL_STA_RSP_STATE,
170 //MLM goes to this state when LIM initiates DELETE_STA as processing of Assoc req because
171 //the entry already exists. LIM comes out of this state when DELETE_STA response from
172 //HAL is received. LIM needs to maintain this state so that ADD_STA can be issued while
173 //processing DELETE_STA response from HAL.
174 eLIM_MLM_WT_ASSOC_DEL_STA_RSP_STATE,
175 eLIM_MLM_WT_SET_BSS_KEY_STATE,
176 eLIM_MLM_WT_SET_STA_KEY_STATE,
177 eLIM_MLM_WT_SET_STA_BCASTKEY_STATE,
178 eLIM_MLM_WT_ADDBA_RSP_STATE,
179 eLIM_MLM_WT_REMOVE_BSS_KEY_STATE,
180 eLIM_MLM_WT_REMOVE_STA_KEY_STATE,
181 eLIM_MLM_WT_SET_MIMOPS_STATE,
182#if defined WLAN_FEATURE_VOWIFI_11R
183 eLIM_MLM_WT_ADD_BSS_RSP_FT_REASSOC_STATE,
184 eLIM_MLM_WT_FT_REASSOC_RSP_STATE,
185#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700186 eLIM_MLM_P2P_LISTEN_STATE,
Jeff Johnson295189b2012-06-20 16:38:30 -0700187} tLimMlmStates;
188
189// 11h channel quiet states
190/* This enum indicates in which state the device is in
191 * when it receives quiet element in beacon or probe-response.
192 * The default quiet state of the device is always INIT
193 * eLIM_QUIET_BEGIN - When Quiet period is started
194 * eLIM_QUIET_CHANGED - When Quiet period is updated
195 * eLIM_QUIET_RUNNING - Between two successive Quiet updates
196 * eLIM_QUIET_END - When quiet period ends
197 */
198typedef enum eLimQuietStates
199{
200 eLIM_QUIET_INIT,
201 eLIM_QUIET_BEGIN,
202 eLIM_QUIET_CHANGED,
203 eLIM_QUIET_RUNNING,
204 eLIM_QUIET_END
205} tLimQuietStates;
206
207// 11h channel switch states
208/* This enum indicates in which state the channel-swith
209 * is presently operating.
210 * eLIM_11H_CHANSW_INIT - Default state
211 * eLIM_11H_CHANSW_RUNNING - When channel switch is running
212 * eLIM_11H_CHANSW_END - After channel switch is complete
213 */
214typedef enum eLimDot11hChanSwStates
215{
216 eLIM_11H_CHANSW_INIT,
217 eLIM_11H_CHANSW_RUNNING,
218 eLIM_11H_CHANSW_END
219} tLimDot11hChanSwStates;
220
221#ifdef GEN4_SCAN
222
223//WLAN_SUSPEND_LINK Related
224typedef void (*SUSPEND_RESUME_LINK_CALLBACK)(tpAniSirGlobal pMac, eHalStatus status, tANI_U32 *data);
225
226// LIM to HAL SCAN Management Message Interface states
227typedef enum eLimHalScanState
228{
229 eLIM_HAL_IDLE_SCAN_STATE,
230 eLIM_HAL_INIT_SCAN_WAIT_STATE,
231 eLIM_HAL_START_SCAN_WAIT_STATE,
232 eLIM_HAL_END_SCAN_WAIT_STATE,
233 eLIM_HAL_FINISH_SCAN_WAIT_STATE,
234 eLIM_HAL_INIT_LEARN_WAIT_STATE,
235 eLIM_HAL_START_LEARN_WAIT_STATE,
236 eLIM_HAL_END_LEARN_WAIT_STATE,
237 eLIM_HAL_FINISH_LEARN_WAIT_STATE,
238 eLIM_HAL_SCANNING_STATE,
239//WLAN_SUSPEND_LINK Related
240 eLIM_HAL_SUSPEND_LINK_WAIT_STATE,
241 eLIM_HAL_SUSPEND_LINK_STATE,
242 eLIM_HAL_RESUME_LINK_WAIT_STATE,
243//end WLAN_SUSPEND_LINK Related
244} tLimLimHalScanState;
245#endif // GEN4_SCAN
246
247// LIM states related to A-MPDU/BA
248// This is used for maintaining the state between PE and HAL only.
249typedef enum eLimBAState
250{
251 eLIM_BA_STATE_IDLE, // we are not waiting for anything from HAL.
252 eLIM_BA_STATE_WT_ADD_RSP, //We are waiting for Add rsponse from HAL.
253 eLIM_BA_STATE_WT_DEL_RSP // We are waiting for Del response from HAL.
254} tLimBAState;
255
Jeff Johnson295189b2012-06-20 16:38:30 -0700256
257
Jeff Johnson62c27982013-02-27 17:53:55 -0800258
Jeff Johnson295189b2012-06-20 16:38:30 -0700259
260// MLM Req/Cnf structure definitions
261typedef struct sLimMlmAuthReq
262{
263 tSirMacAddr peerMacAddr;
264 tAniAuthType authType;
265 tANI_U32 authFailureTimeout;
266 tANI_U8 sessionId;
267} tLimMlmAuthReq, *tpLimMlmAuthReq;
268
269typedef struct sLimMlmJoinReq
270{
271 tANI_U32 joinFailureTimeout;
272 tSirMacRateSet operationalRateSet;
273 tANI_U8 sessionId;
274 tSirBssDescription bssDescription;
Sridhar Selvarajb59cd8c2017-07-17 18:43:55 +0530275 /*
276 * WARNING: Pls make bssDescription as last variable in struct
277 * tLimMlmJoinReq as it has ieFields followed after this bss
278 * description. Adding a variable after this corrupts the ieFields
279 */
Jeff Johnson295189b2012-06-20 16:38:30 -0700280} tLimMlmJoinReq, *tpLimMlmJoinReq;
281
282typedef struct sLimMlmScanReq
283{
284 tSirBssType bssType;
285 tSirMacAddr bssId;
286 tSirMacSSid ssId[SIR_SCAN_MAX_NUM_SSID];
287 tSirScanType scanType;
288 tANI_U32 minChannelTime;
289 tANI_U32 maxChannelTime;
Abhishek Singh3a93ee42016-09-29 17:00:03 +0530290 tANI_U32 min_chntime_btc_esco;
291 tANI_U32 max_chntime_btc_esco;
Jeff Johnson295189b2012-06-20 16:38:30 -0700292 tSirBackgroundScanMode backgroundScanMode;
293 tANI_U32 dot11mode;
294 /* Number of SSIDs to scan(send Probe request) */
295 tANI_U8 numSsid;
296
Jeff Johnson295189b2012-06-20 16:38:30 -0700297 tANI_BOOLEAN p2pSearch;
Jeff Johnson295189b2012-06-20 16:38:30 -0700298 tANI_U16 uIEFieldLen;
299 tANI_U16 uIEFieldOffset;
300
301 //channelList MUST be the last field of this structure
302 tSirChannelList channelList;
303 /*-----------------------------
304 tLimMlmScanReq....
305 -----------------------------
306 uIEFiledLen
307 -----------------------------
308 uIEFiledOffset ----+
309 ----------------------------- |
310 channelList.numChannels |
311 ----------------------------- |
312 ... variable size up to |
313 channelNumber[numChannels-1] |
314 This can be zero, if |
315 numChannel is zero. |
316 ----------------------------- <--+
317 ... variable size uIEFiled
318 up to uIEFieldLen (can be 0)
319 -----------------------------*/
320} tLimMlmScanReq, *tpLimMlmScanReq;
321
322typedef struct tLimScanResultNode tLimScanResultNode;
323struct tLimScanResultNode
324{
325 tLimScanResultNode *next;
326 tSirBssDescription bssDescription;
327};
328
Jeff Johnsone7245742012-09-05 17:12:55 -0700329#ifdef FEATURE_OEM_DATA_SUPPORT
330
331#ifndef OEM_DATA_REQ_SIZE
Madan Mohan Koyyalamudi7a4d9312012-12-04 17:21:36 -0800332#define OEM_DATA_REQ_SIZE 134
Jeff Johnsone7245742012-09-05 17:12:55 -0700333#endif
334#ifndef OEM_DATA_RSP_SIZE
Madan Mohan Koyyalamudi7a4d9312012-12-04 17:21:36 -0800335#define OEM_DATA_RSP_SIZE 1968
Jeff Johnsone7245742012-09-05 17:12:55 -0700336#endif
337
338// OEM Data related structure definitions
339typedef struct sLimMlmOemDataReq
340{
341 tSirMacAddr selfMacAddr;
342 tANI_U8 oemDataReq[OEM_DATA_REQ_SIZE];
343} tLimMlmOemDataReq, *tpLimMlmOemDataReq;
344
345typedef struct sLimMlmOemDataRsp
346{
347 tANI_U8 oemDataRsp[OEM_DATA_RSP_SIZE];
348} tLimMlmOemDataRsp, *tpLimMlmOemDataRsp;
349#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700350
351// Pre-authentication structure definition
352typedef struct tLimPreAuthNode
353{
354 struct tLimPreAuthNode *next;
355 tSirMacAddr peerMacAddr;
356 tAniAuthType authType;
357 tLimMlmStates mlmState;
358 tANI_U8 authNodeIdx;
359 tANI_U8 challengeText[SIR_MAC_AUTH_CHALLENGE_LENGTH];
360 tANI_U8 fTimerStarted:1;
361 tANI_U8 fSeen:1;
362 tANI_U8 fFree:1;
363 tANI_U8 rsvd:5;
364 TX_TIMER timer;
Sushant Kaushikf9c963c2015-01-28 12:50:26 +0530365 tANI_U16 seqNo;
Edhar, Mahesh Kumar0d82c212015-02-03 17:47:16 +0530366 v_TIME_t timestamp;
Jeff Johnson295189b2012-06-20 16:38:30 -0700367}tLimPreAuthNode, *tpLimPreAuthNode;
368
369// Pre-authentication table definition
370typedef struct tLimPreAuthTable
371{
372 tANI_U32 numEntry;
373 tpLimPreAuthNode pTable;
374}tLimPreAuthTable, *tpLimPreAuthTable;
375
376/// Per STA context structure definition
377typedef struct sLimMlmStaContext
378{
379 tLimMlmStates mlmState;
380 tAniAuthType authType;
381 tANI_U16 listenInterval;
382 tSirMacCapabilityInfo capabilityInfo;
383 tSirMacPropRateSet propRateSet;
384 tSirMacReasonCodes disassocReason;
385 tANI_U16 cleanupTrigger;
386
387 tSirResultCodes resultCode;
388 tANI_U16 protStatusCode;
389
390 tANI_U8 subType:1; // Indicates ASSOC (0) or REASSOC (1)
391 tANI_U8 updateContext:1;
392 tANI_U8 schClean:1;
393 // 802.11n HT Capability in Station: Enabled 1 or DIsabled 0
394 tANI_U8 htCapability:1;
Jeff Johnsone7245742012-09-05 17:12:55 -0700395#ifdef WLAN_FEATURE_11AC
396 tANI_U8 vhtCapability:1;
397#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700398} tLimMlmStaContext, *tpLimMlmStaContext;
399
400// Structure definition to hold deferred messages queue parameters
401typedef struct sLimDeferredMsgQParams
402{
403 tSirMsgQ deferredQueue[MAX_DEFERRED_QUEUE_LEN];
404 tANI_U16 size;
405 tANI_U16 read;
406 tANI_U16 write;
407} tLimDeferredMsgQParams, *tpLimDeferredMsgQParams;
408
409typedef struct sLimTraceQ
410{
411 tANI_U32 type;
412 tLimSmeStates smeState;
413 tLimMlmStates mlmState;
414 tANI_U32 value;
415 tANI_U32 value2;
416} tLimTraceQ;
417
418typedef struct sLimTraceParams
419{
420 tLimTraceQ traceQueue[1024];
421 tANI_U16 write;
422 tANI_U16 enabled;
423} tLimTraceParams;
424
425typedef struct sCfgProtection
426{
427 tANI_U32 overlapFromlla:1;
428 tANI_U32 overlapFromllb:1;
429 tANI_U32 overlapFromllg:1;
430 tANI_U32 overlapHt20:1;
431 tANI_U32 overlapNonGf:1;
432 tANI_U32 overlapLsigTxop:1;
433 tANI_U32 overlapRifs:1;
434 tANI_U32 overlapOBSS:1; /* added for obss */
435 tANI_U32 fromlla:1;
436 tANI_U32 fromllb:1;
437 tANI_U32 fromllg:1;
438 tANI_U32 ht20:1;
439 tANI_U32 nonGf:1;
440 tANI_U32 lsigTxop:1;
441 tANI_U32 rifs:1;
442 tANI_U32 obss:1; /* added for Obss */
443}tCfgProtection, *tpCfgProtection;
444
445typedef enum eLimProtStaCacheType
446{
447 eLIM_PROT_STA_CACHE_TYPE_INVALID,
448 eLIM_PROT_STA_CACHE_TYPE_llB,
449 eLIM_PROT_STA_CACHE_TYPE_llG,
450 eLIM_PROT_STA_CACHE_TYPE_HT20
451}tLimProtStaCacheType;
452
453typedef struct sCacheParams
454{
455 tANI_U8 active;
456 tSirMacAddr addr;
457 tLimProtStaCacheType protStaCacheType;
458
459} tCacheParams, *tpCacheParams;
460
Jeff Johnson295189b2012-06-20 16:38:30 -0700461#define LIM_PROT_STA_OVERLAP_CACHE_SIZE HAL_NUM_ASSOC_STA
462#define LIM_PROT_STA_CACHE_SIZE HAL_NUM_ASSOC_STA
Jeff Johnson295189b2012-06-20 16:38:30 -0700463
464typedef struct sLimProtStaParams
465{
466 tANI_U8 numSta;
467 tANI_U8 protectionEnabled;
468} tLimProtStaParams, *tpLimProtStaParams;
469
470
471typedef struct sLimNoShortParams
472{
473 tANI_U8 numNonShortPreambleSta;
474 tCacheParams staNoShortCache[LIM_PROT_STA_CACHE_SIZE];
475} tLimNoShortParams, *tpLimNoShortParams;
476
477typedef struct sLimNoShortSlotParams
478{
479 tANI_U8 numNonShortSlotSta;
480 tCacheParams staNoShortSlotCache[LIM_PROT_STA_CACHE_SIZE];
481} tLimNoShortSlotParams, *tpLimNoShortSlotParams;
482
483
484typedef struct tLimIbssPeerNode tLimIbssPeerNode;
485struct tLimIbssPeerNode
486{
487 tLimIbssPeerNode *next;
488 tSirMacAddr peerMacAddr;
489 tANI_U8 aniIndicator:1;
490 tANI_U8 extendedRatesPresent:1;
491 tANI_U8 edcaPresent:1;
492 tANI_U8 wmeEdcaPresent:1;
493 tANI_U8 wmeInfoPresent:1;
494 tANI_U8 htCapable:1;
Ravi Joshiaeb7d9e2013-05-02 12:28:14 -0700495 tANI_U8 vhtCapable:1;
496 tANI_U8 rsvd:1;
497 tANI_U8 htSecondaryChannelOffset;
Jeff Johnson295189b2012-06-20 16:38:30 -0700498 tSirMacCapabilityInfo capabilityInfo;
499 tSirMacRateSet supportedRates;
500 tSirMacRateSet extendedRates;
501 tANI_U8 supportedMCSSet[SIZE_OF_SUPPORTED_MCS_SET];
502 tSirMacEdcaParamSetIE edcaParams;
503 tANI_U16 propCapability;
504 tANI_U8 erpIePresent;
505
506 //HT Capabilities of IBSS Peer
507 tANI_U8 htGreenfield;
508 tANI_U8 htShortGI40Mhz;
509 tANI_U8 htShortGI20Mhz;
510
511 // DSSS/CCK at 40 MHz: Enabled 1 or Disabled
512 tANI_U8 htDsssCckRate40MHzSupport;
513
514 // MIMO Power Save
515 tSirMacHTMIMOPowerSaveState htMIMOPSState;
516
517 //
518 // A-MPDU Density
519 // 000 - No restriction
520 // 001 - 1/8 usec
521 // 010 - 1/4 usec
522 // 011 - 1/2 usec
523 // 100 - 1 usec
524 // 101 - 2 usec
525 // 110 - 4 usec
526 // 111 - 8 usec
527 //
528 tANI_U8 htAMpduDensity;
529
530 // Maximum Rx A-MPDU factor
531 tANI_U8 htMaxRxAMpduFactor;
532
533 //Set to 0 for 3839 octets
534 //Set to 1 for 7935 octets
535 tANI_U8 htMaxAmsduLength;
536
537 //
538 // Recommended Tx Width Set
539 // 0 - use 20 MHz channel (control channel)
540 // 1 - use 40 Mhz channel
541 //
542 tANI_U8 htSupportedChannelWidthSet;
543
544 tANI_U8 beaconHBCount;
545 tANI_U8 heartbeatFailure;
546
547 tANI_U8 *beacon; //Hold beacon to be sent to HDD/CSR
548 tANI_U16 beaconLen;
Ravi Joshiaeb7d9e2013-05-02 12:28:14 -0700549
550#ifdef WLAN_FEATURE_11AC
551 tDot11fIEVHTCaps VHTCaps;
552 tANI_U8 vhtSupportedChannelWidthSet;
553 tANI_U8 vhtBeamFormerCapable;
554#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700555};
556
557// Enums used for channel switching.
558typedef enum eLimChannelSwitchState
559{
560 eLIM_CHANNEL_SWITCH_IDLE,
561 eLIM_CHANNEL_SWITCH_PRIMARY_ONLY,
562 eLIM_CHANNEL_SWITCH_SECONDARY_ONLY,
563 eLIM_CHANNEL_SWITCH_PRIMARY_AND_SECONDARY
564} tLimChannelSwitchState;
565
566
567// Channel Switch Info
568typedef struct sLimChannelSwitchInfo
569{
570 tLimChannelSwitchState state;
571 tANI_U8 primaryChannel;
Jeff Johnsone7245742012-09-05 17:12:55 -0700572 ePhyChanBondState secondarySubBand;
Jeff Johnson295189b2012-06-20 16:38:30 -0700573 tANI_U32 switchCount;
574 tANI_U32 switchTimeoutValue;
575 tANI_U8 switchMode;
576} tLimChannelSwitchInfo, *tpLimChannelSwitchInfo;
577
Mohit Khanna4a70d262012-09-11 16:30:12 -0700578#ifdef WLAN_FEATURE_11AC
579typedef struct sLimOperatingModeInfo
580{
581 tANI_U8 present;
582 tANI_U8 chanWidth: 2;
583 tANI_U8 reserved: 2;
584 tANI_U8 rxNSS: 3;
585 tANI_U8 rxNSSType: 1;
586}tLimOperatingModeInfo, *tpLimOperatingModeInfo;
Madan Mohan Koyyalamudic6226de2012-09-18 16:33:31 -0700587
588typedef struct sLimWiderBWChannelSwitch
589{
590 tANI_U8 newChanWidth;
591 tANI_U8 newCenterChanFreq0;
592 tANI_U8 newCenterChanFreq1;
593}tLimWiderBWChannelSwitchInfo, *tpLimWiderBWChannelSwitchInfo;
Mohit Khanna4a70d262012-09-11 16:30:12 -0700594#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700595// Enums used when stopping the Tx.
596typedef enum eLimQuietTxMode
597{
598 eLIM_TX_ALL = 0, /* Stops/resumes the transmission of all stations, Uses the global flag. */
599 eLIM_TX_STA, /* Stops/resumes the transmission of specific stations identified by staId. */
600 eLIM_TX_BSS, /* Stops/resumes the transmission of all the packets in BSS */
601 eLIM_TX_BSS_BUT_BEACON /* Stops/resumes the transmission of all packets except beacons in BSS
602 * This is used when radar is detected in the current operating channel.
603 * Beacon has to be sent to notify the stations associated about the
604 * scheduled channel switch */
605} tLimQuietTxMode;
606
607typedef enum eLimControlTx
608{
609 eLIM_RESUME_TX = 0,
610 eLIM_STOP_TX
611} tLimControlTx;
612
Jeff Johnson295189b2012-06-20 16:38:30 -0700613
614// --------------------------------------------------------------------
615
616typedef __ani_attr_pre_packed struct sLimTspecInfo
617{
618 tANI_U8 inuse; // 0==free, else used
619 tANI_U8 idx; // index in list
620 tANI_U8 staAddr[6];
621 tANI_U16 assocId;
622 tSirMacTspecIE tspec;
623 tANI_U8 numTclas; // number of Tclas elements
624 tSirTclasInfo tclasInfo[SIR_MAC_TCLASIE_MAXNUM];
625 tANI_U8 tclasProc;
626 tANI_U8 tclasProcPresent:1; //tclassProc is valid only if this is set to 1.
627} __ani_attr_packed tLimTspecInfo, *tpLimTspecInfo;
628
629typedef struct sLimAdmitPolicyInfo
630{
631 tANI_U8 type; // admit control policy type
632 tANI_U8 bw_factor; // oversubscription factor : 0 means nothing is allowed
633 // valid only when 'type' is set BW_FACTOR
634} tLimAdmitPolicyInfo, *tpLimAdmitPolicyInfo;
635
636
637typedef enum eLimWscEnrollState
638{
639 eLIM_WSC_ENROLL_NOOP,
640 eLIM_WSC_ENROLL_BEGIN,
641 eLIM_WSC_ENROLL_IN_PROGRESS,
642 eLIM_WSC_ENROLL_END
643
644} tLimWscEnrollState;
645
646#define WSC_PASSWD_ID_PUSH_BUTTON (0x0004)
647
648typedef struct sLimWscIeInfo
649{
650 tANI_BOOLEAN apSetupLocked;
651 tANI_BOOLEAN selectedRegistrar;
652 tANI_U16 selectedRegistrarConfigMethods;
653 tLimWscEnrollState wscEnrollmentState;
654 tLimWscEnrollState probeRespWscEnrollmentState;
655 tANI_U8 reqType;
656 tANI_U8 respType;
657} tLimWscIeInfo, *tpLimWscIeInfo;
658
659// maximum number of tspec's supported
Arun Kumar Khandavallida71aa32014-01-07 20:45:13 +0530660#define LIM_NUM_TSPEC_MAX 15
Jeff Johnson295189b2012-06-20 16:38:30 -0700661
662
663//structure to hold all 11h specific data
664typedef struct sLimSpecMgmtInfo
665{
666 tLimQuietStates quietState;
667 tANI_U32 quietCount;
668 tANI_U32 quietDuration; /* This is in units of system TICKS */
669 tANI_U32 quietDuration_TU; /* This is in units of TU, for over the air transmission */
670 tANI_U32 quietTimeoutValue; /* After this timeout, actual quiet starts */
671 tANI_BOOLEAN fQuietEnabled; /* Used on AP, if quiet is enabled during learning */
672
673 tLimDot11hChanSwStates dot11hChanSwState;
674
675 tANI_BOOLEAN fRadarDetCurOperChan; /* Radar detected in cur oper chan on AP */
676 tANI_BOOLEAN fRadarIntrConfigured; /* Whether radar interrupt has been configured */
677}tLimSpecMgmtInfo, *tpLimSpecMgmtInfo;
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800678
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800679#ifdef FEATURE_WLAN_TDLS
680/*
681 * Peer info needed for TDLS setup..
682 */
683typedef struct tLimTDLSPeerSta
684{
685 struct tLimTDLSPeerSta *next;
686 tANI_U8 dialog ;
687 tSirMacAddr peerMac;
688 tSirMacCapabilityInfo capabilityInfo;
689 tSirMacRateSet supportedRates;
690 tSirMacRateSet extendedRates;
691 tSirMacQosCapabilityStaIE qosCaps;
692 tSirMacEdcaParamSetIE edcaParams;
693 tANI_U8 mcsSet[SIZE_OF_SUPPORTED_MCS_SET];
694 tANI_U8 tdls_bIsResponder ;
695 /* HT Capabilties */
696 tDot11fIEHTCaps tdlsPeerHTCaps ;
697 tDot11fIEExtCap tdlsPeerExtCaps;
698 tANI_U8 tdls_flags ;
699 tANI_U8 tdls_link_state ;
700 tANI_U8 tdls_prev_link_state ;
701 tANI_U8 tdls_sessionId;
702 tANI_U8 ExtRatesPresent ;
703 TX_TIMER gLimTdlsLinkSetupRspTimeoutTimer ;
704 TX_TIMER gLimTdlsLinkSetupCnfTimeoutTimer ;
705}tLimTdlsLinkSetupPeer, *tpLimTdlsLinkSetupPeer ;
706
707typedef struct tLimTdlsLinkSetupInfo
708{
709 tLimTdlsLinkSetupPeer *tdlsLinkSetupList ;
710 tANI_U8 num_tdls_peers ;
711 tANI_U8 tdls_flags ;
712 tANI_U8 tdls_state ;
713 tANI_U8 tdls_prev_state ;
714}tLimTdlsLinkSetupInfo, *tpLimTdlsLinkSetupInfo ;
715
716typedef enum tdlsLinkMode
717{
718 TDLS_LINK_MODE_BG,
719 TDLS_LINK_MODE_N,
Hoonki Lee99e53782013-02-12 18:07:03 -0800720 TDLS_LINK_MODE_AC,
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800721 TDLS_LINK_MODE_NONE
722} eLimTdlsLinkMode ;
723#endif /* FEATURE_WLAN_TDLS */
724
Jeff Johnson295189b2012-06-20 16:38:30 -0700725#endif