blob: 1062dae954a7ed20034ff2e82484d79992ae33c7 [file] [log] [blame]
Jeff Johnson295189b2012-06-20 16:38:30 -07001/*
Manjeet Singh3ed79242017-01-11 19:04:32 +05302 * Copyright (c) 2012-2017 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;
Jeff Johnson295189b2012-06-20 16:38:30 -0700277} tLimMlmAssocInd, *tpLimMlmAssocInd;
278
279typedef struct sLimMlmReassocReq
280{
281 tSirMacAddr peerMacAddr;
282 tANI_U32 reassocFailureTimeout;
283 tANI_U16 capabilityInfo;
284 tSirMacListenInterval listenInterval;
285 tANI_U8 sessionId;
286} tLimMlmReassocReq, *tpLimMlmReassocReq;
287
288typedef struct sLimMlmReassocCnf
289{
290 tSirResultCodes resultCode;
291 tANI_U16 protStatusCode; //Protocol Status code.
292 tANI_U8 sessionId;
293} tLimMlmReassocCnf, *tpLimMlmReassocCnf;
294
295typedef struct sLimMlmReassocInd
296{
297 tSirMacAddr peerMacAddr;
298 tSirMacAddr currentApAddr;
299 tANI_U16 aid;
300 tAniAuthType authType;
301 tAniSSID ssId;
302 tSirRSNie rsnIE;
Jeff Johnson1250df42012-12-10 14:31:52 -0800303 tSirAddie addIE; // additional IE received from the peer, which can be WSC IE and/or P2P IE.
Jeff Johnson295189b2012-06-20 16:38:30 -0700304 tSirMacCapabilityInfo capabilityInfo;
Jeff Johnson295189b2012-06-20 16:38:30 -0700305 tAniBool spectrumMgtIndicator;
306 tSirMacPowerCapInfo powerCap;
307 tSirSupChnl supportedChannels;
308
Jeff Johnson295189b2012-06-20 16:38:30 -0700309 tAniBool WmmStaInfoPresent;
Hardik Kantilal Patel1ba630f2014-11-21 04:32:05 +0530310#ifdef WLAN_FEATURE_AP_HT40_24G
311 tAniBool HT40MHzIntoPresent;
312#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700313
Jeff Johnson295189b2012-06-20 16:38:30 -0700314 // Required for indicating the frames to upper layer
315 tANI_U32 beaconLength;
316 tANI_U8* beaconPtr;
317 tANI_U32 assocReqLength;
318 tANI_U8* assocReqPtr;
319} tLimMlmReassocInd, *tpLimMlmReassocInd;
320
321typedef struct sLimMlmAuthCnf
322{
323 tSirMacAddr peerMacAddr;
324 tAniAuthType authType;
325 tSirResultCodes resultCode;
326 tANI_U16 protStatusCode;
327 tANI_U8 sessionId;
328} tLimMlmAuthCnf, *tpLimMlmAuthCnf;
329
330typedef struct sLimMlmAuthInd
331{
332 tSirMacAddr peerMacAddr;
333 tAniAuthType authType;
334 tANI_U8 sessionId;
335} tLimMlmAuthInd, *tpLimMlmAuthInd;
336
337typedef struct sLimMlmDeauthReq
338{
339 tSirMacAddr peerMacAddr;
340 tANI_U16 reasonCode;
341 tANI_U16 deauthTrigger;
342 tANI_U16 aid;
343 tANI_U8 sessionId; //Added for BT-AMP SUPPORT
344
345} tLimMlmDeauthReq, *tpLimMlmDeauthReq;
346
347typedef struct sLimMlmDeauthCnf
348{
349 tSirMacAddr peerMacAddr;
350 tSirResultCodes resultCode;
351 tANI_U16 deauthTrigger;
352 tANI_U16 aid;
353 tANI_U8 sessionId;
354} tLimMlmDeauthCnf, *tpLimMLmDeauthCnf;
355
356typedef struct sLimMlmDeauthInd
357{
358 tSirMacAddr peerMacAddr;
359 tANI_U16 reasonCode;
360 tANI_U16 deauthTrigger;
361 tANI_U16 aid;
362} tLimMlmDeauthInd, *tpLimMlmDeauthInd;
363
364typedef struct sLimMlmDisassocReq
365{
366 tSirMacAddr peerMacAddr;
367 tANI_U16 reasonCode;
368 tANI_U16 disassocTrigger;
369 tANI_U16 aid;
370 tANI_U8 sessionId;
371} tLimMlmDisassocReq, *tpLimMlmDisassocReq;
372
373typedef struct sLimMlmDisassocCnf
374{
375 tSirMacAddr peerMacAddr;
376 tSirResultCodes resultCode;
377 tANI_U16 disassocTrigger;
378 tANI_U16 aid;
379 tANI_U8 sessionId;
380} tLimMlmDisassocCnf, *tpLimMlmDisassocCnf;
381
382typedef struct sLimMlmDisassocInd
383{
384 tSirMacAddr peerMacAddr;
385 tANI_U16 reasonCode;
386 tANI_U16 disassocTrigger;
387 tANI_U16 aid;
388 tANI_U8 sessionId;
389} tLimMlmDisassocInd, *tpLimMlmDisassocInd;
390
391typedef struct sLimMlmPurgeStaReq
392{
393 tSirMacAddr peerMacAddr;
394 tANI_U16 aid;
395 tANI_U8 sessionId;//Added For BT-AMP Support
396} tLimMlmPurgeStaReq, *tpLimMlmPurgeStaReq;
397
398typedef struct sLimMlmPurgeStaInd
399{
400 tSirMacAddr peerMacAddr;
401 tANI_U16 reasonCode;
402 tANI_U16 purgeTrigger;
403 tANI_U16 aid;
404 tANI_U8 sessionId;
405} tLimMlmPurgeStaInd, *tpLimMlmPurgeStaInd;
406
407typedef struct sLimMlmSetKeysReq
408{
409 tSirMacAddr peerMacAddr;
410 tANI_U8 sessionId; //Added For BT-AMP Support
411 tANI_U16 aid;
412 tAniEdType edType; // Encryption/Decryption type
413 tANI_U8 numKeys;
414 tSirKeys key[SIR_MAC_MAX_NUM_OF_DEFAULT_KEYS];
415} tLimMlmSetKeysReq, *tpLimMlmSetKeysReq;
416
417typedef struct sLimMlmSetKeysCnf
418{
419 tSirMacAddr peerMacAddr;
420 tANI_U16 resultCode;
421 tANI_U16 aid;
422 tANI_U8 sessionId;
423} tLimMlmSetKeysCnf, *tpLimMlmSetKeysCnf;
424
425typedef struct sLimMlmRemoveKeyReq
426{
427 tSirMacAddr peerMacAddr;
428 tANI_U8 sessionId; //Added FOr BT-AMP Support
429 tAniEdType edType; // Encryption/Decryption type
430 tANI_U8 wepType; //STATIC / DYNAMIC specifier
431 tANI_U8 keyId; //Key Id To be removed.
432 tANI_BOOLEAN unicast;
433} tLimMlmRemoveKeyReq, *tpLimMlmRemoveKeyReq;
434
435typedef struct sLimMlmRemoveKeyCnf
436{
437 tSirMacAddr peerMacAddr;
438 tANI_U16 resultCode;
439 tANI_U8 sessionId;
440} tLimMlmRemoveKeyCnf, *tpLimMlmRemoveKeyCnf;
441
442
443typedef struct sLimMlmResetReq
444{
445 tSirMacAddr macAddr;
446 tANI_U8 performCleanup;
447 tANI_U8 sessionId;
448} tLimMlmResetReq, *tpLimMlmResetReq;
449
450typedef struct sLimMlmResetCnf
451{
452 tSirMacAddr macAddr;
453 tSirResultCodes resultCode;
454 tANI_U8 sessionId;
455} tLimMlmResetCnf, *tpLimMlmResetCnf;
456
457
458typedef struct sLimMlmLinkTestStopReq
459{
460 tSirMacAddr peerMacAddr;
461 tANI_U8 sessionId;
Jeff Johnson295189b2012-06-20 16:38:30 -0700462} tLimMlmLinkTestStopReq, *tpLimMlmLinkTestStopReq;
463
464
465//
466// Block ACK related MLME data structures
467//
468
469typedef struct sLimMlmAddBAReq
470{
471
472 // ADDBA recipient
473 tSirMacAddr peerMacAddr;
474
475 // ADDBA Action Frame dialog token
476 tANI_U8 baDialogToken;
477
478 // ADDBA requested for TID
479 tANI_U8 baTID;
480
481 // BA policy
482 // 0 - Delayed BA (Not supported)
483 // 1 - Immediate BA
484 tANI_U8 baPolicy;
485
486 // BA buffer size - (0..127) max size MSDU's
487 tANI_U16 baBufferSize;
488
489 // BA timeout in TU's
490 // 0 means no timeout will occur
491 tANI_U16 baTimeout;
492
493 // ADDBA failure timeout in TU's
494 // Greater than or equal to 1
495 tANI_U16 addBAFailureTimeout;
496
497 // BA Starting Sequence Number
498 tANI_U16 baSSN;
499
500 tANI_U8 sessionId;
501
502} tLimMlmAddBAReq, *tpLimMlmAddBAReq;
503
504typedef struct sLimMlmAddBACnf
505{
506
507 // ADDBA recipient
508 tSirMacAddr peerMacAddr;
509
510 // ADDBA Action Frame dialog token
511 tANI_U8 baDialogToken;
512
513 // ADDBA requested for TID
514 tANI_U8 baTID;
515
516 // BA status code
517 tSirMacStatusCodes addBAResultCode;
518
519 // BA policy
520 // 0 - Delayed BA (Not supported)
521 // 1 - Immediate BA
522 tANI_U8 baPolicy;
523
524 // BA buffer size - (0..127) max size MSDU's
525 tANI_U16 baBufferSize;
526
527 // BA timeout in TU's
528 // 0 means no timeout will occur
529 tANI_U16 baTimeout;
530
531 // ADDBA direction
532 // 1 - Originator
533 // 0 - Recipient
534 tANI_U8 baDirection;
535 tANI_U8 sessionId;
536
537
538} tLimMlmAddBACnf, *tpLimMlmAddBACnf;
539
540typedef struct sLimMlmAddBAInd
541{
542
543 // ADDBA recipient
544 tSirMacAddr peerMacAddr;
545
546 // ADDBA Action Frame dialog token
547 tANI_U8 baDialogToken;
548
549 // ADDBA requested for TID
550 tANI_U8 baTID;
551
552 // BA policy
553 // 0 - Delayed BA (Not supported)
554 // 1 - Immediate BA
555 tANI_U8 baPolicy;
556
557 // BA buffer size - (0..127) max size MSDU's
558 tANI_U16 baBufferSize;
559
560 // BA timeout in TU's
561 // 0 means no timeout will occur
562 tANI_U16 baTimeout;
563
564} tLimMlmAddBAInd, *tpLimMlmAddBAInd;
565
566typedef struct sLimMlmAddBARsp
567{
568
569 // ADDBA recipient
570 tSirMacAddr peerMacAddr;
571
572 // ADDBA Action Frame dialog token
573 tANI_U8 baDialogToken;
574
575 // ADDBA requested for TID
576 tANI_U8 baTID;
577
578 // BA status code
579 tSirMacStatusCodes addBAResultCode;
580
581 // BA policy
582 // 0 - Delayed BA (Not supported)
583 // 1 - Immediate BA
584 tANI_U8 baPolicy;
585
586 // BA buffer size - (0..127) max size MSDU's
587 tANI_U16 baBufferSize;
588
589 // BA timeout in TU's
590 // 0 means no timeout will occur
591 tANI_U16 baTimeout;
592
593 //reserved for alignment
594 tANI_U8 rsvd[2];
595
596 /* PE session id*/
597 tANI_U8 sessionId;
598
599 } tLimMlmAddBARsp, *tpLimMlmAddBARsp;
600
601//
602// NOTE - Overloading DELBA IND and DELBA CNF
603// to use the same data structure as DELBA REQ
604// as the parameters do not vary too much.
605//
606typedef struct sLimMlmDelBAReq
607{
608
609 // ADDBA recipient
610 tSirMacAddr peerMacAddr;
611
612 // DELBA direction
613 // 1 - Originator
614 // 0 - Recipient
615 tANI_U8 baDirection;
616
617 // DELBA requested for TID
618 tANI_U8 baTID;
619
620 // DELBA reason code
621 tSirMacReasonCodes delBAReasonCode;
622
623 tANI_U8 sessionId;
624
625} tLimMlmDelBAReq, *tpLimMlmDelBAReq, tLimMlmDelBAInd, *tpLimMlmDelBAInd, tLimMlmDelBACnf, *tpLimMlmDelBACnf;
626
627// Function templates
628
629tANI_BOOLEAN limProcessSmeReqMessages(tpAniSirGlobal, tpSirMsgQ);
630void limProcessMlmReqMessages(tpAniSirGlobal, tpSirMsgQ);
631void limProcessMlmRspMessages(tpAniSirGlobal, tANI_U32, tANI_U32 *);
632void limProcessLmmMessages(tpAniSirGlobal, tANI_U32, tANI_U32 *);
633void limProcessSmeDelBssRsp( tpAniSirGlobal , tANI_U32,tpPESession);
634
635void limGetRandomBssid(tpAniSirGlobal pMac ,tANI_U8 *data);
636
Jeff Johnson295189b2012-06-20 16:38:30 -0700637// Function to handle HT and HT IE CFG parameter intializations
Jeff Johnsone7245742012-09-05 17:12:55 -0700638void handleHTCapabilityandHTInfo(struct sAniSirGlobal *pMac, tpPESession psessionEntry);
Jeff Johnson295189b2012-06-20 16:38:30 -0700639
640// Function to handle CFG parameter updates
641void limHandleCFGparamUpdate(tpAniSirGlobal, tANI_U32);
642
643// Function to apply CFG parameters before join/reassoc/start BSS
644void limApplyConfiguration(tpAniSirGlobal,tpPESession);
645
Jeff Johnson295189b2012-06-20 16:38:30 -0700646void limSetCfgProtection(tpAniSirGlobal pMac, tpPESession pesessionEntry);
Jeff Johnson295189b2012-06-20 16:38:30 -0700647
648
649// Function to Initialize MLM state machine on STA
650void limInitMlm(tpAniSirGlobal);
651
652// Function to cleanup MLM state machine
653void limCleanupMlm(tpAniSirGlobal);
654
655// Function to cleanup LMM state machine
656void limCleanupLmm(tpAniSirGlobal);
657
Jeff Johnson295189b2012-06-20 16:38:30 -0700658// Management frame handling functions
659void limProcessBeaconFrame(tpAniSirGlobal, tANI_U8 *,tpPESession);
660void limProcessBeaconFrameNoSession(tpAniSirGlobal, tANI_U8 *);
661void limProcessProbeReqFrame(tpAniSirGlobal, tANI_U8 *, tpPESession);
662void limProcessProbeRspFrame(tpAniSirGlobal, tANI_U8 *, tpPESession);
663void limProcessProbeRspFrameNoSession(tpAniSirGlobal, tANI_U8 *);
664void limProcessProbeReqFrame_multiple_BSS(tpAniSirGlobal, tANI_U8 *,tpPESession);
665
666
667// Process Auth frame when we have a session in progress.
668void limProcessAuthFrame(tpAniSirGlobal, tANI_U8 *,tpPESession);
669#ifdef WLAN_FEATURE_VOWIFI_11R
Srikant Kuppaa3ed0a32013-02-20 07:24:43 -0800670tSirRetStatus limProcessAuthFrameNoSession(tpAniSirGlobal pMac, tANI_U8 *, void *body);
Jeff Johnson295189b2012-06-20 16:38:30 -0700671#endif
672
673void limProcessAssocReqFrame(tpAniSirGlobal, tANI_U8 *, tANI_U8, tpPESession);
674void limSendMlmAssocInd(tpAniSirGlobal pMac, tpDphHashNode pStaDs, tpPESession psessionEntry);
675
676
677void limProcessAssocRspFrame(tpAniSirGlobal, tANI_U8 *, tANI_U8,tpPESession);
678void limProcessDisassocFrame(tpAniSirGlobal, tANI_U8 *,tpPESession);
679void limProcessDeauthFrame(tpAniSirGlobal, tANI_U8 *,tpPESession);
680void limProcessActionFrame(tpAniSirGlobal, tANI_U8 *,tpPESession);
Jeff Johnson295189b2012-06-20 16:38:30 -0700681void limProcessActionFrameNoSession(tpAniSirGlobal pMac, tANI_U8 *pRxMetaInfo);
Jeff Johnson295189b2012-06-20 16:38:30 -0700682
683
684tSirRetStatus limPopulateMacHeader(tpAniSirGlobal, tANI_U8*, tANI_U8, tANI_U8, tSirMacAddr,tSirMacAddr);
685tSirRetStatus limSendProbeReqMgmtFrame(tpAniSirGlobal, tSirMacSSid *, tSirMacAddr, tANI_U8, tSirMacAddr, tANI_U32, tANI_U32, tANI_U8 *);
686void limSendProbeRspMgmtFrame(tpAniSirGlobal, tSirMacAddr, tpAniSSID, short, tANI_U8, tpPESession, tANI_U8);
Sushant Kaushik9e923872015-04-02 17:09:31 +0530687void limSendAuthMgmtFrame(tpAniSirGlobal, tSirMacAuthFrameBody *, tSirMacAddr,
688 tANI_U8, tpPESession , tAniBool);
Jeff Johnson295189b2012-06-20 16:38:30 -0700689void limSendAssocReqMgmtFrame(tpAniSirGlobal, tLimMlmAssocReq *,tpPESession);
690void limSendReassocReqMgmtFrame(tpAniSirGlobal, tLimMlmReassocReq *,tpPESession);
691#ifdef WLAN_FEATURE_VOWIFI_11R
692void limSendReassocReqWithFTIEsMgmtFrame(tpAniSirGlobal pMac,
693 tLimMlmReassocReq *pMlmReassocReq,tpPESession psessionEntry);
694#endif
695void limSendDeltsReqActionFrame(tpAniSirGlobal pMac, tSirMacAddr peer,
696 tANI_U8 wmmTspecPresent, tSirMacTSInfo *pTsinfo,
697 tSirMacTspecIE *pTspecIe, tpPESession psessionEntry);
698void limSendAddtsReqActionFrame(tpAniSirGlobal pMac, tSirMacAddr peerMacAddr,
699 tSirAddtsReqInfo *addts,tpPESession);
700void limSendAddtsRspActionFrame(tpAniSirGlobal pMac, tSirMacAddr peerMacAddr,
701 tANI_U16 statusCode, tSirAddtsReqInfo *addts, tSirMacScheduleIE *pSchedule,tpPESession);
702
Kapil Gupta956c0c42017-06-16 19:24:31 +0530703void limSendAssocRspMgmtFrame(tpAniSirGlobal, tANI_U16, tANI_U16, tSirMacAddr,
704 tANI_U8, tpDphHashNode pSta,tpPESession,
705 assoc_rsp_tx_context *tx_complete_context);
Jeff Johnson295189b2012-06-20 16:38:30 -0700706
707void limSendNullDataFrame(tpAniSirGlobal, tpDphHashNode);
Madan Mohan Koyyalamudi521ff192012-11-15 17:13:08 -0800708void limSendDisassocMgmtFrame(tpAniSirGlobal, tANI_U16, tSirMacAddr, tpPESession, tANI_BOOLEAN waitForAck);
709void limSendDeauthMgmtFrame(tpAniSirGlobal, tANI_U16, tSirMacAddr, tpPESession, tANI_BOOLEAN waitForAck);
Padma, Santhosh Kumar05600d32015-07-24 13:00:57 +0530710void limSendSmeDisassocDeauthNtf( tpAniSirGlobal pMac,
711 eHalStatus status, tANI_U32 *pCtx );
Paul Zhang83289792017-02-28 18:58:52 +0800712void limDoSendAuthMgmtFrame(tpAniSirGlobal, tpPESession);
Jeff Johnson295189b2012-06-20 16:38:30 -0700713
714void limContinueChannelScan(tpAniSirGlobal);
715tSirResultCodes limMlmAddBss(tpAniSirGlobal, tLimMlmStartReq *,tpPESession psessionEntry);
716
Jeff Johnsone7245742012-09-05 17:12:55 -0700717tSirRetStatus limSendChannelSwitchMgmtFrame(tpAniSirGlobal, tSirMacAddr, tANI_U8, tANI_U8, tANI_U8, tpPESession);
Jeff Johnson295189b2012-06-20 16:38:30 -0700718
Mohit Khanna4a70d262012-09-11 16:30:12 -0700719#ifdef WLAN_FEATURE_11AC
720tSirRetStatus limSendVHTOpmodeNotificationFrame(tpAniSirGlobal pMac,tSirMacAddr peer,tANI_U8 nMode, tpPESession psessionEntry );
Madan Mohan Koyyalamudic6226de2012-09-18 16:33:31 -0700721tSirRetStatus limSendVHTChannelSwitchMgmtFrame(tpAniSirGlobal pMac,tSirMacAddr peer,tANI_U8 nChanWidth, tANI_U8 nNewChannel, tANI_U8 ncbMode, tpPESession psessionEntry );
Mohit Khanna4a70d262012-09-11 16:30:12 -0700722#endif
723
Jeff Johnson295189b2012-06-20 16:38:30 -0700724#if defined WLAN_FEATURE_VOWIFI
725tSirRetStatus limSendNeighborReportRequestFrame(tpAniSirGlobal, tpSirMacNeighborReportReq, tSirMacAddr, tpPESession);
726tSirRetStatus limSendLinkReportActionFrame(tpAniSirGlobal, tpSirMacLinkReport, tSirMacAddr, tpPESession );
727tSirRetStatus limSendRadioMeasureReportActionFrame(tpAniSirGlobal, tANI_U8, tANI_U8, tpSirMacRadioMeasureReport, tSirMacAddr, tpPESession);
728#endif
729
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800730#if defined(FEATURE_WLAN_ESE) && !defined(FEATURE_WLAN_ESE_UPLOAD)
Jeff Johnson295189b2012-06-20 16:38:30 -0700731void limProcessIappFrame(tpAniSirGlobal, tANI_U8 *,tpPESession);
732#endif
733
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800734#ifdef FEATURE_WLAN_TDLS
Gopichand Nakkala777e6032012-12-31 16:39:21 -0800735void limInitTdlsData(tpAniSirGlobal, tpPESession);
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800736tSirRetStatus limProcessSmeTdlsMgmtSendReq(tpAniSirGlobal pMac,
737 tANI_U32 *pMsgBuf);
738tSirRetStatus limProcessSmeTdlsAddStaReq(tpAniSirGlobal pMac,
739 tANI_U32 *pMsgBuf);
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +0530740tSirRetStatus limProcesSmeTdlsLinkEstablishReq(tpAniSirGlobal pMac,
741 tANI_U32 *pMsgBuf);
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800742tSirRetStatus limProcessSmeTdlsDelStaReq(tpAniSirGlobal pMac,
743 tANI_U32 *pMsgBuf);
Gopichand Nakkala2a0a1572013-02-10 21:39:16 -0800744void limSendSmeTDLSDeleteAllPeerInd(tpAniSirGlobal pMac, tpPESession psessionEntry);
Gopichand Nakkalab977a972013-02-18 19:15:09 -0800745void limSendSmeMgmtTXCompletion(tpAniSirGlobal pMac,
Ganesh Kondabattiniff987022015-08-11 19:43:44 +0530746 tANI_U32 smeSessionId,
Gopichand Nakkalab977a972013-02-18 19:15:09 -0800747 tANI_U32 txCompleteStatus);
Gopichand Nakkala2a0a1572013-02-10 21:39:16 -0800748tSirRetStatus limDeleteTDLSPeers(tpAniSirGlobal pMac, tpPESession psessionEntry);
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800749eHalStatus limProcessTdlsAddStaRsp(tpAniSirGlobal pMac, void *msg, tpPESession);
750tSirRetStatus limSendTdlsTeardownFrame(tpAniSirGlobal pMac,
Hoonki Leea34dd892013-02-05 22:56:02 -0800751 tSirMacAddr peerMac, tANI_U16 reason, tANI_U8 responder, tpPESession psessionEntry,
Atul Mittalc0f739f2014-07-31 13:47:47 +0530752 tANI_U8 *addIe, tANI_U16 addIeLen);
753// tdlsoffchan
754tSirRetStatus limProcesSmeTdlsChanSwitchReq(tpAniSirGlobal pMac,
755 tANI_U32 *pMsgBuf);
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800756#endif
757
Jeff Johnson295189b2012-06-20 16:38:30 -0700758// Algorithms & Link Monitoring related functions
759tSirBackgroundScanMode limSelectsBackgroundScanMode(tpAniSirGlobal);
760void limTriggerBackgroundScan(tpAniSirGlobal);
761void limAbortBackgroundScan(tpAniSirGlobal);
762
763/// Function that handles heartbeat failure
764void limHandleHeartBeatFailure(tpAniSirGlobal,tpPESession);
765
766/// Function that triggers link tear down with AP upon HB failure
767void limTearDownLinkWithAp(tpAniSirGlobal,tANI_U8, tSirMacReasonCodes);
768
Jeff Johnson295189b2012-06-20 16:38:30 -0700769
770/// Function that sends keep alive message to peer(s)
771void limSendKeepAliveToPeer(tpAniSirGlobal);
772
773/// Function that processes Max retries interrupt from TFP
774void limHandleMaxRetriesInterrupt(tANI_U32);
775
776/// Function that processes messages deferred during Learn mode
777void limProcessDeferredMessageQueue(tpAniSirGlobal);
778
779/// Function that defers the messages received
780tANI_U32 limDeferMsg(tpAniSirGlobal, tSirMsgQ *);
781
782/// Function that sets system into scan mode
783void limSetScanMode(tpAniSirGlobal pMac);
784
785/// Function that Switches the Channel and sets the CB Mode
Jeff Johnsone7245742012-09-05 17:12:55 -0700786void limSetChannel(tpAniSirGlobal pMac, tANI_U8 channel, tANI_U8 secChannelOffset, tPowerdBm maxTxPower, tANI_U8 peSessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -0700787
788/// Function that completes channel scan
789void limCompleteMlmScan(tpAniSirGlobal, tSirResultCodes);
790
Jeff Johnsone7245742012-09-05 17:12:55 -0700791#ifdef FEATURE_OEM_DATA_SUPPORT
792/// Funtion that sets system into meas mode for oem data req
793void limSetOemDataReqMode(tpAniSirGlobal pMac, eHalStatus status, tANI_U32* data);
794#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700795
796#ifdef ANI_SUPPORT_11H
797/// Function that sends Measurement Report action frame
798tSirRetStatus limSendMeasReportFrame(tpAniSirGlobal, tpSirMacMeasReqActionFrame, tSirMacAddr);
799
800/// Function that sends TPC Report action frame
801tSirRetStatus limSendTpcReportFrame(tpAniSirGlobal, tpSirMacTpcReqActionFrame, tSirMacAddr);
802#endif
803
804/// Function that sends TPC Request action frame
805void limSendTpcRequestFrame(tpAniSirGlobal, tSirMacAddr);
806
807// Function(s) to handle responses received from HAL
808void limProcessMlmAddBssRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ );
809void limProcessMlmAddStaRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQt,tpPESession psessionEntry);
810void limProcessMlmDelStaRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ );
811void limProcessMlmDelBssRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ,tpPESession);
Jeff Johnson295189b2012-06-20 16:38:30 -0700812void limProcessStaMlmAddStaRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ ,tpPESession psessionEntry);
813void limProcessStaMlmDelStaRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ,tpPESession psessionEntry);
814void limProcessStaMlmDelBssRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ ,tpPESession psessionEntry);
815void limProcessMlmSetStaKeyRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ );
816void limProcessMlmSetBssKeyRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ );
817
818
819
820#ifdef GEN4_SCAN
821// Function to process WDA_INIT_SCAN_RSP message
822void limProcessInitScanRsp(tpAniSirGlobal, void * );
823
824// Function to process WDA_START_SCAN_RSP message
825void limProcessStartScanRsp(tpAniSirGlobal, void * );
826
827// Function to process WDA_END_SCAN_RSP message
828void limProcessEndScanRsp(tpAniSirGlobal, void * );
829
830// Function to process WDA_FINISH_SCAN_RSP message
831void limProcessFinishScanRsp(tpAniSirGlobal, void * );
832
833// Function to process WDA_SWITCH_CHANNEL_RSP message
834void limProcessSwitchChannelRsp(tpAniSirGlobal pMac, void * );
835
836void limSendHalInitScanReq( tpAniSirGlobal, tLimLimHalScanState, tSirLinkTrafficCheck);
837void limSendHalStartScanReq( tpAniSirGlobal, tANI_U8, tLimLimHalScanState);
838void limSendHalEndScanReq( tpAniSirGlobal, tANI_U8, tLimLimHalScanState);
Bhargav Shahe3a6ff02016-04-11 16:31:49 +0530839void limSendTLPauseInd(tpAniSirGlobal pMac, uint16_t staId);
Jeff Johnson295189b2012-06-20 16:38:30 -0700840void limSendHalFinishScanReq( tpAniSirGlobal, tLimLimHalScanState);
841
842void limContinuePostChannelScan(tpAniSirGlobal pMac);
Gopichand Nakkalad492d202013-05-10 02:50:47 +0530843void limCovertChannelScanType(tpAniSirGlobal pMac,tANI_U8 channelNum, tANI_BOOLEAN passiveToActive);
844void limSetDFSChannelList(tpAniSirGlobal pMac,tANI_U8 channelNum, tSirDFSChannelList *dfsChannelList);
Jeff Johnson295189b2012-06-20 16:38:30 -0700845void limContinueChannelLearn( tpAniSirGlobal );
846//WLAN_SUSPEND_LINK Related
847tANI_U8 limIsLinkSuspended(tpAniSirGlobal pMac);
848void limSuspendLink(tpAniSirGlobal, tSirLinkTrafficCheck, SUSPEND_RESUME_LINK_CALLBACK, tANI_U32*);
849void limResumeLink(tpAniSirGlobal, SUSPEND_RESUME_LINK_CALLBACK, tANI_U32*);
850//end WLAN_SUSPEND_LINK Related
851#endif // GEN4_SCAN
852
853tSirRetStatus limSendAddBAReq( tpAniSirGlobal pMac,
854 tpLimMlmAddBAReq pMlmAddBAReq,tpPESession);
855
856tSirRetStatus limSendAddBARsp( tpAniSirGlobal pMac,
857 tpLimMlmAddBARsp pMlmAddBARsp,tpPESession);
858
859tSirRetStatus limSendDelBAInd( tpAniSirGlobal pMac,
860 tpLimMlmDelBAReq pMlmDelBAReq ,tpPESession psessionEntry);
861#if 0
862tSirRetStatus limSendSMPowerStateFrame( tpAniSirGlobal pMac,
863 tSirMacAddr peer, tSirMacHTMIMOPowerSaveState State );
864#endif
865
866void limProcessMlmHalAddBARsp( tpAniSirGlobal pMac,
867 tpSirMsgQ limMsgQ );
868
869void limProcessMlmHalBADeleteInd( tpAniSirGlobal pMac,
870 tpSirMsgQ limMsgQ );
871
872void limProcessMlmRemoveKeyRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ );
873
874void limProcessLearnIntervalTimeout(tpAniSirGlobal pMac);
Chet Lanctot8cecea22014-02-11 19:09:36 -0800875
Jeff Johnson295189b2012-06-20 16:38:30 -0700876#ifdef WLAN_FEATURE_11W
Chet Lanctot8cecea22014-02-11 19:09:36 -0800877//11w send SA query request action frame
878tSirRetStatus limSendSaQueryRequestFrame( tpAniSirGlobal pMac, tANI_U8 *transId,
879 tSirMacAddr peer, tpPESession psessionEntry );
Jeff Johnson295189b2012-06-20 16:38:30 -0700880//11w SA query request action frame handler
881tSirRetStatus limSendSaQueryResponseFrame( tpAniSirGlobal pMac,
Chet Lanctot186b5732013-03-18 10:26:30 -0700882 tANI_U8 *transId, tSirMacAddr peer,tpPESession psessionEntry);
Jeff Johnson295189b2012-06-20 16:38:30 -0700883#endif
Abhishek Singh00b71972016-01-07 10:51:04 +0530884
885#ifdef WLAN_FEATURE_RMC
886void limProcessRMCMessages(tpAniSirGlobal pMac, eRmcMessageType msgType,
887 tANI_U32 *pMsgBuf);
888tSirRetStatus limSendRMCActionFrame(tpAniSirGlobal pMac,
889 tSirMacAddr peerMacAddr, tSirRMCInfo *pRMC,
890 tpPESession psessionEntry);
891#endif /* WLAN_FEATURE_RMC */
892
Jeff Johnson295189b2012-06-20 16:38:30 -0700893// Inline functions
894
895/**
896 * limPostSmeMessage()
897 *
898 *FUNCTION:
899 * This function is called by limProcessMlmMessages(). In this
900 * function MLM sub-module invokes MLM ind/cnf primitives.
901 *
902 *LOGIC:
903 * Initially MLM makes an SME function call to invoke MLM ind/cnf
904 * primitive. In future this can be enhanced to 'post' messages to SME.
905 *
906 *ASSUMPTIONS:
907 * NA
908 *
909 *NOTE:
910 * NA
911 *
912 * @param pMac Pointer to Global MAC structure
913 * @param msgType Indicates the MLM primitive message type
914 * @param *pMsgBuf A pointer to the MLM message buffer
915 *
916 * @return None
917 */
918static inline void
919limPostSmeMessage(tpAniSirGlobal pMac, tANI_U32 msgType, tANI_U32 *pMsgBuf)
920{
921 tSirMsgQ msg;
922
923 if(pMsgBuf == NULL)
924 {
Kiran Kumar Lokere5be73a62013-04-01 18:40:00 -0700925 limLog(pMac, LOGE,FL("Buffer is Pointing to NULL"));
Jeff Johnson295189b2012-06-20 16:38:30 -0700926 return;
927 }
928
929 msg.type = (tANI_U16)msgType;
930 msg.bodyptr = pMsgBuf;
931 msg.bodyval = 0;
932 if (msgType > eWNI_SME_MSG_TYPES_BEGIN)
Konamki, Sreelakshmi2bfb8b02015-07-29 11:41:24 +0530933 {
934 MTRACE(macTrace(pMac, TRACE_CODE_TX_SME_MSG, NO_SESSION, msg.type));
Jeff Johnson295189b2012-06-20 16:38:30 -0700935 limProcessSmeReqMessages(pMac, &msg);
Konamki, Sreelakshmi2bfb8b02015-07-29 11:41:24 +0530936 }
Jeff Johnson295189b2012-06-20 16:38:30 -0700937 else
938 limProcessMlmRspMessages(pMac, msgType, pMsgBuf);
939} /*** end limPostSmeMessage() ***/
940
941/**
942 * limPostMlmMessage()
943 *
944 *FUNCTION:
945 * This function is called by limProcessSmeMessages(). In this
946 * function SME invokes MLME primitives.
947 *
948 *PARAMS:
949 *
950 *LOGIC:
951 * Initially SME makes an MLM function call to invoke MLM primitive.
952 * In future this can be enhanced to 'post' messages to MLM.
953 *
954 *ASSUMPTIONS:
955 * NA
956 *
957 *NOTE:
958 * NA
959 *
960 * @param pMac Pointer to Global MAC structure
961 * @param msgType Indicates the MLM primitive message type
962 * @param *pMsgBuf A pointer to the MLM message buffer
963 *
964 * @return None
965 */
966static inline void
967limPostMlmMessage(tpAniSirGlobal pMac, tANI_U32 msgType, tANI_U32 *pMsgBuf)
968{
969
970 tSirMsgQ msg;
971 if(pMsgBuf == NULL)
972 {
Kiran Kumar Lokere5be73a62013-04-01 18:40:00 -0700973 limLog(pMac, LOGE,FL("Buffer is Pointing to NULL"));
Jeff Johnson295189b2012-06-20 16:38:30 -0700974 return;
975 }
976 msg.type = (tANI_U16) msgType;
977 msg.bodyptr = pMsgBuf;
978 msg.bodyval = 0;
Konamki, Sreelakshmi2bfb8b02015-07-29 11:41:24 +0530979 MTRACE(macTraceMsgRx(pMac, NO_SESSION, msg.type));
Jeff Johnson295189b2012-06-20 16:38:30 -0700980 limProcessMlmReqMessages(pMac, &msg);
981} /*** end limPostMlmMessage() ***/
982
983
984
985/**
986 * limGetCurrentScanChannel()
987 *
988 *FUNCTION:
989 * This function is called in various places to get current channel
990 * number being scanned.
991 *
992 *PARAMS:
993 *
994 *LOGIC:
995 *
996 *ASSUMPTIONS:
997 * NA
998 *
999 *NOTE:
1000 * NA
1001 *
1002 * @param pMac Pointer to Global MAC structure
1003 * @return Channel number
1004 */
1005static inline tANI_U8
1006limGetCurrentScanChannel(tpAniSirGlobal pMac)
1007{
1008 tANI_U8 *pChanNum = pMac->lim.gpLimMlmScanReq->channelList.channelNumber;
1009
1010 return (*(pChanNum + pMac->lim.gLimCurrentScanChannelId));
1011} /*** end limGetCurrentScanChannel() ***/
1012
Jeff Johnson295189b2012-06-20 16:38:30 -07001013/**
1014 * limSendBeaconInd()
1015 *
1016 *FUNCTION:
1017 * This function is called to send the beacon indication
1018 * number being scanned.
1019 *
1020 *PARAMS:
1021 *
1022 *LOGIC:
1023 *
1024 *ASSUMPTIONS:
1025*/
1026
1027void
1028limSendBeaconInd(tpAniSirGlobal pMac, tpPESession psessionEntry);
Jeff Johnson295189b2012-06-20 16:38:30 -07001029
Jeff Johnson295189b2012-06-20 16:38:30 -07001030
1031void limGetWPSPBCSessions(tpAniSirGlobal pMac, tANI_U8 *addr, tANI_U8 *uuid_e, eWPSPBCOverlap *overlap, tpPESession psessionEntry);
1032void limWPSPBCTimeout(tpAniSirGlobal pMac, tpPESession psessionEntry);
1033void limWPSPBCClose(tpAniSirGlobal pMac, tpPESession psessionEntry);
1034void limRemovePBCSessions(tpAniSirGlobal pMac, tSirMacAddr pRemoveMac,tpPESession psessionEntry);
1035
1036
1037tSirRetStatus
1038limIsSmeGetWPSPBCSessionsReqValid(tpAniSirGlobal pMac, tSirSmeGetWPSPBCSessionsReq *pGetWPSPBCSessionsReq, tANI_U8 *pBuf);
1039
1040#define LIM_WPS_OVERLAP_TIMER_MS 10000
Jeff Johnson295189b2012-06-20 16:38:30 -07001041
1042void
1043limSuspendLink(tpAniSirGlobal pMac, tSirLinkTrafficCheck trafficCheck, SUSPEND_RESUME_LINK_CALLBACK callback, tANI_U32 *data);
1044void
1045limResumeLink(tpAniSirGlobal pMac, SUSPEND_RESUME_LINK_CALLBACK callback, tANI_U32 *data);
1046
1047void
1048limChangeChannelWithCallback(tpAniSirGlobal pMac, tANI_U8 newChannel,
1049 CHANGE_CHANNEL_CALLBACK callback, tANI_U32 *cbdata, tpPESession psessionEntry);
1050
Jeff Johnson295189b2012-06-20 16:38:30 -07001051void limSendSmeMgmtFrameInd(
Rashmi Ramanna0d0adec2014-02-05 20:35:37 +05301052 tpAniSirGlobal pMac, tANI_U16 sessionId,
1053 tANI_U8 *pRxPacketInfo,
1054 tpPESession psessionEntry, tANI_S8 rxRssi);
Jeff Johnson295189b2012-06-20 16:38:30 -07001055void limProcessRemainOnChnTimeout(tpAniSirGlobal pMac);
Gopichand Nakkala4261ea52012-12-31 16:43:00 -08001056void limProcessInsertSingleShotNOATimeout(tpAniSirGlobal pMac);
Gopichand Nakkalad492d202013-05-10 02:50:47 +05301057void limConvertActiveChannelToPassiveChannel(tpAniSirGlobal pMac);
Jeff Johnson295189b2012-06-20 16:38:30 -07001058void limSendP2PActionFrame(tpAniSirGlobal pMac, tpSirMsgQ pMsg);
1059void limAbortRemainOnChan(tpAniSirGlobal pMac);
1060tSirRetStatus __limProcessSmeNoAUpdate(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf);
Viral Modid440e682013-03-06 02:25:31 -08001061void limProcessRegdDefdSmeReqAfterNOAStart(tpAniSirGlobal pMac);
Madan Mohan Koyyalamudi521ff192012-11-15 17:13:08 -08001062void limProcessDisassocAckTimeout(tpAniSirGlobal pMac);
1063void limProcessDeauthAckTimeout(tpAniSirGlobal pMac);
Abhishek Singh550aa8c2017-10-30 17:34:53 +05301064/**
1065 * lim_process_ap_ecsa_timeout() -process ECSA timeout which indicate ECSA IE TX
1066 * complete in beacon
1067 * @mac_ctx - A pointer to Global MAC structure
1068 *
1069 * Return None
1070 */
1071void lim_process_ap_ecsa_timeout(tpAniSirGlobal mac_ctx);
1072/**
1073 * lim_send_sme_ap_channel_switch_resp() -process channel switch resp for ecsa
1074 * channel switch req
1075 * @mac_ctx - A pointer to Global MAC structure
1076 * @session: session on which channel switch was done
1077 * @chan_param: channel switch resp params
1078 *
1079 * Return None
1080 */
1081void lim_send_sme_ap_channel_switch_resp(tpAniSirGlobal mac_ctx,
1082 tpPESession session, tpSwitchChannelParams chan_param);
1083
Madan Mohan Koyyalamudi521ff192012-11-15 17:13:08 -08001084eHalStatus limSendDisassocCnf(tpAniSirGlobal pMac);
1085eHalStatus limSendDeauthCnf(tpAniSirGlobal pMac);
Dhanashri Atre4a6e3ea2012-12-12 14:10:33 -08001086
1087#ifdef WLAN_FEATURE_VOWIFI_11R
1088typedef struct sSetLinkCbackParams
1089{
1090 void * cbackDataPtr;
1091} tSetLinkCbackParams;
1092#endif
Gopichand Nakkala2c231c82013-06-11 17:49:16 +05301093
1094void limProcessRxScanEvent(tpAniSirGlobal mac, void *buf);
Sudhir Sattayappa Kohalliabf751c2013-06-30 15:37:18 -07001095
1096int limProcessRemainOnChnlReq(tpAniSirGlobal pMac, tANI_U32 *pMsg);
1097void limRemainOnChnRsp(tpAniSirGlobal pMac, eHalStatus status, tANI_U32 *data);
Siddharth Bhal4f3187c2014-10-09 21:38:08 +05301098void limProcessMlmSpoofMacAddrRsp(tpAniSirGlobal pMac, tSirRetStatus rspStatus);
Pradeep Reddy POTTETI31505892015-04-16 16:47:54 +05301099tSirRetStatus limProcessSmeSetTdls2040BSSCoexReq(tpAniSirGlobal pMac,
1100 tANI_U32 *pMsgBuf);
Masti, Narayanraddi1fb32a92015-06-29 13:14:06 +05301101tSirRetStatus limProcessSmeDelAllTdlsPeers(tpAniSirGlobal pMac,
1102 tANI_U32 *pMsgBuf);
Manjeet Singh3ed79242017-01-11 19:04:32 +05301103
1104tSirRetStatus lim_process_sme_cap_tsf_req(tpAniSirGlobal pMac,
1105 tANI_U32 *pMsgBuf);
1106
1107tSirRetStatus lim_process_sme_get_tsf_req(tpAniSirGlobal pMac,
1108 tANI_U32 *pMsgBuf);
SaidiReddy Yenugac341fbf2017-02-01 20:22:45 +05301109
1110tSirRetStatus lim_process_sme_del_ba_ses_req(tpAniSirGlobal pMac,
1111 tANI_U32 *pMsgBuf);
1112
Jeff Johnson295189b2012-06-20 16:38:30 -07001113#endif /* __LIM_TYPES_H */
1114