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