blob: aaffe0c0f6c93f57cbf2eaa2bcfc2b7bb247d3a7 [file] [log] [blame]
Jeff Johnson295189b2012-06-20 16:38:30 -07001/*
Abhinav Kumar8eed0362019-08-05 14:26:07 +05302 * Copyright (c) 2012-2017, 2019 The Linux Foundation. All rights reserved.
Kiet Lam842dad02014-02-18 18:44:02 -08003 *
4 * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
5 *
6 *
7 * Permission to use, copy, modify, and/or distribute this software for
8 * any purpose with or without fee is hereby granted, provided that the
9 * above copyright notice and this permission notice appear in all
10 * copies.
11 *
12 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
13 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
14 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
15 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
16 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
17 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
18 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
19 * PERFORMANCE OF THIS SOFTWARE.
20 */
21
22/*
Kiet Lama7f454d2014-07-24 12:04:06 -070023 * This file was originally distributed by Qualcomm Atheros, Inc.
24 * under proprietary terms before Copyright ownership was assigned
25 * to the Linux Foundation.
Jeff Johnson295189b2012-06-20 16:38:30 -070026 */
Kiet Lam842dad02014-02-18 18:44:02 -080027
28
Kiet Lama7f454d2014-07-24 12:04:06 -070029
30
Jeff Johnson295189b2012-06-20 16:38:30 -070031/*
Jeff Johnson295189b2012-06-20 16:38:30 -070032 * This file limTypes.h contains the definitions used by all
33 * all LIM modules.
34 * Author: Chandra Modumudi
35 * Date: 02/11/02
36 * History:-
37 * Date Modified by Modification Information
38 * --------------------------------------------------------------------
39 *
40 */
41#ifndef __LIM_TYPES_H
42#define __LIM_TYPES_H
43
44#include "wniApi.h"
45#include "sirApi.h"
46#include "sirCommon.h"
47#include "sirMacProtDef.h"
48#include "utilsApi.h"
49
Jeff Johnson295189b2012-06-20 16:38:30 -070050#include "wlan_qct_wdi_ds.h"
Jeff Johnson295189b2012-06-20 16:38:30 -070051
52#include "limApi.h"
53#include "limDebug.h"
Konamki, Sreelakshmi2bfb8b02015-07-29 11:41:24 +053054#include "limTrace.h"
Jeff Johnson295189b2012-06-20 16:38:30 -070055#include "limSendSmeRspMessages.h"
56#include "sysGlobal.h"
57#include "dphGlobal.h"
58#include "parserApi.h"
59
60#define LINK_TEST_DEFER 1
61
62#define TRACE_EVENT_CNF_TIMER_DEACT 0x6600
63#define TRACE_EVENT_CNF_TIMER_ACT 0x6601
64#define TRACE_EVENT_AUTH_RSP_TIMER_DEACT 0x6602
65#define TRACE_EVENT_AUTH_RSP_TIMER_ACT 0x6603
66
67// MLM message types
68#define LIM_MLM_MSG_START 1000
69#define LIM_MLM_SCAN_REQ LIM_MLM_MSG_START
Madan Mohan Koyyalamudia53c4dc2012-11-13 10:35:42 -080070#define LIM_MLM_SCAN_CNF (LIM_MLM_MSG_START + 1)
71#define LIM_MLM_START_REQ (LIM_MLM_MSG_START + 2)
72#define LIM_MLM_START_CNF (LIM_MLM_MSG_START + 3)
73#define LIM_MLM_JOIN_REQ (LIM_MLM_MSG_START + 4)
74#define LIM_MLM_JOIN_CNF (LIM_MLM_MSG_START + 5)
75#define LIM_MLM_AUTH_REQ (LIM_MLM_MSG_START + 6)
76#define LIM_MLM_AUTH_CNF (LIM_MLM_MSG_START + 7)
77#define LIM_MLM_AUTH_IND (LIM_MLM_MSG_START + 8)
78#define LIM_MLM_ASSOC_REQ (LIM_MLM_MSG_START + 9)
79#define LIM_MLM_ASSOC_CNF (LIM_MLM_MSG_START + 10)
80#define LIM_MLM_ASSOC_IND (LIM_MLM_MSG_START + 11)
81#define LIM_MLM_DISASSOC_REQ (LIM_MLM_MSG_START + 12)
82#define LIM_MLM_DISASSOC_CNF (LIM_MLM_MSG_START + 13)
83#define LIM_MLM_DISASSOC_IND (LIM_MLM_MSG_START + 14)
84#define LIM_MLM_REASSOC_REQ (LIM_MLM_MSG_START + 15)
85#define LIM_MLM_REASSOC_CNF (LIM_MLM_MSG_START + 16)
86#define LIM_MLM_REASSOC_IND (LIM_MLM_MSG_START + 17)
87#define LIM_MLM_DEAUTH_REQ (LIM_MLM_MSG_START + 18)
88#define LIM_MLM_DEAUTH_CNF (LIM_MLM_MSG_START + 19)
89#define LIM_MLM_DEAUTH_IND (LIM_MLM_MSG_START + 20)
90#define LIM_MLM_TSPEC_REQ (LIM_MLM_MSG_START + 21)
91#define LIM_MLM_TSPEC_CNF (LIM_MLM_MSG_START + 22)
92#define LIM_MLM_TSPEC_IND (LIM_MLM_MSG_START + 23)
93#define LIM_MLM_SETKEYS_REQ (LIM_MLM_MSG_START + 24)
94#define LIM_MLM_SETKEYS_CNF (LIM_MLM_MSG_START + 25)
95#define LIM_MLM_LINK_TEST_STOP_REQ (LIM_MLM_MSG_START + 30)
96#define LIM_MLM_PURGE_STA_IND (LIM_MLM_MSG_START + 31)
97#define LIM_MLM_ADDBA_REQ (LIM_MLM_MSG_START + 32)
98#define LIM_MLM_ADDBA_CNF (LIM_MLM_MSG_START + 33)
99#define LIM_MLM_ADDBA_IND (LIM_MLM_MSG_START + 34)
100#define LIM_MLM_ADDBA_RSP (LIM_MLM_MSG_START + 35)
101#define LIM_MLM_DELBA_REQ (LIM_MLM_MSG_START + 36)
102#define LIM_MLM_DELBA_CNF (LIM_MLM_MSG_START + 37)
103#define LIM_MLM_DELBA_IND (LIM_MLM_MSG_START + 38)
104#define LIM_MLM_REMOVEKEY_REQ (LIM_MLM_MSG_START + 39)
105#define LIM_MLM_REMOVEKEY_CNF (LIM_MLM_MSG_START + 40)
Jeff Johnson295189b2012-06-20 16:38:30 -0700106
Jeff Johnsone7245742012-09-05 17:12:55 -0700107#ifdef FEATURE_OEM_DATA_SUPPORT
Madan Mohan Koyyalamudia53c4dc2012-11-13 10:35:42 -0800108#define LIM_MLM_OEM_DATA_REQ (LIM_MLM_MSG_START + 41)
109#define LIM_MLM_OEM_DATA_CNF (LIM_MLM_MSG_START + 42)
Jeff Johnsone7245742012-09-05 17:12:55 -0700110#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700111
112#define LIM_HASH_ADD 0
113#define LIM_HASH_UPDATE 1
114
115#define LIM_WEP_IN_FC 1
116#define LIM_NO_WEP_IN_FC 0
117
118#define LIM_DECRYPT_ICV_FAIL 1
119
120/// Definitions to distinquish between Association/Reassociaton
121#define LIM_ASSOC 0
122#define LIM_REASSOC 1
123
124/// Minimum Memory blocks require for different scenario
125#define LIM_MIN_MEM_ASSOC 4
126
127/// Verifies whether given mac addr matches the CURRENT Bssid
Kiet Lamb1233192013-11-28 13:38:20 +0530128#define IS_CURRENT_BSSID(pMac, addr,psessionEntry) (vos_mem_compare( addr, \
129 psessionEntry->bssId, \
130 sizeof(psessionEntry->bssId)))
Jeff Johnson295189b2012-06-20 16:38:30 -0700131/// Verifies whether given addr matches the REASSOC Bssid
Kiet Lamb1233192013-11-28 13:38:20 +0530132#define IS_REASSOC_BSSID(pMac, addr,psessionEntry) (vos_mem_compare( addr, \
133 psessionEntry->limReAssocbssId, \
134 sizeof(psessionEntry->limReAssocbssId)))
Jeff Johnson295189b2012-06-20 16:38:30 -0700135
136#define REQ_TYPE_REGISTRAR (0x2)
137#define REQ_TYPE_WLAN_MANAGER_REGISTRAR (0x3)
138
139#define RESP_TYPE_REGISTRAR (0x2)
140#define RESP_TYPE_ENROLLEE_INFO_ONLY (0x0)
141#define RESP_TYPE_ENROLLEE_OPEN_8021X (0x1)
142#define RESP_TYPE_AP (0x3)
143#define LIM_TX_FRAMES_THRESHOLD_ON_CHIP 300
144
145
146// enums used by LIM are as follows
147
148enum eLimDisassocTrigger
149{
150 eLIM_HOST_DISASSOC,
151 eLIM_PEER_ENTITY_DISASSOC,
152 eLIM_LINK_MONITORING_DISASSOC,
153 eLIM_PROMISCUOUS_MODE_DISASSOC,
154 eLIM_HOST_DEAUTH,
155 eLIM_PEER_ENTITY_DEAUTH,
156 eLIM_LINK_MONITORING_DEAUTH,
157 eLIM_JOIN_FAILURE,
158 eLIM_REASSOC_REJECT
159};
160
161/* Reason code to determine the channel change context while sending
162 * WDA_CHNL_SWITCH_REQ message to HAL
163 */
164enum eChannelChangeReasonCodes
165{
166 LIM_SWITCH_CHANNEL_REASSOC,
167 LIM_SWITCH_CHANNEL_JOIN,
168 LIM_SWITCH_CHANNEL_OPERATION, // Generic change channel
Kalikinkar dhara085c02f2014-02-28 15:32:12 -0800169 LIM_SWITCH_CHANNEL_CSA,
Abhishek Singh550aa8c2017-10-30 17:34:53 +0530170 LIM_SWITCH_CHANNEL_SAP_ECSA,
Jeff Johnson295189b2012-06-20 16:38:30 -0700171};
172
173typedef struct sLimAuthRspTimeout
174{
175 tSirMacAddr peerMacAddr;
176} tLimAuthRspTimeout;
177
178typedef struct sLimMlmStartReq
179{
180 tSirMacSSid ssId;
181 tSirBssType bssType;
182 tSirMacAddr bssId;
183 tSirMacBeaconInterval beaconPeriod;
184 tANI_U8 dtimPeriod;
185 tSirMacCfParamSet cfParamSet;
186 tSirMacChanNum channelNumber;
Jeff Johnsone7245742012-09-05 17:12:55 -0700187 ePhyChanBondState cbMode;
Jeff Johnson295189b2012-06-20 16:38:30 -0700188 tANI_U16 atimWindow;
189 tSirMacRateSet rateSet;
190 tANI_U8 sessionId; //Added For BT-AMP Support
191
192 // Parameters reqd for new HAL (message) interface
193 tSirNwType nwType;
194 tANI_U8 htCapable;
195 tSirMacHTOperatingMode htOperMode;
196 tANI_U8 dualCTSProtection;
197 tANI_U8 txChannelWidthSet;
Jeff Johnson295189b2012-06-20 16:38:30 -0700198 tANI_U8 ssidHidden;
199 tANI_U8 wps_state;
200 tANI_U8 obssProtEnabled;
Jeff Johnson295189b2012-06-20 16:38:30 -0700201} tLimMlmStartReq, *tpLimMlmStartReq;
202
203typedef struct sLimMlmStartCnf
204{
205 tSirResultCodes resultCode;
206 tANI_U8 sessionId;
207} tLimMlmStartCnf, *tpLimMlmStartCnf;
208
209typedef struct sLimMlmScanCnf
210{
211 tSirResultCodes resultCode;
212 tANI_U16 scanResultLength;
Jeff Johnson295189b2012-06-20 16:38:30 -0700213 tANI_U8 sessionId;
Sridhar Selvarajb59cd8c2017-07-17 18:43:55 +0530214 tSirBssDescription bssDescription[1];
215 /*
216 * WARNING: Pls make bssDescription as last variable in struct
217 * tLimMlmScanCnf as it has ieFields followed after this bss
218 * description. Adding a variable after this corrupts the ieFields
219 */
Jeff Johnson295189b2012-06-20 16:38:30 -0700220} tLimMlmScanCnf, *tpLimMlmScanCnf;
221
222typedef struct sLimScanResult
223{
224 tANI_U16 numBssDescriptions;
225 tSirBssDescription bssDescription[1];
226} tLimScanResult;
227
228typedef struct sLimMlmJoinCnf
229{
230 tSirResultCodes resultCode;
231 tANI_U16 protStatusCode;
232 tANI_U8 sessionId;
233} tLimMlmJoinCnf, *tpLimMlmJoinCnf;
234
235typedef struct sLimMlmAssocReq
236{
237 tSirMacAddr peerMacAddr;
238 tANI_U32 assocFailureTimeout;
239 tANI_U16 capabilityInfo;
240 tSirMacListenInterval listenInterval;
241 tANI_U8 sessionId;
242} tLimMlmAssocReq, *tpLimMlmAssocReq;
243
244typedef struct sLimMlmAssocCnf
245{
246 tSirResultCodes resultCode; //Internal status code.
247 tANI_U16 protStatusCode; //Protocol Status code.
248 tANI_U8 sessionId;
249} tLimMlmAssocCnf, *tpLimMlmAssocCnf;
250
251typedef struct sLimMlmAssocInd
252{
253 tSirMacAddr peerMacAddr;
254 tANI_U16 aid;
255 tAniAuthType authType;
256 tAniSSID ssId;
257 tSirRSNie rsnIE;
Jeff Johnson1250df42012-12-10 14:31:52 -0800258 tSirAddie addIE; // additional IE received from the peer, which possibly includes WSC IE and/or P2P IE.
Jeff Johnson295189b2012-06-20 16:38:30 -0700259 tSirMacCapabilityInfo capabilityInfo;
Jeff Johnson295189b2012-06-20 16:38:30 -0700260 tAniBool spectrumMgtIndicator;
261 tSirMacPowerCapInfo powerCap;
262 tSirSupChnl supportedChannels;
263 tANI_U8 sessionId;
264
265
Jeff Johnson295189b2012-06-20 16:38:30 -0700266 tAniBool WmmStaInfoPresent;
Hardik Kantilal Patel1ba630f2014-11-21 04:32:05 +0530267#ifdef WLAN_FEATURE_AP_HT40_24G
268 tAniBool HT40MHzIntoPresent;
269#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700270
Jeff Johnson295189b2012-06-20 16:38:30 -0700271 // Required for indicating the frames to upper layer
272 tANI_U32 beaconLength;
273 tANI_U8* beaconPtr;
274 tANI_U32 assocReqLength;
Deepthi Gowriae6a1662015-10-12 12:59:37 +0530275 tANI_U8* assocReqPtr;
276 uint32_t rate_flags;
Hanumanth Reddy Pothula57323632017-12-06 17:55:09 +0530277 tSirSmeChanInfo chan_info;
278 tSirMacHTChannelWidth ch_width;
279 tDot11fIEHTCaps HTCaps;
280 tDot11fIEVHTCaps VHTCaps;
Jeff Johnson295189b2012-06-20 16:38:30 -0700281} tLimMlmAssocInd, *tpLimMlmAssocInd;
282
283typedef struct sLimMlmReassocReq
284{
285 tSirMacAddr peerMacAddr;
286 tANI_U32 reassocFailureTimeout;
287 tANI_U16 capabilityInfo;
288 tSirMacListenInterval listenInterval;
289 tANI_U8 sessionId;
290} tLimMlmReassocReq, *tpLimMlmReassocReq;
291
292typedef struct sLimMlmReassocCnf
293{
294 tSirResultCodes resultCode;
295 tANI_U16 protStatusCode; //Protocol Status code.
296 tANI_U8 sessionId;
297} tLimMlmReassocCnf, *tpLimMlmReassocCnf;
298
299typedef struct sLimMlmReassocInd
300{
301 tSirMacAddr peerMacAddr;
302 tSirMacAddr currentApAddr;
303 tANI_U16 aid;
304 tAniAuthType authType;
305 tAniSSID ssId;
306 tSirRSNie rsnIE;
Jeff Johnson1250df42012-12-10 14:31:52 -0800307 tSirAddie addIE; // additional IE received from the peer, which can be WSC IE and/or P2P IE.
Jeff Johnson295189b2012-06-20 16:38:30 -0700308 tSirMacCapabilityInfo capabilityInfo;
Jeff Johnson295189b2012-06-20 16:38:30 -0700309 tAniBool spectrumMgtIndicator;
310 tSirMacPowerCapInfo powerCap;
311 tSirSupChnl supportedChannels;
312
Jeff Johnson295189b2012-06-20 16:38:30 -0700313 tAniBool WmmStaInfoPresent;
Hardik Kantilal Patel1ba630f2014-11-21 04:32:05 +0530314#ifdef WLAN_FEATURE_AP_HT40_24G
315 tAniBool HT40MHzIntoPresent;
316#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700317
Jeff Johnson295189b2012-06-20 16:38:30 -0700318 // Required for indicating the frames to upper layer
319 tANI_U32 beaconLength;
320 tANI_U8* beaconPtr;
321 tANI_U32 assocReqLength;
322 tANI_U8* assocReqPtr;
323} tLimMlmReassocInd, *tpLimMlmReassocInd;
324
325typedef struct sLimMlmAuthCnf
326{
327 tSirMacAddr peerMacAddr;
328 tAniAuthType authType;
329 tSirResultCodes resultCode;
330 tANI_U16 protStatusCode;
331 tANI_U8 sessionId;
332} tLimMlmAuthCnf, *tpLimMlmAuthCnf;
333
334typedef struct sLimMlmAuthInd
335{
336 tSirMacAddr peerMacAddr;
337 tAniAuthType authType;
338 tANI_U8 sessionId;
339} tLimMlmAuthInd, *tpLimMlmAuthInd;
340
341typedef struct sLimMlmDeauthReq
342{
343 tSirMacAddr peerMacAddr;
344 tANI_U16 reasonCode;
345 tANI_U16 deauthTrigger;
346 tANI_U16 aid;
347 tANI_U8 sessionId; //Added for BT-AMP SUPPORT
348
349} tLimMlmDeauthReq, *tpLimMlmDeauthReq;
350
351typedef struct sLimMlmDeauthCnf
352{
353 tSirMacAddr peerMacAddr;
354 tSirResultCodes resultCode;
355 tANI_U16 deauthTrigger;
356 tANI_U16 aid;
357 tANI_U8 sessionId;
358} tLimMlmDeauthCnf, *tpLimMLmDeauthCnf;
359
360typedef struct sLimMlmDeauthInd
361{
362 tSirMacAddr peerMacAddr;
363 tANI_U16 reasonCode;
364 tANI_U16 deauthTrigger;
365 tANI_U16 aid;
366} tLimMlmDeauthInd, *tpLimMlmDeauthInd;
367
368typedef struct sLimMlmDisassocReq
369{
370 tSirMacAddr peerMacAddr;
371 tANI_U16 reasonCode;
372 tANI_U16 disassocTrigger;
373 tANI_U16 aid;
374 tANI_U8 sessionId;
375} tLimMlmDisassocReq, *tpLimMlmDisassocReq;
376
377typedef struct sLimMlmDisassocCnf
378{
379 tSirMacAddr peerMacAddr;
380 tSirResultCodes resultCode;
381 tANI_U16 disassocTrigger;
382 tANI_U16 aid;
383 tANI_U8 sessionId;
384} tLimMlmDisassocCnf, *tpLimMlmDisassocCnf;
385
386typedef struct sLimMlmDisassocInd
387{
388 tSirMacAddr peerMacAddr;
389 tANI_U16 reasonCode;
390 tANI_U16 disassocTrigger;
391 tANI_U16 aid;
392 tANI_U8 sessionId;
393} tLimMlmDisassocInd, *tpLimMlmDisassocInd;
394
395typedef struct sLimMlmPurgeStaReq
396{
397 tSirMacAddr peerMacAddr;
398 tANI_U16 aid;
399 tANI_U8 sessionId;//Added For BT-AMP Support
400} tLimMlmPurgeStaReq, *tpLimMlmPurgeStaReq;
401
402typedef struct sLimMlmPurgeStaInd
403{
404 tSirMacAddr peerMacAddr;
405 tANI_U16 reasonCode;
406 tANI_U16 purgeTrigger;
407 tANI_U16 aid;
408 tANI_U8 sessionId;
409} tLimMlmPurgeStaInd, *tpLimMlmPurgeStaInd;
410
411typedef struct sLimMlmSetKeysReq
412{
413 tSirMacAddr peerMacAddr;
414 tANI_U8 sessionId; //Added For BT-AMP Support
415 tANI_U16 aid;
416 tAniEdType edType; // Encryption/Decryption type
417 tANI_U8 numKeys;
418 tSirKeys key[SIR_MAC_MAX_NUM_OF_DEFAULT_KEYS];
419} tLimMlmSetKeysReq, *tpLimMlmSetKeysReq;
420
421typedef struct sLimMlmSetKeysCnf
422{
423 tSirMacAddr peerMacAddr;
424 tANI_U16 resultCode;
425 tANI_U16 aid;
426 tANI_U8 sessionId;
427} tLimMlmSetKeysCnf, *tpLimMlmSetKeysCnf;
428
429typedef struct sLimMlmRemoveKeyReq
430{
431 tSirMacAddr peerMacAddr;
432 tANI_U8 sessionId; //Added FOr BT-AMP Support
433 tAniEdType edType; // Encryption/Decryption type
434 tANI_U8 wepType; //STATIC / DYNAMIC specifier
435 tANI_U8 keyId; //Key Id To be removed.
436 tANI_BOOLEAN unicast;
437} tLimMlmRemoveKeyReq, *tpLimMlmRemoveKeyReq;
438
439typedef struct sLimMlmRemoveKeyCnf
440{
441 tSirMacAddr peerMacAddr;
442 tANI_U16 resultCode;
443 tANI_U8 sessionId;
444} tLimMlmRemoveKeyCnf, *tpLimMlmRemoveKeyCnf;
445
446
447typedef struct sLimMlmResetReq
448{
449 tSirMacAddr macAddr;
450 tANI_U8 performCleanup;
451 tANI_U8 sessionId;
452} tLimMlmResetReq, *tpLimMlmResetReq;
453
454typedef struct sLimMlmResetCnf
455{
456 tSirMacAddr macAddr;
457 tSirResultCodes resultCode;
458 tANI_U8 sessionId;
459} tLimMlmResetCnf, *tpLimMlmResetCnf;
460
461
462typedef struct sLimMlmLinkTestStopReq
463{
464 tSirMacAddr peerMacAddr;
465 tANI_U8 sessionId;
Jeff Johnson295189b2012-06-20 16:38:30 -0700466} tLimMlmLinkTestStopReq, *tpLimMlmLinkTestStopReq;
467
468
469//
470// Block ACK related MLME data structures
471//
472
473typedef struct sLimMlmAddBAReq
474{
475
476 // ADDBA recipient
477 tSirMacAddr peerMacAddr;
478
479 // ADDBA Action Frame dialog token
480 tANI_U8 baDialogToken;
481
482 // ADDBA requested for TID
483 tANI_U8 baTID;
484
485 // BA policy
486 // 0 - Delayed BA (Not supported)
487 // 1 - Immediate BA
488 tANI_U8 baPolicy;
489
490 // BA buffer size - (0..127) max size MSDU's
491 tANI_U16 baBufferSize;
492
493 // BA timeout in TU's
494 // 0 means no timeout will occur
495 tANI_U16 baTimeout;
496
497 // ADDBA failure timeout in TU's
498 // Greater than or equal to 1
499 tANI_U16 addBAFailureTimeout;
500
501 // BA Starting Sequence Number
502 tANI_U16 baSSN;
503
504 tANI_U8 sessionId;
505
506} tLimMlmAddBAReq, *tpLimMlmAddBAReq;
507
508typedef struct sLimMlmAddBACnf
509{
510
511 // ADDBA recipient
512 tSirMacAddr peerMacAddr;
513
514 // ADDBA Action Frame dialog token
515 tANI_U8 baDialogToken;
516
517 // ADDBA requested for TID
518 tANI_U8 baTID;
519
520 // BA status code
521 tSirMacStatusCodes addBAResultCode;
522
523 // BA policy
524 // 0 - Delayed BA (Not supported)
525 // 1 - Immediate BA
526 tANI_U8 baPolicy;
527
528 // BA buffer size - (0..127) max size MSDU's
529 tANI_U16 baBufferSize;
530
531 // BA timeout in TU's
532 // 0 means no timeout will occur
533 tANI_U16 baTimeout;
534
535 // ADDBA direction
536 // 1 - Originator
537 // 0 - Recipient
538 tANI_U8 baDirection;
539 tANI_U8 sessionId;
540
541
542} tLimMlmAddBACnf, *tpLimMlmAddBACnf;
543
544typedef struct sLimMlmAddBAInd
545{
546
547 // ADDBA recipient
548 tSirMacAddr peerMacAddr;
549
550 // ADDBA Action Frame dialog token
551 tANI_U8 baDialogToken;
552
553 // ADDBA requested for TID
554 tANI_U8 baTID;
555
556 // BA policy
557 // 0 - Delayed BA (Not supported)
558 // 1 - Immediate BA
559 tANI_U8 baPolicy;
560
561 // BA buffer size - (0..127) max size MSDU's
562 tANI_U16 baBufferSize;
563
564 // BA timeout in TU's
565 // 0 means no timeout will occur
566 tANI_U16 baTimeout;
567
568} tLimMlmAddBAInd, *tpLimMlmAddBAInd;
569
570typedef struct sLimMlmAddBARsp
571{
572
573 // ADDBA recipient
574 tSirMacAddr peerMacAddr;
575
576 // ADDBA Action Frame dialog token
577 tANI_U8 baDialogToken;
578
579 // ADDBA requested for TID
580 tANI_U8 baTID;
581
582 // BA status code
583 tSirMacStatusCodes addBAResultCode;
584
585 // BA policy
586 // 0 - Delayed BA (Not supported)
587 // 1 - Immediate BA
588 tANI_U8 baPolicy;
589
590 // BA buffer size - (0..127) max size MSDU's
591 tANI_U16 baBufferSize;
592
593 // BA timeout in TU's
594 // 0 means no timeout will occur
595 tANI_U16 baTimeout;
596
597 //reserved for alignment
598 tANI_U8 rsvd[2];
599
600 /* PE session id*/
601 tANI_U8 sessionId;
602
603 } tLimMlmAddBARsp, *tpLimMlmAddBARsp;
604
605//
606// NOTE - Overloading DELBA IND and DELBA CNF
607// to use the same data structure as DELBA REQ
608// as the parameters do not vary too much.
609//
610typedef struct sLimMlmDelBAReq
611{
612
613 // ADDBA recipient
614 tSirMacAddr peerMacAddr;
615
616 // DELBA direction
617 // 1 - Originator
618 // 0 - Recipient
619 tANI_U8 baDirection;
620
621 // DELBA requested for TID
622 tANI_U8 baTID;
623
624 // DELBA reason code
625 tSirMacReasonCodes delBAReasonCode;
626
627 tANI_U8 sessionId;
628
629} tLimMlmDelBAReq, *tpLimMlmDelBAReq, tLimMlmDelBAInd, *tpLimMlmDelBAInd, tLimMlmDelBACnf, *tpLimMlmDelBACnf;
630
631// Function templates
632
633tANI_BOOLEAN limProcessSmeReqMessages(tpAniSirGlobal, tpSirMsgQ);
634void limProcessMlmReqMessages(tpAniSirGlobal, tpSirMsgQ);
635void limProcessMlmRspMessages(tpAniSirGlobal, tANI_U32, tANI_U32 *);
636void limProcessLmmMessages(tpAniSirGlobal, tANI_U32, tANI_U32 *);
637void limProcessSmeDelBssRsp( tpAniSirGlobal , tANI_U32,tpPESession);
638
639void limGetRandomBssid(tpAniSirGlobal pMac ,tANI_U8 *data);
640
Jeff Johnson295189b2012-06-20 16:38:30 -0700641// Function to handle HT and HT IE CFG parameter intializations
Jeff Johnsone7245742012-09-05 17:12:55 -0700642void handleHTCapabilityandHTInfo(struct sAniSirGlobal *pMac, tpPESession psessionEntry);
Jeff Johnson295189b2012-06-20 16:38:30 -0700643
644// Function to handle CFG parameter updates
645void limHandleCFGparamUpdate(tpAniSirGlobal, tANI_U32);
646
647// Function to apply CFG parameters before join/reassoc/start BSS
648void limApplyConfiguration(tpAniSirGlobal,tpPESession);
649
Jeff Johnson295189b2012-06-20 16:38:30 -0700650void limSetCfgProtection(tpAniSirGlobal pMac, tpPESession pesessionEntry);
Jeff Johnson295189b2012-06-20 16:38:30 -0700651
652
653// Function to Initialize MLM state machine on STA
654void limInitMlm(tpAniSirGlobal);
655
656// Function to cleanup MLM state machine
657void limCleanupMlm(tpAniSirGlobal);
658
659// Function to cleanup LMM state machine
660void limCleanupLmm(tpAniSirGlobal);
661
Jeff Johnson295189b2012-06-20 16:38:30 -0700662// Management frame handling functions
663void limProcessBeaconFrame(tpAniSirGlobal, tANI_U8 *,tpPESession);
664void limProcessBeaconFrameNoSession(tpAniSirGlobal, tANI_U8 *);
665void limProcessProbeReqFrame(tpAniSirGlobal, tANI_U8 *, tpPESession);
666void limProcessProbeRspFrame(tpAniSirGlobal, tANI_U8 *, tpPESession);
667void limProcessProbeRspFrameNoSession(tpAniSirGlobal, tANI_U8 *);
668void limProcessProbeReqFrame_multiple_BSS(tpAniSirGlobal, tANI_U8 *,tpPESession);
669
670
671// Process Auth frame when we have a session in progress.
672void limProcessAuthFrame(tpAniSirGlobal, tANI_U8 *,tpPESession);
673#ifdef WLAN_FEATURE_VOWIFI_11R
Srikant Kuppaa3ed0a32013-02-20 07:24:43 -0800674tSirRetStatus limProcessAuthFrameNoSession(tpAniSirGlobal pMac, tANI_U8 *, void *body);
Jeff Johnson295189b2012-06-20 16:38:30 -0700675#endif
676
677void limProcessAssocReqFrame(tpAniSirGlobal, tANI_U8 *, tANI_U8, tpPESession);
678void limSendMlmAssocInd(tpAniSirGlobal pMac, tpDphHashNode pStaDs, tpPESession psessionEntry);
679
680
681void limProcessAssocRspFrame(tpAniSirGlobal, tANI_U8 *, tANI_U8,tpPESession);
682void limProcessDisassocFrame(tpAniSirGlobal, tANI_U8 *,tpPESession);
683void limProcessDeauthFrame(tpAniSirGlobal, tANI_U8 *,tpPESession);
684void limProcessActionFrame(tpAniSirGlobal, tANI_U8 *,tpPESession);
Jeff Johnson295189b2012-06-20 16:38:30 -0700685void limProcessActionFrameNoSession(tpAniSirGlobal pMac, tANI_U8 *pRxMetaInfo);
Jeff Johnson295189b2012-06-20 16:38:30 -0700686
687
688tSirRetStatus limPopulateMacHeader(tpAniSirGlobal, tANI_U8*, tANI_U8, tANI_U8, tSirMacAddr,tSirMacAddr);
689tSirRetStatus limSendProbeReqMgmtFrame(tpAniSirGlobal, tSirMacSSid *, tSirMacAddr, tANI_U8, tSirMacAddr, tANI_U32, tANI_U32, tANI_U8 *);
690void limSendProbeRspMgmtFrame(tpAniSirGlobal, tSirMacAddr, tpAniSSID, short, tANI_U8, tpPESession, tANI_U8);
Sushant Kaushik9e923872015-04-02 17:09:31 +0530691void limSendAuthMgmtFrame(tpAniSirGlobal, tSirMacAuthFrameBody *, tSirMacAddr,
692 tANI_U8, tpPESession , tAniBool);
Jeff Johnson295189b2012-06-20 16:38:30 -0700693void limSendAssocReqMgmtFrame(tpAniSirGlobal, tLimMlmAssocReq *,tpPESession);
694void limSendReassocReqMgmtFrame(tpAniSirGlobal, tLimMlmReassocReq *,tpPESession);
695#ifdef WLAN_FEATURE_VOWIFI_11R
696void limSendReassocReqWithFTIEsMgmtFrame(tpAniSirGlobal pMac,
697 tLimMlmReassocReq *pMlmReassocReq,tpPESession psessionEntry);
698#endif
699void limSendDeltsReqActionFrame(tpAniSirGlobal pMac, tSirMacAddr peer,
700 tANI_U8 wmmTspecPresent, tSirMacTSInfo *pTsinfo,
701 tSirMacTspecIE *pTspecIe, tpPESession psessionEntry);
702void limSendAddtsReqActionFrame(tpAniSirGlobal pMac, tSirMacAddr peerMacAddr,
703 tSirAddtsReqInfo *addts,tpPESession);
704void limSendAddtsRspActionFrame(tpAniSirGlobal pMac, tSirMacAddr peerMacAddr,
705 tANI_U16 statusCode, tSirAddtsReqInfo *addts, tSirMacScheduleIE *pSchedule,tpPESession);
706
Kapil Gupta956c0c42017-06-16 19:24:31 +0530707void limSendAssocRspMgmtFrame(tpAniSirGlobal, tANI_U16, tANI_U16, tSirMacAddr,
708 tANI_U8, tpDphHashNode pSta,tpPESession,
709 assoc_rsp_tx_context *tx_complete_context);
Jeff Johnson295189b2012-06-20 16:38:30 -0700710
711void limSendNullDataFrame(tpAniSirGlobal, tpDphHashNode);
Madan Mohan Koyyalamudi521ff192012-11-15 17:13:08 -0800712void limSendDisassocMgmtFrame(tpAniSirGlobal, tANI_U16, tSirMacAddr, tpPESession, tANI_BOOLEAN waitForAck);
713void limSendDeauthMgmtFrame(tpAniSirGlobal, tANI_U16, tSirMacAddr, tpPESession, tANI_BOOLEAN waitForAck);
Paul Zhang83289792017-02-28 18:58:52 +0800714void limDoSendAuthMgmtFrame(tpAniSirGlobal, tpPESession);
Jeff Johnson295189b2012-06-20 16:38:30 -0700715void limContinueChannelScan(tpAniSirGlobal);
716tSirResultCodes limMlmAddBss(tpAniSirGlobal, tLimMlmStartReq *,tpPESession psessionEntry);
717
Jeff Johnsone7245742012-09-05 17:12:55 -0700718tSirRetStatus limSendChannelSwitchMgmtFrame(tpAniSirGlobal, tSirMacAddr, tANI_U8, tANI_U8, tANI_U8, tpPESession);
Jeff Johnson295189b2012-06-20 16:38:30 -0700719
Abhishek Singh2b0cf1c2017-10-30 17:36:38 +0530720/**
721 * lim_send_extended_chan_switch_action_frame()- function to send ECSA
722 * action frame over the air .
723 * @mac_ctx: pointer to global mac structure
724 * @peer: Destination mac.
725 * @mode: channel switch mode
726 * @new_op_class: new op class
727 * @new_channel: new channel to switch
728 * @count: channel switch count
729 *
730 * This function is called to send ECSA frame.
731 *
732 * Return: success if frame is sent else return failure
733 */
734tSirRetStatus
735lim_send_extended_chan_switch_action_frame(tpAniSirGlobal mac_ctx,
736 tSirMacAddr peer, uint8_t mode, uint8_t new_op_class,
737 uint8_t new_channel, uint8_t count, tpPESession session_entry);
738
739
Mohit Khanna4a70d262012-09-11 16:30:12 -0700740#ifdef WLAN_FEATURE_11AC
741tSirRetStatus limSendVHTOpmodeNotificationFrame(tpAniSirGlobal pMac,tSirMacAddr peer,tANI_U8 nMode, tpPESession psessionEntry );
Madan Mohan Koyyalamudic6226de2012-09-18 16:33:31 -0700742tSirRetStatus limSendVHTChannelSwitchMgmtFrame(tpAniSirGlobal pMac,tSirMacAddr peer,tANI_U8 nChanWidth, tANI_U8 nNewChannel, tANI_U8 ncbMode, tpPESession psessionEntry );
Mohit Khanna4a70d262012-09-11 16:30:12 -0700743#endif
744
Jeff Johnson295189b2012-06-20 16:38:30 -0700745#if defined WLAN_FEATURE_VOWIFI
746tSirRetStatus limSendNeighborReportRequestFrame(tpAniSirGlobal, tpSirMacNeighborReportReq, tSirMacAddr, tpPESession);
747tSirRetStatus limSendLinkReportActionFrame(tpAniSirGlobal, tpSirMacLinkReport, tSirMacAddr, tpPESession );
748tSirRetStatus limSendRadioMeasureReportActionFrame(tpAniSirGlobal, tANI_U8, tANI_U8, tpSirMacRadioMeasureReport, tSirMacAddr, tpPESession);
749#endif
750
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800751#if defined(FEATURE_WLAN_ESE) && !defined(FEATURE_WLAN_ESE_UPLOAD)
Jeff Johnson295189b2012-06-20 16:38:30 -0700752void limProcessIappFrame(tpAniSirGlobal, tANI_U8 *,tpPESession);
753#endif
754
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800755#ifdef FEATURE_WLAN_TDLS
Gopichand Nakkala777e6032012-12-31 16:39:21 -0800756void limInitTdlsData(tpAniSirGlobal, tpPESession);
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800757tSirRetStatus limProcessSmeTdlsMgmtSendReq(tpAniSirGlobal pMac,
758 tANI_U32 *pMsgBuf);
759tSirRetStatus limProcessSmeTdlsAddStaReq(tpAniSirGlobal pMac,
760 tANI_U32 *pMsgBuf);
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +0530761tSirRetStatus limProcesSmeTdlsLinkEstablishReq(tpAniSirGlobal pMac,
762 tANI_U32 *pMsgBuf);
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800763tSirRetStatus limProcessSmeTdlsDelStaReq(tpAniSirGlobal pMac,
764 tANI_U32 *pMsgBuf);
Gopichand Nakkala2a0a1572013-02-10 21:39:16 -0800765void limSendSmeTDLSDeleteAllPeerInd(tpAniSirGlobal pMac, tpPESession psessionEntry);
Gopichand Nakkalab977a972013-02-18 19:15:09 -0800766void limSendSmeMgmtTXCompletion(tpAniSirGlobal pMac,
Ganesh Kondabattiniff987022015-08-11 19:43:44 +0530767 tANI_U32 smeSessionId,
Gopichand Nakkalab977a972013-02-18 19:15:09 -0800768 tANI_U32 txCompleteStatus);
Gopichand Nakkala2a0a1572013-02-10 21:39:16 -0800769tSirRetStatus limDeleteTDLSPeers(tpAniSirGlobal pMac, tpPESession psessionEntry);
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800770eHalStatus limProcessTdlsAddStaRsp(tpAniSirGlobal pMac, void *msg, tpPESession);
771tSirRetStatus limSendTdlsTeardownFrame(tpAniSirGlobal pMac,
Hoonki Leea34dd892013-02-05 22:56:02 -0800772 tSirMacAddr peerMac, tANI_U16 reason, tANI_U8 responder, tpPESession psessionEntry,
Atul Mittalc0f739f2014-07-31 13:47:47 +0530773 tANI_U8 *addIe, tANI_U16 addIeLen);
774// tdlsoffchan
775tSirRetStatus limProcesSmeTdlsChanSwitchReq(tpAniSirGlobal pMac,
776 tANI_U32 *pMsgBuf);
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800777#endif
778
Jeff Johnson295189b2012-06-20 16:38:30 -0700779// Algorithms & Link Monitoring related functions
780tSirBackgroundScanMode limSelectsBackgroundScanMode(tpAniSirGlobal);
781void limTriggerBackgroundScan(tpAniSirGlobal);
782void limAbortBackgroundScan(tpAniSirGlobal);
783
784/// Function that handles heartbeat failure
785void limHandleHeartBeatFailure(tpAniSirGlobal,tpPESession);
786
787/// Function that triggers link tear down with AP upon HB failure
788void limTearDownLinkWithAp(tpAniSirGlobal,tANI_U8, tSirMacReasonCodes);
789
Jeff Johnson295189b2012-06-20 16:38:30 -0700790
791/// Function that sends keep alive message to peer(s)
792void limSendKeepAliveToPeer(tpAniSirGlobal);
793
794/// Function that processes Max retries interrupt from TFP
795void limHandleMaxRetriesInterrupt(tANI_U32);
796
797/// Function that processes messages deferred during Learn mode
798void limProcessDeferredMessageQueue(tpAniSirGlobal);
799
800/// Function that defers the messages received
801tANI_U32 limDeferMsg(tpAniSirGlobal, tSirMsgQ *);
802
803/// Function that sets system into scan mode
804void limSetScanMode(tpAniSirGlobal pMac);
805
806/// Function that Switches the Channel and sets the CB Mode
Jeff Johnsone7245742012-09-05 17:12:55 -0700807void limSetChannel(tpAniSirGlobal pMac, tANI_U8 channel, tANI_U8 secChannelOffset, tPowerdBm maxTxPower, tANI_U8 peSessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -0700808
809/// Function that completes channel scan
810void limCompleteMlmScan(tpAniSirGlobal, tSirResultCodes);
811
Jeff Johnsone7245742012-09-05 17:12:55 -0700812#ifdef FEATURE_OEM_DATA_SUPPORT
813/// Funtion that sets system into meas mode for oem data req
814void limSetOemDataReqMode(tpAniSirGlobal pMac, eHalStatus status, tANI_U32* data);
815#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700816
817#ifdef ANI_SUPPORT_11H
818/// Function that sends Measurement Report action frame
819tSirRetStatus limSendMeasReportFrame(tpAniSirGlobal, tpSirMacMeasReqActionFrame, tSirMacAddr);
820
821/// Function that sends TPC Report action frame
822tSirRetStatus limSendTpcReportFrame(tpAniSirGlobal, tpSirMacTpcReqActionFrame, tSirMacAddr);
823#endif
824
825/// Function that sends TPC Request action frame
826void limSendTpcRequestFrame(tpAniSirGlobal, tSirMacAddr);
827
828// Function(s) to handle responses received from HAL
829void limProcessMlmAddBssRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ );
830void limProcessMlmAddStaRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQt,tpPESession psessionEntry);
831void limProcessMlmDelStaRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ );
832void limProcessMlmDelBssRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ,tpPESession);
Jeff Johnson295189b2012-06-20 16:38:30 -0700833void limProcessStaMlmAddStaRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ ,tpPESession psessionEntry);
834void limProcessStaMlmDelStaRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ,tpPESession psessionEntry);
835void limProcessStaMlmDelBssRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ ,tpPESession psessionEntry);
836void limProcessMlmSetStaKeyRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ );
837void limProcessMlmSetBssKeyRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ );
838
839
840
841#ifdef GEN4_SCAN
842// Function to process WDA_INIT_SCAN_RSP message
843void limProcessInitScanRsp(tpAniSirGlobal, void * );
844
845// Function to process WDA_START_SCAN_RSP message
846void limProcessStartScanRsp(tpAniSirGlobal, void * );
847
848// Function to process WDA_END_SCAN_RSP message
849void limProcessEndScanRsp(tpAniSirGlobal, void * );
850
851// Function to process WDA_FINISH_SCAN_RSP message
852void limProcessFinishScanRsp(tpAniSirGlobal, void * );
853
854// Function to process WDA_SWITCH_CHANNEL_RSP message
855void limProcessSwitchChannelRsp(tpAniSirGlobal pMac, void * );
856
857void limSendHalInitScanReq( tpAniSirGlobal, tLimLimHalScanState, tSirLinkTrafficCheck);
858void limSendHalStartScanReq( tpAniSirGlobal, tANI_U8, tLimLimHalScanState);
859void limSendHalEndScanReq( tpAniSirGlobal, tANI_U8, tLimLimHalScanState);
Bhargav Shahe3a6ff02016-04-11 16:31:49 +0530860void limSendTLPauseInd(tpAniSirGlobal pMac, uint16_t staId);
Jeff Johnson295189b2012-06-20 16:38:30 -0700861void limSendHalFinishScanReq( tpAniSirGlobal, tLimLimHalScanState);
862
863void limContinuePostChannelScan(tpAniSirGlobal pMac);
Gopichand Nakkalad492d202013-05-10 02:50:47 +0530864void limCovertChannelScanType(tpAniSirGlobal pMac,tANI_U8 channelNum, tANI_BOOLEAN passiveToActive);
865void limSetDFSChannelList(tpAniSirGlobal pMac,tANI_U8 channelNum, tSirDFSChannelList *dfsChannelList);
Jeff Johnson295189b2012-06-20 16:38:30 -0700866void limContinueChannelLearn( tpAniSirGlobal );
867//WLAN_SUSPEND_LINK Related
868tANI_U8 limIsLinkSuspended(tpAniSirGlobal pMac);
869void limSuspendLink(tpAniSirGlobal, tSirLinkTrafficCheck, SUSPEND_RESUME_LINK_CALLBACK, tANI_U32*);
870void limResumeLink(tpAniSirGlobal, SUSPEND_RESUME_LINK_CALLBACK, tANI_U32*);
871//end WLAN_SUSPEND_LINK Related
872#endif // GEN4_SCAN
873
874tSirRetStatus limSendAddBAReq( tpAniSirGlobal pMac,
875 tpLimMlmAddBAReq pMlmAddBAReq,tpPESession);
876
877tSirRetStatus limSendAddBARsp( tpAniSirGlobal pMac,
878 tpLimMlmAddBARsp pMlmAddBARsp,tpPESession);
879
880tSirRetStatus limSendDelBAInd( tpAniSirGlobal pMac,
881 tpLimMlmDelBAReq pMlmDelBAReq ,tpPESession psessionEntry);
882#if 0
883tSirRetStatus limSendSMPowerStateFrame( tpAniSirGlobal pMac,
884 tSirMacAddr peer, tSirMacHTMIMOPowerSaveState State );
885#endif
886
887void limProcessMlmHalAddBARsp( tpAniSirGlobal pMac,
888 tpSirMsgQ limMsgQ );
889
890void limProcessMlmHalBADeleteInd( tpAniSirGlobal pMac,
891 tpSirMsgQ limMsgQ );
892
893void limProcessMlmRemoveKeyRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ );
894
895void limProcessLearnIntervalTimeout(tpAniSirGlobal pMac);
Chet Lanctot8cecea22014-02-11 19:09:36 -0800896
Jeff Johnson295189b2012-06-20 16:38:30 -0700897#ifdef WLAN_FEATURE_11W
Chet Lanctot8cecea22014-02-11 19:09:36 -0800898//11w send SA query request action frame
899tSirRetStatus limSendSaQueryRequestFrame( tpAniSirGlobal pMac, tANI_U8 *transId,
900 tSirMacAddr peer, tpPESession psessionEntry );
Jeff Johnson295189b2012-06-20 16:38:30 -0700901//11w SA query request action frame handler
902tSirRetStatus limSendSaQueryResponseFrame( tpAniSirGlobal pMac,
Chet Lanctot186b5732013-03-18 10:26:30 -0700903 tANI_U8 *transId, tSirMacAddr peer,tpPESession psessionEntry);
Jeff Johnson295189b2012-06-20 16:38:30 -0700904#endif
Abhishek Singh00b71972016-01-07 10:51:04 +0530905
906#ifdef WLAN_FEATURE_RMC
907void limProcessRMCMessages(tpAniSirGlobal pMac, eRmcMessageType msgType,
908 tANI_U32 *pMsgBuf);
909tSirRetStatus limSendRMCActionFrame(tpAniSirGlobal pMac,
910 tSirMacAddr peerMacAddr, tSirRMCInfo *pRMC,
911 tpPESession psessionEntry);
912#endif /* WLAN_FEATURE_RMC */
913
Jeff Johnson295189b2012-06-20 16:38:30 -0700914// Inline functions
915
916/**
917 * limPostSmeMessage()
918 *
919 *FUNCTION:
920 * This function is called by limProcessMlmMessages(). In this
921 * function MLM sub-module invokes MLM ind/cnf primitives.
922 *
923 *LOGIC:
924 * Initially MLM makes an SME function call to invoke MLM ind/cnf
925 * primitive. In future this can be enhanced to 'post' messages to SME.
926 *
927 *ASSUMPTIONS:
928 * NA
929 *
930 *NOTE:
931 * NA
932 *
933 * @param pMac Pointer to Global MAC structure
934 * @param msgType Indicates the MLM primitive message type
935 * @param *pMsgBuf A pointer to the MLM message buffer
936 *
937 * @return None
938 */
939static inline void
940limPostSmeMessage(tpAniSirGlobal pMac, tANI_U32 msgType, tANI_U32 *pMsgBuf)
941{
942 tSirMsgQ msg;
943
944 if(pMsgBuf == NULL)
945 {
Kiran Kumar Lokere5be73a62013-04-01 18:40:00 -0700946 limLog(pMac, LOGE,FL("Buffer is Pointing to NULL"));
Jeff Johnson295189b2012-06-20 16:38:30 -0700947 return;
948 }
949
950 msg.type = (tANI_U16)msgType;
951 msg.bodyptr = pMsgBuf;
952 msg.bodyval = 0;
953 if (msgType > eWNI_SME_MSG_TYPES_BEGIN)
Konamki, Sreelakshmi2bfb8b02015-07-29 11:41:24 +0530954 {
955 MTRACE(macTrace(pMac, TRACE_CODE_TX_SME_MSG, NO_SESSION, msg.type));
Jeff Johnson295189b2012-06-20 16:38:30 -0700956 limProcessSmeReqMessages(pMac, &msg);
Konamki, Sreelakshmi2bfb8b02015-07-29 11:41:24 +0530957 }
Jeff Johnson295189b2012-06-20 16:38:30 -0700958 else
959 limProcessMlmRspMessages(pMac, msgType, pMsgBuf);
960} /*** end limPostSmeMessage() ***/
961
962/**
963 * limPostMlmMessage()
964 *
965 *FUNCTION:
966 * This function is called by limProcessSmeMessages(). In this
967 * function SME invokes MLME primitives.
968 *
969 *PARAMS:
970 *
971 *LOGIC:
972 * Initially SME makes an MLM function call to invoke MLM primitive.
973 * In future this can be enhanced to 'post' messages to MLM.
974 *
975 *ASSUMPTIONS:
976 * NA
977 *
978 *NOTE:
979 * NA
980 *
981 * @param pMac Pointer to Global MAC structure
982 * @param msgType Indicates the MLM primitive message type
983 * @param *pMsgBuf A pointer to the MLM message buffer
984 *
985 * @return None
986 */
987static inline void
988limPostMlmMessage(tpAniSirGlobal pMac, tANI_U32 msgType, tANI_U32 *pMsgBuf)
989{
990
991 tSirMsgQ msg;
992 if(pMsgBuf == NULL)
993 {
Kiran Kumar Lokere5be73a62013-04-01 18:40:00 -0700994 limLog(pMac, LOGE,FL("Buffer is Pointing to NULL"));
Jeff Johnson295189b2012-06-20 16:38:30 -0700995 return;
996 }
997 msg.type = (tANI_U16) msgType;
998 msg.bodyptr = pMsgBuf;
999 msg.bodyval = 0;
Konamki, Sreelakshmi2bfb8b02015-07-29 11:41:24 +05301000 MTRACE(macTraceMsgRx(pMac, NO_SESSION, msg.type));
Jeff Johnson295189b2012-06-20 16:38:30 -07001001 limProcessMlmReqMessages(pMac, &msg);
1002} /*** end limPostMlmMessage() ***/
1003
1004
1005
1006/**
1007 * limGetCurrentScanChannel()
1008 *
1009 *FUNCTION:
1010 * This function is called in various places to get current channel
1011 * number being scanned.
1012 *
1013 *PARAMS:
1014 *
1015 *LOGIC:
1016 *
1017 *ASSUMPTIONS:
1018 * NA
1019 *
1020 *NOTE:
1021 * NA
1022 *
1023 * @param pMac Pointer to Global MAC structure
1024 * @return Channel number
1025 */
1026static inline tANI_U8
1027limGetCurrentScanChannel(tpAniSirGlobal pMac)
1028{
1029 tANI_U8 *pChanNum = pMac->lim.gpLimMlmScanReq->channelList.channelNumber;
1030
1031 return (*(pChanNum + pMac->lim.gLimCurrentScanChannelId));
1032} /*** end limGetCurrentScanChannel() ***/
1033
Jeff Johnson295189b2012-06-20 16:38:30 -07001034/**
1035 * limSendBeaconInd()
1036 *
1037 *FUNCTION:
1038 * This function is called to send the beacon indication
1039 * number being scanned.
1040 *
1041 *PARAMS:
1042 *
1043 *LOGIC:
1044 *
1045 *ASSUMPTIONS:
1046*/
1047
1048void
1049limSendBeaconInd(tpAniSirGlobal pMac, tpPESession psessionEntry);
Jeff Johnson295189b2012-06-20 16:38:30 -07001050
Jeff Johnson295189b2012-06-20 16:38:30 -07001051
1052void limGetWPSPBCSessions(tpAniSirGlobal pMac, tANI_U8 *addr, tANI_U8 *uuid_e, eWPSPBCOverlap *overlap, tpPESession psessionEntry);
1053void limWPSPBCTimeout(tpAniSirGlobal pMac, tpPESession psessionEntry);
1054void limWPSPBCClose(tpAniSirGlobal pMac, tpPESession psessionEntry);
1055void limRemovePBCSessions(tpAniSirGlobal pMac, tSirMacAddr pRemoveMac,tpPESession psessionEntry);
1056
1057
1058tSirRetStatus
1059limIsSmeGetWPSPBCSessionsReqValid(tpAniSirGlobal pMac, tSirSmeGetWPSPBCSessionsReq *pGetWPSPBCSessionsReq, tANI_U8 *pBuf);
1060
1061#define LIM_WPS_OVERLAP_TIMER_MS 10000
Jeff Johnson295189b2012-06-20 16:38:30 -07001062
1063void
1064limSuspendLink(tpAniSirGlobal pMac, tSirLinkTrafficCheck trafficCheck, SUSPEND_RESUME_LINK_CALLBACK callback, tANI_U32 *data);
1065void
1066limResumeLink(tpAniSirGlobal pMac, SUSPEND_RESUME_LINK_CALLBACK callback, tANI_U32 *data);
1067
1068void
1069limChangeChannelWithCallback(tpAniSirGlobal pMac, tANI_U8 newChannel,
1070 CHANGE_CHANNEL_CALLBACK callback, tANI_U32 *cbdata, tpPESession psessionEntry);
1071
Jeff Johnson295189b2012-06-20 16:38:30 -07001072void limSendSmeMgmtFrameInd(
Rashmi Ramanna0d0adec2014-02-05 20:35:37 +05301073 tpAniSirGlobal pMac, tANI_U16 sessionId,
1074 tANI_U8 *pRxPacketInfo,
1075 tpPESession psessionEntry, tANI_S8 rxRssi);
Jeff Johnson295189b2012-06-20 16:38:30 -07001076void limProcessRemainOnChnTimeout(tpAniSirGlobal pMac);
Gopichand Nakkala4261ea52012-12-31 16:43:00 -08001077void limProcessInsertSingleShotNOATimeout(tpAniSirGlobal pMac);
Gopichand Nakkalad492d202013-05-10 02:50:47 +05301078void limConvertActiveChannelToPassiveChannel(tpAniSirGlobal pMac);
Jeff Johnson295189b2012-06-20 16:38:30 -07001079void limSendP2PActionFrame(tpAniSirGlobal pMac, tpSirMsgQ pMsg);
1080void limAbortRemainOnChan(tpAniSirGlobal pMac);
1081tSirRetStatus __limProcessSmeNoAUpdate(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf);
Viral Modid440e682013-03-06 02:25:31 -08001082void limProcessRegdDefdSmeReqAfterNOAStart(tpAniSirGlobal pMac);
Madan Mohan Koyyalamudi521ff192012-11-15 17:13:08 -08001083void limProcessDisassocAckTimeout(tpAniSirGlobal pMac);
1084void limProcessDeauthAckTimeout(tpAniSirGlobal pMac);
Abhishek Singh550aa8c2017-10-30 17:34:53 +05301085/**
1086 * lim_process_ap_ecsa_timeout() -process ECSA timeout which indicate ECSA IE TX
1087 * complete in beacon
1088 * @mac_ctx - A pointer to Global MAC structure
1089 *
1090 * Return None
1091 */
1092void lim_process_ap_ecsa_timeout(tpAniSirGlobal mac_ctx);
1093/**
1094 * lim_send_sme_ap_channel_switch_resp() -process channel switch resp for ecsa
1095 * channel switch req
1096 * @mac_ctx - A pointer to Global MAC structure
1097 * @session: session on which channel switch was done
1098 * @chan_param: channel switch resp params
1099 *
1100 * Return None
1101 */
1102void lim_send_sme_ap_channel_switch_resp(tpAniSirGlobal mac_ctx,
1103 tpPESession session, tpSwitchChannelParams chan_param);
1104
Madan Mohan Koyyalamudi521ff192012-11-15 17:13:08 -08001105eHalStatus limSendDisassocCnf(tpAniSirGlobal pMac);
1106eHalStatus limSendDeauthCnf(tpAniSirGlobal pMac);
Dhanashri Atre4a6e3ea2012-12-12 14:10:33 -08001107
1108#ifdef WLAN_FEATURE_VOWIFI_11R
1109typedef struct sSetLinkCbackParams
1110{
1111 void * cbackDataPtr;
1112} tSetLinkCbackParams;
1113#endif
Gopichand Nakkala2c231c82013-06-11 17:49:16 +05301114
1115void limProcessRxScanEvent(tpAniSirGlobal mac, void *buf);
Sudhir Sattayappa Kohalliabf751c2013-06-30 15:37:18 -07001116
1117int limProcessRemainOnChnlReq(tpAniSirGlobal pMac, tANI_U32 *pMsg);
1118void limRemainOnChnRsp(tpAniSirGlobal pMac, eHalStatus status, tANI_U32 *data);
Siddharth Bhal4f3187c2014-10-09 21:38:08 +05301119void limProcessMlmSpoofMacAddrRsp(tpAniSirGlobal pMac, tSirRetStatus rspStatus);
Pradeep Reddy POTTETI31505892015-04-16 16:47:54 +05301120tSirRetStatus limProcessSmeSetTdls2040BSSCoexReq(tpAniSirGlobal pMac,
1121 tANI_U32 *pMsgBuf);
Masti, Narayanraddi1fb32a92015-06-29 13:14:06 +05301122tSirRetStatus limProcessSmeDelAllTdlsPeers(tpAniSirGlobal pMac,
1123 tANI_U32 *pMsgBuf);
Manjeet Singh3ed79242017-01-11 19:04:32 +05301124
1125tSirRetStatus lim_process_sme_cap_tsf_req(tpAniSirGlobal pMac,
1126 tANI_U32 *pMsgBuf);
1127
1128tSirRetStatus lim_process_sme_get_tsf_req(tpAniSirGlobal pMac,
1129 tANI_U32 *pMsgBuf);
SaidiReddy Yenugac341fbf2017-02-01 20:22:45 +05301130
1131tSirRetStatus lim_process_sme_del_ba_ses_req(tpAniSirGlobal pMac,
1132 tANI_U32 *pMsgBuf);
Abhishek Singh449c5372017-12-19 17:21:20 +05301133/**
1134 * lim_send_chan_switch_action_frame() - send channel switch action frame to all
1135 * connected peers
1136 * @mac_ctx: Pointer to Global MAC structure
1137 * @new_channel: new channel
1138 * @session_entry: ap session
1139 *
1140 * Return: None
1141 */
1142void lim_send_chan_switch_action_frame(tpAniSirGlobal mac_ctx,
1143 uint16_t new_channel, tpPESession session_entry);
1144
Abhinav Kumar8eed0362019-08-05 14:26:07 +05301145/**
1146 * lim_send_mgmt_frame_tx() - Sends mgmt frame
1147 * @mac_ctx Pointer to Global MAC structure
1148 * @msg: Received message info
1149 *
1150 * Return: None
1151 */
1152void lim_send_mgmt_frame_tx(tpAniSirGlobal mac_ctx, tpSirMsgQ msg);
SaidiReddy Yenugac341fbf2017-02-01 20:22:45 +05301153
Jeff Johnson295189b2012-06-20 16:38:30 -07001154#endif /* __LIM_TYPES_H */
1155