blob: 35137b854b02d36097c142638df39ad09fdc7982 [file] [log] [blame]
Jeff Johnson295189b2012-06-20 16:38:30 -07001/*
Abhishek Singh00b71972016-01-07 10:51:04 +05302 * Copyright (c) 2012-2013, 2016 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,
Jeff Johnson295189b2012-06-20 16:38:30 -0700170};
171
172typedef struct sLimAuthRspTimeout
173{
174 tSirMacAddr peerMacAddr;
175} tLimAuthRspTimeout;
176
177typedef struct sLimMlmStartReq
178{
179 tSirMacSSid ssId;
180 tSirBssType bssType;
181 tSirMacAddr bssId;
182 tSirMacBeaconInterval beaconPeriod;
183 tANI_U8 dtimPeriod;
184 tSirMacCfParamSet cfParamSet;
185 tSirMacChanNum channelNumber;
Jeff Johnsone7245742012-09-05 17:12:55 -0700186 ePhyChanBondState cbMode;
Jeff Johnson295189b2012-06-20 16:38:30 -0700187 tANI_U16 atimWindow;
188 tSirMacRateSet rateSet;
189 tANI_U8 sessionId; //Added For BT-AMP Support
190
191 // Parameters reqd for new HAL (message) interface
192 tSirNwType nwType;
193 tANI_U8 htCapable;
194 tSirMacHTOperatingMode htOperMode;
195 tANI_U8 dualCTSProtection;
196 tANI_U8 txChannelWidthSet;
Jeff Johnson295189b2012-06-20 16:38:30 -0700197 tANI_U8 ssidHidden;
198 tANI_U8 wps_state;
199 tANI_U8 obssProtEnabled;
Jeff Johnson295189b2012-06-20 16:38:30 -0700200} tLimMlmStartReq, *tpLimMlmStartReq;
201
202typedef struct sLimMlmStartCnf
203{
204 tSirResultCodes resultCode;
205 tANI_U8 sessionId;
206} tLimMlmStartCnf, *tpLimMlmStartCnf;
207
208typedef struct sLimMlmScanCnf
209{
210 tSirResultCodes resultCode;
211 tANI_U16 scanResultLength;
212 tSirBssDescription bssDescription[1];
213 tANI_U8 sessionId;
214} tLimMlmScanCnf, *tpLimMlmScanCnf;
215
216typedef struct sLimScanResult
217{
218 tANI_U16 numBssDescriptions;
219 tSirBssDescription bssDescription[1];
220} tLimScanResult;
221
222typedef struct sLimMlmJoinCnf
223{
224 tSirResultCodes resultCode;
225 tANI_U16 protStatusCode;
226 tANI_U8 sessionId;
227} tLimMlmJoinCnf, *tpLimMlmJoinCnf;
228
229typedef struct sLimMlmAssocReq
230{
231 tSirMacAddr peerMacAddr;
232 tANI_U32 assocFailureTimeout;
233 tANI_U16 capabilityInfo;
234 tSirMacListenInterval listenInterval;
235 tANI_U8 sessionId;
236} tLimMlmAssocReq, *tpLimMlmAssocReq;
237
238typedef struct sLimMlmAssocCnf
239{
240 tSirResultCodes resultCode; //Internal status code.
241 tANI_U16 protStatusCode; //Protocol Status code.
242 tANI_U8 sessionId;
243} tLimMlmAssocCnf, *tpLimMlmAssocCnf;
244
245typedef struct sLimMlmAssocInd
246{
247 tSirMacAddr peerMacAddr;
248 tANI_U16 aid;
249 tAniAuthType authType;
250 tAniSSID ssId;
251 tSirRSNie rsnIE;
Jeff Johnson1250df42012-12-10 14:31:52 -0800252 tSirAddie addIE; // additional IE received from the peer, which possibly includes WSC IE and/or P2P IE.
Jeff Johnson295189b2012-06-20 16:38:30 -0700253 tSirMacCapabilityInfo capabilityInfo;
Jeff Johnson295189b2012-06-20 16:38:30 -0700254 tAniBool spectrumMgtIndicator;
255 tSirMacPowerCapInfo powerCap;
256 tSirSupChnl supportedChannels;
257 tANI_U8 sessionId;
258
259
Jeff Johnson295189b2012-06-20 16:38:30 -0700260 tAniBool WmmStaInfoPresent;
Hardik Kantilal Patel1ba630f2014-11-21 04:32:05 +0530261#ifdef WLAN_FEATURE_AP_HT40_24G
262 tAniBool HT40MHzIntoPresent;
263#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700264
Jeff Johnson295189b2012-06-20 16:38:30 -0700265 // Required for indicating the frames to upper layer
266 tANI_U32 beaconLength;
267 tANI_U8* beaconPtr;
268 tANI_U32 assocReqLength;
Deepthi Gowriae6a1662015-10-12 12:59:37 +0530269 tANI_U8* assocReqPtr;
270 uint32_t rate_flags;
Jeff Johnson295189b2012-06-20 16:38:30 -0700271} tLimMlmAssocInd, *tpLimMlmAssocInd;
272
273typedef struct sLimMlmReassocReq
274{
275 tSirMacAddr peerMacAddr;
276 tANI_U32 reassocFailureTimeout;
277 tANI_U16 capabilityInfo;
278 tSirMacListenInterval listenInterval;
279 tANI_U8 sessionId;
280} tLimMlmReassocReq, *tpLimMlmReassocReq;
281
282typedef struct sLimMlmReassocCnf
283{
284 tSirResultCodes resultCode;
285 tANI_U16 protStatusCode; //Protocol Status code.
286 tANI_U8 sessionId;
287} tLimMlmReassocCnf, *tpLimMlmReassocCnf;
288
289typedef struct sLimMlmReassocInd
290{
291 tSirMacAddr peerMacAddr;
292 tSirMacAddr currentApAddr;
293 tANI_U16 aid;
294 tAniAuthType authType;
295 tAniSSID ssId;
296 tSirRSNie rsnIE;
Jeff Johnson1250df42012-12-10 14:31:52 -0800297 tSirAddie addIE; // additional IE received from the peer, which can be WSC IE and/or P2P IE.
Jeff Johnson295189b2012-06-20 16:38:30 -0700298 tSirMacCapabilityInfo capabilityInfo;
Jeff Johnson295189b2012-06-20 16:38:30 -0700299 tAniBool spectrumMgtIndicator;
300 tSirMacPowerCapInfo powerCap;
301 tSirSupChnl supportedChannels;
302
Jeff Johnson295189b2012-06-20 16:38:30 -0700303 tAniBool WmmStaInfoPresent;
Hardik Kantilal Patel1ba630f2014-11-21 04:32:05 +0530304#ifdef WLAN_FEATURE_AP_HT40_24G
305 tAniBool HT40MHzIntoPresent;
306#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700307
Jeff Johnson295189b2012-06-20 16:38:30 -0700308 // Required for indicating the frames to upper layer
309 tANI_U32 beaconLength;
310 tANI_U8* beaconPtr;
311 tANI_U32 assocReqLength;
312 tANI_U8* assocReqPtr;
313} tLimMlmReassocInd, *tpLimMlmReassocInd;
314
315typedef struct sLimMlmAuthCnf
316{
317 tSirMacAddr peerMacAddr;
318 tAniAuthType authType;
319 tSirResultCodes resultCode;
320 tANI_U16 protStatusCode;
321 tANI_U8 sessionId;
322} tLimMlmAuthCnf, *tpLimMlmAuthCnf;
323
324typedef struct sLimMlmAuthInd
325{
326 tSirMacAddr peerMacAddr;
327 tAniAuthType authType;
328 tANI_U8 sessionId;
329} tLimMlmAuthInd, *tpLimMlmAuthInd;
330
331typedef struct sLimMlmDeauthReq
332{
333 tSirMacAddr peerMacAddr;
334 tANI_U16 reasonCode;
335 tANI_U16 deauthTrigger;
336 tANI_U16 aid;
337 tANI_U8 sessionId; //Added for BT-AMP SUPPORT
338
339} tLimMlmDeauthReq, *tpLimMlmDeauthReq;
340
341typedef struct sLimMlmDeauthCnf
342{
343 tSirMacAddr peerMacAddr;
344 tSirResultCodes resultCode;
345 tANI_U16 deauthTrigger;
346 tANI_U16 aid;
347 tANI_U8 sessionId;
348} tLimMlmDeauthCnf, *tpLimMLmDeauthCnf;
349
350typedef struct sLimMlmDeauthInd
351{
352 tSirMacAddr peerMacAddr;
353 tANI_U16 reasonCode;
354 tANI_U16 deauthTrigger;
355 tANI_U16 aid;
356} tLimMlmDeauthInd, *tpLimMlmDeauthInd;
357
358typedef struct sLimMlmDisassocReq
359{
360 tSirMacAddr peerMacAddr;
361 tANI_U16 reasonCode;
362 tANI_U16 disassocTrigger;
363 tANI_U16 aid;
364 tANI_U8 sessionId;
365} tLimMlmDisassocReq, *tpLimMlmDisassocReq;
366
367typedef struct sLimMlmDisassocCnf
368{
369 tSirMacAddr peerMacAddr;
370 tSirResultCodes resultCode;
371 tANI_U16 disassocTrigger;
372 tANI_U16 aid;
373 tANI_U8 sessionId;
374} tLimMlmDisassocCnf, *tpLimMlmDisassocCnf;
375
376typedef struct sLimMlmDisassocInd
377{
378 tSirMacAddr peerMacAddr;
379 tANI_U16 reasonCode;
380 tANI_U16 disassocTrigger;
381 tANI_U16 aid;
382 tANI_U8 sessionId;
383} tLimMlmDisassocInd, *tpLimMlmDisassocInd;
384
385typedef struct sLimMlmPurgeStaReq
386{
387 tSirMacAddr peerMacAddr;
388 tANI_U16 aid;
389 tANI_U8 sessionId;//Added For BT-AMP Support
390} tLimMlmPurgeStaReq, *tpLimMlmPurgeStaReq;
391
392typedef struct sLimMlmPurgeStaInd
393{
394 tSirMacAddr peerMacAddr;
395 tANI_U16 reasonCode;
396 tANI_U16 purgeTrigger;
397 tANI_U16 aid;
398 tANI_U8 sessionId;
399} tLimMlmPurgeStaInd, *tpLimMlmPurgeStaInd;
400
401typedef struct sLimMlmSetKeysReq
402{
403 tSirMacAddr peerMacAddr;
404 tANI_U8 sessionId; //Added For BT-AMP Support
405 tANI_U16 aid;
406 tAniEdType edType; // Encryption/Decryption type
407 tANI_U8 numKeys;
408 tSirKeys key[SIR_MAC_MAX_NUM_OF_DEFAULT_KEYS];
409} tLimMlmSetKeysReq, *tpLimMlmSetKeysReq;
410
411typedef struct sLimMlmSetKeysCnf
412{
413 tSirMacAddr peerMacAddr;
414 tANI_U16 resultCode;
415 tANI_U16 aid;
416 tANI_U8 sessionId;
417} tLimMlmSetKeysCnf, *tpLimMlmSetKeysCnf;
418
419typedef struct sLimMlmRemoveKeyReq
420{
421 tSirMacAddr peerMacAddr;
422 tANI_U8 sessionId; //Added FOr BT-AMP Support
423 tAniEdType edType; // Encryption/Decryption type
424 tANI_U8 wepType; //STATIC / DYNAMIC specifier
425 tANI_U8 keyId; //Key Id To be removed.
426 tANI_BOOLEAN unicast;
427} tLimMlmRemoveKeyReq, *tpLimMlmRemoveKeyReq;
428
429typedef struct sLimMlmRemoveKeyCnf
430{
431 tSirMacAddr peerMacAddr;
432 tANI_U16 resultCode;
433 tANI_U8 sessionId;
434} tLimMlmRemoveKeyCnf, *tpLimMlmRemoveKeyCnf;
435
436
437typedef struct sLimMlmResetReq
438{
439 tSirMacAddr macAddr;
440 tANI_U8 performCleanup;
441 tANI_U8 sessionId;
442} tLimMlmResetReq, *tpLimMlmResetReq;
443
444typedef struct sLimMlmResetCnf
445{
446 tSirMacAddr macAddr;
447 tSirResultCodes resultCode;
448 tANI_U8 sessionId;
449} tLimMlmResetCnf, *tpLimMlmResetCnf;
450
451
452typedef struct sLimMlmLinkTestStopReq
453{
454 tSirMacAddr peerMacAddr;
455 tANI_U8 sessionId;
Jeff Johnson295189b2012-06-20 16:38:30 -0700456} tLimMlmLinkTestStopReq, *tpLimMlmLinkTestStopReq;
457
458
459//
460// Block ACK related MLME data structures
461//
462
463typedef struct sLimMlmAddBAReq
464{
465
466 // ADDBA recipient
467 tSirMacAddr peerMacAddr;
468
469 // ADDBA Action Frame dialog token
470 tANI_U8 baDialogToken;
471
472 // ADDBA requested for TID
473 tANI_U8 baTID;
474
475 // BA policy
476 // 0 - Delayed BA (Not supported)
477 // 1 - Immediate BA
478 tANI_U8 baPolicy;
479
480 // BA buffer size - (0..127) max size MSDU's
481 tANI_U16 baBufferSize;
482
483 // BA timeout in TU's
484 // 0 means no timeout will occur
485 tANI_U16 baTimeout;
486
487 // ADDBA failure timeout in TU's
488 // Greater than or equal to 1
489 tANI_U16 addBAFailureTimeout;
490
491 // BA Starting Sequence Number
492 tANI_U16 baSSN;
493
494 tANI_U8 sessionId;
495
496} tLimMlmAddBAReq, *tpLimMlmAddBAReq;
497
498typedef struct sLimMlmAddBACnf
499{
500
501 // ADDBA recipient
502 tSirMacAddr peerMacAddr;
503
504 // ADDBA Action Frame dialog token
505 tANI_U8 baDialogToken;
506
507 // ADDBA requested for TID
508 tANI_U8 baTID;
509
510 // BA status code
511 tSirMacStatusCodes addBAResultCode;
512
513 // BA policy
514 // 0 - Delayed BA (Not supported)
515 // 1 - Immediate BA
516 tANI_U8 baPolicy;
517
518 // BA buffer size - (0..127) max size MSDU's
519 tANI_U16 baBufferSize;
520
521 // BA timeout in TU's
522 // 0 means no timeout will occur
523 tANI_U16 baTimeout;
524
525 // ADDBA direction
526 // 1 - Originator
527 // 0 - Recipient
528 tANI_U8 baDirection;
529 tANI_U8 sessionId;
530
531
532} tLimMlmAddBACnf, *tpLimMlmAddBACnf;
533
534typedef struct sLimMlmAddBAInd
535{
536
537 // ADDBA recipient
538 tSirMacAddr peerMacAddr;
539
540 // ADDBA Action Frame dialog token
541 tANI_U8 baDialogToken;
542
543 // ADDBA requested for TID
544 tANI_U8 baTID;
545
546 // BA policy
547 // 0 - Delayed BA (Not supported)
548 // 1 - Immediate BA
549 tANI_U8 baPolicy;
550
551 // BA buffer size - (0..127) max size MSDU's
552 tANI_U16 baBufferSize;
553
554 // BA timeout in TU's
555 // 0 means no timeout will occur
556 tANI_U16 baTimeout;
557
558} tLimMlmAddBAInd, *tpLimMlmAddBAInd;
559
560typedef struct sLimMlmAddBARsp
561{
562
563 // ADDBA recipient
564 tSirMacAddr peerMacAddr;
565
566 // ADDBA Action Frame dialog token
567 tANI_U8 baDialogToken;
568
569 // ADDBA requested for TID
570 tANI_U8 baTID;
571
572 // BA status code
573 tSirMacStatusCodes addBAResultCode;
574
575 // BA policy
576 // 0 - Delayed BA (Not supported)
577 // 1 - Immediate BA
578 tANI_U8 baPolicy;
579
580 // BA buffer size - (0..127) max size MSDU's
581 tANI_U16 baBufferSize;
582
583 // BA timeout in TU's
584 // 0 means no timeout will occur
585 tANI_U16 baTimeout;
586
587 //reserved for alignment
588 tANI_U8 rsvd[2];
589
590 /* PE session id*/
591 tANI_U8 sessionId;
592
593 } tLimMlmAddBARsp, *tpLimMlmAddBARsp;
594
595//
596// NOTE - Overloading DELBA IND and DELBA CNF
597// to use the same data structure as DELBA REQ
598// as the parameters do not vary too much.
599//
600typedef struct sLimMlmDelBAReq
601{
602
603 // ADDBA recipient
604 tSirMacAddr peerMacAddr;
605
606 // DELBA direction
607 // 1 - Originator
608 // 0 - Recipient
609 tANI_U8 baDirection;
610
611 // DELBA requested for TID
612 tANI_U8 baTID;
613
614 // DELBA reason code
615 tSirMacReasonCodes delBAReasonCode;
616
617 tANI_U8 sessionId;
618
619} tLimMlmDelBAReq, *tpLimMlmDelBAReq, tLimMlmDelBAInd, *tpLimMlmDelBAInd, tLimMlmDelBACnf, *tpLimMlmDelBACnf;
620
621// Function templates
622
623tANI_BOOLEAN limProcessSmeReqMessages(tpAniSirGlobal, tpSirMsgQ);
624void limProcessMlmReqMessages(tpAniSirGlobal, tpSirMsgQ);
625void limProcessMlmRspMessages(tpAniSirGlobal, tANI_U32, tANI_U32 *);
626void limProcessLmmMessages(tpAniSirGlobal, tANI_U32, tANI_U32 *);
627void limProcessSmeDelBssRsp( tpAniSirGlobal , tANI_U32,tpPESession);
628
629void limGetRandomBssid(tpAniSirGlobal pMac ,tANI_U8 *data);
630
Jeff Johnson295189b2012-06-20 16:38:30 -0700631// Function to handle HT and HT IE CFG parameter intializations
Jeff Johnsone7245742012-09-05 17:12:55 -0700632void handleHTCapabilityandHTInfo(struct sAniSirGlobal *pMac, tpPESession psessionEntry);
Jeff Johnson295189b2012-06-20 16:38:30 -0700633
634// Function to handle CFG parameter updates
635void limHandleCFGparamUpdate(tpAniSirGlobal, tANI_U32);
636
637// Function to apply CFG parameters before join/reassoc/start BSS
638void limApplyConfiguration(tpAniSirGlobal,tpPESession);
639
Jeff Johnson295189b2012-06-20 16:38:30 -0700640void limSetCfgProtection(tpAniSirGlobal pMac, tpPESession pesessionEntry);
Jeff Johnson295189b2012-06-20 16:38:30 -0700641
642
643// Function to Initialize MLM state machine on STA
644void limInitMlm(tpAniSirGlobal);
645
646// Function to cleanup MLM state machine
647void limCleanupMlm(tpAniSirGlobal);
648
649// Function to cleanup LMM state machine
650void limCleanupLmm(tpAniSirGlobal);
651
Jeff Johnson295189b2012-06-20 16:38:30 -0700652// Management frame handling functions
653void limProcessBeaconFrame(tpAniSirGlobal, tANI_U8 *,tpPESession);
654void limProcessBeaconFrameNoSession(tpAniSirGlobal, tANI_U8 *);
655void limProcessProbeReqFrame(tpAniSirGlobal, tANI_U8 *, tpPESession);
656void limProcessProbeRspFrame(tpAniSirGlobal, tANI_U8 *, tpPESession);
657void limProcessProbeRspFrameNoSession(tpAniSirGlobal, tANI_U8 *);
658void limProcessProbeReqFrame_multiple_BSS(tpAniSirGlobal, tANI_U8 *,tpPESession);
659
660
661// Process Auth frame when we have a session in progress.
662void limProcessAuthFrame(tpAniSirGlobal, tANI_U8 *,tpPESession);
663#ifdef WLAN_FEATURE_VOWIFI_11R
Srikant Kuppaa3ed0a32013-02-20 07:24:43 -0800664tSirRetStatus limProcessAuthFrameNoSession(tpAniSirGlobal pMac, tANI_U8 *, void *body);
Jeff Johnson295189b2012-06-20 16:38:30 -0700665#endif
666
667void limProcessAssocReqFrame(tpAniSirGlobal, tANI_U8 *, tANI_U8, tpPESession);
668void limSendMlmAssocInd(tpAniSirGlobal pMac, tpDphHashNode pStaDs, tpPESession psessionEntry);
669
670
671void limProcessAssocRspFrame(tpAniSirGlobal, tANI_U8 *, tANI_U8,tpPESession);
672void limProcessDisassocFrame(tpAniSirGlobal, tANI_U8 *,tpPESession);
673void limProcessDeauthFrame(tpAniSirGlobal, tANI_U8 *,tpPESession);
674void limProcessActionFrame(tpAniSirGlobal, tANI_U8 *,tpPESession);
Jeff Johnson295189b2012-06-20 16:38:30 -0700675void limProcessActionFrameNoSession(tpAniSirGlobal pMac, tANI_U8 *pRxMetaInfo);
Jeff Johnson295189b2012-06-20 16:38:30 -0700676
677
678tSirRetStatus limPopulateMacHeader(tpAniSirGlobal, tANI_U8*, tANI_U8, tANI_U8, tSirMacAddr,tSirMacAddr);
679tSirRetStatus limSendProbeReqMgmtFrame(tpAniSirGlobal, tSirMacSSid *, tSirMacAddr, tANI_U8, tSirMacAddr, tANI_U32, tANI_U32, tANI_U8 *);
680void limSendProbeRspMgmtFrame(tpAniSirGlobal, tSirMacAddr, tpAniSSID, short, tANI_U8, tpPESession, tANI_U8);
Sushant Kaushik9e923872015-04-02 17:09:31 +0530681void limSendAuthMgmtFrame(tpAniSirGlobal, tSirMacAuthFrameBody *, tSirMacAddr,
682 tANI_U8, tpPESession , tAniBool);
Jeff Johnson295189b2012-06-20 16:38:30 -0700683void limSendAssocReqMgmtFrame(tpAniSirGlobal, tLimMlmAssocReq *,tpPESession);
684void limSendReassocReqMgmtFrame(tpAniSirGlobal, tLimMlmReassocReq *,tpPESession);
685#ifdef WLAN_FEATURE_VOWIFI_11R
686void limSendReassocReqWithFTIEsMgmtFrame(tpAniSirGlobal pMac,
687 tLimMlmReassocReq *pMlmReassocReq,tpPESession psessionEntry);
688#endif
689void limSendDeltsReqActionFrame(tpAniSirGlobal pMac, tSirMacAddr peer,
690 tANI_U8 wmmTspecPresent, tSirMacTSInfo *pTsinfo,
691 tSirMacTspecIE *pTspecIe, tpPESession psessionEntry);
692void limSendAddtsReqActionFrame(tpAniSirGlobal pMac, tSirMacAddr peerMacAddr,
693 tSirAddtsReqInfo *addts,tpPESession);
694void limSendAddtsRspActionFrame(tpAniSirGlobal pMac, tSirMacAddr peerMacAddr,
695 tANI_U16 statusCode, tSirAddtsReqInfo *addts, tSirMacScheduleIE *pSchedule,tpPESession);
696
Jeff Johnson295189b2012-06-20 16:38:30 -0700697void limSendAssocRspMgmtFrame(tpAniSirGlobal, tANI_U16, tANI_U16, tSirMacAddr, tANI_U8, tpDphHashNode pSta,tpPESession);
698
699void limSendNullDataFrame(tpAniSirGlobal, tpDphHashNode);
Madan Mohan Koyyalamudi521ff192012-11-15 17:13:08 -0800700void limSendDisassocMgmtFrame(tpAniSirGlobal, tANI_U16, tSirMacAddr, tpPESession, tANI_BOOLEAN waitForAck);
701void limSendDeauthMgmtFrame(tpAniSirGlobal, tANI_U16, tSirMacAddr, tpPESession, tANI_BOOLEAN waitForAck);
Padma, Santhosh Kumar05600d32015-07-24 13:00:57 +0530702void limSendSmeDisassocDeauthNtf( tpAniSirGlobal pMac,
703 eHalStatus status, tANI_U32 *pCtx );
704
Jeff Johnson295189b2012-06-20 16:38:30 -0700705
706void limContinueChannelScan(tpAniSirGlobal);
707tSirResultCodes limMlmAddBss(tpAniSirGlobal, tLimMlmStartReq *,tpPESession psessionEntry);
708
Jeff Johnsone7245742012-09-05 17:12:55 -0700709tSirRetStatus limSendChannelSwitchMgmtFrame(tpAniSirGlobal, tSirMacAddr, tANI_U8, tANI_U8, tANI_U8, tpPESession);
Jeff Johnson295189b2012-06-20 16:38:30 -0700710
Mohit Khanna4a70d262012-09-11 16:30:12 -0700711#ifdef WLAN_FEATURE_11AC
712tSirRetStatus limSendVHTOpmodeNotificationFrame(tpAniSirGlobal pMac,tSirMacAddr peer,tANI_U8 nMode, tpPESession psessionEntry );
Madan Mohan Koyyalamudic6226de2012-09-18 16:33:31 -0700713tSirRetStatus limSendVHTChannelSwitchMgmtFrame(tpAniSirGlobal pMac,tSirMacAddr peer,tANI_U8 nChanWidth, tANI_U8 nNewChannel, tANI_U8 ncbMode, tpPESession psessionEntry );
Mohit Khanna4a70d262012-09-11 16:30:12 -0700714#endif
715
Jeff Johnson295189b2012-06-20 16:38:30 -0700716#if defined WLAN_FEATURE_VOWIFI
717tSirRetStatus limSendNeighborReportRequestFrame(tpAniSirGlobal, tpSirMacNeighborReportReq, tSirMacAddr, tpPESession);
718tSirRetStatus limSendLinkReportActionFrame(tpAniSirGlobal, tpSirMacLinkReport, tSirMacAddr, tpPESession );
719tSirRetStatus limSendRadioMeasureReportActionFrame(tpAniSirGlobal, tANI_U8, tANI_U8, tpSirMacRadioMeasureReport, tSirMacAddr, tpPESession);
720#endif
721
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800722#if defined(FEATURE_WLAN_ESE) && !defined(FEATURE_WLAN_ESE_UPLOAD)
Jeff Johnson295189b2012-06-20 16:38:30 -0700723void limProcessIappFrame(tpAniSirGlobal, tANI_U8 *,tpPESession);
724#endif
725
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800726#ifdef FEATURE_WLAN_TDLS
Gopichand Nakkala777e6032012-12-31 16:39:21 -0800727void limInitTdlsData(tpAniSirGlobal, tpPESession);
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800728tSirRetStatus limProcessSmeTdlsMgmtSendReq(tpAniSirGlobal pMac,
729 tANI_U32 *pMsgBuf);
730tSirRetStatus limProcessSmeTdlsAddStaReq(tpAniSirGlobal pMac,
731 tANI_U32 *pMsgBuf);
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +0530732tSirRetStatus limProcesSmeTdlsLinkEstablishReq(tpAniSirGlobal pMac,
733 tANI_U32 *pMsgBuf);
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800734tSirRetStatus limProcessSmeTdlsDelStaReq(tpAniSirGlobal pMac,
735 tANI_U32 *pMsgBuf);
Gopichand Nakkala2a0a1572013-02-10 21:39:16 -0800736void limSendSmeTDLSDeleteAllPeerInd(tpAniSirGlobal pMac, tpPESession psessionEntry);
Gopichand Nakkalab977a972013-02-18 19:15:09 -0800737void limSendSmeMgmtTXCompletion(tpAniSirGlobal pMac,
Ganesh Kondabattiniff987022015-08-11 19:43:44 +0530738 tANI_U32 smeSessionId,
Gopichand Nakkalab977a972013-02-18 19:15:09 -0800739 tANI_U32 txCompleteStatus);
Gopichand Nakkala2a0a1572013-02-10 21:39:16 -0800740tSirRetStatus limDeleteTDLSPeers(tpAniSirGlobal pMac, tpPESession psessionEntry);
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800741eHalStatus limProcessTdlsAddStaRsp(tpAniSirGlobal pMac, void *msg, tpPESession);
742tSirRetStatus limSendTdlsTeardownFrame(tpAniSirGlobal pMac,
Hoonki Leea34dd892013-02-05 22:56:02 -0800743 tSirMacAddr peerMac, tANI_U16 reason, tANI_U8 responder, tpPESession psessionEntry,
Atul Mittalc0f739f2014-07-31 13:47:47 +0530744 tANI_U8 *addIe, tANI_U16 addIeLen);
745// tdlsoffchan
746tSirRetStatus limProcesSmeTdlsChanSwitchReq(tpAniSirGlobal pMac,
747 tANI_U32 *pMsgBuf);
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800748#endif
749
Jeff Johnson295189b2012-06-20 16:38:30 -0700750// Algorithms & Link Monitoring related functions
751tSirBackgroundScanMode limSelectsBackgroundScanMode(tpAniSirGlobal);
752void limTriggerBackgroundScan(tpAniSirGlobal);
753void limAbortBackgroundScan(tpAniSirGlobal);
754
755/// Function that handles heartbeat failure
756void limHandleHeartBeatFailure(tpAniSirGlobal,tpPESession);
757
758/// Function that triggers link tear down with AP upon HB failure
759void limTearDownLinkWithAp(tpAniSirGlobal,tANI_U8, tSirMacReasonCodes);
760
Jeff Johnson295189b2012-06-20 16:38:30 -0700761
762/// Function that sends keep alive message to peer(s)
763void limSendKeepAliveToPeer(tpAniSirGlobal);
764
765/// Function that processes Max retries interrupt from TFP
766void limHandleMaxRetriesInterrupt(tANI_U32);
767
768/// Function that processes messages deferred during Learn mode
769void limProcessDeferredMessageQueue(tpAniSirGlobal);
770
771/// Function that defers the messages received
772tANI_U32 limDeferMsg(tpAniSirGlobal, tSirMsgQ *);
773
774/// Function that sets system into scan mode
775void limSetScanMode(tpAniSirGlobal pMac);
776
777/// Function that Switches the Channel and sets the CB Mode
Jeff Johnsone7245742012-09-05 17:12:55 -0700778void limSetChannel(tpAniSirGlobal pMac, tANI_U8 channel, tANI_U8 secChannelOffset, tPowerdBm maxTxPower, tANI_U8 peSessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -0700779
780/// Function that completes channel scan
781void limCompleteMlmScan(tpAniSirGlobal, tSirResultCodes);
782
Jeff Johnsone7245742012-09-05 17:12:55 -0700783#ifdef FEATURE_OEM_DATA_SUPPORT
784/// Funtion that sets system into meas mode for oem data req
785void limSetOemDataReqMode(tpAniSirGlobal pMac, eHalStatus status, tANI_U32* data);
786#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700787
788#ifdef ANI_SUPPORT_11H
789/// Function that sends Measurement Report action frame
790tSirRetStatus limSendMeasReportFrame(tpAniSirGlobal, tpSirMacMeasReqActionFrame, tSirMacAddr);
791
792/// Function that sends TPC Report action frame
793tSirRetStatus limSendTpcReportFrame(tpAniSirGlobal, tpSirMacTpcReqActionFrame, tSirMacAddr);
794#endif
795
796/// Function that sends TPC Request action frame
797void limSendTpcRequestFrame(tpAniSirGlobal, tSirMacAddr);
798
799// Function(s) to handle responses received from HAL
800void limProcessMlmAddBssRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ );
801void limProcessMlmAddStaRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQt,tpPESession psessionEntry);
802void limProcessMlmDelStaRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ );
803void limProcessMlmDelBssRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ,tpPESession);
Jeff Johnson295189b2012-06-20 16:38:30 -0700804void limProcessStaMlmAddStaRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ ,tpPESession psessionEntry);
805void limProcessStaMlmDelStaRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ,tpPESession psessionEntry);
806void limProcessStaMlmDelBssRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ ,tpPESession psessionEntry);
807void limProcessMlmSetStaKeyRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ );
808void limProcessMlmSetBssKeyRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ );
809
810
811
812#ifdef GEN4_SCAN
813// Function to process WDA_INIT_SCAN_RSP message
814void limProcessInitScanRsp(tpAniSirGlobal, void * );
815
816// Function to process WDA_START_SCAN_RSP message
817void limProcessStartScanRsp(tpAniSirGlobal, void * );
818
819// Function to process WDA_END_SCAN_RSP message
820void limProcessEndScanRsp(tpAniSirGlobal, void * );
821
822// Function to process WDA_FINISH_SCAN_RSP message
823void limProcessFinishScanRsp(tpAniSirGlobal, void * );
824
825// Function to process WDA_SWITCH_CHANNEL_RSP message
826void limProcessSwitchChannelRsp(tpAniSirGlobal pMac, void * );
827
828void limSendHalInitScanReq( tpAniSirGlobal, tLimLimHalScanState, tSirLinkTrafficCheck);
829void limSendHalStartScanReq( tpAniSirGlobal, tANI_U8, tLimLimHalScanState);
830void limSendHalEndScanReq( tpAniSirGlobal, tANI_U8, tLimLimHalScanState);
Bhargav Shahe3a6ff02016-04-11 16:31:49 +0530831void limSendTLPauseInd(tpAniSirGlobal pMac, uint16_t staId);
Jeff Johnson295189b2012-06-20 16:38:30 -0700832void limSendHalFinishScanReq( tpAniSirGlobal, tLimLimHalScanState);
833
834void limContinuePostChannelScan(tpAniSirGlobal pMac);
Gopichand Nakkalad492d202013-05-10 02:50:47 +0530835void limCovertChannelScanType(tpAniSirGlobal pMac,tANI_U8 channelNum, tANI_BOOLEAN passiveToActive);
836void limSetDFSChannelList(tpAniSirGlobal pMac,tANI_U8 channelNum, tSirDFSChannelList *dfsChannelList);
Jeff Johnson295189b2012-06-20 16:38:30 -0700837void limContinueChannelLearn( tpAniSirGlobal );
838//WLAN_SUSPEND_LINK Related
839tANI_U8 limIsLinkSuspended(tpAniSirGlobal pMac);
840void limSuspendLink(tpAniSirGlobal, tSirLinkTrafficCheck, SUSPEND_RESUME_LINK_CALLBACK, tANI_U32*);
841void limResumeLink(tpAniSirGlobal, SUSPEND_RESUME_LINK_CALLBACK, tANI_U32*);
842//end WLAN_SUSPEND_LINK Related
843#endif // GEN4_SCAN
844
845tSirRetStatus limSendAddBAReq( tpAniSirGlobal pMac,
846 tpLimMlmAddBAReq pMlmAddBAReq,tpPESession);
847
848tSirRetStatus limSendAddBARsp( tpAniSirGlobal pMac,
849 tpLimMlmAddBARsp pMlmAddBARsp,tpPESession);
850
851tSirRetStatus limSendDelBAInd( tpAniSirGlobal pMac,
852 tpLimMlmDelBAReq pMlmDelBAReq ,tpPESession psessionEntry);
853#if 0
854tSirRetStatus limSendSMPowerStateFrame( tpAniSirGlobal pMac,
855 tSirMacAddr peer, tSirMacHTMIMOPowerSaveState State );
856#endif
857
858void limProcessMlmHalAddBARsp( tpAniSirGlobal pMac,
859 tpSirMsgQ limMsgQ );
860
861void limProcessMlmHalBADeleteInd( tpAniSirGlobal pMac,
862 tpSirMsgQ limMsgQ );
863
864void limProcessMlmRemoveKeyRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ );
865
866void limProcessLearnIntervalTimeout(tpAniSirGlobal pMac);
Chet Lanctot8cecea22014-02-11 19:09:36 -0800867
Jeff Johnson295189b2012-06-20 16:38:30 -0700868#ifdef WLAN_FEATURE_11W
Chet Lanctot8cecea22014-02-11 19:09:36 -0800869//11w send SA query request action frame
870tSirRetStatus limSendSaQueryRequestFrame( tpAniSirGlobal pMac, tANI_U8 *transId,
871 tSirMacAddr peer, tpPESession psessionEntry );
Jeff Johnson295189b2012-06-20 16:38:30 -0700872//11w SA query request action frame handler
873tSirRetStatus limSendSaQueryResponseFrame( tpAniSirGlobal pMac,
Chet Lanctot186b5732013-03-18 10:26:30 -0700874 tANI_U8 *transId, tSirMacAddr peer,tpPESession psessionEntry);
Jeff Johnson295189b2012-06-20 16:38:30 -0700875#endif
Abhishek Singh00b71972016-01-07 10:51:04 +0530876
877#ifdef WLAN_FEATURE_RMC
878void limProcessRMCMessages(tpAniSirGlobal pMac, eRmcMessageType msgType,
879 tANI_U32 *pMsgBuf);
880tSirRetStatus limSendRMCActionFrame(tpAniSirGlobal pMac,
881 tSirMacAddr peerMacAddr, tSirRMCInfo *pRMC,
882 tpPESession psessionEntry);
883#endif /* WLAN_FEATURE_RMC */
884
Jeff Johnson295189b2012-06-20 16:38:30 -0700885// Inline functions
886
887/**
888 * limPostSmeMessage()
889 *
890 *FUNCTION:
891 * This function is called by limProcessMlmMessages(). In this
892 * function MLM sub-module invokes MLM ind/cnf primitives.
893 *
894 *LOGIC:
895 * Initially MLM makes an SME function call to invoke MLM ind/cnf
896 * primitive. In future this can be enhanced to 'post' messages to SME.
897 *
898 *ASSUMPTIONS:
899 * NA
900 *
901 *NOTE:
902 * NA
903 *
904 * @param pMac Pointer to Global MAC structure
905 * @param msgType Indicates the MLM primitive message type
906 * @param *pMsgBuf A pointer to the MLM message buffer
907 *
908 * @return None
909 */
910static inline void
911limPostSmeMessage(tpAniSirGlobal pMac, tANI_U32 msgType, tANI_U32 *pMsgBuf)
912{
913 tSirMsgQ msg;
914
915 if(pMsgBuf == NULL)
916 {
Kiran Kumar Lokere5be73a62013-04-01 18:40:00 -0700917 limLog(pMac, LOGE,FL("Buffer is Pointing to NULL"));
Jeff Johnson295189b2012-06-20 16:38:30 -0700918 return;
919 }
920
921 msg.type = (tANI_U16)msgType;
922 msg.bodyptr = pMsgBuf;
923 msg.bodyval = 0;
924 if (msgType > eWNI_SME_MSG_TYPES_BEGIN)
Konamki, Sreelakshmi2bfb8b02015-07-29 11:41:24 +0530925 {
926 MTRACE(macTrace(pMac, TRACE_CODE_TX_SME_MSG, NO_SESSION, msg.type));
Jeff Johnson295189b2012-06-20 16:38:30 -0700927 limProcessSmeReqMessages(pMac, &msg);
Konamki, Sreelakshmi2bfb8b02015-07-29 11:41:24 +0530928 }
Jeff Johnson295189b2012-06-20 16:38:30 -0700929 else
930 limProcessMlmRspMessages(pMac, msgType, pMsgBuf);
931} /*** end limPostSmeMessage() ***/
932
933/**
934 * limPostMlmMessage()
935 *
936 *FUNCTION:
937 * This function is called by limProcessSmeMessages(). In this
938 * function SME invokes MLME primitives.
939 *
940 *PARAMS:
941 *
942 *LOGIC:
943 * Initially SME makes an MLM function call to invoke MLM primitive.
944 * In future this can be enhanced to 'post' messages to MLM.
945 *
946 *ASSUMPTIONS:
947 * NA
948 *
949 *NOTE:
950 * NA
951 *
952 * @param pMac Pointer to Global MAC structure
953 * @param msgType Indicates the MLM primitive message type
954 * @param *pMsgBuf A pointer to the MLM message buffer
955 *
956 * @return None
957 */
958static inline void
959limPostMlmMessage(tpAniSirGlobal pMac, tANI_U32 msgType, tANI_U32 *pMsgBuf)
960{
961
962 tSirMsgQ msg;
963 if(pMsgBuf == NULL)
964 {
Kiran Kumar Lokere5be73a62013-04-01 18:40:00 -0700965 limLog(pMac, LOGE,FL("Buffer is Pointing to NULL"));
Jeff Johnson295189b2012-06-20 16:38:30 -0700966 return;
967 }
968 msg.type = (tANI_U16) msgType;
969 msg.bodyptr = pMsgBuf;
970 msg.bodyval = 0;
Konamki, Sreelakshmi2bfb8b02015-07-29 11:41:24 +0530971 MTRACE(macTraceMsgRx(pMac, NO_SESSION, msg.type));
Jeff Johnson295189b2012-06-20 16:38:30 -0700972 limProcessMlmReqMessages(pMac, &msg);
973} /*** end limPostMlmMessage() ***/
974
975
976
977/**
978 * limGetCurrentScanChannel()
979 *
980 *FUNCTION:
981 * This function is called in various places to get current channel
982 * number being scanned.
983 *
984 *PARAMS:
985 *
986 *LOGIC:
987 *
988 *ASSUMPTIONS:
989 * NA
990 *
991 *NOTE:
992 * NA
993 *
994 * @param pMac Pointer to Global MAC structure
995 * @return Channel number
996 */
997static inline tANI_U8
998limGetCurrentScanChannel(tpAniSirGlobal pMac)
999{
1000 tANI_U8 *pChanNum = pMac->lim.gpLimMlmScanReq->channelList.channelNumber;
1001
1002 return (*(pChanNum + pMac->lim.gLimCurrentScanChannelId));
1003} /*** end limGetCurrentScanChannel() ***/
1004
1005
1006
1007/**
1008 * limGetIElenFromBssDescription()
1009 *
1010 *FUNCTION:
1011 * This function is called in various places to get IE length
1012 * from tSirBssDescription structure
1013 * number being scanned.
1014 *
1015 *PARAMS:
1016 *
1017 *LOGIC:
1018 *
1019 *ASSUMPTIONS:
1020 * NA
1021 *
1022 *NOTE:
1023 * NA
1024 *
1025 * @param pBssDescr
1026 * @return Total IE length
1027 */
1028
1029static inline tANI_U16
1030limGetIElenFromBssDescription(tpSirBssDescription pBssDescr)
1031{
1032 if (!pBssDescr)
1033 return 0;
1034
1035 return ((tANI_U16) (pBssDescr->length + sizeof(tANI_U16) +
1036 sizeof(tANI_U32) - sizeof(tSirBssDescription)));
1037} /*** end limGetIElenFromBssDescription() ***/
1038
Jeff Johnson295189b2012-06-20 16:38:30 -07001039/**
1040 * limSendBeaconInd()
1041 *
1042 *FUNCTION:
1043 * This function is called to send the beacon indication
1044 * number being scanned.
1045 *
1046 *PARAMS:
1047 *
1048 *LOGIC:
1049 *
1050 *ASSUMPTIONS:
1051*/
1052
1053void
1054limSendBeaconInd(tpAniSirGlobal pMac, tpPESession psessionEntry);
Jeff Johnson295189b2012-06-20 16:38:30 -07001055
Jeff Johnson295189b2012-06-20 16:38:30 -07001056
1057void limGetWPSPBCSessions(tpAniSirGlobal pMac, tANI_U8 *addr, tANI_U8 *uuid_e, eWPSPBCOverlap *overlap, tpPESession psessionEntry);
1058void limWPSPBCTimeout(tpAniSirGlobal pMac, tpPESession psessionEntry);
1059void limWPSPBCClose(tpAniSirGlobal pMac, tpPESession psessionEntry);
1060void limRemovePBCSessions(tpAniSirGlobal pMac, tSirMacAddr pRemoveMac,tpPESession psessionEntry);
1061
1062
1063tSirRetStatus
1064limIsSmeGetWPSPBCSessionsReqValid(tpAniSirGlobal pMac, tSirSmeGetWPSPBCSessionsReq *pGetWPSPBCSessionsReq, tANI_U8 *pBuf);
1065
1066#define LIM_WPS_OVERLAP_TIMER_MS 10000
Jeff Johnson295189b2012-06-20 16:38:30 -07001067
1068void
1069limSuspendLink(tpAniSirGlobal pMac, tSirLinkTrafficCheck trafficCheck, SUSPEND_RESUME_LINK_CALLBACK callback, tANI_U32 *data);
1070void
1071limResumeLink(tpAniSirGlobal pMac, SUSPEND_RESUME_LINK_CALLBACK callback, tANI_U32 *data);
1072
1073void
1074limChangeChannelWithCallback(tpAniSirGlobal pMac, tANI_U8 newChannel,
1075 CHANGE_CHANNEL_CALLBACK callback, tANI_U32 *cbdata, tpPESession psessionEntry);
1076
Jeff Johnson295189b2012-06-20 16:38:30 -07001077void limSendSmeMgmtFrameInd(
Rashmi Ramanna0d0adec2014-02-05 20:35:37 +05301078 tpAniSirGlobal pMac, tANI_U16 sessionId,
1079 tANI_U8 *pRxPacketInfo,
1080 tpPESession psessionEntry, tANI_S8 rxRssi);
Jeff Johnson295189b2012-06-20 16:38:30 -07001081void limProcessRemainOnChnTimeout(tpAniSirGlobal pMac);
Gopichand Nakkala4261ea52012-12-31 16:43:00 -08001082void limProcessInsertSingleShotNOATimeout(tpAniSirGlobal pMac);
Gopichand Nakkalad492d202013-05-10 02:50:47 +05301083void limConvertActiveChannelToPassiveChannel(tpAniSirGlobal pMac);
Jeff Johnson295189b2012-06-20 16:38:30 -07001084void limSendP2PActionFrame(tpAniSirGlobal pMac, tpSirMsgQ pMsg);
1085void limAbortRemainOnChan(tpAniSirGlobal pMac);
1086tSirRetStatus __limProcessSmeNoAUpdate(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf);
Viral Modid440e682013-03-06 02:25:31 -08001087void limProcessRegdDefdSmeReqAfterNOAStart(tpAniSirGlobal pMac);
Madan Mohan Koyyalamudi521ff192012-11-15 17:13:08 -08001088void limProcessDisassocAckTimeout(tpAniSirGlobal pMac);
1089void limProcessDeauthAckTimeout(tpAniSirGlobal pMac);
1090eHalStatus limSendDisassocCnf(tpAniSirGlobal pMac);
1091eHalStatus limSendDeauthCnf(tpAniSirGlobal pMac);
Dhanashri Atre4a6e3ea2012-12-12 14:10:33 -08001092
1093#ifdef WLAN_FEATURE_VOWIFI_11R
1094typedef struct sSetLinkCbackParams
1095{
1096 void * cbackDataPtr;
1097} tSetLinkCbackParams;
1098#endif
Gopichand Nakkala2c231c82013-06-11 17:49:16 +05301099
1100void limProcessRxScanEvent(tpAniSirGlobal mac, void *buf);
Sudhir Sattayappa Kohalliabf751c2013-06-30 15:37:18 -07001101
1102int limProcessRemainOnChnlReq(tpAniSirGlobal pMac, tANI_U32 *pMsg);
1103void limRemainOnChnRsp(tpAniSirGlobal pMac, eHalStatus status, tANI_U32 *data);
Siddharth Bhal4f3187c2014-10-09 21:38:08 +05301104void limProcessMlmSpoofMacAddrRsp(tpAniSirGlobal pMac, tSirRetStatus rspStatus);
Pradeep Reddy POTTETI31505892015-04-16 16:47:54 +05301105tSirRetStatus limProcessSmeSetTdls2040BSSCoexReq(tpAniSirGlobal pMac,
1106 tANI_U32 *pMsgBuf);
Masti, Narayanraddi1fb32a92015-06-29 13:14:06 +05301107tSirRetStatus limProcessSmeDelAllTdlsPeers(tpAniSirGlobal pMac,
1108 tANI_U32 *pMsgBuf);
Jeff Johnson295189b2012-06-20 16:38:30 -07001109#endif /* __LIM_TYPES_H */
1110