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