blob: ebdf97a10c11999021f2d048c2efb6530b83bdc9 [file] [log] [blame]
Jeff Johnson295189b2012-06-20 16:38:30 -07001/*
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -08002 * Copyright (c) 2012-2014 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 Lamaa8e15a2014-02-11 23:30:06 -080023 * Copyright (c) 2012-2013 Qualcomm Atheros, Inc.
24 * All Rights Reserved.
25 * Qualcomm Atheros Confidential and Proprietary.
Kiet Lam842dad02014-02-18 18:44:02 -080026 *
Jeff Johnson295189b2012-06-20 16:38:30 -070027 */
Kiet Lam842dad02014-02-18 18:44:02 -080028
29
Jeff Johnson295189b2012-06-20 16:38:30 -070030/*
Jeff Johnson295189b2012-06-20 16:38:30 -070031 * This file limTypes.h contains the definitions used by all
32 * all LIM modules.
33 * Author: Chandra Modumudi
34 * Date: 02/11/02
35 * History:-
36 * Date Modified by Modification Information
37 * --------------------------------------------------------------------
38 *
39 */
40#ifndef __LIM_TYPES_H
41#define __LIM_TYPES_H
42
43#include "wniApi.h"
44#include "sirApi.h"
45#include "sirCommon.h"
46#include "sirMacProtDef.h"
47#include "utilsApi.h"
48
Jeff Johnson295189b2012-06-20 16:38:30 -070049#include "wlan_qct_wdi_ds.h"
Jeff Johnson295189b2012-06-20 16:38:30 -070050
51#include "limApi.h"
52#include "limDebug.h"
53#include "limSendSmeRspMessages.h"
54#include "sysGlobal.h"
55#include "dphGlobal.h"
56#include "parserApi.h"
57
58#define LINK_TEST_DEFER 1
59
60#define TRACE_EVENT_CNF_TIMER_DEACT 0x6600
61#define TRACE_EVENT_CNF_TIMER_ACT 0x6601
62#define TRACE_EVENT_AUTH_RSP_TIMER_DEACT 0x6602
63#define TRACE_EVENT_AUTH_RSP_TIMER_ACT 0x6603
64
65// MLM message types
66#define LIM_MLM_MSG_START 1000
67#define LIM_MLM_SCAN_REQ LIM_MLM_MSG_START
Madan Mohan Koyyalamudia53c4dc2012-11-13 10:35:42 -080068#define LIM_MLM_SCAN_CNF (LIM_MLM_MSG_START + 1)
69#define LIM_MLM_START_REQ (LIM_MLM_MSG_START + 2)
70#define LIM_MLM_START_CNF (LIM_MLM_MSG_START + 3)
71#define LIM_MLM_JOIN_REQ (LIM_MLM_MSG_START + 4)
72#define LIM_MLM_JOIN_CNF (LIM_MLM_MSG_START + 5)
73#define LIM_MLM_AUTH_REQ (LIM_MLM_MSG_START + 6)
74#define LIM_MLM_AUTH_CNF (LIM_MLM_MSG_START + 7)
75#define LIM_MLM_AUTH_IND (LIM_MLM_MSG_START + 8)
76#define LIM_MLM_ASSOC_REQ (LIM_MLM_MSG_START + 9)
77#define LIM_MLM_ASSOC_CNF (LIM_MLM_MSG_START + 10)
78#define LIM_MLM_ASSOC_IND (LIM_MLM_MSG_START + 11)
79#define LIM_MLM_DISASSOC_REQ (LIM_MLM_MSG_START + 12)
80#define LIM_MLM_DISASSOC_CNF (LIM_MLM_MSG_START + 13)
81#define LIM_MLM_DISASSOC_IND (LIM_MLM_MSG_START + 14)
82#define LIM_MLM_REASSOC_REQ (LIM_MLM_MSG_START + 15)
83#define LIM_MLM_REASSOC_CNF (LIM_MLM_MSG_START + 16)
84#define LIM_MLM_REASSOC_IND (LIM_MLM_MSG_START + 17)
85#define LIM_MLM_DEAUTH_REQ (LIM_MLM_MSG_START + 18)
86#define LIM_MLM_DEAUTH_CNF (LIM_MLM_MSG_START + 19)
87#define LIM_MLM_DEAUTH_IND (LIM_MLM_MSG_START + 20)
88#define LIM_MLM_TSPEC_REQ (LIM_MLM_MSG_START + 21)
89#define LIM_MLM_TSPEC_CNF (LIM_MLM_MSG_START + 22)
90#define LIM_MLM_TSPEC_IND (LIM_MLM_MSG_START + 23)
91#define LIM_MLM_SETKEYS_REQ (LIM_MLM_MSG_START + 24)
92#define LIM_MLM_SETKEYS_CNF (LIM_MLM_MSG_START + 25)
93#define LIM_MLM_LINK_TEST_STOP_REQ (LIM_MLM_MSG_START + 30)
94#define LIM_MLM_PURGE_STA_IND (LIM_MLM_MSG_START + 31)
95#define LIM_MLM_ADDBA_REQ (LIM_MLM_MSG_START + 32)
96#define LIM_MLM_ADDBA_CNF (LIM_MLM_MSG_START + 33)
97#define LIM_MLM_ADDBA_IND (LIM_MLM_MSG_START + 34)
98#define LIM_MLM_ADDBA_RSP (LIM_MLM_MSG_START + 35)
99#define LIM_MLM_DELBA_REQ (LIM_MLM_MSG_START + 36)
100#define LIM_MLM_DELBA_CNF (LIM_MLM_MSG_START + 37)
101#define LIM_MLM_DELBA_IND (LIM_MLM_MSG_START + 38)
102#define LIM_MLM_REMOVEKEY_REQ (LIM_MLM_MSG_START + 39)
103#define LIM_MLM_REMOVEKEY_CNF (LIM_MLM_MSG_START + 40)
Jeff Johnson295189b2012-06-20 16:38:30 -0700104
Jeff Johnsone7245742012-09-05 17:12:55 -0700105#ifdef FEATURE_OEM_DATA_SUPPORT
Madan Mohan Koyyalamudia53c4dc2012-11-13 10:35:42 -0800106#define LIM_MLM_OEM_DATA_REQ (LIM_MLM_MSG_START + 41)
107#define LIM_MLM_OEM_DATA_CNF (LIM_MLM_MSG_START + 42)
Jeff Johnsone7245742012-09-05 17:12:55 -0700108#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700109
110#define LIM_HASH_ADD 0
111#define LIM_HASH_UPDATE 1
112
113#define LIM_WEP_IN_FC 1
114#define LIM_NO_WEP_IN_FC 0
115
116#define LIM_DECRYPT_ICV_FAIL 1
117
118/// Definitions to distinquish between Association/Reassociaton
119#define LIM_ASSOC 0
120#define LIM_REASSOC 1
121
122/// Minimum Memory blocks require for different scenario
123#define LIM_MIN_MEM_ASSOC 4
124
125/// Verifies whether given mac addr matches the CURRENT Bssid
Kiet Lamb1233192013-11-28 13:38:20 +0530126#define IS_CURRENT_BSSID(pMac, addr,psessionEntry) (vos_mem_compare( addr, \
127 psessionEntry->bssId, \
128 sizeof(psessionEntry->bssId)))
Jeff Johnson295189b2012-06-20 16:38:30 -0700129/// Verifies whether given addr matches the REASSOC Bssid
Kiet Lamb1233192013-11-28 13:38:20 +0530130#define IS_REASSOC_BSSID(pMac, addr,psessionEntry) (vos_mem_compare( addr, \
131 psessionEntry->limReAssocbssId, \
132 sizeof(psessionEntry->limReAssocbssId)))
Jeff Johnson295189b2012-06-20 16:38:30 -0700133
134#define REQ_TYPE_REGISTRAR (0x2)
135#define REQ_TYPE_WLAN_MANAGER_REGISTRAR (0x3)
136
137#define RESP_TYPE_REGISTRAR (0x2)
138#define RESP_TYPE_ENROLLEE_INFO_ONLY (0x0)
139#define RESP_TYPE_ENROLLEE_OPEN_8021X (0x1)
140#define RESP_TYPE_AP (0x3)
141#define LIM_TX_FRAMES_THRESHOLD_ON_CHIP 300
142
143
144// enums used by LIM are as follows
145
146enum eLimDisassocTrigger
147{
148 eLIM_HOST_DISASSOC,
149 eLIM_PEER_ENTITY_DISASSOC,
150 eLIM_LINK_MONITORING_DISASSOC,
151 eLIM_PROMISCUOUS_MODE_DISASSOC,
152 eLIM_HOST_DEAUTH,
153 eLIM_PEER_ENTITY_DEAUTH,
154 eLIM_LINK_MONITORING_DEAUTH,
155 eLIM_JOIN_FAILURE,
156 eLIM_REASSOC_REJECT
157};
158
159/* Reason code to determine the channel change context while sending
160 * WDA_CHNL_SWITCH_REQ message to HAL
161 */
162enum eChannelChangeReasonCodes
163{
164 LIM_SWITCH_CHANNEL_REASSOC,
165 LIM_SWITCH_CHANNEL_JOIN,
166 LIM_SWITCH_CHANNEL_OPERATION, // Generic change channel
167};
168
169typedef struct sLimAuthRspTimeout
170{
171 tSirMacAddr peerMacAddr;
172} tLimAuthRspTimeout;
173
174typedef struct sLimMlmStartReq
175{
176 tSirMacSSid ssId;
177 tSirBssType bssType;
178 tSirMacAddr bssId;
179 tSirMacBeaconInterval beaconPeriod;
180 tANI_U8 dtimPeriod;
181 tSirMacCfParamSet cfParamSet;
182 tSirMacChanNum channelNumber;
Jeff Johnsone7245742012-09-05 17:12:55 -0700183 ePhyChanBondState cbMode;
Jeff Johnson295189b2012-06-20 16:38:30 -0700184 tANI_U16 atimWindow;
185 tSirMacRateSet rateSet;
186 tANI_U8 sessionId; //Added For BT-AMP Support
187
188 // Parameters reqd for new HAL (message) interface
189 tSirNwType nwType;
190 tANI_U8 htCapable;
191 tSirMacHTOperatingMode htOperMode;
192 tANI_U8 dualCTSProtection;
193 tANI_U8 txChannelWidthSet;
Jeff Johnson295189b2012-06-20 16:38:30 -0700194 tANI_U8 ssidHidden;
195 tANI_U8 wps_state;
196 tANI_U8 obssProtEnabled;
Jeff Johnson295189b2012-06-20 16:38:30 -0700197} tLimMlmStartReq, *tpLimMlmStartReq;
198
199typedef struct sLimMlmStartCnf
200{
201 tSirResultCodes resultCode;
202 tANI_U8 sessionId;
203} tLimMlmStartCnf, *tpLimMlmStartCnf;
204
205typedef struct sLimMlmScanCnf
206{
207 tSirResultCodes resultCode;
208 tANI_U16 scanResultLength;
209 tSirBssDescription bssDescription[1];
210 tANI_U8 sessionId;
211} tLimMlmScanCnf, *tpLimMlmScanCnf;
212
213typedef struct sLimScanResult
214{
215 tANI_U16 numBssDescriptions;
216 tSirBssDescription bssDescription[1];
217} tLimScanResult;
218
219typedef struct sLimMlmJoinCnf
220{
221 tSirResultCodes resultCode;
222 tANI_U16 protStatusCode;
223 tANI_U8 sessionId;
224} tLimMlmJoinCnf, *tpLimMlmJoinCnf;
225
226typedef struct sLimMlmAssocReq
227{
228 tSirMacAddr peerMacAddr;
229 tANI_U32 assocFailureTimeout;
230 tANI_U16 capabilityInfo;
231 tSirMacListenInterval listenInterval;
232 tANI_U8 sessionId;
233} tLimMlmAssocReq, *tpLimMlmAssocReq;
234
235typedef struct sLimMlmAssocCnf
236{
237 tSirResultCodes resultCode; //Internal status code.
238 tANI_U16 protStatusCode; //Protocol Status code.
239 tANI_U8 sessionId;
240} tLimMlmAssocCnf, *tpLimMlmAssocCnf;
241
242typedef struct sLimMlmAssocInd
243{
244 tSirMacAddr peerMacAddr;
245 tANI_U16 aid;
246 tAniAuthType authType;
247 tAniSSID ssId;
248 tSirRSNie rsnIE;
Jeff Johnson1250df42012-12-10 14:31:52 -0800249 tSirAddie addIE; // additional IE received from the peer, which possibly includes WSC IE and/or P2P IE.
Jeff Johnson295189b2012-06-20 16:38:30 -0700250 tSirMacCapabilityInfo capabilityInfo;
Jeff Johnson295189b2012-06-20 16:38:30 -0700251 tAniBool spectrumMgtIndicator;
252 tSirMacPowerCapInfo powerCap;
253 tSirSupChnl supportedChannels;
254 tANI_U8 sessionId;
255
256
Jeff Johnson295189b2012-06-20 16:38:30 -0700257 tAniBool WmmStaInfoPresent;
Jeff Johnson295189b2012-06-20 16:38:30 -0700258
Jeff Johnson295189b2012-06-20 16:38:30 -0700259 // Required for indicating the frames to upper layer
260 tANI_U32 beaconLength;
261 tANI_U8* beaconPtr;
262 tANI_U32 assocReqLength;
263 tANI_U8* assocReqPtr;
264} tLimMlmAssocInd, *tpLimMlmAssocInd;
265
266typedef struct sLimMlmReassocReq
267{
268 tSirMacAddr peerMacAddr;
269 tANI_U32 reassocFailureTimeout;
270 tANI_U16 capabilityInfo;
271 tSirMacListenInterval listenInterval;
272 tANI_U8 sessionId;
273} tLimMlmReassocReq, *tpLimMlmReassocReq;
274
275typedef struct sLimMlmReassocCnf
276{
277 tSirResultCodes resultCode;
278 tANI_U16 protStatusCode; //Protocol Status code.
279 tANI_U8 sessionId;
280} tLimMlmReassocCnf, *tpLimMlmReassocCnf;
281
282typedef struct sLimMlmReassocInd
283{
284 tSirMacAddr peerMacAddr;
285 tSirMacAddr currentApAddr;
286 tANI_U16 aid;
287 tAniAuthType authType;
288 tAniSSID ssId;
289 tSirRSNie rsnIE;
Jeff Johnson1250df42012-12-10 14:31:52 -0800290 tSirAddie addIE; // additional IE received from the peer, which can be WSC IE and/or P2P IE.
Jeff Johnson295189b2012-06-20 16:38:30 -0700291 tSirMacCapabilityInfo capabilityInfo;
Jeff Johnson295189b2012-06-20 16:38:30 -0700292 tAniBool spectrumMgtIndicator;
293 tSirMacPowerCapInfo powerCap;
294 tSirSupChnl supportedChannels;
295
Jeff Johnson295189b2012-06-20 16:38:30 -0700296 tAniBool WmmStaInfoPresent;
Jeff Johnson295189b2012-06-20 16:38:30 -0700297
Jeff Johnson295189b2012-06-20 16:38:30 -0700298 // Required for indicating the frames to upper layer
299 tANI_U32 beaconLength;
300 tANI_U8* beaconPtr;
301 tANI_U32 assocReqLength;
302 tANI_U8* assocReqPtr;
303} tLimMlmReassocInd, *tpLimMlmReassocInd;
304
305typedef struct sLimMlmAuthCnf
306{
307 tSirMacAddr peerMacAddr;
308 tAniAuthType authType;
309 tSirResultCodes resultCode;
310 tANI_U16 protStatusCode;
311 tANI_U8 sessionId;
312} tLimMlmAuthCnf, *tpLimMlmAuthCnf;
313
314typedef struct sLimMlmAuthInd
315{
316 tSirMacAddr peerMacAddr;
317 tAniAuthType authType;
318 tANI_U8 sessionId;
319} tLimMlmAuthInd, *tpLimMlmAuthInd;
320
321typedef struct sLimMlmDeauthReq
322{
323 tSirMacAddr peerMacAddr;
324 tANI_U16 reasonCode;
325 tANI_U16 deauthTrigger;
326 tANI_U16 aid;
327 tANI_U8 sessionId; //Added for BT-AMP SUPPORT
328
329} tLimMlmDeauthReq, *tpLimMlmDeauthReq;
330
331typedef struct sLimMlmDeauthCnf
332{
333 tSirMacAddr peerMacAddr;
334 tSirResultCodes resultCode;
335 tANI_U16 deauthTrigger;
336 tANI_U16 aid;
337 tANI_U8 sessionId;
338} tLimMlmDeauthCnf, *tpLimMLmDeauthCnf;
339
340typedef struct sLimMlmDeauthInd
341{
342 tSirMacAddr peerMacAddr;
343 tANI_U16 reasonCode;
344 tANI_U16 deauthTrigger;
345 tANI_U16 aid;
346} tLimMlmDeauthInd, *tpLimMlmDeauthInd;
347
348typedef struct sLimMlmDisassocReq
349{
350 tSirMacAddr peerMacAddr;
351 tANI_U16 reasonCode;
352 tANI_U16 disassocTrigger;
353 tANI_U16 aid;
354 tANI_U8 sessionId;
355} tLimMlmDisassocReq, *tpLimMlmDisassocReq;
356
357typedef struct sLimMlmDisassocCnf
358{
359 tSirMacAddr peerMacAddr;
360 tSirResultCodes resultCode;
361 tANI_U16 disassocTrigger;
362 tANI_U16 aid;
363 tANI_U8 sessionId;
364} tLimMlmDisassocCnf, *tpLimMlmDisassocCnf;
365
366typedef struct sLimMlmDisassocInd
367{
368 tSirMacAddr peerMacAddr;
369 tANI_U16 reasonCode;
370 tANI_U16 disassocTrigger;
371 tANI_U16 aid;
372 tANI_U8 sessionId;
373} tLimMlmDisassocInd, *tpLimMlmDisassocInd;
374
375typedef struct sLimMlmPurgeStaReq
376{
377 tSirMacAddr peerMacAddr;
378 tANI_U16 aid;
379 tANI_U8 sessionId;//Added For BT-AMP Support
380} tLimMlmPurgeStaReq, *tpLimMlmPurgeStaReq;
381
382typedef struct sLimMlmPurgeStaInd
383{
384 tSirMacAddr peerMacAddr;
385 tANI_U16 reasonCode;
386 tANI_U16 purgeTrigger;
387 tANI_U16 aid;
388 tANI_U8 sessionId;
389} tLimMlmPurgeStaInd, *tpLimMlmPurgeStaInd;
390
391typedef struct sLimMlmSetKeysReq
392{
393 tSirMacAddr peerMacAddr;
394 tANI_U8 sessionId; //Added For BT-AMP Support
395 tANI_U16 aid;
396 tAniEdType edType; // Encryption/Decryption type
397 tANI_U8 numKeys;
398 tSirKeys key[SIR_MAC_MAX_NUM_OF_DEFAULT_KEYS];
399} tLimMlmSetKeysReq, *tpLimMlmSetKeysReq;
400
401typedef struct sLimMlmSetKeysCnf
402{
403 tSirMacAddr peerMacAddr;
404 tANI_U16 resultCode;
405 tANI_U16 aid;
406 tANI_U8 sessionId;
407} tLimMlmSetKeysCnf, *tpLimMlmSetKeysCnf;
408
409typedef struct sLimMlmRemoveKeyReq
410{
411 tSirMacAddr peerMacAddr;
412 tANI_U8 sessionId; //Added FOr BT-AMP Support
413 tAniEdType edType; // Encryption/Decryption type
414 tANI_U8 wepType; //STATIC / DYNAMIC specifier
415 tANI_U8 keyId; //Key Id To be removed.
416 tANI_BOOLEAN unicast;
417} tLimMlmRemoveKeyReq, *tpLimMlmRemoveKeyReq;
418
419typedef struct sLimMlmRemoveKeyCnf
420{
421 tSirMacAddr peerMacAddr;
422 tANI_U16 resultCode;
423 tANI_U8 sessionId;
424} tLimMlmRemoveKeyCnf, *tpLimMlmRemoveKeyCnf;
425
426
427typedef struct sLimMlmResetReq
428{
429 tSirMacAddr macAddr;
430 tANI_U8 performCleanup;
431 tANI_U8 sessionId;
432} tLimMlmResetReq, *tpLimMlmResetReq;
433
434typedef struct sLimMlmResetCnf
435{
436 tSirMacAddr macAddr;
437 tSirResultCodes resultCode;
438 tANI_U8 sessionId;
439} tLimMlmResetCnf, *tpLimMlmResetCnf;
440
441
442typedef struct sLimMlmLinkTestStopReq
443{
444 tSirMacAddr peerMacAddr;
445 tANI_U8 sessionId;
Jeff Johnson295189b2012-06-20 16:38:30 -0700446} tLimMlmLinkTestStopReq, *tpLimMlmLinkTestStopReq;
447
448
449//
450// Block ACK related MLME data structures
451//
452
453typedef struct sLimMlmAddBAReq
454{
455
456 // ADDBA recipient
457 tSirMacAddr peerMacAddr;
458
459 // ADDBA Action Frame dialog token
460 tANI_U8 baDialogToken;
461
462 // ADDBA requested for TID
463 tANI_U8 baTID;
464
465 // BA policy
466 // 0 - Delayed BA (Not supported)
467 // 1 - Immediate BA
468 tANI_U8 baPolicy;
469
470 // BA buffer size - (0..127) max size MSDU's
471 tANI_U16 baBufferSize;
472
473 // BA timeout in TU's
474 // 0 means no timeout will occur
475 tANI_U16 baTimeout;
476
477 // ADDBA failure timeout in TU's
478 // Greater than or equal to 1
479 tANI_U16 addBAFailureTimeout;
480
481 // BA Starting Sequence Number
482 tANI_U16 baSSN;
483
484 tANI_U8 sessionId;
485
486} tLimMlmAddBAReq, *tpLimMlmAddBAReq;
487
488typedef struct sLimMlmAddBACnf
489{
490
491 // ADDBA recipient
492 tSirMacAddr peerMacAddr;
493
494 // ADDBA Action Frame dialog token
495 tANI_U8 baDialogToken;
496
497 // ADDBA requested for TID
498 tANI_U8 baTID;
499
500 // BA status code
501 tSirMacStatusCodes addBAResultCode;
502
503 // BA policy
504 // 0 - Delayed BA (Not supported)
505 // 1 - Immediate BA
506 tANI_U8 baPolicy;
507
508 // BA buffer size - (0..127) max size MSDU's
509 tANI_U16 baBufferSize;
510
511 // BA timeout in TU's
512 // 0 means no timeout will occur
513 tANI_U16 baTimeout;
514
515 // ADDBA direction
516 // 1 - Originator
517 // 0 - Recipient
518 tANI_U8 baDirection;
519 tANI_U8 sessionId;
520
521
522} tLimMlmAddBACnf, *tpLimMlmAddBACnf;
523
524typedef struct sLimMlmAddBAInd
525{
526
527 // ADDBA recipient
528 tSirMacAddr peerMacAddr;
529
530 // ADDBA Action Frame dialog token
531 tANI_U8 baDialogToken;
532
533 // ADDBA requested for TID
534 tANI_U8 baTID;
535
536 // BA policy
537 // 0 - Delayed BA (Not supported)
538 // 1 - Immediate BA
539 tANI_U8 baPolicy;
540
541 // BA buffer size - (0..127) max size MSDU's
542 tANI_U16 baBufferSize;
543
544 // BA timeout in TU's
545 // 0 means no timeout will occur
546 tANI_U16 baTimeout;
547
548} tLimMlmAddBAInd, *tpLimMlmAddBAInd;
549
550typedef struct sLimMlmAddBARsp
551{
552
553 // ADDBA recipient
554 tSirMacAddr peerMacAddr;
555
556 // ADDBA Action Frame dialog token
557 tANI_U8 baDialogToken;
558
559 // ADDBA requested for TID
560 tANI_U8 baTID;
561
562 // BA status code
563 tSirMacStatusCodes addBAResultCode;
564
565 // BA policy
566 // 0 - Delayed BA (Not supported)
567 // 1 - Immediate BA
568 tANI_U8 baPolicy;
569
570 // BA buffer size - (0..127) max size MSDU's
571 tANI_U16 baBufferSize;
572
573 // BA timeout in TU's
574 // 0 means no timeout will occur
575 tANI_U16 baTimeout;
576
577 //reserved for alignment
578 tANI_U8 rsvd[2];
579
580 /* PE session id*/
581 tANI_U8 sessionId;
582
583 } tLimMlmAddBARsp, *tpLimMlmAddBARsp;
584
585//
586// NOTE - Overloading DELBA IND and DELBA CNF
587// to use the same data structure as DELBA REQ
588// as the parameters do not vary too much.
589//
590typedef struct sLimMlmDelBAReq
591{
592
593 // ADDBA recipient
594 tSirMacAddr peerMacAddr;
595
596 // DELBA direction
597 // 1 - Originator
598 // 0 - Recipient
599 tANI_U8 baDirection;
600
601 // DELBA requested for TID
602 tANI_U8 baTID;
603
604 // DELBA reason code
605 tSirMacReasonCodes delBAReasonCode;
606
607 tANI_U8 sessionId;
608
609} tLimMlmDelBAReq, *tpLimMlmDelBAReq, tLimMlmDelBAInd, *tpLimMlmDelBAInd, tLimMlmDelBACnf, *tpLimMlmDelBACnf;
610
611// Function templates
612
613tANI_BOOLEAN limProcessSmeReqMessages(tpAniSirGlobal, tpSirMsgQ);
614void limProcessMlmReqMessages(tpAniSirGlobal, tpSirMsgQ);
615void limProcessMlmRspMessages(tpAniSirGlobal, tANI_U32, tANI_U32 *);
616void limProcessLmmMessages(tpAniSirGlobal, tANI_U32, tANI_U32 *);
617void limProcessSmeDelBssRsp( tpAniSirGlobal , tANI_U32,tpPESession);
618
619void limGetRandomBssid(tpAniSirGlobal pMac ,tANI_U8 *data);
620
Jeff Johnson295189b2012-06-20 16:38:30 -0700621// Function to handle HT and HT IE CFG parameter intializations
Jeff Johnsone7245742012-09-05 17:12:55 -0700622void handleHTCapabilityandHTInfo(struct sAniSirGlobal *pMac, tpPESession psessionEntry);
Jeff Johnson295189b2012-06-20 16:38:30 -0700623
624// Function to handle CFG parameter updates
625void limHandleCFGparamUpdate(tpAniSirGlobal, tANI_U32);
626
627// Function to apply CFG parameters before join/reassoc/start BSS
628void limApplyConfiguration(tpAniSirGlobal,tpPESession);
629
Jeff Johnson295189b2012-06-20 16:38:30 -0700630void limSetCfgProtection(tpAniSirGlobal pMac, tpPESession pesessionEntry);
Jeff Johnson295189b2012-06-20 16:38:30 -0700631
632
633// Function to Initialize MLM state machine on STA
634void limInitMlm(tpAniSirGlobal);
635
636// Function to cleanup MLM state machine
637void limCleanupMlm(tpAniSirGlobal);
638
639// Function to cleanup LMM state machine
640void limCleanupLmm(tpAniSirGlobal);
641
Jeff Johnson295189b2012-06-20 16:38:30 -0700642// Management frame handling functions
643void limProcessBeaconFrame(tpAniSirGlobal, tANI_U8 *,tpPESession);
644void limProcessBeaconFrameNoSession(tpAniSirGlobal, tANI_U8 *);
645void limProcessProbeReqFrame(tpAniSirGlobal, tANI_U8 *, tpPESession);
646void limProcessProbeRspFrame(tpAniSirGlobal, tANI_U8 *, tpPESession);
647void limProcessProbeRspFrameNoSession(tpAniSirGlobal, tANI_U8 *);
648void limProcessProbeReqFrame_multiple_BSS(tpAniSirGlobal, tANI_U8 *,tpPESession);
649
650
651// Process Auth frame when we have a session in progress.
652void limProcessAuthFrame(tpAniSirGlobal, tANI_U8 *,tpPESession);
653#ifdef WLAN_FEATURE_VOWIFI_11R
Srikant Kuppaa3ed0a32013-02-20 07:24:43 -0800654tSirRetStatus limProcessAuthFrameNoSession(tpAniSirGlobal pMac, tANI_U8 *, void *body);
Jeff Johnson295189b2012-06-20 16:38:30 -0700655#endif
656
657void limProcessAssocReqFrame(tpAniSirGlobal, tANI_U8 *, tANI_U8, tpPESession);
658void limSendMlmAssocInd(tpAniSirGlobal pMac, tpDphHashNode pStaDs, tpPESession psessionEntry);
659
660
661void limProcessAssocRspFrame(tpAniSirGlobal, tANI_U8 *, tANI_U8,tpPESession);
662void limProcessDisassocFrame(tpAniSirGlobal, tANI_U8 *,tpPESession);
663void limProcessDeauthFrame(tpAniSirGlobal, tANI_U8 *,tpPESession);
664void limProcessActionFrame(tpAniSirGlobal, tANI_U8 *,tpPESession);
Jeff Johnson295189b2012-06-20 16:38:30 -0700665void limProcessActionFrameNoSession(tpAniSirGlobal pMac, tANI_U8 *pRxMetaInfo);
Jeff Johnson295189b2012-06-20 16:38:30 -0700666
667
668tSirRetStatus limPopulateMacHeader(tpAniSirGlobal, tANI_U8*, tANI_U8, tANI_U8, tSirMacAddr,tSirMacAddr);
669tSirRetStatus limSendProbeReqMgmtFrame(tpAniSirGlobal, tSirMacSSid *, tSirMacAddr, tANI_U8, tSirMacAddr, tANI_U32, tANI_U32, tANI_U8 *);
670void limSendProbeRspMgmtFrame(tpAniSirGlobal, tSirMacAddr, tpAniSSID, short, tANI_U8, tpPESession, tANI_U8);
671void limSendAuthMgmtFrame(tpAniSirGlobal, tSirMacAuthFrameBody *, tSirMacAddr, tANI_U8,tpPESession);
672void limSendAssocReqMgmtFrame(tpAniSirGlobal, tLimMlmAssocReq *,tpPESession);
673void limSendReassocReqMgmtFrame(tpAniSirGlobal, tLimMlmReassocReq *,tpPESession);
674#ifdef WLAN_FEATURE_VOWIFI_11R
675void limSendReassocReqWithFTIEsMgmtFrame(tpAniSirGlobal pMac,
676 tLimMlmReassocReq *pMlmReassocReq,tpPESession psessionEntry);
677#endif
678void limSendDeltsReqActionFrame(tpAniSirGlobal pMac, tSirMacAddr peer,
679 tANI_U8 wmmTspecPresent, tSirMacTSInfo *pTsinfo,
680 tSirMacTspecIE *pTspecIe, tpPESession psessionEntry);
681void limSendAddtsReqActionFrame(tpAniSirGlobal pMac, tSirMacAddr peerMacAddr,
682 tSirAddtsReqInfo *addts,tpPESession);
683void limSendAddtsRspActionFrame(tpAniSirGlobal pMac, tSirMacAddr peerMacAddr,
684 tANI_U16 statusCode, tSirAddtsReqInfo *addts, tSirMacScheduleIE *pSchedule,tpPESession);
685
Jeff Johnson295189b2012-06-20 16:38:30 -0700686void limSendAssocRspMgmtFrame(tpAniSirGlobal, tANI_U16, tANI_U16, tSirMacAddr, tANI_U8, tpDphHashNode pSta,tpPESession);
687
688void limSendNullDataFrame(tpAniSirGlobal, tpDphHashNode);
Madan Mohan Koyyalamudi521ff192012-11-15 17:13:08 -0800689void limSendDisassocMgmtFrame(tpAniSirGlobal, tANI_U16, tSirMacAddr, tpPESession, tANI_BOOLEAN waitForAck);
690void limSendDeauthMgmtFrame(tpAniSirGlobal, tANI_U16, tSirMacAddr, tpPESession, tANI_BOOLEAN waitForAck);
Jeff Johnson295189b2012-06-20 16:38:30 -0700691
692void limContinueChannelScan(tpAniSirGlobal);
693tSirResultCodes limMlmAddBss(tpAniSirGlobal, tLimMlmStartReq *,tpPESession psessionEntry);
694
Jeff Johnsone7245742012-09-05 17:12:55 -0700695tSirRetStatus limSendChannelSwitchMgmtFrame(tpAniSirGlobal, tSirMacAddr, tANI_U8, tANI_U8, tANI_U8, tpPESession);
Jeff Johnson295189b2012-06-20 16:38:30 -0700696
Mohit Khanna4a70d262012-09-11 16:30:12 -0700697#ifdef WLAN_FEATURE_11AC
698tSirRetStatus limSendVHTOpmodeNotificationFrame(tpAniSirGlobal pMac,tSirMacAddr peer,tANI_U8 nMode, tpPESession psessionEntry );
Madan Mohan Koyyalamudic6226de2012-09-18 16:33:31 -0700699tSirRetStatus limSendVHTChannelSwitchMgmtFrame(tpAniSirGlobal pMac,tSirMacAddr peer,tANI_U8 nChanWidth, tANI_U8 nNewChannel, tANI_U8 ncbMode, tpPESession psessionEntry );
Mohit Khanna4a70d262012-09-11 16:30:12 -0700700#endif
701
Jeff Johnson295189b2012-06-20 16:38:30 -0700702#if defined WLAN_FEATURE_VOWIFI
703tSirRetStatus limSendNeighborReportRequestFrame(tpAniSirGlobal, tpSirMacNeighborReportReq, tSirMacAddr, tpPESession);
704tSirRetStatus limSendLinkReportActionFrame(tpAniSirGlobal, tpSirMacLinkReport, tSirMacAddr, tpPESession );
705tSirRetStatus limSendRadioMeasureReportActionFrame(tpAniSirGlobal, tANI_U8, tANI_U8, tpSirMacRadioMeasureReport, tSirMacAddr, tpPESession);
706#endif
707
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800708#if defined(FEATURE_WLAN_ESE) && !defined(FEATURE_WLAN_ESE_UPLOAD)
Jeff Johnson295189b2012-06-20 16:38:30 -0700709void limProcessIappFrame(tpAniSirGlobal, tANI_U8 *,tpPESession);
710#endif
711
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800712#ifdef FEATURE_WLAN_TDLS_INTERNAL
713tSirRetStatus limSendTdlsDisReqFrame(tpAniSirGlobal pMac,
714 tSirMacAddr peer_mac, tANI_U8 dialog, tpPESession psessionEntry);
715tSirRetStatus limSendTdlsLinkSetupReqFrame(tpAniSirGlobal pMac,
716 tSirMacAddr peerMac, tANI_U8 dialog, tpPESession psessionEntry,
717 tANI_U8* addIe, tANI_U16 len);
718
719eHalStatus limTdlsPrepareSetupReqFrame(tpAniSirGlobal pMac,
720 tLimTdlsLinkSetupInfo *linkSetupInfo,
721 tANI_U8 dialog, tSirMacAddr peerMac,
722 tpPESession psessionEntry);
723#endif
724#ifdef FEATURE_WLAN_TDLS
Gopichand Nakkala777e6032012-12-31 16:39:21 -0800725void limInitTdlsData(tpAniSirGlobal, tpPESession);
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800726tSirRetStatus limProcessSmeTdlsMgmtSendReq(tpAniSirGlobal pMac,
727 tANI_U32 *pMsgBuf);
728tSirRetStatus limProcessSmeTdlsAddStaReq(tpAniSirGlobal pMac,
729 tANI_U32 *pMsgBuf);
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +0530730tSirRetStatus limProcesSmeTdlsLinkEstablishReq(tpAniSirGlobal pMac,
731 tANI_U32 *pMsgBuf);
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800732tSirRetStatus limProcessSmeTdlsDelStaReq(tpAniSirGlobal pMac,
733 tANI_U32 *pMsgBuf);
Gopichand Nakkala2a0a1572013-02-10 21:39:16 -0800734void limSendSmeTDLSDeleteAllPeerInd(tpAniSirGlobal pMac, tpPESession psessionEntry);
Gopichand Nakkalab977a972013-02-18 19:15:09 -0800735void limSendSmeMgmtTXCompletion(tpAniSirGlobal pMac,
736 tpPESession psessionEntry,
737 tANI_U32 txCompleteStatus);
Gopichand Nakkala2a0a1572013-02-10 21:39:16 -0800738tSirRetStatus limDeleteTDLSPeers(tpAniSirGlobal pMac, tpPESession psessionEntry);
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800739eHalStatus limProcessTdlsAddStaRsp(tpAniSirGlobal pMac, void *msg, tpPESession);
740tSirRetStatus limSendTdlsTeardownFrame(tpAniSirGlobal pMac,
Hoonki Leea34dd892013-02-05 22:56:02 -0800741 tSirMacAddr peerMac, tANI_U16 reason, tANI_U8 responder, tpPESession psessionEntry,
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800742 tANI_U8 *addIe, tANI_U16 addIeLen);
743#endif
744
Jeff Johnson295189b2012-06-20 16:38:30 -0700745// Algorithms & Link Monitoring related functions
746tSirBackgroundScanMode limSelectsBackgroundScanMode(tpAniSirGlobal);
747void limTriggerBackgroundScan(tpAniSirGlobal);
748void limAbortBackgroundScan(tpAniSirGlobal);
749
750/// Function that handles heartbeat failure
751void limHandleHeartBeatFailure(tpAniSirGlobal,tpPESession);
752
753/// Function that triggers link tear down with AP upon HB failure
754void limTearDownLinkWithAp(tpAniSirGlobal,tANI_U8, tSirMacReasonCodes);
755
Jeff Johnson295189b2012-06-20 16:38:30 -0700756
757/// Function that sends keep alive message to peer(s)
758void limSendKeepAliveToPeer(tpAniSirGlobal);
759
760/// Function that processes Max retries interrupt from TFP
761void limHandleMaxRetriesInterrupt(tANI_U32);
762
763/// Function that processes messages deferred during Learn mode
764void limProcessDeferredMessageQueue(tpAniSirGlobal);
765
766/// Function that defers the messages received
767tANI_U32 limDeferMsg(tpAniSirGlobal, tSirMsgQ *);
768
769/// Function that sets system into scan mode
770void limSetScanMode(tpAniSirGlobal pMac);
771
772/// Function that Switches the Channel and sets the CB Mode
Jeff Johnsone7245742012-09-05 17:12:55 -0700773void limSetChannel(tpAniSirGlobal pMac, tANI_U8 channel, tANI_U8 secChannelOffset, tPowerdBm maxTxPower, tANI_U8 peSessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -0700774
775/// Function that completes channel scan
776void limCompleteMlmScan(tpAniSirGlobal, tSirResultCodes);
777
Jeff Johnsone7245742012-09-05 17:12:55 -0700778#ifdef FEATURE_OEM_DATA_SUPPORT
779/// Funtion that sets system into meas mode for oem data req
780void limSetOemDataReqMode(tpAniSirGlobal pMac, eHalStatus status, tANI_U32* data);
781#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700782
783#ifdef ANI_SUPPORT_11H
784/// Function that sends Measurement Report action frame
785tSirRetStatus limSendMeasReportFrame(tpAniSirGlobal, tpSirMacMeasReqActionFrame, tSirMacAddr);
786
787/// Function that sends TPC Report action frame
788tSirRetStatus limSendTpcReportFrame(tpAniSirGlobal, tpSirMacTpcReqActionFrame, tSirMacAddr);
789#endif
790
791/// Function that sends TPC Request action frame
792void limSendTpcRequestFrame(tpAniSirGlobal, tSirMacAddr);
793
794// Function(s) to handle responses received from HAL
795void limProcessMlmAddBssRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ );
796void limProcessMlmAddStaRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQt,tpPESession psessionEntry);
797void limProcessMlmDelStaRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ );
798void limProcessMlmDelBssRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ,tpPESession);
Jeff Johnson295189b2012-06-20 16:38:30 -0700799void limProcessStaMlmAddStaRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ ,tpPESession psessionEntry);
800void limProcessStaMlmDelStaRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ,tpPESession psessionEntry);
801void limProcessStaMlmDelBssRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ ,tpPESession psessionEntry);
802void limProcessMlmSetStaKeyRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ );
803void limProcessMlmSetBssKeyRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ );
804
805
806
807#ifdef GEN4_SCAN
808// Function to process WDA_INIT_SCAN_RSP message
809void limProcessInitScanRsp(tpAniSirGlobal, void * );
810
811// Function to process WDA_START_SCAN_RSP message
812void limProcessStartScanRsp(tpAniSirGlobal, void * );
813
814// Function to process WDA_END_SCAN_RSP message
815void limProcessEndScanRsp(tpAniSirGlobal, void * );
816
817// Function to process WDA_FINISH_SCAN_RSP message
818void limProcessFinishScanRsp(tpAniSirGlobal, void * );
819
820// Function to process WDA_SWITCH_CHANNEL_RSP message
821void limProcessSwitchChannelRsp(tpAniSirGlobal pMac, void * );
822
823void limSendHalInitScanReq( tpAniSirGlobal, tLimLimHalScanState, tSirLinkTrafficCheck);
824void limSendHalStartScanReq( tpAniSirGlobal, tANI_U8, tLimLimHalScanState);
825void limSendHalEndScanReq( tpAniSirGlobal, tANI_U8, tLimLimHalScanState);
826void limSendHalFinishScanReq( tpAniSirGlobal, tLimLimHalScanState);
827
828void limContinuePostChannelScan(tpAniSirGlobal pMac);
Gopichand Nakkalad492d202013-05-10 02:50:47 +0530829void limCovertChannelScanType(tpAniSirGlobal pMac,tANI_U8 channelNum, tANI_BOOLEAN passiveToActive);
830void limSetDFSChannelList(tpAniSirGlobal pMac,tANI_U8 channelNum, tSirDFSChannelList *dfsChannelList);
Jeff Johnson295189b2012-06-20 16:38:30 -0700831void limContinueChannelLearn( tpAniSirGlobal );
832//WLAN_SUSPEND_LINK Related
833tANI_U8 limIsLinkSuspended(tpAniSirGlobal pMac);
834void limSuspendLink(tpAniSirGlobal, tSirLinkTrafficCheck, SUSPEND_RESUME_LINK_CALLBACK, tANI_U32*);
835void limResumeLink(tpAniSirGlobal, SUSPEND_RESUME_LINK_CALLBACK, tANI_U32*);
836//end WLAN_SUSPEND_LINK Related
837#endif // GEN4_SCAN
838
839tSirRetStatus limSendAddBAReq( tpAniSirGlobal pMac,
840 tpLimMlmAddBAReq pMlmAddBAReq,tpPESession);
841
842tSirRetStatus limSendAddBARsp( tpAniSirGlobal pMac,
843 tpLimMlmAddBARsp pMlmAddBARsp,tpPESession);
844
845tSirRetStatus limSendDelBAInd( tpAniSirGlobal pMac,
846 tpLimMlmDelBAReq pMlmDelBAReq ,tpPESession psessionEntry);
847#if 0
848tSirRetStatus limSendSMPowerStateFrame( tpAniSirGlobal pMac,
849 tSirMacAddr peer, tSirMacHTMIMOPowerSaveState State );
850#endif
851
852void limProcessMlmHalAddBARsp( tpAniSirGlobal pMac,
853 tpSirMsgQ limMsgQ );
854
855void limProcessMlmHalBADeleteInd( tpAniSirGlobal pMac,
856 tpSirMsgQ limMsgQ );
857
858void limProcessMlmRemoveKeyRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ );
859
860void limProcessLearnIntervalTimeout(tpAniSirGlobal pMac);
Chet Lanctot8cecea22014-02-11 19:09:36 -0800861
Jeff Johnson295189b2012-06-20 16:38:30 -0700862#ifdef WLAN_FEATURE_11W
Chet Lanctot8cecea22014-02-11 19:09:36 -0800863//11w send SA query request action frame
864tSirRetStatus limSendSaQueryRequestFrame( tpAniSirGlobal pMac, tANI_U8 *transId,
865 tSirMacAddr peer, tpPESession psessionEntry );
Jeff Johnson295189b2012-06-20 16:38:30 -0700866//11w SA query request action frame handler
867tSirRetStatus limSendSaQueryResponseFrame( tpAniSirGlobal pMac,
Chet Lanctot186b5732013-03-18 10:26:30 -0700868 tANI_U8 *transId, tSirMacAddr peer,tpPESession psessionEntry);
Jeff Johnson295189b2012-06-20 16:38:30 -0700869#endif
870// Inline functions
871
872/**
873 * limPostSmeMessage()
874 *
875 *FUNCTION:
876 * This function is called by limProcessMlmMessages(). In this
877 * function MLM sub-module invokes MLM ind/cnf primitives.
878 *
879 *LOGIC:
880 * Initially MLM makes an SME function call to invoke MLM ind/cnf
881 * primitive. In future this can be enhanced to 'post' messages to SME.
882 *
883 *ASSUMPTIONS:
884 * NA
885 *
886 *NOTE:
887 * NA
888 *
889 * @param pMac Pointer to Global MAC structure
890 * @param msgType Indicates the MLM primitive message type
891 * @param *pMsgBuf A pointer to the MLM message buffer
892 *
893 * @return None
894 */
895static inline void
896limPostSmeMessage(tpAniSirGlobal pMac, tANI_U32 msgType, tANI_U32 *pMsgBuf)
897{
898 tSirMsgQ msg;
899
900 if(pMsgBuf == NULL)
901 {
Kiran Kumar Lokere5be73a62013-04-01 18:40:00 -0700902 limLog(pMac, LOGE,FL("Buffer is Pointing to NULL"));
Jeff Johnson295189b2012-06-20 16:38:30 -0700903 return;
904 }
905
906 msg.type = (tANI_U16)msgType;
907 msg.bodyptr = pMsgBuf;
908 msg.bodyval = 0;
909 if (msgType > eWNI_SME_MSG_TYPES_BEGIN)
910 limProcessSmeReqMessages(pMac, &msg);
911 else
912 limProcessMlmRspMessages(pMac, msgType, pMsgBuf);
913} /*** end limPostSmeMessage() ***/
914
915/**
916 * limPostMlmMessage()
917 *
918 *FUNCTION:
919 * This function is called by limProcessSmeMessages(). In this
920 * function SME invokes MLME primitives.
921 *
922 *PARAMS:
923 *
924 *LOGIC:
925 * Initially SME makes an MLM function call to invoke MLM primitive.
926 * In future this can be enhanced to 'post' messages to MLM.
927 *
928 *ASSUMPTIONS:
929 * NA
930 *
931 *NOTE:
932 * NA
933 *
934 * @param pMac Pointer to Global MAC structure
935 * @param msgType Indicates the MLM primitive message type
936 * @param *pMsgBuf A pointer to the MLM message buffer
937 *
938 * @return None
939 */
940static inline void
941limPostMlmMessage(tpAniSirGlobal pMac, tANI_U32 msgType, tANI_U32 *pMsgBuf)
942{
943
944 tSirMsgQ msg;
945 if(pMsgBuf == NULL)
946 {
Kiran Kumar Lokere5be73a62013-04-01 18:40:00 -0700947 limLog(pMac, LOGE,FL("Buffer is Pointing to NULL"));
Jeff Johnson295189b2012-06-20 16:38:30 -0700948 return;
949 }
950 msg.type = (tANI_U16) msgType;
951 msg.bodyptr = pMsgBuf;
952 msg.bodyval = 0;
953 limProcessMlmReqMessages(pMac, &msg);
954} /*** end limPostMlmMessage() ***/
955
956
957
958/**
959 * limGetCurrentScanChannel()
960 *
961 *FUNCTION:
962 * This function is called in various places to get current channel
963 * number being scanned.
964 *
965 *PARAMS:
966 *
967 *LOGIC:
968 *
969 *ASSUMPTIONS:
970 * NA
971 *
972 *NOTE:
973 * NA
974 *
975 * @param pMac Pointer to Global MAC structure
976 * @return Channel number
977 */
978static inline tANI_U8
979limGetCurrentScanChannel(tpAniSirGlobal pMac)
980{
981 tANI_U8 *pChanNum = pMac->lim.gpLimMlmScanReq->channelList.channelNumber;
982
983 return (*(pChanNum + pMac->lim.gLimCurrentScanChannelId));
984} /*** end limGetCurrentScanChannel() ***/
985
986
987
988/**
989 * limGetIElenFromBssDescription()
990 *
991 *FUNCTION:
992 * This function is called in various places to get IE length
993 * from tSirBssDescription structure
994 * number being scanned.
995 *
996 *PARAMS:
997 *
998 *LOGIC:
999 *
1000 *ASSUMPTIONS:
1001 * NA
1002 *
1003 *NOTE:
1004 * NA
1005 *
1006 * @param pBssDescr
1007 * @return Total IE length
1008 */
1009
1010static inline tANI_U16
1011limGetIElenFromBssDescription(tpSirBssDescription pBssDescr)
1012{
1013 if (!pBssDescr)
1014 return 0;
1015
1016 return ((tANI_U16) (pBssDescr->length + sizeof(tANI_U16) +
1017 sizeof(tANI_U32) - sizeof(tSirBssDescription)));
1018} /*** end limGetIElenFromBssDescription() ***/
1019
Jeff Johnson295189b2012-06-20 16:38:30 -07001020/**
1021 * limSendBeaconInd()
1022 *
1023 *FUNCTION:
1024 * This function is called to send the beacon indication
1025 * number being scanned.
1026 *
1027 *PARAMS:
1028 *
1029 *LOGIC:
1030 *
1031 *ASSUMPTIONS:
1032*/
1033
1034void
1035limSendBeaconInd(tpAniSirGlobal pMac, tpPESession psessionEntry);
Jeff Johnson295189b2012-06-20 16:38:30 -07001036
Jeff Johnson295189b2012-06-20 16:38:30 -07001037
1038void limGetWPSPBCSessions(tpAniSirGlobal pMac, tANI_U8 *addr, tANI_U8 *uuid_e, eWPSPBCOverlap *overlap, tpPESession psessionEntry);
1039void limWPSPBCTimeout(tpAniSirGlobal pMac, tpPESession psessionEntry);
1040void limWPSPBCClose(tpAniSirGlobal pMac, tpPESession psessionEntry);
1041void limRemovePBCSessions(tpAniSirGlobal pMac, tSirMacAddr pRemoveMac,tpPESession psessionEntry);
1042
1043
1044tSirRetStatus
1045limIsSmeGetWPSPBCSessionsReqValid(tpAniSirGlobal pMac, tSirSmeGetWPSPBCSessionsReq *pGetWPSPBCSessionsReq, tANI_U8 *pBuf);
1046
1047#define LIM_WPS_OVERLAP_TIMER_MS 10000
Jeff Johnson295189b2012-06-20 16:38:30 -07001048
1049void
1050limSuspendLink(tpAniSirGlobal pMac, tSirLinkTrafficCheck trafficCheck, SUSPEND_RESUME_LINK_CALLBACK callback, tANI_U32 *data);
1051void
1052limResumeLink(tpAniSirGlobal pMac, SUSPEND_RESUME_LINK_CALLBACK callback, tANI_U32 *data);
1053
1054void
1055limChangeChannelWithCallback(tpAniSirGlobal pMac, tANI_U8 newChannel,
1056 CHANGE_CHANNEL_CALLBACK callback, tANI_U32 *cbdata, tpPESession psessionEntry);
1057
Jeff Johnson295189b2012-06-20 16:38:30 -07001058void limSendSmeMgmtFrameInd(
1059 tpAniSirGlobal pMac, tANI_U8 frameType,
1060 tANI_U8 *frame, tANI_U32 frameLen, tANI_U16 sessionId,
Chilam NG571c65a2013-01-19 12:27:36 +05301061 tANI_U32 rxChan, tpPESession psessionEntry,
1062 tANI_S8 rxRssi);
Jeff Johnson295189b2012-06-20 16:38:30 -07001063void limProcessRemainOnChnTimeout(tpAniSirGlobal pMac);
Gopichand Nakkala4261ea52012-12-31 16:43:00 -08001064void limProcessInsertSingleShotNOATimeout(tpAniSirGlobal pMac);
Gopichand Nakkalad492d202013-05-10 02:50:47 +05301065void limConvertActiveChannelToPassiveChannel(tpAniSirGlobal pMac);
Jeff Johnson295189b2012-06-20 16:38:30 -07001066void limSendP2PActionFrame(tpAniSirGlobal pMac, tpSirMsgQ pMsg);
1067void limAbortRemainOnChan(tpAniSirGlobal pMac);
1068tSirRetStatus __limProcessSmeNoAUpdate(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf);
Viral Modid440e682013-03-06 02:25:31 -08001069void limProcessRegdDefdSmeReqAfterNOAStart(tpAniSirGlobal pMac);
Mohit Khanna698ba2a2012-12-04 15:08:18 -08001070#ifdef FEATURE_WLAN_TDLS_INTERNAL
1071void limProcessTdlsFrame(tpAniSirGlobal, tANI_U32 *);
Mohit Khanna698ba2a2012-12-04 15:08:18 -08001072void limProcessTdlsPublicActionFrame(tpAniSirGlobal pMac, tANI_U32 *pBd,
1073 tpPESession) ;
1074#ifdef FEATURE_WLAN_TDLS_NEGATIVE
1075#define LIM_TDLS_NEGATIVE_WRONG_BSSID_IN_DSCV_REQ 0x1 /* 5.1.4-5 */
1076#define LIM_TDLS_NEGATIVE_WRONG_BSSID_IN_SETUP_REQ 0x2 /* 5.2.4-16 */
1077#define LIM_TDLS_NEGATIVE_STATUS_37_IN_SETUP_CNF 0x4 /* 5.2.4-10 */
1078#define LIM_TDLS_NEGATIVE_SEND_REQ_TO_SETUP_REQ 0x8 /* 5.2.4-20/32 */
1079#define LIM_TDLS_NEGATIVE_RSP_TIMEOUT_TO_SETUP_REQ 0x10 /* 5.2.3.4 */
1080#define LIM_TDLS_NEGATIVE_TREAT_TDLS_PROHIBIT_AP 0x20 /* 5.2.4-49 */
1081 /* following is not paticularily tested in WFA test plan, but will help to validate our TDLS behavior in-house */
1082#define LIM_TDLS_NEGATIVE_WRONG_BSSID_IN_DSCV_RSP 0x40
1083#define LIM_TDLS_NEGATIVE_WRONG_BSSID_IN_SETUP_RSP 0x80
1084
1085void limTdlsSetNegativeBehavior(tpAniSirGlobal pMac, tANI_U8 value, tANI_BOOLEAN on);
1086#endif
1087#endif
1088
Madan Mohan Koyyalamudi521ff192012-11-15 17:13:08 -08001089void limProcessDisassocAckTimeout(tpAniSirGlobal pMac);
1090void limProcessDeauthAckTimeout(tpAniSirGlobal pMac);
1091eHalStatus limSendDisassocCnf(tpAniSirGlobal pMac);
1092eHalStatus limSendDeauthCnf(tpAniSirGlobal pMac);
Dhanashri Atre4a6e3ea2012-12-12 14:10:33 -08001093
1094#ifdef WLAN_FEATURE_VOWIFI_11R
1095typedef struct sSetLinkCbackParams
1096{
1097 void * cbackDataPtr;
1098} tSetLinkCbackParams;
1099#endif
Gopichand Nakkala2c231c82013-06-11 17:49:16 +05301100
1101void limProcessRxScanEvent(tpAniSirGlobal mac, void *buf);
Sudhir Sattayappa Kohalliabf751c2013-06-30 15:37:18 -07001102
1103int limProcessRemainOnChnlReq(tpAniSirGlobal pMac, tANI_U32 *pMsg);
1104void limRemainOnChnRsp(tpAniSirGlobal pMac, eHalStatus status, tANI_U32 *data);
Jeff Johnson295189b2012-06-20 16:38:30 -07001105#endif /* __LIM_TYPES_H */
1106