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