blob: 1ad20b5c4234a45558fd1a808ba7d4a5583af4a3 [file] [log] [blame]
Jeff Johnson295189b2012-06-20 16:38:30 -07001/*
Kiet Lama7f454d2014-07-24 12:04:06 -07002 * Copyright (c) 2012-2013 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;
269 tANI_U8* assocReqPtr;
270} tLimMlmAssocInd, *tpLimMlmAssocInd;
271
272typedef struct sLimMlmReassocReq
273{
274 tSirMacAddr peerMacAddr;
275 tANI_U32 reassocFailureTimeout;
276 tANI_U16 capabilityInfo;
277 tSirMacListenInterval listenInterval;
278 tANI_U8 sessionId;
279} tLimMlmReassocReq, *tpLimMlmReassocReq;
280
281typedef struct sLimMlmReassocCnf
282{
283 tSirResultCodes resultCode;
284 tANI_U16 protStatusCode; //Protocol Status code.
285 tANI_U8 sessionId;
286} tLimMlmReassocCnf, *tpLimMlmReassocCnf;
287
288typedef struct sLimMlmReassocInd
289{
290 tSirMacAddr peerMacAddr;
291 tSirMacAddr currentApAddr;
292 tANI_U16 aid;
293 tAniAuthType authType;
294 tAniSSID ssId;
295 tSirRSNie rsnIE;
Jeff Johnson1250df42012-12-10 14:31:52 -0800296 tSirAddie addIE; // additional IE received from the peer, which can be WSC IE and/or P2P IE.
Jeff Johnson295189b2012-06-20 16:38:30 -0700297 tSirMacCapabilityInfo capabilityInfo;
Jeff Johnson295189b2012-06-20 16:38:30 -0700298 tAniBool spectrumMgtIndicator;
299 tSirMacPowerCapInfo powerCap;
300 tSirSupChnl supportedChannels;
301
Jeff Johnson295189b2012-06-20 16:38:30 -0700302 tAniBool WmmStaInfoPresent;
Hardik Kantilal Patel1ba630f2014-11-21 04:32:05 +0530303#ifdef WLAN_FEATURE_AP_HT40_24G
304 tAniBool HT40MHzIntoPresent;
305#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700306
Jeff Johnson295189b2012-06-20 16:38:30 -0700307 // Required for indicating the frames to upper layer
308 tANI_U32 beaconLength;
309 tANI_U8* beaconPtr;
310 tANI_U32 assocReqLength;
311 tANI_U8* assocReqPtr;
312} tLimMlmReassocInd, *tpLimMlmReassocInd;
313
314typedef struct sLimMlmAuthCnf
315{
316 tSirMacAddr peerMacAddr;
317 tAniAuthType authType;
318 tSirResultCodes resultCode;
319 tANI_U16 protStatusCode;
320 tANI_U8 sessionId;
321} tLimMlmAuthCnf, *tpLimMlmAuthCnf;
322
323typedef struct sLimMlmAuthInd
324{
325 tSirMacAddr peerMacAddr;
326 tAniAuthType authType;
327 tANI_U8 sessionId;
328} tLimMlmAuthInd, *tpLimMlmAuthInd;
329
330typedef struct sLimMlmDeauthReq
331{
332 tSirMacAddr peerMacAddr;
333 tANI_U16 reasonCode;
334 tANI_U16 deauthTrigger;
335 tANI_U16 aid;
336 tANI_U8 sessionId; //Added for BT-AMP SUPPORT
337
338} tLimMlmDeauthReq, *tpLimMlmDeauthReq;
339
340typedef struct sLimMlmDeauthCnf
341{
342 tSirMacAddr peerMacAddr;
343 tSirResultCodes resultCode;
344 tANI_U16 deauthTrigger;
345 tANI_U16 aid;
346 tANI_U8 sessionId;
347} tLimMlmDeauthCnf, *tpLimMLmDeauthCnf;
348
349typedef struct sLimMlmDeauthInd
350{
351 tSirMacAddr peerMacAddr;
352 tANI_U16 reasonCode;
353 tANI_U16 deauthTrigger;
354 tANI_U16 aid;
355} tLimMlmDeauthInd, *tpLimMlmDeauthInd;
356
357typedef struct sLimMlmDisassocReq
358{
359 tSirMacAddr peerMacAddr;
360 tANI_U16 reasonCode;
361 tANI_U16 disassocTrigger;
362 tANI_U16 aid;
363 tANI_U8 sessionId;
364} tLimMlmDisassocReq, *tpLimMlmDisassocReq;
365
366typedef struct sLimMlmDisassocCnf
367{
368 tSirMacAddr peerMacAddr;
369 tSirResultCodes resultCode;
370 tANI_U16 disassocTrigger;
371 tANI_U16 aid;
372 tANI_U8 sessionId;
373} tLimMlmDisassocCnf, *tpLimMlmDisassocCnf;
374
375typedef struct sLimMlmDisassocInd
376{
377 tSirMacAddr peerMacAddr;
378 tANI_U16 reasonCode;
379 tANI_U16 disassocTrigger;
380 tANI_U16 aid;
381 tANI_U8 sessionId;
382} tLimMlmDisassocInd, *tpLimMlmDisassocInd;
383
384typedef struct sLimMlmPurgeStaReq
385{
386 tSirMacAddr peerMacAddr;
387 tANI_U16 aid;
388 tANI_U8 sessionId;//Added For BT-AMP Support
389} tLimMlmPurgeStaReq, *tpLimMlmPurgeStaReq;
390
391typedef struct sLimMlmPurgeStaInd
392{
393 tSirMacAddr peerMacAddr;
394 tANI_U16 reasonCode;
395 tANI_U16 purgeTrigger;
396 tANI_U16 aid;
397 tANI_U8 sessionId;
398} tLimMlmPurgeStaInd, *tpLimMlmPurgeStaInd;
399
400typedef struct sLimMlmSetKeysReq
401{
402 tSirMacAddr peerMacAddr;
403 tANI_U8 sessionId; //Added For BT-AMP Support
404 tANI_U16 aid;
405 tAniEdType edType; // Encryption/Decryption type
406 tANI_U8 numKeys;
407 tSirKeys key[SIR_MAC_MAX_NUM_OF_DEFAULT_KEYS];
408} tLimMlmSetKeysReq, *tpLimMlmSetKeysReq;
409
410typedef struct sLimMlmSetKeysCnf
411{
412 tSirMacAddr peerMacAddr;
413 tANI_U16 resultCode;
414 tANI_U16 aid;
415 tANI_U8 sessionId;
416} tLimMlmSetKeysCnf, *tpLimMlmSetKeysCnf;
417
418typedef struct sLimMlmRemoveKeyReq
419{
420 tSirMacAddr peerMacAddr;
421 tANI_U8 sessionId; //Added FOr BT-AMP Support
422 tAniEdType edType; // Encryption/Decryption type
423 tANI_U8 wepType; //STATIC / DYNAMIC specifier
424 tANI_U8 keyId; //Key Id To be removed.
425 tANI_BOOLEAN unicast;
426} tLimMlmRemoveKeyReq, *tpLimMlmRemoveKeyReq;
427
428typedef struct sLimMlmRemoveKeyCnf
429{
430 tSirMacAddr peerMacAddr;
431 tANI_U16 resultCode;
432 tANI_U8 sessionId;
433} tLimMlmRemoveKeyCnf, *tpLimMlmRemoveKeyCnf;
434
435
436typedef struct sLimMlmResetReq
437{
438 tSirMacAddr macAddr;
439 tANI_U8 performCleanup;
440 tANI_U8 sessionId;
441} tLimMlmResetReq, *tpLimMlmResetReq;
442
443typedef struct sLimMlmResetCnf
444{
445 tSirMacAddr macAddr;
446 tSirResultCodes resultCode;
447 tANI_U8 sessionId;
448} tLimMlmResetCnf, *tpLimMlmResetCnf;
449
450
451typedef struct sLimMlmLinkTestStopReq
452{
453 tSirMacAddr peerMacAddr;
454 tANI_U8 sessionId;
Jeff Johnson295189b2012-06-20 16:38:30 -0700455} tLimMlmLinkTestStopReq, *tpLimMlmLinkTestStopReq;
456
457
458//
459// Block ACK related MLME data structures
460//
461
462typedef struct sLimMlmAddBAReq
463{
464
465 // ADDBA recipient
466 tSirMacAddr peerMacAddr;
467
468 // ADDBA Action Frame dialog token
469 tANI_U8 baDialogToken;
470
471 // ADDBA requested for TID
472 tANI_U8 baTID;
473
474 // BA policy
475 // 0 - Delayed BA (Not supported)
476 // 1 - Immediate BA
477 tANI_U8 baPolicy;
478
479 // BA buffer size - (0..127) max size MSDU's
480 tANI_U16 baBufferSize;
481
482 // BA timeout in TU's
483 // 0 means no timeout will occur
484 tANI_U16 baTimeout;
485
486 // ADDBA failure timeout in TU's
487 // Greater than or equal to 1
488 tANI_U16 addBAFailureTimeout;
489
490 // BA Starting Sequence Number
491 tANI_U16 baSSN;
492
493 tANI_U8 sessionId;
494
495} tLimMlmAddBAReq, *tpLimMlmAddBAReq;
496
497typedef struct sLimMlmAddBACnf
498{
499
500 // ADDBA recipient
501 tSirMacAddr peerMacAddr;
502
503 // ADDBA Action Frame dialog token
504 tANI_U8 baDialogToken;
505
506 // ADDBA requested for TID
507 tANI_U8 baTID;
508
509 // BA status code
510 tSirMacStatusCodes addBAResultCode;
511
512 // BA policy
513 // 0 - Delayed BA (Not supported)
514 // 1 - Immediate BA
515 tANI_U8 baPolicy;
516
517 // BA buffer size - (0..127) max size MSDU's
518 tANI_U16 baBufferSize;
519
520 // BA timeout in TU's
521 // 0 means no timeout will occur
522 tANI_U16 baTimeout;
523
524 // ADDBA direction
525 // 1 - Originator
526 // 0 - Recipient
527 tANI_U8 baDirection;
528 tANI_U8 sessionId;
529
530
531} tLimMlmAddBACnf, *tpLimMlmAddBACnf;
532
533typedef struct sLimMlmAddBAInd
534{
535
536 // ADDBA recipient
537 tSirMacAddr peerMacAddr;
538
539 // ADDBA Action Frame dialog token
540 tANI_U8 baDialogToken;
541
542 // ADDBA requested for TID
543 tANI_U8 baTID;
544
545 // BA policy
546 // 0 - Delayed BA (Not supported)
547 // 1 - Immediate BA
548 tANI_U8 baPolicy;
549
550 // BA buffer size - (0..127) max size MSDU's
551 tANI_U16 baBufferSize;
552
553 // BA timeout in TU's
554 // 0 means no timeout will occur
555 tANI_U16 baTimeout;
556
557} tLimMlmAddBAInd, *tpLimMlmAddBAInd;
558
559typedef struct sLimMlmAddBARsp
560{
561
562 // ADDBA recipient
563 tSirMacAddr peerMacAddr;
564
565 // ADDBA Action Frame dialog token
566 tANI_U8 baDialogToken;
567
568 // ADDBA requested for TID
569 tANI_U8 baTID;
570
571 // BA status code
572 tSirMacStatusCodes addBAResultCode;
573
574 // BA policy
575 // 0 - Delayed BA (Not supported)
576 // 1 - Immediate BA
577 tANI_U8 baPolicy;
578
579 // BA buffer size - (0..127) max size MSDU's
580 tANI_U16 baBufferSize;
581
582 // BA timeout in TU's
583 // 0 means no timeout will occur
584 tANI_U16 baTimeout;
585
586 //reserved for alignment
587 tANI_U8 rsvd[2];
588
589 /* PE session id*/
590 tANI_U8 sessionId;
591
592 } tLimMlmAddBARsp, *tpLimMlmAddBARsp;
593
594//
595// NOTE - Overloading DELBA IND and DELBA CNF
596// to use the same data structure as DELBA REQ
597// as the parameters do not vary too much.
598//
599typedef struct sLimMlmDelBAReq
600{
601
602 // ADDBA recipient
603 tSirMacAddr peerMacAddr;
604
605 // DELBA direction
606 // 1 - Originator
607 // 0 - Recipient
608 tANI_U8 baDirection;
609
610 // DELBA requested for TID
611 tANI_U8 baTID;
612
613 // DELBA reason code
614 tSirMacReasonCodes delBAReasonCode;
615
616 tANI_U8 sessionId;
617
618} tLimMlmDelBAReq, *tpLimMlmDelBAReq, tLimMlmDelBAInd, *tpLimMlmDelBAInd, tLimMlmDelBACnf, *tpLimMlmDelBACnf;
619
620// Function templates
621
622tANI_BOOLEAN limProcessSmeReqMessages(tpAniSirGlobal, tpSirMsgQ);
623void limProcessMlmReqMessages(tpAniSirGlobal, tpSirMsgQ);
624void limProcessMlmRspMessages(tpAniSirGlobal, tANI_U32, tANI_U32 *);
625void limProcessLmmMessages(tpAniSirGlobal, tANI_U32, tANI_U32 *);
626void limProcessSmeDelBssRsp( tpAniSirGlobal , tANI_U32,tpPESession);
627
628void limGetRandomBssid(tpAniSirGlobal pMac ,tANI_U8 *data);
629
Jeff Johnson295189b2012-06-20 16:38:30 -0700630// Function to handle HT and HT IE CFG parameter intializations
Jeff Johnsone7245742012-09-05 17:12:55 -0700631void handleHTCapabilityandHTInfo(struct sAniSirGlobal *pMac, tpPESession psessionEntry);
Jeff Johnson295189b2012-06-20 16:38:30 -0700632
633// Function to handle CFG parameter updates
634void limHandleCFGparamUpdate(tpAniSirGlobal, tANI_U32);
635
636// Function to apply CFG parameters before join/reassoc/start BSS
637void limApplyConfiguration(tpAniSirGlobal,tpPESession);
638
Jeff Johnson295189b2012-06-20 16:38:30 -0700639void limSetCfgProtection(tpAniSirGlobal pMac, tpPESession pesessionEntry);
Jeff Johnson295189b2012-06-20 16:38:30 -0700640
641
642// Function to Initialize MLM state machine on STA
643void limInitMlm(tpAniSirGlobal);
644
645// Function to cleanup MLM state machine
646void limCleanupMlm(tpAniSirGlobal);
647
648// Function to cleanup LMM state machine
649void limCleanupLmm(tpAniSirGlobal);
650
Jeff Johnson295189b2012-06-20 16:38:30 -0700651// Management frame handling functions
652void limProcessBeaconFrame(tpAniSirGlobal, tANI_U8 *,tpPESession);
653void limProcessBeaconFrameNoSession(tpAniSirGlobal, tANI_U8 *);
654void limProcessProbeReqFrame(tpAniSirGlobal, tANI_U8 *, tpPESession);
655void limProcessProbeRspFrame(tpAniSirGlobal, tANI_U8 *, tpPESession);
656void limProcessProbeRspFrameNoSession(tpAniSirGlobal, tANI_U8 *);
657void limProcessProbeReqFrame_multiple_BSS(tpAniSirGlobal, tANI_U8 *,tpPESession);
658
659
660// Process Auth frame when we have a session in progress.
661void limProcessAuthFrame(tpAniSirGlobal, tANI_U8 *,tpPESession);
662#ifdef WLAN_FEATURE_VOWIFI_11R
Srikant Kuppaa3ed0a32013-02-20 07:24:43 -0800663tSirRetStatus limProcessAuthFrameNoSession(tpAniSirGlobal pMac, tANI_U8 *, void *body);
Jeff Johnson295189b2012-06-20 16:38:30 -0700664#endif
665
666void limProcessAssocReqFrame(tpAniSirGlobal, tANI_U8 *, tANI_U8, tpPESession);
667void limSendMlmAssocInd(tpAniSirGlobal pMac, tpDphHashNode pStaDs, tpPESession psessionEntry);
668
669
670void limProcessAssocRspFrame(tpAniSirGlobal, tANI_U8 *, tANI_U8,tpPESession);
671void limProcessDisassocFrame(tpAniSirGlobal, tANI_U8 *,tpPESession);
672void limProcessDeauthFrame(tpAniSirGlobal, tANI_U8 *,tpPESession);
673void limProcessActionFrame(tpAniSirGlobal, tANI_U8 *,tpPESession);
Jeff Johnson295189b2012-06-20 16:38:30 -0700674void limProcessActionFrameNoSession(tpAniSirGlobal pMac, tANI_U8 *pRxMetaInfo);
Jeff Johnson295189b2012-06-20 16:38:30 -0700675
676
677tSirRetStatus limPopulateMacHeader(tpAniSirGlobal, tANI_U8*, tANI_U8, tANI_U8, tSirMacAddr,tSirMacAddr);
678tSirRetStatus limSendProbeReqMgmtFrame(tpAniSirGlobal, tSirMacSSid *, tSirMacAddr, tANI_U8, tSirMacAddr, tANI_U32, tANI_U32, tANI_U8 *);
679void limSendProbeRspMgmtFrame(tpAniSirGlobal, tSirMacAddr, tpAniSSID, short, tANI_U8, tpPESession, tANI_U8);
Sushant Kaushik9e923872015-04-02 17:09:31 +0530680void limSendAuthMgmtFrame(tpAniSirGlobal, tSirMacAuthFrameBody *, tSirMacAddr,
681 tANI_U8, tpPESession , tAniBool);
Jeff Johnson295189b2012-06-20 16:38:30 -0700682void limSendAssocReqMgmtFrame(tpAniSirGlobal, tLimMlmAssocReq *,tpPESession);
683void limSendReassocReqMgmtFrame(tpAniSirGlobal, tLimMlmReassocReq *,tpPESession);
684#ifdef WLAN_FEATURE_VOWIFI_11R
685void limSendReassocReqWithFTIEsMgmtFrame(tpAniSirGlobal pMac,
686 tLimMlmReassocReq *pMlmReassocReq,tpPESession psessionEntry);
687#endif
688void limSendDeltsReqActionFrame(tpAniSirGlobal pMac, tSirMacAddr peer,
689 tANI_U8 wmmTspecPresent, tSirMacTSInfo *pTsinfo,
690 tSirMacTspecIE *pTspecIe, tpPESession psessionEntry);
691void limSendAddtsReqActionFrame(tpAniSirGlobal pMac, tSirMacAddr peerMacAddr,
692 tSirAddtsReqInfo *addts,tpPESession);
693void limSendAddtsRspActionFrame(tpAniSirGlobal pMac, tSirMacAddr peerMacAddr,
694 tANI_U16 statusCode, tSirAddtsReqInfo *addts, tSirMacScheduleIE *pSchedule,tpPESession);
695
Jeff Johnson295189b2012-06-20 16:38:30 -0700696void limSendAssocRspMgmtFrame(tpAniSirGlobal, tANI_U16, tANI_U16, tSirMacAddr, tANI_U8, tpDphHashNode pSta,tpPESession);
697
698void limSendNullDataFrame(tpAniSirGlobal, tpDphHashNode);
Madan Mohan Koyyalamudi521ff192012-11-15 17:13:08 -0800699void limSendDisassocMgmtFrame(tpAniSirGlobal, tANI_U16, tSirMacAddr, tpPESession, tANI_BOOLEAN waitForAck);
700void limSendDeauthMgmtFrame(tpAniSirGlobal, tANI_U16, tSirMacAddr, tpPESession, tANI_BOOLEAN waitForAck);
Padma, Santhosh Kumar05600d32015-07-24 13:00:57 +0530701void limSendSmeDisassocDeauthNtf( tpAniSirGlobal pMac,
702 eHalStatus status, tANI_U32 *pCtx );
703
Jeff Johnson295189b2012-06-20 16:38:30 -0700704
705void limContinueChannelScan(tpAniSirGlobal);
706tSirResultCodes limMlmAddBss(tpAniSirGlobal, tLimMlmStartReq *,tpPESession psessionEntry);
707
Jeff Johnsone7245742012-09-05 17:12:55 -0700708tSirRetStatus limSendChannelSwitchMgmtFrame(tpAniSirGlobal, tSirMacAddr, tANI_U8, tANI_U8, tANI_U8, tpPESession);
Jeff Johnson295189b2012-06-20 16:38:30 -0700709
Mohit Khanna4a70d262012-09-11 16:30:12 -0700710#ifdef WLAN_FEATURE_11AC
711tSirRetStatus limSendVHTOpmodeNotificationFrame(tpAniSirGlobal pMac,tSirMacAddr peer,tANI_U8 nMode, tpPESession psessionEntry );
Madan Mohan Koyyalamudic6226de2012-09-18 16:33:31 -0700712tSirRetStatus limSendVHTChannelSwitchMgmtFrame(tpAniSirGlobal pMac,tSirMacAddr peer,tANI_U8 nChanWidth, tANI_U8 nNewChannel, tANI_U8 ncbMode, tpPESession psessionEntry );
Mohit Khanna4a70d262012-09-11 16:30:12 -0700713#endif
714
Jeff Johnson295189b2012-06-20 16:38:30 -0700715#if defined WLAN_FEATURE_VOWIFI
716tSirRetStatus limSendNeighborReportRequestFrame(tpAniSirGlobal, tpSirMacNeighborReportReq, tSirMacAddr, tpPESession);
717tSirRetStatus limSendLinkReportActionFrame(tpAniSirGlobal, tpSirMacLinkReport, tSirMacAddr, tpPESession );
718tSirRetStatus limSendRadioMeasureReportActionFrame(tpAniSirGlobal, tANI_U8, tANI_U8, tpSirMacRadioMeasureReport, tSirMacAddr, tpPESession);
719#endif
720
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800721#if defined(FEATURE_WLAN_ESE) && !defined(FEATURE_WLAN_ESE_UPLOAD)
Jeff Johnson295189b2012-06-20 16:38:30 -0700722void limProcessIappFrame(tpAniSirGlobal, tANI_U8 *,tpPESession);
723#endif
724
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800725#ifdef FEATURE_WLAN_TDLS
Gopichand Nakkala777e6032012-12-31 16:39:21 -0800726void limInitTdlsData(tpAniSirGlobal, tpPESession);
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800727tSirRetStatus limProcessSmeTdlsMgmtSendReq(tpAniSirGlobal pMac,
728 tANI_U32 *pMsgBuf);
729tSirRetStatus limProcessSmeTdlsAddStaReq(tpAniSirGlobal pMac,
730 tANI_U32 *pMsgBuf);
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +0530731tSirRetStatus limProcesSmeTdlsLinkEstablishReq(tpAniSirGlobal pMac,
732 tANI_U32 *pMsgBuf);
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800733tSirRetStatus limProcessSmeTdlsDelStaReq(tpAniSirGlobal pMac,
734 tANI_U32 *pMsgBuf);
Gopichand Nakkala2a0a1572013-02-10 21:39:16 -0800735void limSendSmeTDLSDeleteAllPeerInd(tpAniSirGlobal pMac, tpPESession psessionEntry);
Gopichand Nakkalab977a972013-02-18 19:15:09 -0800736void limSendSmeMgmtTXCompletion(tpAniSirGlobal pMac,
Ganesh Kondabattiniff987022015-08-11 19:43:44 +0530737 tANI_U32 smeSessionId,
Gopichand Nakkalab977a972013-02-18 19:15:09 -0800738 tANI_U32 txCompleteStatus);
Gopichand Nakkala2a0a1572013-02-10 21:39:16 -0800739tSirRetStatus limDeleteTDLSPeers(tpAniSirGlobal pMac, tpPESession psessionEntry);
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800740eHalStatus limProcessTdlsAddStaRsp(tpAniSirGlobal pMac, void *msg, tpPESession);
741tSirRetStatus limSendTdlsTeardownFrame(tpAniSirGlobal pMac,
Hoonki Leea34dd892013-02-05 22:56:02 -0800742 tSirMacAddr peerMac, tANI_U16 reason, tANI_U8 responder, tpPESession psessionEntry,
Atul Mittalc0f739f2014-07-31 13:47:47 +0530743 tANI_U8 *addIe, tANI_U16 addIeLen);
744// tdlsoffchan
745tSirRetStatus limProcesSmeTdlsChanSwitchReq(tpAniSirGlobal pMac,
746 tANI_U32 *pMsgBuf);
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800747#endif
748
Jeff Johnson295189b2012-06-20 16:38:30 -0700749// Algorithms & Link Monitoring related functions
750tSirBackgroundScanMode limSelectsBackgroundScanMode(tpAniSirGlobal);
751void limTriggerBackgroundScan(tpAniSirGlobal);
752void limAbortBackgroundScan(tpAniSirGlobal);
753
754/// Function that handles heartbeat failure
755void limHandleHeartBeatFailure(tpAniSirGlobal,tpPESession);
756
757/// Function that triggers link tear down with AP upon HB failure
758void limTearDownLinkWithAp(tpAniSirGlobal,tANI_U8, tSirMacReasonCodes);
759
Jeff Johnson295189b2012-06-20 16:38:30 -0700760
761/// Function that sends keep alive message to peer(s)
762void limSendKeepAliveToPeer(tpAniSirGlobal);
763
764/// Function that processes Max retries interrupt from TFP
765void limHandleMaxRetriesInterrupt(tANI_U32);
766
767/// Function that processes messages deferred during Learn mode
768void limProcessDeferredMessageQueue(tpAniSirGlobal);
769
770/// Function that defers the messages received
771tANI_U32 limDeferMsg(tpAniSirGlobal, tSirMsgQ *);
772
773/// Function that sets system into scan mode
774void limSetScanMode(tpAniSirGlobal pMac);
775
776/// Function that Switches the Channel and sets the CB Mode
Jeff Johnsone7245742012-09-05 17:12:55 -0700777void limSetChannel(tpAniSirGlobal pMac, tANI_U8 channel, tANI_U8 secChannelOffset, tPowerdBm maxTxPower, tANI_U8 peSessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -0700778
779/// Function that completes channel scan
780void limCompleteMlmScan(tpAniSirGlobal, tSirResultCodes);
781
Jeff Johnsone7245742012-09-05 17:12:55 -0700782#ifdef FEATURE_OEM_DATA_SUPPORT
783/// Funtion that sets system into meas mode for oem data req
784void limSetOemDataReqMode(tpAniSirGlobal pMac, eHalStatus status, tANI_U32* data);
785#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700786
787#ifdef ANI_SUPPORT_11H
788/// Function that sends Measurement Report action frame
789tSirRetStatus limSendMeasReportFrame(tpAniSirGlobal, tpSirMacMeasReqActionFrame, tSirMacAddr);
790
791/// Function that sends TPC Report action frame
792tSirRetStatus limSendTpcReportFrame(tpAniSirGlobal, tpSirMacTpcReqActionFrame, tSirMacAddr);
793#endif
794
795/// Function that sends TPC Request action frame
796void limSendTpcRequestFrame(tpAniSirGlobal, tSirMacAddr);
797
798// Function(s) to handle responses received from HAL
799void limProcessMlmAddBssRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ );
800void limProcessMlmAddStaRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQt,tpPESession psessionEntry);
801void limProcessMlmDelStaRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ );
802void limProcessMlmDelBssRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ,tpPESession);
Jeff Johnson295189b2012-06-20 16:38:30 -0700803void limProcessStaMlmAddStaRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ ,tpPESession psessionEntry);
804void limProcessStaMlmDelStaRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ,tpPESession psessionEntry);
805void limProcessStaMlmDelBssRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ ,tpPESession psessionEntry);
806void limProcessMlmSetStaKeyRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ );
807void limProcessMlmSetBssKeyRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ );
808
809
810
811#ifdef GEN4_SCAN
812// Function to process WDA_INIT_SCAN_RSP message
813void limProcessInitScanRsp(tpAniSirGlobal, void * );
814
815// Function to process WDA_START_SCAN_RSP message
816void limProcessStartScanRsp(tpAniSirGlobal, void * );
817
818// Function to process WDA_END_SCAN_RSP message
819void limProcessEndScanRsp(tpAniSirGlobal, void * );
820
821// Function to process WDA_FINISH_SCAN_RSP message
822void limProcessFinishScanRsp(tpAniSirGlobal, void * );
823
824// Function to process WDA_SWITCH_CHANNEL_RSP message
825void limProcessSwitchChannelRsp(tpAniSirGlobal pMac, void * );
826
827void limSendHalInitScanReq( tpAniSirGlobal, tLimLimHalScanState, tSirLinkTrafficCheck);
828void limSendHalStartScanReq( tpAniSirGlobal, tANI_U8, tLimLimHalScanState);
829void limSendHalEndScanReq( tpAniSirGlobal, tANI_U8, tLimLimHalScanState);
830void limSendHalFinishScanReq( tpAniSirGlobal, tLimLimHalScanState);
831
832void limContinuePostChannelScan(tpAniSirGlobal pMac);
Gopichand Nakkalad492d202013-05-10 02:50:47 +0530833void limCovertChannelScanType(tpAniSirGlobal pMac,tANI_U8 channelNum, tANI_BOOLEAN passiveToActive);
834void limSetDFSChannelList(tpAniSirGlobal pMac,tANI_U8 channelNum, tSirDFSChannelList *dfsChannelList);
Jeff Johnson295189b2012-06-20 16:38:30 -0700835void limContinueChannelLearn( tpAniSirGlobal );
836//WLAN_SUSPEND_LINK Related
837tANI_U8 limIsLinkSuspended(tpAniSirGlobal pMac);
838void limSuspendLink(tpAniSirGlobal, tSirLinkTrafficCheck, SUSPEND_RESUME_LINK_CALLBACK, tANI_U32*);
839void limResumeLink(tpAniSirGlobal, SUSPEND_RESUME_LINK_CALLBACK, tANI_U32*);
840//end WLAN_SUSPEND_LINK Related
841#endif // GEN4_SCAN
842
843tSirRetStatus limSendAddBAReq( tpAniSirGlobal pMac,
844 tpLimMlmAddBAReq pMlmAddBAReq,tpPESession);
845
846tSirRetStatus limSendAddBARsp( tpAniSirGlobal pMac,
847 tpLimMlmAddBARsp pMlmAddBARsp,tpPESession);
848
849tSirRetStatus limSendDelBAInd( tpAniSirGlobal pMac,
850 tpLimMlmDelBAReq pMlmDelBAReq ,tpPESession psessionEntry);
851#if 0
852tSirRetStatus limSendSMPowerStateFrame( tpAniSirGlobal pMac,
853 tSirMacAddr peer, tSirMacHTMIMOPowerSaveState State );
854#endif
855
856void limProcessMlmHalAddBARsp( tpAniSirGlobal pMac,
857 tpSirMsgQ limMsgQ );
858
859void limProcessMlmHalBADeleteInd( tpAniSirGlobal pMac,
860 tpSirMsgQ limMsgQ );
861
862void limProcessMlmRemoveKeyRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ );
863
864void limProcessLearnIntervalTimeout(tpAniSirGlobal pMac);
Chet Lanctot8cecea22014-02-11 19:09:36 -0800865
Jeff Johnson295189b2012-06-20 16:38:30 -0700866#ifdef WLAN_FEATURE_11W
Chet Lanctot8cecea22014-02-11 19:09:36 -0800867//11w send SA query request action frame
868tSirRetStatus limSendSaQueryRequestFrame( tpAniSirGlobal pMac, tANI_U8 *transId,
869 tSirMacAddr peer, tpPESession psessionEntry );
Jeff Johnson295189b2012-06-20 16:38:30 -0700870//11w SA query request action frame handler
871tSirRetStatus limSendSaQueryResponseFrame( tpAniSirGlobal pMac,
Chet Lanctot186b5732013-03-18 10:26:30 -0700872 tANI_U8 *transId, tSirMacAddr peer,tpPESession psessionEntry);
Jeff Johnson295189b2012-06-20 16:38:30 -0700873#endif
874// Inline functions
875
876/**
877 * limPostSmeMessage()
878 *
879 *FUNCTION:
880 * This function is called by limProcessMlmMessages(). In this
881 * function MLM sub-module invokes MLM ind/cnf primitives.
882 *
883 *LOGIC:
884 * Initially MLM makes an SME function call to invoke MLM ind/cnf
885 * primitive. In future this can be enhanced to 'post' messages to SME.
886 *
887 *ASSUMPTIONS:
888 * NA
889 *
890 *NOTE:
891 * NA
892 *
893 * @param pMac Pointer to Global MAC structure
894 * @param msgType Indicates the MLM primitive message type
895 * @param *pMsgBuf A pointer to the MLM message buffer
896 *
897 * @return None
898 */
899static inline void
900limPostSmeMessage(tpAniSirGlobal pMac, tANI_U32 msgType, tANI_U32 *pMsgBuf)
901{
902 tSirMsgQ msg;
903
904 if(pMsgBuf == NULL)
905 {
Kiran Kumar Lokere5be73a62013-04-01 18:40:00 -0700906 limLog(pMac, LOGE,FL("Buffer is Pointing to NULL"));
Jeff Johnson295189b2012-06-20 16:38:30 -0700907 return;
908 }
909
910 msg.type = (tANI_U16)msgType;
911 msg.bodyptr = pMsgBuf;
912 msg.bodyval = 0;
913 if (msgType > eWNI_SME_MSG_TYPES_BEGIN)
Konamki, Sreelakshmi2bfb8b02015-07-29 11:41:24 +0530914 {
915 MTRACE(macTrace(pMac, TRACE_CODE_TX_SME_MSG, NO_SESSION, msg.type));
Jeff Johnson295189b2012-06-20 16:38:30 -0700916 limProcessSmeReqMessages(pMac, &msg);
Konamki, Sreelakshmi2bfb8b02015-07-29 11:41:24 +0530917 }
Jeff Johnson295189b2012-06-20 16:38:30 -0700918 else
919 limProcessMlmRspMessages(pMac, msgType, pMsgBuf);
920} /*** end limPostSmeMessage() ***/
921
922/**
923 * limPostMlmMessage()
924 *
925 *FUNCTION:
926 * This function is called by limProcessSmeMessages(). In this
927 * function SME invokes MLME primitives.
928 *
929 *PARAMS:
930 *
931 *LOGIC:
932 * Initially SME makes an MLM function call to invoke MLM primitive.
933 * In future this can be enhanced to 'post' messages to MLM.
934 *
935 *ASSUMPTIONS:
936 * NA
937 *
938 *NOTE:
939 * NA
940 *
941 * @param pMac Pointer to Global MAC structure
942 * @param msgType Indicates the MLM primitive message type
943 * @param *pMsgBuf A pointer to the MLM message buffer
944 *
945 * @return None
946 */
947static inline void
948limPostMlmMessage(tpAniSirGlobal pMac, tANI_U32 msgType, tANI_U32 *pMsgBuf)
949{
950
951 tSirMsgQ msg;
952 if(pMsgBuf == NULL)
953 {
Kiran Kumar Lokere5be73a62013-04-01 18:40:00 -0700954 limLog(pMac, LOGE,FL("Buffer is Pointing to NULL"));
Jeff Johnson295189b2012-06-20 16:38:30 -0700955 return;
956 }
957 msg.type = (tANI_U16) msgType;
958 msg.bodyptr = pMsgBuf;
959 msg.bodyval = 0;
Konamki, Sreelakshmi2bfb8b02015-07-29 11:41:24 +0530960 MTRACE(macTraceMsgRx(pMac, NO_SESSION, msg.type));
Jeff Johnson295189b2012-06-20 16:38:30 -0700961 limProcessMlmReqMessages(pMac, &msg);
962} /*** end limPostMlmMessage() ***/
963
964
965
966/**
967 * limGetCurrentScanChannel()
968 *
969 *FUNCTION:
970 * This function is called in various places to get current channel
971 * number being scanned.
972 *
973 *PARAMS:
974 *
975 *LOGIC:
976 *
977 *ASSUMPTIONS:
978 * NA
979 *
980 *NOTE:
981 * NA
982 *
983 * @param pMac Pointer to Global MAC structure
984 * @return Channel number
985 */
986static inline tANI_U8
987limGetCurrentScanChannel(tpAniSirGlobal pMac)
988{
989 tANI_U8 *pChanNum = pMac->lim.gpLimMlmScanReq->channelList.channelNumber;
990
991 return (*(pChanNum + pMac->lim.gLimCurrentScanChannelId));
992} /*** end limGetCurrentScanChannel() ***/
993
994
995
996/**
997 * limGetIElenFromBssDescription()
998 *
999 *FUNCTION:
1000 * This function is called in various places to get IE length
1001 * from tSirBssDescription structure
1002 * number being scanned.
1003 *
1004 *PARAMS:
1005 *
1006 *LOGIC:
1007 *
1008 *ASSUMPTIONS:
1009 * NA
1010 *
1011 *NOTE:
1012 * NA
1013 *
1014 * @param pBssDescr
1015 * @return Total IE length
1016 */
1017
1018static inline tANI_U16
1019limGetIElenFromBssDescription(tpSirBssDescription pBssDescr)
1020{
1021 if (!pBssDescr)
1022 return 0;
1023
1024 return ((tANI_U16) (pBssDescr->length + sizeof(tANI_U16) +
1025 sizeof(tANI_U32) - sizeof(tSirBssDescription)));
1026} /*** end limGetIElenFromBssDescription() ***/
1027
Jeff Johnson295189b2012-06-20 16:38:30 -07001028/**
1029 * limSendBeaconInd()
1030 *
1031 *FUNCTION:
1032 * This function is called to send the beacon indication
1033 * number being scanned.
1034 *
1035 *PARAMS:
1036 *
1037 *LOGIC:
1038 *
1039 *ASSUMPTIONS:
1040*/
1041
1042void
1043limSendBeaconInd(tpAniSirGlobal pMac, tpPESession psessionEntry);
Jeff Johnson295189b2012-06-20 16:38:30 -07001044
Jeff Johnson295189b2012-06-20 16:38:30 -07001045
1046void limGetWPSPBCSessions(tpAniSirGlobal pMac, tANI_U8 *addr, tANI_U8 *uuid_e, eWPSPBCOverlap *overlap, tpPESession psessionEntry);
1047void limWPSPBCTimeout(tpAniSirGlobal pMac, tpPESession psessionEntry);
1048void limWPSPBCClose(tpAniSirGlobal pMac, tpPESession psessionEntry);
1049void limRemovePBCSessions(tpAniSirGlobal pMac, tSirMacAddr pRemoveMac,tpPESession psessionEntry);
1050
1051
1052tSirRetStatus
1053limIsSmeGetWPSPBCSessionsReqValid(tpAniSirGlobal pMac, tSirSmeGetWPSPBCSessionsReq *pGetWPSPBCSessionsReq, tANI_U8 *pBuf);
1054
1055#define LIM_WPS_OVERLAP_TIMER_MS 10000
Jeff Johnson295189b2012-06-20 16:38:30 -07001056
1057void
1058limSuspendLink(tpAniSirGlobal pMac, tSirLinkTrafficCheck trafficCheck, SUSPEND_RESUME_LINK_CALLBACK callback, tANI_U32 *data);
1059void
1060limResumeLink(tpAniSirGlobal pMac, SUSPEND_RESUME_LINK_CALLBACK callback, tANI_U32 *data);
1061
1062void
1063limChangeChannelWithCallback(tpAniSirGlobal pMac, tANI_U8 newChannel,
1064 CHANGE_CHANNEL_CALLBACK callback, tANI_U32 *cbdata, tpPESession psessionEntry);
1065
Jeff Johnson295189b2012-06-20 16:38:30 -07001066void limSendSmeMgmtFrameInd(
Rashmi Ramanna0d0adec2014-02-05 20:35:37 +05301067 tpAniSirGlobal pMac, tANI_U16 sessionId,
1068 tANI_U8 *pRxPacketInfo,
1069 tpPESession psessionEntry, tANI_S8 rxRssi);
Jeff Johnson295189b2012-06-20 16:38:30 -07001070void limProcessRemainOnChnTimeout(tpAniSirGlobal pMac);
Gopichand Nakkala4261ea52012-12-31 16:43:00 -08001071void limProcessInsertSingleShotNOATimeout(tpAniSirGlobal pMac);
Gopichand Nakkalad492d202013-05-10 02:50:47 +05301072void limConvertActiveChannelToPassiveChannel(tpAniSirGlobal pMac);
Jeff Johnson295189b2012-06-20 16:38:30 -07001073void limSendP2PActionFrame(tpAniSirGlobal pMac, tpSirMsgQ pMsg);
1074void limAbortRemainOnChan(tpAniSirGlobal pMac);
1075tSirRetStatus __limProcessSmeNoAUpdate(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf);
Viral Modid440e682013-03-06 02:25:31 -08001076void limProcessRegdDefdSmeReqAfterNOAStart(tpAniSirGlobal pMac);
Madan Mohan Koyyalamudi521ff192012-11-15 17:13:08 -08001077void limProcessDisassocAckTimeout(tpAniSirGlobal pMac);
1078void limProcessDeauthAckTimeout(tpAniSirGlobal pMac);
1079eHalStatus limSendDisassocCnf(tpAniSirGlobal pMac);
1080eHalStatus limSendDeauthCnf(tpAniSirGlobal pMac);
Dhanashri Atre4a6e3ea2012-12-12 14:10:33 -08001081
1082#ifdef WLAN_FEATURE_VOWIFI_11R
1083typedef struct sSetLinkCbackParams
1084{
1085 void * cbackDataPtr;
1086} tSetLinkCbackParams;
1087#endif
Gopichand Nakkala2c231c82013-06-11 17:49:16 +05301088
1089void limProcessRxScanEvent(tpAniSirGlobal mac, void *buf);
Sudhir Sattayappa Kohalliabf751c2013-06-30 15:37:18 -07001090
1091int limProcessRemainOnChnlReq(tpAniSirGlobal pMac, tANI_U32 *pMsg);
1092void limRemainOnChnRsp(tpAniSirGlobal pMac, eHalStatus status, tANI_U32 *data);
Siddharth Bhal4f3187c2014-10-09 21:38:08 +05301093void limProcessMlmSpoofMacAddrRsp(tpAniSirGlobal pMac, tSirRetStatus rspStatus);
Pradeep Reddy POTTETI31505892015-04-16 16:47:54 +05301094tSirRetStatus limProcessSmeSetTdls2040BSSCoexReq(tpAniSirGlobal pMac,
1095 tANI_U32 *pMsgBuf);
Masti, Narayanraddi1fb32a92015-06-29 13:14:06 +05301096tSirRetStatus limProcessSmeDelAllTdlsPeers(tpAniSirGlobal pMac,
1097 tANI_U32 *pMsgBuf);
Jeff Johnson295189b2012-06-20 16:38:30 -07001098#endif /* __LIM_TYPES_H */
1099