blob: f2adc553b2b4690ec71ef615fd986fee8dc4d7b2 [file] [log] [blame]
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08001/*
Ashish Kumar Dhanotiya443d31f2017-10-13 12:41:19 +05302 * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved.
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08003 *
Prakash Dhavali7090c5f2015-11-02 17:55:19 -08004 * Permission to use, copy, modify, and/or distribute this software for
5 * any purpose with or without fee is hereby granted, provided that the
6 * above copyright notice and this permission notice appear in all
7 * copies.
8 *
9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
10 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
11 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
12 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
13 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
14 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
15 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
16 * PERFORMANCE OF THIS SOFTWARE.
17 */
18
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080019#ifndef _ANIGLOBAL_H
20#define _ANIGLOBAL_H
21
Anurag Chouhan6d760662016-02-20 16:05:43 +053022#include "qdf_types.h"
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080023#include "sir_common.h"
24#include "ani_system_defs.h"
25#include "sys_def.h"
26#include "dph_global.h"
27#include "lim_global.h"
28#include "sch_global.h"
29#include "sys_global.h"
30#include "cfg_global.h"
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080031#include "sir_api.h"
32
33#include "csr_api.h"
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080034#include "sme_ft_api.h"
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080035#include "csr_support.h"
36#include "sme_internal.h"
37#include "sap_api.h"
38#include "csr_internal.h"
39
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080040#include "sme_rrm_internal.h"
41#include "rrm_global.h"
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080042
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080043#include <lim_ft_defs.h>
Selvaraj, Sridhar0672a122016-12-29 16:11:48 +053044#include "wlan_objmgr_psoc_obj.h"
Vignesh Viswanathan21c58cb2018-05-24 15:53:58 +053045#include "wlan_mlme_public_struct.h"
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080046
Jeff Johnson21b678d2018-06-07 11:14:00 -070047/**
48 * MAC_CONTEXT() - Convert an opaque mac handle into a mac context
49 * @handle: MAC handle to be converted
50 *
51 * Given an opaque mac handle this function will return the mac
52 * context that is associated with that handle.
53 *
54 * This is the inverse function of MAC_HANDLE()
55 *
56 * Return: mac context for @handle
57 */
58static inline tpAniSirGlobal MAC_CONTEXT(mac_handle_t handle)
59{
60 return (tpAniSirGlobal)handle;
61}
62
63/* legacy definition */
64#define PMAC_STRUCT(handle) MAC_CONTEXT(handle)
65
66/**
67 * MAC_HANDLE() - Convert a mac context into an opaque mac handle
68 * @mac: MAC context to be converted
69 *
70 * Given a mac context this function will return the opaque mac handle
71 * that is associated with that handle.
72 *
73 * This is the inverse function of PMAC_STRUCT()
74 *
75 * Return: opaque handle for @mac
76 */
77static inline mac_handle_t MAC_HANDLE(tpAniSirGlobal mac)
78{
79 return (mac_handle_t)mac;
80}
Prakash Dhavali7090c5f2015-11-02 17:55:19 -080081
82#define ANI_DRIVER_TYPE(pMac) (((tpAniSirGlobal)(pMac))->gDriverType)
83
84#define IS_MIRACAST_SESSION_PRESENT(pMac) (((tpAniSirGlobal)(pMac))->fMiracastSessionPresent ? 1 : 0)
85/* ------------------------------------------------------------------- */
86/* Bss Qos Caps bit map definition */
87#define LIM_BSS_CAPS_OFFSET_HCF 0
88#define LIM_BSS_CAPS_OFFSET_WME 1
89#define LIM_BSS_CAPS_OFFSET_WSM 2
90
91#define LIM_BSS_CAPS_HCF (1 << LIM_BSS_CAPS_OFFSET_HCF)
92#define LIM_BSS_CAPS_WME (1 << LIM_BSS_CAPS_OFFSET_WME)
93#define LIM_BSS_CAPS_WSM (1 << LIM_BSS_CAPS_OFFSET_WSM)
94
95/* cap should be one of HCF/WME/WSM */
96#define LIM_BSS_CAPS_GET(cap, val) (((val) & (LIM_BSS_CAPS_ ## cap)) >> LIM_BSS_CAPS_OFFSET_ ## cap)
97#define LIM_BSS_CAPS_SET(cap, val) ((val) |= (LIM_BSS_CAPS_ ## cap))
98#define LIM_BSS_CAPS_CLR(cap, val) ((val) &= (~(LIM_BSS_CAPS_ ## cap)))
99
100/* 40 beacons per heart beat interval is the default + 1 to count the rest */
101#define MAX_NO_BEACONS_PER_HEART_BEAT_INTERVAL 41
102
103/* max number of legacy bssid we can store during scan on one channel */
104#define MAX_NUM_LEGACY_BSSID_PER_CHANNEL 10
105
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800106#ifdef WLAN_FEATURE_CONCURRENT_P2P
107#define MAX_NO_OF_P2P_SESSIONS 5
108#endif /* WLAN_FEATURE_CONCURRENT_P2P */
109
110#define SPACE_ASCII_VALUE 32
111
112#define WLAN_HOST_SEQ_NUM_MIN 2048
113#define WLAN_HOST_SEQ_NUM_MAX 4095
114#define LOW_SEQ_NUM_MASK 0x000F
115#define HIGH_SEQ_NUM_MASK 0x0FF0
116#define HIGH_SEQ_NUM_OFFSET 4
Kiran Kumar Lokerea006a302018-03-07 20:58:13 -0800117#define DEF_HE_AUTO_SGI_LTF 0x0F07
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800118
119/* vendor element ID */
120#define IE_EID_VENDOR (221) /* 0xDD */
121#define IE_LEN_SIZE (1)
122#define IE_EID_SIZE (1)
123/* Minimum size of vendor IE = 3 bytes of oui_data + 1 byte of data */
124#define IE_VENDOR_OUI_SIZE (4)
125
Kiran Kumar Lokere666bf852016-05-02 12:23:02 -0700126/*
127 * NSS cfg bit definition.
128 * STA BIT[0:1]
129 * SAP BIT[2:3]
130 * P2P_GO BIT[4:5]
131 * P2P_CLIENT BIT[6:7]
132 * IBSS BIT[8:9]
133 * TDLS BIT[10:11]
134 * P2P_DEVICE BIT[12:13]
135 * OCB BIT[14:15]
136 */
137
138#define CFG_STA_NSS(_x) ((((_x) >> 0) & 0x3) ? (((_x) >> 0) & 0x3) : 1)
139#define CFG_SAP_NSS(_x) ((((_x) >> 2) & 0x3) ? (((_x) >> 2) & 0x3) : 1)
140#define CFG_P2P_GO_NSS(_x) ((((_x) >> 4) & 0x3) ? (((_x) >> 4) & 0x3) : 1)
141#define CFG_P2P_CLI_NSS(_x) ((((_x) >> 6) & 0x3) ? (((_x) >> 6) & 0x3) : 1)
142#define CFG_IBSS_NSS(_x) ((((_x) >> 8) & 0x3) ? (((_x) >> 8) & 0x3) : 1)
143#define CFG_TDLS_NSS(_x) ((((_x) >> 10) & 0x3) ? (((_x) >> 10) & 0x3) : 1)
144#define CFG_P2P_DEV_NSS(_x) ((((_x) >> 12) & 0x3) ? (((_x) >> 12) & 0x3) : 1)
145#define CFG_OCB_NSS(_x) ((((_x) >> 14) & 0x3) ? (((_x) >> 14) & 0x3) : 1)
146
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800147/**
148 * enum log_event_type - Type of event initiating bug report
149 * @WLAN_LOG_TYPE_NON_FATAL: Non fatal event
150 * @WLAN_LOG_TYPE_FATAL: Fatal event
151 *
152 * Enum indicating the type of event that is initiating the bug report
153 */
154enum log_event_type {
155 WLAN_LOG_TYPE_NON_FATAL,
156 WLAN_LOG_TYPE_FATAL,
157};
158
159/**
160 * enum log_event_indicator - Module triggering bug report
161 * @WLAN_LOG_INDICATOR_UNUSED: Unused
162 * @WLAN_LOG_INDICATOR_FRAMEWORK: Framework triggers bug report
163 * @WLAN_LOG_INDICATOR_HOST_DRIVER: Host driver triggers bug report
164 * @WLAN_LOG_INDICATOR_FIRMWARE: FW initiates bug report
Abhishek Singh5ea86532016-04-27 14:10:53 +0530165 * @WLAN_LOG_INDICATOR_HOST_ONLY: Host triggers fatal event bug report
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800166 *
167 * Enum indicating the module that triggered the bug report
168 */
169enum log_event_indicator {
170 WLAN_LOG_INDICATOR_UNUSED,
171 WLAN_LOG_INDICATOR_FRAMEWORK,
172 WLAN_LOG_INDICATOR_HOST_DRIVER,
173 WLAN_LOG_INDICATOR_FIRMWARE,
Abhishek Singh5ea86532016-04-27 14:10:53 +0530174 WLAN_LOG_INDICATOR_HOST_ONLY,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800175};
176
177/**
178 * enum log_event_host_reason_code - Reason code for bug report
179 * @WLAN_LOG_REASON_CODE_UNUSED: Unused
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800180 * @WLAN_LOG_REASON_ROAM_FAIL: Driver initiated roam has failed
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800181 * @WLAN_LOG_REASON_DATA_STALL: Unable to send/receive data due to low resource
182 * scenario for a prolonged period
183 * @WLAN_LOG_REASON_SME_COMMAND_STUCK: SME command is stuck in SME active queue
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800184 * @WLAN_LOG_REASON_QUEUE_FULL: Defer queue becomes full for a prolonged period
185 * @WLAN_LOG_REASON_POWER_COLLAPSE_FAIL: Unable to allow apps power collapse
186 * for a prolonged period
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800187 * @WLAN_LOG_REASON_MALLOC_FAIL: Memory allocation Fails
188 * @WLAN_LOG_REASON_VOS_MSG_UNDER_RUN: VOS Core runs out of message wrapper
Abhishek Singh5ea86532016-04-27 14:10:53 +0530189 * @WLAN_LOG_REASON_HDD_TIME_OUT: Wait for event Timeout in HDD layer
190 @WLAN_LOG_REASON_SME_OUT_OF_CMD_BUFL sme out of cmd buffer
Kapil Gupta0ed58dc2016-04-22 15:35:26 +0530191 * @WLAN_LOG_REASON_NO_SCAN_RESULTS: no scan results to report from HDD
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800192 * This enum contains the different reason codes for bug report
Sreelakshmi Konamkib53c6292017-03-01 13:13:23 +0530193 * @WLAN_LOG_REASON_SCAN_NOT_ALLOWED: scan not allowed due to connection states
Agrawal Ashishc416da62017-04-10 15:12:46 +0530194 * @WLAN_LOG_REASON_HB_FAILURE: station triggered heart beat failure with AP
195 * @WLAN_LOG_REASON_ROAM_HO_FAILURE: Handover failed during LFR3 roaming
Agrawal Ashishb08e7212017-07-04 18:47:02 +0530196 * @WLAN_LOG_REASON_DISCONNECT: Disconnect because of some failure
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800197 */
198enum log_event_host_reason_code {
199 WLAN_LOG_REASON_CODE_UNUSED,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800200 WLAN_LOG_REASON_ROAM_FAIL,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800201 WLAN_LOG_REASON_DATA_STALL,
202 WLAN_LOG_REASON_SME_COMMAND_STUCK,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800203 WLAN_LOG_REASON_QUEUE_FULL,
204 WLAN_LOG_REASON_POWER_COLLAPSE_FAIL,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800205 WLAN_LOG_REASON_MALLOC_FAIL,
206 WLAN_LOG_REASON_VOS_MSG_UNDER_RUN,
Abhishek Singh5ea86532016-04-27 14:10:53 +0530207 WLAN_LOG_REASON_HDD_TIME_OUT,
208 WLAN_LOG_REASON_SME_OUT_OF_CMD_BUF,
Kapil Gupta0ed58dc2016-04-22 15:35:26 +0530209 WLAN_LOG_REASON_NO_SCAN_RESULTS,
Sreelakshmi Konamkib53c6292017-03-01 13:13:23 +0530210 WLAN_LOG_REASON_SCAN_NOT_ALLOWED,
Agrawal Ashishc416da62017-04-10 15:12:46 +0530211 WLAN_LOG_REASON_HB_FAILURE,
Agrawal Ashishb08e7212017-07-04 18:47:02 +0530212 WLAN_LOG_REASON_ROAM_HO_FAILURE,
213 WLAN_LOG_REASON_DISCONNECT
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800214};
215
Abhishek Singh5ea86532016-04-27 14:10:53 +0530216
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800217/**
218 * enum userspace_log_level - Log level at userspace
219 * @LOG_LEVEL_NO_COLLECTION: verbose_level 0 corresponds to no collection
220 * @LOG_LEVEL_NORMAL_COLLECT: verbose_level 1 correspond to normal log level,
221 * with minimal user impact. this is the default value
222 * @LOG_LEVEL_ISSUE_REPRO: verbose_level 2 are enabled when user is lazily
223 * trying to reproduce a problem, wifi performances and power can be impacted
224 * but device should not otherwise be significantly impacted
225 * @LOG_LEVEL_ACTIVE: verbose_level 3+ are used when trying to
226 * actively debug a problem
227 *
228 * Various log levels defined in the userspace for logging applications
229 */
230enum userspace_log_level {
231 LOG_LEVEL_NO_COLLECTION,
232 LOG_LEVEL_NORMAL_COLLECT,
233 LOG_LEVEL_ISSUE_REPRO,
234 LOG_LEVEL_ACTIVE,
235};
236
237/**
238 * enum wifi_driver_log_level - Log level defined in the driver for logging
239 * @WLAN_LOG_LEVEL_OFF: No logging
240 * @WLAN_LOG_LEVEL_NORMAL: Default logging
241 * @WLAN_LOG_LEVEL_REPRO: Normal debug level
242 * @WLAN_LOG_LEVEL_ACTIVE: Active debug level
243 *
244 * Log levels defined for logging by the wifi driver
245 */
246enum wifi_driver_log_level {
247 WLAN_LOG_LEVEL_OFF,
248 WLAN_LOG_LEVEL_NORMAL,
249 WLAN_LOG_LEVEL_REPRO,
250 WLAN_LOG_LEVEL_ACTIVE,
251};
252
253/**
254 * enum wifi_logging_ring_id - Ring id of logging entities
255 * @RING_ID_WAKELOCK: Power events ring id
256 * @RING_ID_CONNECTIVITY: Connectivity event ring id
257 * @RING_ID_PER_PACKET_STATS: Per packet statistic ring id
Chandrasekaran, Manishekar907c2af2015-11-13 12:50:04 +0530258 * @RING_ID_DRIVER_DEBUG: Driver debug messages ring id
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800259 * @RING_ID_FIRMWARE_DEBUG: Firmware debug messages ring id
260 *
261 * This enum has the ring id values of logging rings
262 */
263enum wifi_logging_ring_id {
264 RING_ID_WAKELOCK,
265 RING_ID_CONNECTIVITY,
266 RING_ID_PER_PACKET_STATS,
Chandrasekaran, Manishekar907c2af2015-11-13 12:50:04 +0530267 RING_ID_DRIVER_DEBUG,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800268 RING_ID_FIRMWARE_DEBUG,
269};
270
271/* ------------------------------------------------------------------- */
272/* Change channel generic scheme */
Anurag Chouhanfb54ab02016-02-18 18:00:46 +0530273typedef void (*CHANGE_CHANNEL_CALLBACK)(tpAniSirGlobal pMac, QDF_STATUS status,
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800274 uint32_t *data,
275 tpPESession psessionEntry);
276
277/* / LIM global definitions */
278typedef struct sAniSirLimIbss {
279 void *pHdr;
280 void *pBeacon;
281} tAniSirLimIbss;
282
283typedef struct sDialogueToken {
284 /* bytes 0-3 */
285 uint16_t assocId;
286 uint8_t token;
287 uint8_t rsvd1;
288 /* Bytes 4-7 */
289 uint16_t tid;
290 uint8_t rsvd2[2];
291
292 struct sDialogueToken *next;
293} tDialogueToken, *tpDialogueToken;
294
295typedef struct sLimTimers {
296 /* TIMERS IN LIM ARE NOT SUPPOSED TO BE ZEROED OUT DURING RESET. */
297 /* DURING lim_initialize DONOT ZERO THEM OUT. */
298
299/* STA SPECIFIC TIMERS */
300
301 TX_TIMER gLimPreAuthClnupTimer;
302
303 /* Association related timers */
304 TX_TIMER gLimAssocFailureTimer;
305 TX_TIMER gLimReassocFailureTimer;
306
307 /* / Wait for Probe after Heartbeat failure timer on STA */
308 TX_TIMER gLimProbeAfterHBTimer;
309
310 /* Authentication related timers */
311 TX_TIMER gLimAuthFailureTimer;
312
313 /* Join Failure timeout on STA */
314 TX_TIMER gLimJoinFailureTimer;
315
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800316 /* CNF_WAIT timer */
317 TX_TIMER *gpLimCnfWaitTimer;
318
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800319 TX_TIMER gLimAddtsRspTimer; /* max wait for a response */
320
321 /* Update OLBC Cache Timer */
322 TX_TIMER gLimUpdateOlbcCacheTimer;
323
324 TX_TIMER gLimChannelSwitchTimer;
325 /* This TIMER is started on the STA, as indicated by the */
326 /* AP in its Quiet BSS IE, for the specified interval */
327 TX_TIMER gLimQuietTimer;
328 /* This TIMER is started on the AP, prior to the AP going */
329 /* into LEARN mode */
330 /* This TIMER is started on the STA, for the specified */
331 /* quiet duration */
332 TX_TIMER gLimQuietBssTimer;
333
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800334 TX_TIMER gLimFTPreAuthRspTimer;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800335
336#ifdef FEATURE_WLAN_ESE
337 TX_TIMER gLimEseTsmTimer;
338#endif
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800339 TX_TIMER gLimPeriodicJoinProbeReqTimer;
340 TX_TIMER gLimDisassocAckTimer;
341 TX_TIMER gLimDeauthAckTimer;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800342 /* This timer is used to convert active channel to
343 * passive channel when there is no beacon
344 * for a period of time on a particular DFS channel
345 */
346 TX_TIMER gLimActiveToPassiveChannelTimer;
Abhishek Singh7d3bc3e2016-02-03 17:45:01 +0530347 TX_TIMER g_lim_periodic_auth_retry_timer;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800348
Padma, Santhosh Kumarc56735f2017-09-13 18:14:26 +0530349 /* SAE authentication related timer */
350 TX_TIMER sae_auth_timer;
351
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800352/* ********************TIMER SECTION ENDS************************************************** */
353/* ALL THE FIELDS BELOW THIS CAN BE ZEROED OUT in lim_initialize */
354/* **************************************************************************************** */
355
356} tLimTimers;
357
358typedef struct {
359 void *pMlmDisassocReq;
360 void *pMlmDeauthReq;
361} tLimDisassocDeauthCnfReq;
362
363typedef struct sAniSirLim {
364 /* //////////////////////////////////// TIMER RELATED START /////////////////////////////////////////// */
365
366 tLimTimers limTimers;
367 /* / Flag to track if LIM timers are created or not */
368 uint32_t gLimTimersCreated;
369
370 /* //////////////////////////////////// TIMER RELATED END /////////////////////////////////////////// */
371
gaoleze5108942017-03-31 16:56:42 +0800372 struct lim_scan_channel_status scan_channel_status;
373
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800374 uint8_t gLimCurrentBssUapsd;
375
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800376 /* */
377 /* Store the BSS Index returned by HAL during */
378 /* WMA_ADD_BSS_RSP here. */
379 /* */
380
381 /* For now: */
382 /* This will be used during WMA_SET_BSSKEY_REQ in */
383 /* order to set the GTK */
384 /* Later: */
385 /* There could be other interfaces needing this info */
386 /* */
387
388 /* */
389 /* Due to the asynchronous nature of the interface */
390 /* between PE <-> HAL, some transient information */
391 /* like this needs to be cached. */
392 /* This is cached upon receipt of eWNI_SME_SETCONTEXT_REQ. */
393 /* This is released while posting LIM_MLM_SETKEYS_CNF */
394 /* */
395 void *gpLimMlmSetKeysReq;
396
397 /* //////////////////////////////////////// BSS RELATED END /////////////////////////////////////////// */
398
399 /* //////////////////////////////////////// IBSS RELATED START /////////////////////////////////////////// */
400 /* This indicates whether this STA coalesced and adapter to peer's capabilities or not. */
401 uint8_t gLimIbssCoalescingHappened;
402
403 /* / Definition for storing IBSS peers BSS description */
404 tLimIbssPeerNode *gLimIbssPeerList;
405 uint32_t gLimNumIbssPeers;
406 uint32_t ibss_retry_cnt;
407
408 /* ibss info - params for which ibss to join while coalescing */
409 tAniSirLimIbss ibssInfo;
410
411 /* //////////////////////////////////////// IBSS RELATED END /////////////////////////////////////////// */
412
413 /* //////////////////////////////////////// STATS/COUNTER RELATED START /////////////////////////////////////////// */
414
415 uint16_t maxStation;
416 uint16_t maxBssId;
417
418 uint32_t gLimNumBeaconsRcvd;
419 uint32_t gLimNumBeaconsIgnored;
420
421 uint32_t gLimNumDeferredMsgs;
422
423 /* / Variable to keep track of number of currently associated STAs */
424 uint16_t gLimNumOfAniSTAs; /* count of ANI peers */
425 uint16_t gLimAssocStaLimit;
426
427 /* Heart-Beat interval value */
428 uint32_t gLimHeartBeatCount;
429 tSirMacAddr gLimHeartBeatApMac[2];
430 uint8_t gLimHeartBeatApMacIndex;
431
432 /* Statistics to keep track of no. beacons rcvd in heart beat interval */
433 uint16_t
434 gLimHeartBeatBeaconStats[MAX_NO_BEACONS_PER_HEART_BEAT_INTERVAL];
435
436#ifdef WLAN_DEBUG
437 /* Debug counters */
438 uint32_t numTot, numBbt, numProtErr, numLearn, numLearnIgnore;
439 uint32_t numSme, numMAC[4][16];
440
441 /* Debug counter to track number of Assoc Req frame drops */
442 /* when received in pStaDs->mlmState other than LINK_ESTABLISED */
443 uint32_t gLimNumAssocReqDropInvldState;
444 /* counters to track rejection of Assoc Req due to Admission Control */
445 uint32_t gLimNumAssocReqDropACRejectTS;
446 uint32_t gLimNumAssocReqDropACRejectSta;
447 /* Debug counter to track number of Reassoc Req frame drops */
448 /* when received in pStaDs->mlmState other than LINK_ESTABLISED */
449 uint32_t gLimNumReassocReqDropInvldState;
450 /* Debug counter to track number of Hash Miss event that */
451 /* will not cause a sending of de-auth/de-associate frame */
452 uint32_t gLimNumHashMissIgnored;
453
454 /* Debug counter to track number of Beacon frames */
455 /* received in unexpected state */
456 uint32_t gLimUnexpBcnCnt;
457
458 /* Debug counter to track number of Beacon frames */
459 /* received in wt-join-state that do have SSID mismatch */
460 uint32_t gLimBcnSSIDMismatchCnt;
461
462 /* Debug counter to track number of Link establishments on STA/BP */
463 uint32_t gLimNumLinkEsts;
464
465 /* Debug counter to track number of Rx cleanup */
466 uint32_t gLimNumRxCleanup;
467
468 /* Debug counter to track different parse problem */
469 uint32_t gLim11bStaAssocRejectCount;
470
471#endif
472
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800473 /* //////////////////////////////////////// STATS/COUNTER RELATED END /////////////////////////////////////////// */
474
475 /* //////////////////////////////////////// STATES RELATED START /////////////////////////////////////////// */
476 /* Counts Heartbeat failures */
477 uint8_t gLimHBfailureCntInLinkEstState;
478 uint8_t gLimProbeFailureAfterHBfailedCnt;
479 uint8_t gLimHBfailureCntInOtherStates;
480
481 /**
482 * This variable indicates whether LIM module need to
483 * send response to host. Used to identify whether a request
484 * is generated internally within LIM module or by host
485 */
486 uint8_t gLimRspReqd;
487
488 /* / Previous SME State */
489 tLimSmeStates gLimPrevSmeState;
490
491 /* / MLM State visible across all Sirius modules */
492 tLimMlmStates gLimMlmState;
493
494 /* / Previous MLM State */
495 tLimMlmStates gLimPrevMlmState;
496
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800497 /* Can be set to invalid channel. If it is invalid, HAL */
498 /* should move to previous valid channel or stay in the */
499 /* current channel. CB state goes along with channel to resume to */
500 uint16_t gResumeChannel;
501 ePhyChanBondState gResumePhyCbState;
502
503 /* Change channel generic scheme */
504 CHANGE_CHANNEL_CALLBACK gpchangeChannelCallback;
505 uint32_t *gpchangeChannelData;
506
507 /* / SME State visible across all Sirius modules */
508 tLimSmeStates gLimSmeState;
509 /* / This indicates whether we're an AP, STA in BSS/IBSS */
510 tLimSystemRole gLimSystemRole;
511
512 /* Number of STAs that do not support short preamble */
513 tLimNoShortParams gLimNoShortParams;
514
515 /* Number of STAs that do not support short slot time */
516 tLimNoShortSlotParams gLimNoShortSlotParams;
517
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800518 /* */
519 /* ---------------- DPH ----------------------- */
520 /* these used to live in DPH but are now moved here (where they belong) */
521 uint32_t gLimPhyMode;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800522
523 uint8_t gLimQosEnabled:1; /* 11E */
524 uint8_t gLimWmeEnabled:1; /* WME */
525 uint8_t gLimWsmEnabled:1; /* WSM */
526 uint8_t gLimHcfEnabled:1;
527 uint8_t gLim11dEnabled:1;
528 uint8_t gLimProbeRespDisableFlag:1; /* control over probe response */
529 /* ---------------- DPH ----------------------- */
530
531 /* //////////////////////////////////////// STATES RELATED END /////////////////////////////////////////// */
532
533 /* //////////////////////////////////////// MISC RELATED START /////////////////////////////////////////// */
534
535 /* Deferred Queue Parameters */
536 tLimDeferredMsgQParams gLimDeferredMsgQ;
537
538 /* addts request if any - only one can be outstanding at any time */
539 tSirAddtsReq gLimAddtsReq;
540 uint8_t gLimAddtsSent;
541 uint8_t gLimAddtsRspTimerCount;
542
543 /* protection related config cache */
544 tCfgProtection cfgProtection;
545
546 uint8_t gLimProtectionControl;
547 /* This flag will remain to be set except while LIM is waiting for specific response messages */
548 /* from HAL. e.g when LIM issues ADD_STA req it will clear this flag and when it will receive */
549 /* the response the flag will be set. */
550 uint8_t gLimProcessDefdMsgs;
551
552 /* UAPSD flag used on AP */
553 uint8_t gUapsdEnable;
554
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800555 /* Used on STA for AC downgrade. This is a dynamic mask
556 * setting which keep tracks of ACs being admitted.
557 * If bit is set to 0: That partiular AC is not admitted
558 * If bit is set to 1: That particular AC is admitted
559 */
560 uint8_t gAcAdmitMask[SIR_MAC_DIRECTION_DIRECT];
561
562 /* dialogue token List head/tail for Action frames request sent. */
563 tpDialogueToken pDialogueTokenHead;
564 tpDialogueToken pDialogueTokenTail;
565
566 tLimTspecInfo tspecInfo[LIM_NUM_TSPEC_MAX];
567
568 /* admission control policy information */
569 tLimAdmitPolicyInfo admitPolicyInfo;
Anurag Chouhana37b5b72016-02-21 14:53:42 +0530570 qdf_mutex_t lkPeGlobalLock;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800571 uint8_t disableLDPCWithTxbfAP;
572#ifdef FEATURE_WLAN_TDLS
573 uint8_t gLimTDLSBufStaEnabled;
574 uint8_t gLimTDLSUapsdMask;
575 uint8_t gLimTDLSOffChannelEnabled;
576 uint8_t gLimTDLSWmmMode;
577#endif
578 /* //////////////////////////////////////// MISC RELATED END /////////////////////////////////////////// */
579
580 /* //////////////////////////////////////// ASSOC RELATED START /////////////////////////////////////////// */
581 /* Place holder for JoinReq message */
582 /* received by SME state machine */
583 /* tpSirSmeJoinReq gpLimJoinReq; */
584
585 /* Place holder for ReassocReq message */
586 /* received by SME state machine */
587 /* tpSirSmeReassocReq gpLimReassocReq; sep23 review */
588
589 /* Current Authentication type used at STA */
590 /* tAniAuthType gLimCurrentAuthType; */
591
592 /* Place holder for current authentication request */
593 /* being handled */
594 tLimMlmAuthReq *gpLimMlmAuthReq;
595
596 /* Reason code to determine the channel change context while sending */
597 /* WMA_CHNL_SWITCH_REQ message to HAL */
598 uint32_t channelChangeReasonCode;
599
600 /* / MAC level Pre-authentication related globals */
601 tSirMacChanNum gLimPreAuthChannelNumber;
602 tAniAuthType gLimPreAuthType;
603 tSirMacAddr gLimPreAuthPeerAddr;
604 uint32_t gLimNumPreAuthContexts;
605 tLimPreAuthTable gLimPreAuthTimerTable;
606
607 /* Placed holder to deauth reason */
608 uint16_t gLimDeauthReasonCode;
609
610 /* Place holder for Pre-authentication node list */
611 struct tLimPreAuthNode *pLimPreAuthList;
612
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800613 /* Assoc or ReAssoc Response Data/Frame */
614 void *gLimAssocResponseData;
615
616 /* One cache for each overlap and associated case. */
617 tCacheParams protStaOverlapCache[LIM_PROT_STA_OVERLAP_CACHE_SIZE];
618 tCacheParams protStaCache[LIM_PROT_STA_CACHE_SIZE];
619
620 /* //////////////////////////////////////// ASSOC RELATED END /////////////////////////////////////////// */
621
622 /* ////////////////////////////// HT RELATED ////////////////////////////////////////// */
623 /* */
624 /* The following global LIM variables maintain/manage */
625 /* the runtime configurations related to 802.11n */
626
627 /* 802.11n Station detected HT capability in Beacon Frame */
628 uint8_t htCapabilityPresentInBeacon;
629
630 /* 802.11 HT capability: Enabled or Disabled */
631 uint8_t htCapability;
632
633 uint8_t gHTGreenfield;
634
635 uint8_t gHTShortGI40Mhz;
636 uint8_t gHTShortGI20Mhz;
637
638 /* Set to 0 for 3839 octets */
639 /* Set to 1 for 7935 octets */
640 uint8_t gHTMaxAmsduLength;
641
642 /* DSSS/CCK at 40 MHz: Enabled 1 or Disabled */
643 uint8_t gHTDsssCckRate40MHzSupport;
644
645 /* PSMP Support: Enabled 1 or Disabled 0 */
646 uint8_t gHTPSMPSupport;
647
648 /* L-SIG TXOP Protection used only if peer support available */
649 uint8_t gHTLsigTXOPProtection;
650
651 /* MIMO Power Save */
652 tSirMacHTMIMOPowerSaveState gHTMIMOPSState;
653
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800654 /* */
655 /* A-MPDU Density */
656 /* 000 - No restriction */
657 /* 001 - 1/8 usec */
658 /* 010 - 1/4 usec */
659 /* 011 - 1/2 usec */
660 /* 100 - 1 usec */
661 /* 101 - 2 usec */
662 /* 110 - 4 usec */
663 /* 111 - 8 usec */
664 /* */
665 uint8_t gHTAMpduDensity;
666
667 bool gMaxAmsduSizeEnabled;
668 /* Maximum Tx/Rx A-MPDU factor */
669 uint8_t gHTMaxRxAMpduFactor;
670
671 /* */
672 /* Scheduled PSMP related - Service Interval Granularity */
673 /* 000 - 5 ms */
674 /* 001 - 10 ms */
675 /* 010 - 15 ms */
676 /* 011 - 20 ms */
677 /* 100 - 25 ms */
678 /* 101 - 30 ms */
679 /* 110 - 35 ms */
680 /* 111 - 40 ms */
681 /* */
682 uint8_t gHTServiceIntervalGranularity;
683
684 /* Indicates whether an AP wants to associate PSMP enabled Stations */
685 uint8_t gHTControlledAccessOnly;
686
687 /* RIFS Mode. Set if no APSD legacy devices associated */
688 uint8_t gHTRifsMode;
689 /* OBss Mode . set when we have Non HT STA is associated or with in overlap bss */
690 uint8_t gHTObssMode;
691
692 /* Identifies the current Operating Mode */
693 tSirMacHTOperatingMode gHTOperMode;
694
695 /* Indicates if PCO is activated in the BSS */
696 uint8_t gHTPCOActive;
697
698 /* */
699 /* If PCO is active, indicates which PCO phase to use */
700 /* 0 - switch to 20 MHz phase */
701 /* 1 - switch to 40 MHz phase */
702 /* */
703 uint8_t gHTPCOPhase;
704
705 /* */
706 /* Used only in beacons. For PR, this is set to 0 */
707 /* 0 - Primary beacon */
708 /* 1 - Secondary beacon */
709 /* */
710 uint8_t gHTSecondaryBeacon;
711
712 /* */
713 /* Dual CTS Protection */
714 /* 0 - Use RTS/CTS */
715 /* 1 - Dual CTS Protection is used */
716 /* */
717 uint8_t gHTDualCTSProtection;
718
719 /* */
720 /* Identifies a single STBC MCS that shall ne used for */
721 /* STBC control frames and STBC beacons */
722 /* */
723 uint8_t gHTSTBCBasicMCS;
724
725 uint8_t gHTNonGFDevicesPresent;
726
727 /* ////////////////////////////// HT RELATED ////////////////////////////////////////// */
728
729#ifdef FEATURE_WLAN_TDLS
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800730 uint8_t gLimTdlsLinkMode;
731 /* ////////////////////////////// TDLS RELATED ////////////////////////////////////////// */
732#endif
733
734 /* wsc info required to form the wsc IE */
735 tLimWscIeInfo wscIeInfo;
736 tpPESession gpSession; /* Pointer to session table */
737 /*
738 * sessionID and transactionID from SME is stored here for those messages, for which
739 * there is no session context in PE, e.g. Scan related messages.
740 **/
741 uint8_t gSmeSessionId;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800742
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800743 tSirRemainOnChnReq *gpLimRemainOnChanReq; /* hold remain on chan request in this buf */
Anurag Chouhana37b5b72016-02-21 14:53:42 +0530744 qdf_mutex_t lim_frame_register_lock;
Anurag Chouhanffb21542016-02-17 14:33:03 +0530745 qdf_list_t gLimMgmtFrameRegistratinQueue;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800746 uint32_t mgmtFrameSessionId;
Masti, Narayanraddi6319f062016-09-03 18:49:22 +0530747 uint32_t tdls_frm_session_id;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800748
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800749 tpPESession pSessionEntry;
750 uint8_t reAssocRetryAttempt;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800751 tLimDisassocDeauthCnfReq limDisassocDeauthCnfReq;
752 uint8_t deferredMsgCnt;
753 tSirDFSChannelList dfschannelList;
754 uint8_t deauthMsgCnt;
Sandeep Puligillaf4810702017-04-19 17:07:03 -0700755 uint8_t disassocMsgCnt;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800756 uint8_t gLimIbssStaLimit;
757
758 /* Number of channel switch IEs sent so far */
759 uint8_t gLimDfsChanSwTxCount;
760 uint8_t gLimDfsTargetChanNum;
Sandeep Puligilla1426d612017-04-12 18:22:06 -0700761 QDF_STATUS(*sme_msg_callback)
Jeff Johnson5f9ce2d2018-06-09 21:20:45 -0700762 (tpAniSirGlobal mac, struct scheduler_msg *msg);
Vignesh Viswanathan3d478032018-08-02 20:18:53 +0530763 QDF_STATUS(*stop_roaming_callback)
764 (tpAniSirGlobal mac, uint8_t session_id, uint8_t reason);
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800765 uint8_t retry_packet_cnt;
Sreelakshmi Konamki1bb6f312016-12-08 12:32:01 +0530766 uint8_t beacon_probe_rsp_cnt_per_scan;
Paul Zhang2f1077c2017-11-30 12:06:09 +0800767 wlan_scan_requester req_id;
Arif Hussain1513cb22018-01-05 19:56:31 -0800768 bool global_obss_offload_enabled;
Arif Hussain05fb4872018-01-03 16:02:55 -0800769 bool global_obss_color_collision_det_offload;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800770} tAniSirLim, *tpAniSirLim;
771
772struct mgmt_frm_reg_info {
Anurag Chouhanffb21542016-02-17 14:33:03 +0530773 qdf_list_node_t node; /* MUST be first element */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800774 uint16_t frameType;
775 uint16_t matchLen;
776 uint16_t sessionId;
777 uint8_t matchData[1];
778};
779
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800780typedef struct sRrmContext {
781 tRrmSMEContext rrmSmeContext;
782 tRrmPEContext rrmPEContext;
783} tRrmContext, *tpRrmContext;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800784
Abhishek Singh7d3bc3e2016-02-03 17:45:01 +0530785/**
786 * enum auth_tx_ack_status - Indicate TX status of AUTH
787 * @LIM_AUTH_ACK_NOT_RCD : Default status while waiting for ack status.
788 * @LIM_AUTH_ACK_RCD_SUCCESS : Ack is received.
789 * @LIM_AUTH_ACK_RCD_FAILURE : No Ack received.
790 *
791 * Indicate if driver is waiting for ACK status of auth or ACK received for AUTH
792 * OR NO ACK is received for the auth sent.
793 */
794enum auth_tx_ack_status {
795 LIM_AUTH_ACK_NOT_RCD,
796 LIM_AUTH_ACK_RCD_SUCCESS,
797 LIM_AUTH_ACK_RCD_FAILURE,
798};
Kiran Kumar Lokere666bf852016-05-02 12:23:02 -0700799/**
800 * struct vdev_type_nss - vdev type nss structure
801 * @sta: STA Nss value.
802 * @sap: SAP Nss value.
803 * @p2p_go: P2P GO Nss value.
804 * @p2p_cli: P2P CLI Nss value.
805 * @p2p_dev: P2P device Nss value.
806 * @ibss: IBSS Nss value.
807 * @tdls: TDLS Nss value.
808 * @ocb: OCB Nss value.
809 *
810 * Holds the Nss values of different vdev types.
811 */
812struct vdev_type_nss {
813 uint8_t sta;
814 uint8_t sap;
815 uint8_t p2p_go;
816 uint8_t p2p_cli;
817 uint8_t p2p_dev;
818 uint8_t ibss;
819 uint8_t tdls;
820 uint8_t ocb;
821};
Abhishek Singh7d3bc3e2016-02-03 17:45:01 +0530822
Vignesh Viswanathanb3dbbc82018-04-06 00:06:27 +0530823/**
824 * struct mgmt_beacon_probe_filter
825 * @bcn_filter_lock: Spinlock for the filter structure
826 * @num_sta_sessions: Number of active PE STA sessions
827 * @sta_bssid: Array of PE STA session's peer BSSIDs
828 * @num_ibss_sessions: Number of active PE IBSS sessions
829 * @ibss_ssid: Array of PE IBSS session's SSID
830 * @num_sap_session: Number of active PE SAP sessions
831 * @sap_channel: Array of PE SAP session's channels
832 *
833 * Used to filter the STA/IBSS/SAP beacons/probes required in PE and
834 * drop other unwanted beacon/probe response frames
835 */
836struct mgmt_beacon_probe_filter {
837 uint8_t num_sta_sessions;
838 tSirMacAddr sta_bssid[SIR_MAX_SUPPORTED_BSS];
839 uint8_t num_ibss_sessions;
840 tSirMacSSid ibss_ssid[SIR_MAX_SUPPORTED_BSS];
841 uint8_t num_sap_sessions;
842 uint8_t sap_channel[SIR_MAX_SUPPORTED_BSS];
843};
844
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800845/* ------------------------------------------------------------------- */
846/* / MAC Sirius parameter structure */
847typedef struct sAniSirGlobal {
Srinivas Girigowda35b00312017-06-27 21:52:03 -0700848 enum qdf_driver_type gDriverType;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800849
850 tAniSirCfg cfg;
Vignesh Viswanathan21c58cb2018-05-24 15:53:58 +0530851 struct wlan_mlme_cfg *mlme_cfg;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800852 tAniSirLim lim;
853 tAniSirSch sch;
854 tAniSirSys sys;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800855
856 /* PAL/HDD handle */
Jeff Johnson6aaaa992018-06-30 10:43:04 -0700857 hdd_handle_t hdd_handle;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800858
859
860 tSmeStruct sme;
861 tSapStruct sap;
gaurank kathpalia14e2f912017-08-31 14:51:45 +0530862 struct csr_scanstruct scan;
863 struct csr_roamstruct roam;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800864
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800865 tRrmContext rrm;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800866
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800867
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800868 csr_readyToSuspendCallback readyToSuspendCallback;
869 void *readyToSuspendContext;
Rachit Kankane02471912017-12-27 17:13:57 +0530870 uint8_t isCoalesingInIBSSAllowed;
Krunal Sonie6a1cda2017-09-27 15:23:02 -0700871 uint8_t lteCoexAntShare;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800872 uint8_t beacon_offload;
mukul sharma72c8b222015-09-04 17:02:01 +0530873 bool pmf_offload;
Vignesh Viswanathan731186f2017-09-18 13:47:37 +0530874 bool is_fils_roaming_supported;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800875 bool enable5gEBT;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800876 uint8_t fMiracastSessionPresent;
Rachit Kankane02471912017-12-27 17:13:57 +0530877 uint8_t f_prefer_non_dfs_on_radar;
878 uint32_t fEnableDebugLog;
879 uint32_t f_sta_miracast_mcc_rest_time_val;
880 /* Miracast session 0-Disabled, 1-Source, 2-sink */
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800881#ifdef WLAN_FEATURE_EXTWOW_SUPPORT
882 csr_readyToExtWoWCallback readyToExtWoWCallback;
883 void *readyToExtWoWContext;
884#endif
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800885 hdd_ftm_msg_processor ftm_msg_processor_callback;
Kiran Kumar Lokere666bf852016-05-02 12:23:02 -0700886 struct vdev_type_nss vdev_type_nss_2g;
887 struct vdev_type_nss vdev_type_nss_5g;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800888
Rachit Kankane02471912017-12-27 17:13:57 +0530889 uint16_t mgmtSeqNum;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800890 /* 802.11p enable */
891 bool enable_dot11p;
Nitesh Shahdb5ea0d2017-03-22 15:17:47 +0530892 /* DBS capability based on INI and FW capability */
893 uint8_t hw_dbs_capable;
Ganesh Kondabattini930304c2017-10-10 15:25:36 +0530894 uint32_t sta_sap_scc_on_dfs_chan;
Abhishek Singh7996eb72015-12-30 17:24:02 +0530895 sir_mgmt_frame_ind_callback mgmt_frame_ind_cb;
Krunal Sonida0e1e72018-06-01 10:50:38 -0700896 qdf_atomic_t global_cmd_id;
Selvaraj, Sridhar0672a122016-12-29 16:11:48 +0530897 struct wlan_objmgr_psoc *psoc;
Kiran Kumar Lokerea3de2262017-04-12 12:15:04 -0700898 struct wlan_objmgr_pdev *pdev;
Kapil Gupta4f0c0c12017-02-07 15:21:15 +0530899 void (*chan_info_cb)(struct scan_chan_info *chan_info);
Rachit Kankane02471912017-12-27 17:13:57 +0530900 /* Based on INI parameter */
901 uint32_t dual_mac_feature_disable;
902
903 enum country_src reg_hint_src;
Sreelakshmi Konamki0e9fb9a2017-04-05 18:57:15 +0530904 uint32_t rx_packet_drop_counter;
Rachit Kankane02471912017-12-27 17:13:57 +0530905 enum auth_tx_ack_status auth_ack_status;
906 uint8_t user_configured_nss;
907 bool snr_monitor_enabled;
Selvaraj, Sridhar5b5a0652017-05-04 11:23:07 +0530908 bool ignore_assoc_disallowed;
Rachit Kankane02471912017-12-27 17:13:57 +0530909 bool sta_prefer_80MHz_over_160MHz;
910 bool first_scan_done;
911 int8_t first_scan_bucket_threshold;
Ashish Kumar Dhanotiya443d31f2017-10-13 12:41:19 +0530912 uint32_t peer_rssi;
913 uint32_t peer_txrate;
914 uint32_t peer_rxrate;
Vignesh Viswanathan694e28e2018-01-18 20:53:57 +0530915 /* 11k Offload Support */
916 bool is_11k_offload_supported;
Kiran Kumar Lokere08195ef2018-01-17 19:25:15 -0800917 uint8_t reject_addba_req;
Kiran Kumar Lokerebc87bec2018-02-27 20:06:42 -0800918 uint16_t usr_cfg_ba_buff_size;
Arif Hussain0e246802018-05-01 18:13:44 -0700919 bool is_usr_cfg_amsdu_enabled;
Kiran Kumar Lokere3324f632018-03-01 21:43:21 -0800920 uint8_t no_ack_policy_cfg[MAX_NUM_AC];
Kiran Kumar Lokerea006a302018-03-07 20:58:13 -0800921 uint32_t he_sgi_ltf_cfg_bit_mask;
Kiran Kumar Lokeref3044852018-06-27 14:14:24 -0700922 uint8_t usr_cfg_tx_bfee_nsts;
Vignesh Viswanathanb3dbbc82018-04-06 00:06:27 +0530923 struct mgmt_beacon_probe_filter bcn_filter;
Kiran Kumar Lokerefba20632018-07-05 16:51:27 -0700924 tSirMacEdcaParamRecord usr_mu_edca_params[MAX_NUM_AC];
Kiran Kumar Lokeref54b8552018-07-10 00:53:38 -0700925 bool usr_cfg_mu_edca_params;
Jinwei Chen998a1a02018-06-20 17:20:34 +0800926#ifdef WLAN_FEATURE_11AX
927 tDot11fIEhe_cap he_cap_2g;
928 tDot11fIEhe_cap he_cap_5g;
929#endif
Liangwei Dong0da14262018-07-03 03:30:23 -0400930 bool obss_scan_offload;
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800931} tAniSirGlobal;
932
Prakash Dhavali7090c5f2015-11-02 17:55:19 -0800933
934#ifdef FEATURE_WLAN_TDLS
935
936#define RFC1042_HDR_LENGTH (6)
937#define GET_BE16(x) ((uint16_t) (((x)[0] << 8) | (x)[1]))
938#define ETH_TYPE_89_0d (0x890d)
939#define ETH_TYPE_LEN (2)
940#define PAYLOAD_TYPE_TDLS_SIZE (1)
941#define PAYLOAD_TYPE_TDLS (2)
942
943#endif
944
945#endif /* _ANIGLOBAL_H */