blob: 6672d6eb6a655e81d891da14ed64a133e2d53ca3 [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;
240} tLimMlmJoinReq, *tpLimMlmJoinReq;
241
242typedef struct sLimMlmScanReq {
243 tSirBssType bssType;
244 tSirMacAddr bssId;
245 tSirMacSSid ssId[SIR_SCAN_MAX_NUM_SSID];
246 tSirScanType scanType;
247 uint32_t minChannelTime;
248 uint32_t maxChannelTime;
249 uint32_t dot11mode;
250 /* Number of SSIDs to scan(send Probe request) */
251 uint8_t numSsid;
252
253 bool p2pSearch;
254 uint16_t uIEFieldLen;
255 uint16_t uIEFieldOffset;
256
257 uint8_t sessionId;
258 /* channelList MUST be the last field of this structure */
259 tSirChannelList channelList;
260 /*-----------------------------
261 tLimMlmScanReq....
262 -----------------------------
263 uIEFiledLen
264 -----------------------------
265 uIEFiledOffset ----+
266 ----------------------------- |
267 channelList.numChannels |
268 ----------------------------- |
269 ... variable size up to |
270 channelNumber[numChannels-1] |
271 This can be zero, if |
272 numChannel is zero. |
273 ----------------------------- <--+
274 ... variable size uIEFiled
275 up to uIEFieldLen (can be 0)
276 -----------------------------*/
277} tLimMlmScanReq, *tpLimMlmScanReq;
278
279typedef struct tLimScanResultNode tLimScanResultNode;
280struct tLimScanResultNode {
281 tLimScanResultNode *next;
282 tSirBssDescription bssDescription;
283};
284
285#ifdef FEATURE_OEM_DATA_SUPPORT
286
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800287/* OEM Data related structure definitions */
288typedef struct sLimMlmOemDataReq {
Anurag Chouhan6d760662016-02-20 16:05:43 +0530289 struct qdf_mac_addr selfMacAddr;
Gupta, Kapil8a605e12016-06-08 14:14:35 +0530290 uint32_t data_len;
Krishna Kumaar Natarajan9ac8efd2015-11-20 13:40:24 -0800291 uint8_t *data;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800292} tLimMlmOemDataReq, *tpLimMlmOemDataReq;
293
294typedef struct sLimMlmOemDataRsp {
Krishna Kumaar Natarajan4e9cf392015-11-20 13:35:05 -0800295 bool target_rsp;
Krishna Kumaar Natarajan608291e2015-12-14 18:17:27 -0800296 uint32_t rsp_len;
297 uint8_t *oem_data_rsp;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800298} tLimMlmOemDataRsp, *tpLimMlmOemDataRsp;
299#endif
300
301/* Pre-authentication structure definition */
302typedef struct tLimPreAuthNode {
303 struct tLimPreAuthNode *next;
304 tSirMacAddr peerMacAddr;
305 tAniAuthType authType;
306 tLimMlmStates mlmState;
307 uint8_t authNodeIdx;
308 uint8_t challengeText[SIR_MAC_AUTH_CHALLENGE_LENGTH];
309 uint8_t fTimerStarted:1;
310 uint8_t fSeen:1;
311 uint8_t fFree:1;
312 uint8_t rsvd:5;
313 TX_TIMER timer;
314 uint16_t seq_num;
Anurag Chouhan6d760662016-02-20 16:05:43 +0530315 unsigned long timestamp;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800316} tLimPreAuthNode, *tpLimPreAuthNode;
317
318/* Pre-authentication table definition */
319typedef struct tLimPreAuthTable {
320 uint32_t numEntry;
Naveen Rawate6ddcaa2016-02-05 16:50:18 -0800321 tLimPreAuthNode **pTable;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800322} tLimPreAuthTable, *tpLimPreAuthTable;
323
324/* / Per STA context structure definition */
325typedef struct sLimMlmStaContext {
326 tLimMlmStates mlmState;
327 tAniAuthType authType;
328 uint16_t listenInterval;
329 tSirMacCapabilityInfo capabilityInfo;
330 tSirMacPropRateSet propRateSet;
331 tSirMacReasonCodes disassocReason;
332 uint16_t cleanupTrigger;
333
334 tSirResultCodes resultCode;
335 uint16_t protStatusCode;
336
337 uint8_t subType:1; /* Indicates ASSOC (0) or REASSOC (1) */
338 uint8_t updateContext:1;
339 uint8_t schClean:1;
340 /* 802.11n HT Capability in Station: Enabled 1 or DIsabled 0 */
341 uint8_t htCapability:1;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800342 uint8_t vhtCapability:1;
Krishna Kumaar Natarajan0103ef82017-02-17 18:15:56 -0800343#ifdef WLAN_FEATURE_11AX
344 bool he_capable;
345#endif
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800346} tLimMlmStaContext, *tpLimMlmStaContext;
347
348/* Structure definition to hold deferred messages queue parameters */
349typedef struct sLimDeferredMsgQParams {
Rajeev Kumar416b73f2017-01-21 16:45:21 -0800350 struct scheduler_msg deferredQueue[MAX_DEFERRED_QUEUE_LEN];
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800351 uint16_t size;
352 uint16_t read;
353 uint16_t write;
354} tLimDeferredMsgQParams, *tpLimDeferredMsgQParams;
355
356typedef struct sCfgProtection {
357 uint32_t overlapFromlla:1;
358 uint32_t overlapFromllb:1;
359 uint32_t overlapFromllg:1;
360 uint32_t overlapHt20:1;
361 uint32_t overlapNonGf:1;
362 uint32_t overlapLsigTxop:1;
363 uint32_t overlapRifs:1;
364 uint32_t overlapOBSS:1; /* added for obss */
365 uint32_t fromlla:1;
366 uint32_t fromllb:1;
367 uint32_t fromllg:1;
368 uint32_t ht20:1;
369 uint32_t nonGf:1;
370 uint32_t lsigTxop:1;
371 uint32_t rifs:1;
372 uint32_t obss:1; /* added for Obss */
373} tCfgProtection, *tpCfgProtection;
374
375typedef enum eLimProtStaCacheType {
376 eLIM_PROT_STA_CACHE_TYPE_INVALID,
377 eLIM_PROT_STA_CACHE_TYPE_llB,
378 eLIM_PROT_STA_CACHE_TYPE_llG,
379 eLIM_PROT_STA_CACHE_TYPE_HT20
380} tLimProtStaCacheType;
381
382typedef struct sCacheParams {
383 uint8_t active;
384 tSirMacAddr addr;
385 tLimProtStaCacheType protStaCacheType;
386
387} tCacheParams, *tpCacheParams;
388
389#define LIM_PROT_STA_OVERLAP_CACHE_SIZE HAL_NUM_ASSOC_STA
390#define LIM_PROT_STA_CACHE_SIZE HAL_NUM_ASSOC_STA
391
392typedef struct sLimProtStaParams {
393 uint8_t numSta;
394 uint8_t protectionEnabled;
395} tLimProtStaParams, *tpLimProtStaParams;
396
397typedef struct sLimNoShortParams {
398 uint8_t numNonShortPreambleSta;
399 tCacheParams staNoShortCache[LIM_PROT_STA_CACHE_SIZE];
400} tLimNoShortParams, *tpLimNoShortParams;
401
402typedef struct sLimNoShortSlotParams {
403 uint8_t numNonShortSlotSta;
404 tCacheParams staNoShortSlotCache[LIM_PROT_STA_CACHE_SIZE];
405} tLimNoShortSlotParams, *tpLimNoShortSlotParams;
406
407typedef struct tLimIbssPeerNode tLimIbssPeerNode;
408struct tLimIbssPeerNode {
409 tLimIbssPeerNode *next;
410 tSirMacAddr peerMacAddr;
411 uint8_t extendedRatesPresent:1;
412 uint8_t edcaPresent:1;
413 uint8_t wmeEdcaPresent:1;
414 uint8_t wmeInfoPresent:1;
415 uint8_t htCapable:1;
416 uint8_t vhtCapable:1;
417 uint8_t rsvd:2;
418 uint8_t htSecondaryChannelOffset;
419 tSirMacCapabilityInfo capabilityInfo;
420 tSirMacRateSet supportedRates;
421 tSirMacRateSet extendedRates;
422 uint8_t supportedMCSSet[SIZE_OF_SUPPORTED_MCS_SET];
423 tSirMacEdcaParamSetIE edcaParams;
424 uint8_t erpIePresent;
425
426 /* HT Capabilities of IBSS Peer */
427 uint8_t htGreenfield;
428 uint8_t htShortGI40Mhz;
429 uint8_t htShortGI20Mhz;
430
431 /* DSSS/CCK at 40 MHz: Enabled 1 or Disabled */
432 uint8_t htDsssCckRate40MHzSupport;
433
434 /* MIMO Power Save */
435 tSirMacHTMIMOPowerSaveState htMIMOPSState;
436
437 /* */
438 /* A-MPDU Density */
439 /* 000 - No restriction */
440 /* 001 - 1/8 usec */
441 /* 010 - 1/4 usec */
442 /* 011 - 1/2 usec */
443 /* 100 - 1 usec */
444 /* 101 - 2 usec */
445 /* 110 - 4 usec */
446 /* 111 - 8 usec */
447 /* */
448 uint8_t htAMpduDensity;
449
450 /* Maximum Rx A-MPDU factor */
451 uint8_t htMaxRxAMpduFactor;
452
453 /* Set to 0 for 3839 octets */
454 /* Set to 1 for 7935 octets */
455 uint8_t htMaxAmsduLength;
456
457 /* */
458 /* Recommended Tx Width Set */
459 /* 0 - use 20 MHz channel (control channel) */
460 /* 1 - use 40 Mhz channel */
461 /* */
462 uint8_t htSupportedChannelWidthSet;
463
464 uint8_t htLdpcCapable;
465
466 uint8_t beaconHBCount;
467 uint8_t heartbeatFailure;
468
469 uint8_t *beacon; /* Hold beacon to be sent to HDD/CSR */
470 uint16_t beaconLen;
471
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800472 tDot11fIEVHTCaps VHTCaps;
473 uint8_t vhtSupportedChannelWidthSet;
474 uint8_t vhtBeamFormerCapable;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800475 /*
476 * Peer Atim Info
477 */
478 uint8_t atimIePresent;
479 uint32_t peerAtimWindowLength;
480};
481
482/* Enums used for channel switching. */
483typedef enum eLimChannelSwitchState {
484 eLIM_CHANNEL_SWITCH_IDLE,
485 eLIM_CHANNEL_SWITCH_PRIMARY_ONLY,
486 eLIM_CHANNEL_SWITCH_PRIMARY_AND_SECONDARY
487} tLimChannelSwitchState;
488
489/* Channel Switch Info */
490typedef struct sLimChannelSwitchInfo {
491 tLimChannelSwitchState state;
492 uint8_t primaryChannel;
493 uint8_t ch_center_freq_seg0;
494 uint8_t ch_center_freq_seg1;
Kiran Kumar Lokere999e58c2016-01-07 02:18:39 -0800495 uint8_t sec_ch_offset;
Kiran Kumar Lokere13644672016-02-29 15:40:10 -0800496 enum phy_ch_width ch_width;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800497 int8_t switchCount;
498 uint32_t switchTimeoutValue;
499 uint8_t switchMode;
500} tLimChannelSwitchInfo, *tpLimChannelSwitchInfo;
501
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800502typedef struct sLimOperatingModeInfo {
503 uint8_t present;
504 uint8_t chanWidth:2;
505 uint8_t reserved:2;
506 uint8_t rxNSS:3;
507 uint8_t rxNSSType:1;
508} tLimOperatingModeInfo, *tpLimOperatingModeInfo;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800509
510typedef struct sLimWiderBWChannelSwitch {
511 uint8_t newChanWidth;
512 uint8_t newCenterChanFreq0;
513 uint8_t newCenterChanFreq1;
514} tLimWiderBWChannelSwitchInfo, *tpLimWiderBWChannelSwitchInfo;
515
516/* Enums used when stopping the Tx. */
517typedef enum eLimQuietTxMode {
518 /* Stop/resume transmission of all stations,Uses the global flag */
519 eLIM_TX_ALL = 0,
520 /*
521 * Stops/resumes the transmission of specific stations identified
522 * by staId.
523 */
524 eLIM_TX_STA,
525 /* Stops/resumes the transmission of all the packets in BSS */
526 eLIM_TX_BSS,
527 /*
528 * Stops/resumes the transmission of all packets except beacons in BSS
529 * This is used when radar is detected in the current operating channel.
530 * Beacon has to be sent to notify the stations associated about the
531 * scheduled channel switch
532 */
533 eLIM_TX_BSS_BUT_BEACON
534} tLimQuietTxMode;
535
536typedef enum eLimControlTx {
537 eLIM_RESUME_TX = 0,
538 eLIM_STOP_TX
539} tLimControlTx;
540
541/* -------------------------------------------------------------------- */
542
543typedef struct sLimTspecInfo {
544 /* 0==free, else used */
545 uint8_t inuse;
546 /* index in list */
547 uint8_t idx;
548 tSirMacAddr staAddr;
549 uint16_t assocId;
550 tSirMacTspecIE tspec;
551 /* number of Tclas elements */
552 uint8_t numTclas;
553 tSirTclasInfo tclasInfo[SIR_MAC_TCLASIE_MAXNUM];
554 uint8_t tclasProc;
555 /* tclassProc is valid only if this is set to 1. */
556 uint8_t tclasProcPresent:1;
Anurag Chouhan6d760662016-02-20 16:05:43 +0530557} qdf_packed tLimTspecInfo, *tpLimTspecInfo;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800558
559typedef struct sLimAdmitPolicyInfo {
560 /* admit control policy type */
561 uint8_t type;
562 /* oversubscription factor : 0 means nothing is allowed */
563 uint8_t bw_factor;
564 /* valid only when 'type' is set BW_FACTOR */
565} tLimAdmitPolicyInfo, *tpLimAdmitPolicyInfo;
566
567typedef enum eLimWscEnrollState {
568 eLIM_WSC_ENROLL_NOOP,
569 eLIM_WSC_ENROLL_BEGIN,
570 eLIM_WSC_ENROLL_IN_PROGRESS,
571 eLIM_WSC_ENROLL_END
572} tLimWscEnrollState;
573
574#define WSC_PASSWD_ID_PUSH_BUTTON (0x0004)
575
576typedef struct sLimWscIeInfo {
577 bool apSetupLocked;
578 bool selectedRegistrar;
579 uint16_t selectedRegistrarConfigMethods;
580 tLimWscEnrollState wscEnrollmentState;
581 tLimWscEnrollState probeRespWscEnrollmentState;
582 uint8_t reqType;
583 uint8_t respType;
584} tLimWscIeInfo, *tpLimWscIeInfo;
585
586/* maximum number of tspec's supported */
587#define LIM_NUM_TSPEC_MAX 15
588
589/* structure to hold all 11h specific data */
590typedef struct sLimSpecMgmtInfo {
591 tLimQuietStates quietState;
592 uint32_t quietCount;
593 /* This is in units of system TICKS */
594 uint32_t quietDuration;
595 /* This is in units of TU, for over the air transmission */
596 uint32_t quietDuration_TU;
597 /* After this timeout, actual quiet starts */
598 uint32_t quietTimeoutValue;
599 /* Used on AP, if quiet is enabled during learning */
600 bool fQuietEnabled;
601 tLimDot11hChanSwStates dot11hChanSwState;
602 /* Radar detected in cur oper chan on AP */
603 bool fRadarDetCurOperChan;
604 /* Whether radar interrupt has been configured */
605 bool fRadarIntrConfigured;
606} tLimSpecMgmtInfo, *tpLimSpecMgmtInfo;
607
608#ifdef FEATURE_WLAN_TDLS
609/*
610 * Peer info needed for TDLS setup..
611 */
612typedef struct tLimTDLSPeerSta {
613 struct tLimTDLSPeerSta *next;
614 uint8_t dialog;
615 tSirMacAddr peerMac;
616 tSirMacCapabilityInfo capabilityInfo;
617 tSirMacRateSet supportedRates;
618 tSirMacRateSet extendedRates;
619 tSirMacQosCapabilityStaIE qosCaps;
620 tSirMacEdcaParamSetIE edcaParams;
621 uint8_t mcsSet[SIZE_OF_SUPPORTED_MCS_SET];
622 uint8_t tdls_bIsResponder;
623 /* HT Capabilties */
624 tDot11fIEHTCaps tdlsPeerHTCaps;
625 tDot11fIEExtCap tdlsPeerExtCaps;
626 uint8_t tdls_flags;
627 uint8_t tdls_link_state;
628 uint8_t tdls_prev_link_state;
629 uint8_t tdls_sessionId;
630 uint8_t ExtRatesPresent;
631 TX_TIMER gLimTdlsLinkSetupRspTimeoutTimer;
632 TX_TIMER gLimTdlsLinkSetupCnfTimeoutTimer;
633} tLimTdlsLinkSetupPeer, *tpLimTdlsLinkSetupPeer;
634
635typedef struct tLimTdlsLinkSetupInfo {
636 tLimTdlsLinkSetupPeer *tdlsLinkSetupList;
637 uint8_t num_tdls_peers;
638 uint8_t tdls_flags;
639 uint8_t tdls_state;
640 uint8_t tdls_prev_state;
641} tLimTdlsLinkSetupInfo, *tpLimTdlsLinkSetupInfo;
642
643typedef enum tdlsLinkMode {
644 TDLS_LINK_MODE_BG,
645 TDLS_LINK_MODE_N,
646 TDLS_LINK_MODE_AC,
647 TDLS_LINK_MODE_NONE
648} eLimTdlsLinkMode;
649#endif /* FEATURE_WLAN_TDLS */
650
651#endif