blob: aecfd439002123178d184c47eef7bbe90f6c1277 [file] [log] [blame]
Jeff Johnson295189b2012-06-20 16:38:30 -07001/*
Gopichand Nakkala92f07d82013-01-08 21:16:34 -08002 * Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
3 *
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/*
Jeff Johnson32d95a32012-09-10 13:15:23 -070022 * Copyright (c) 2012, The Linux Foundation. All rights reserved.
Jeff Johnson295189b2012-06-20 16:38:30 -070023 *
24 * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
25 *
26 *
27 * Permission to use, copy, modify, and/or distribute this software for
28 * any purpose with or without fee is hereby granted, provided that the
29 * above copyright notice and this permission notice appear in all
30 * copies.
31 *
32 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
33 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
34 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
35 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
36 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
37 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
38 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
39 * PERFORMANCE OF THIS SOFTWARE.
40 */
Jeff Johnson295189b2012-06-20 16:38:30 -070041/*
42 * Airgo Networks, Inc proprietary. All rights reserved.
43 * This file limTypes.h contains the definitions used by all
44 * all LIM modules.
45 * Author: Chandra Modumudi
46 * Date: 02/11/02
47 * History:-
48 * Date Modified by Modification Information
49 * --------------------------------------------------------------------
50 *
51 */
52#ifndef __LIM_TYPES_H
53#define __LIM_TYPES_H
54
55#include "wniApi.h"
56#include "sirApi.h"
57#include "sirCommon.h"
58#include "sirMacProtDef.h"
59#include "utilsApi.h"
60
Jeff Johnson295189b2012-06-20 16:38:30 -070061#include "wlan_qct_wdi_ds.h"
Jeff Johnson295189b2012-06-20 16:38:30 -070062
63#include "limApi.h"
64#include "limDebug.h"
65#include "limSendSmeRspMessages.h"
66#include "sysGlobal.h"
67#include "dphGlobal.h"
68#include "parserApi.h"
69
70#define LINK_TEST_DEFER 1
71
72#define TRACE_EVENT_CNF_TIMER_DEACT 0x6600
73#define TRACE_EVENT_CNF_TIMER_ACT 0x6601
74#define TRACE_EVENT_AUTH_RSP_TIMER_DEACT 0x6602
75#define TRACE_EVENT_AUTH_RSP_TIMER_ACT 0x6603
76
77// MLM message types
78#define LIM_MLM_MSG_START 1000
79#define LIM_MLM_SCAN_REQ LIM_MLM_MSG_START
Madan Mohan Koyyalamudia53c4dc2012-11-13 10:35:42 -080080#define LIM_MLM_SCAN_CNF (LIM_MLM_MSG_START + 1)
81#define LIM_MLM_START_REQ (LIM_MLM_MSG_START + 2)
82#define LIM_MLM_START_CNF (LIM_MLM_MSG_START + 3)
83#define LIM_MLM_JOIN_REQ (LIM_MLM_MSG_START + 4)
84#define LIM_MLM_JOIN_CNF (LIM_MLM_MSG_START + 5)
85#define LIM_MLM_AUTH_REQ (LIM_MLM_MSG_START + 6)
86#define LIM_MLM_AUTH_CNF (LIM_MLM_MSG_START + 7)
87#define LIM_MLM_AUTH_IND (LIM_MLM_MSG_START + 8)
88#define LIM_MLM_ASSOC_REQ (LIM_MLM_MSG_START + 9)
89#define LIM_MLM_ASSOC_CNF (LIM_MLM_MSG_START + 10)
90#define LIM_MLM_ASSOC_IND (LIM_MLM_MSG_START + 11)
91#define LIM_MLM_DISASSOC_REQ (LIM_MLM_MSG_START + 12)
92#define LIM_MLM_DISASSOC_CNF (LIM_MLM_MSG_START + 13)
93#define LIM_MLM_DISASSOC_IND (LIM_MLM_MSG_START + 14)
94#define LIM_MLM_REASSOC_REQ (LIM_MLM_MSG_START + 15)
95#define LIM_MLM_REASSOC_CNF (LIM_MLM_MSG_START + 16)
96#define LIM_MLM_REASSOC_IND (LIM_MLM_MSG_START + 17)
97#define LIM_MLM_DEAUTH_REQ (LIM_MLM_MSG_START + 18)
98#define LIM_MLM_DEAUTH_CNF (LIM_MLM_MSG_START + 19)
99#define LIM_MLM_DEAUTH_IND (LIM_MLM_MSG_START + 20)
100#define LIM_MLM_TSPEC_REQ (LIM_MLM_MSG_START + 21)
101#define LIM_MLM_TSPEC_CNF (LIM_MLM_MSG_START + 22)
102#define LIM_MLM_TSPEC_IND (LIM_MLM_MSG_START + 23)
103#define LIM_MLM_SETKEYS_REQ (LIM_MLM_MSG_START + 24)
104#define LIM_MLM_SETKEYS_CNF (LIM_MLM_MSG_START + 25)
105#define LIM_MLM_LINK_TEST_STOP_REQ (LIM_MLM_MSG_START + 30)
106#define LIM_MLM_PURGE_STA_IND (LIM_MLM_MSG_START + 31)
107#define LIM_MLM_ADDBA_REQ (LIM_MLM_MSG_START + 32)
108#define LIM_MLM_ADDBA_CNF (LIM_MLM_MSG_START + 33)
109#define LIM_MLM_ADDBA_IND (LIM_MLM_MSG_START + 34)
110#define LIM_MLM_ADDBA_RSP (LIM_MLM_MSG_START + 35)
111#define LIM_MLM_DELBA_REQ (LIM_MLM_MSG_START + 36)
112#define LIM_MLM_DELBA_CNF (LIM_MLM_MSG_START + 37)
113#define LIM_MLM_DELBA_IND (LIM_MLM_MSG_START + 38)
114#define LIM_MLM_REMOVEKEY_REQ (LIM_MLM_MSG_START + 39)
115#define LIM_MLM_REMOVEKEY_CNF (LIM_MLM_MSG_START + 40)
Jeff Johnson295189b2012-06-20 16:38:30 -0700116
Jeff Johnsone7245742012-09-05 17:12:55 -0700117#ifdef FEATURE_OEM_DATA_SUPPORT
Madan Mohan Koyyalamudia53c4dc2012-11-13 10:35:42 -0800118#define LIM_MLM_OEM_DATA_REQ (LIM_MLM_MSG_START + 41)
119#define LIM_MLM_OEM_DATA_CNF (LIM_MLM_MSG_START + 42)
Jeff Johnsone7245742012-09-05 17:12:55 -0700120#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700121
122#define LIM_HASH_ADD 0
123#define LIM_HASH_UPDATE 1
124
125#define LIM_WEP_IN_FC 1
126#define LIM_NO_WEP_IN_FC 0
127
128#define LIM_DECRYPT_ICV_FAIL 1
129
130/// Definitions to distinquish between Association/Reassociaton
131#define LIM_ASSOC 0
132#define LIM_REASSOC 1
133
134/// Minimum Memory blocks require for different scenario
135#define LIM_MIN_MEM_ASSOC 4
136
137/// Verifies whether given mac addr matches the CURRENT Bssid
138#define IS_CURRENT_BSSID(pMac, addr,psessionEntry) (palEqualMemory(pMac->hHdd, addr, \
139 psessionEntry->bssId, \
140 sizeof(psessionEntry->bssId)))
141/// Verifies whether given addr matches the REASSOC Bssid
142#define IS_REASSOC_BSSID(pMac, addr,psessionEntry) (palEqualMemory(pMac->hHdd, addr, \
143 psessionEntry->limReAssocbssId, \
144 sizeof(psessionEntry->limReAssocbssId)))
145
146#define REQ_TYPE_REGISTRAR (0x2)
147#define REQ_TYPE_WLAN_MANAGER_REGISTRAR (0x3)
148
149#define RESP_TYPE_REGISTRAR (0x2)
150#define RESP_TYPE_ENROLLEE_INFO_ONLY (0x0)
151#define RESP_TYPE_ENROLLEE_OPEN_8021X (0x1)
152#define RESP_TYPE_AP (0x3)
153#define LIM_TX_FRAMES_THRESHOLD_ON_CHIP 300
154
155
156// enums used by LIM are as follows
157
158enum eLimDisassocTrigger
159{
160 eLIM_HOST_DISASSOC,
161 eLIM_PEER_ENTITY_DISASSOC,
162 eLIM_LINK_MONITORING_DISASSOC,
163 eLIM_PROMISCUOUS_MODE_DISASSOC,
164 eLIM_HOST_DEAUTH,
165 eLIM_PEER_ENTITY_DEAUTH,
166 eLIM_LINK_MONITORING_DEAUTH,
167 eLIM_JOIN_FAILURE,
168 eLIM_REASSOC_REJECT
169};
170
171/* Reason code to determine the channel change context while sending
172 * WDA_CHNL_SWITCH_REQ message to HAL
173 */
174enum eChannelChangeReasonCodes
175{
176 LIM_SWITCH_CHANNEL_REASSOC,
177 LIM_SWITCH_CHANNEL_JOIN,
178 LIM_SWITCH_CHANNEL_OPERATION, // Generic change channel
179};
180
181typedef struct sLimAuthRspTimeout
182{
183 tSirMacAddr peerMacAddr;
184} tLimAuthRspTimeout;
185
186typedef struct sLimMlmStartReq
187{
188 tSirMacSSid ssId;
189 tSirBssType bssType;
190 tSirMacAddr bssId;
191 tSirMacBeaconInterval beaconPeriod;
192 tANI_U8 dtimPeriod;
193 tSirMacCfParamSet cfParamSet;
194 tSirMacChanNum channelNumber;
Jeff Johnsone7245742012-09-05 17:12:55 -0700195 ePhyChanBondState cbMode;
Jeff Johnson295189b2012-06-20 16:38:30 -0700196 tANI_U16 atimWindow;
197 tSirMacRateSet rateSet;
198 tANI_U8 sessionId; //Added For BT-AMP Support
199
200 // Parameters reqd for new HAL (message) interface
201 tSirNwType nwType;
202 tANI_U8 htCapable;
203 tSirMacHTOperatingMode htOperMode;
204 tANI_U8 dualCTSProtection;
205 tANI_U8 txChannelWidthSet;
Jeff Johnson295189b2012-06-20 16:38:30 -0700206 tANI_U8 ssidHidden;
207 tANI_U8 wps_state;
208 tANI_U8 obssProtEnabled;
Jeff Johnson295189b2012-06-20 16:38:30 -0700209} tLimMlmStartReq, *tpLimMlmStartReq;
210
211typedef struct sLimMlmStartCnf
212{
213 tSirResultCodes resultCode;
214 tANI_U8 sessionId;
215} tLimMlmStartCnf, *tpLimMlmStartCnf;
216
217typedef struct sLimMlmScanCnf
218{
219 tSirResultCodes resultCode;
220 tANI_U16 scanResultLength;
221 tSirBssDescription bssDescription[1];
222 tANI_U8 sessionId;
223} tLimMlmScanCnf, *tpLimMlmScanCnf;
224
225typedef struct sLimScanResult
226{
227 tANI_U16 numBssDescriptions;
228 tSirBssDescription bssDescription[1];
229} tLimScanResult;
230
231typedef struct sLimMlmJoinCnf
232{
233 tSirResultCodes resultCode;
234 tANI_U16 protStatusCode;
235 tANI_U8 sessionId;
236} tLimMlmJoinCnf, *tpLimMlmJoinCnf;
237
238typedef struct sLimMlmAssocReq
239{
240 tSirMacAddr peerMacAddr;
241 tANI_U32 assocFailureTimeout;
242 tANI_U16 capabilityInfo;
243 tSirMacListenInterval listenInterval;
244 tANI_U8 sessionId;
245} tLimMlmAssocReq, *tpLimMlmAssocReq;
246
247typedef struct sLimMlmAssocCnf
248{
249 tSirResultCodes resultCode; //Internal status code.
250 tANI_U16 protStatusCode; //Protocol Status code.
251 tANI_U8 sessionId;
252} tLimMlmAssocCnf, *tpLimMlmAssocCnf;
253
254typedef struct sLimMlmAssocInd
255{
256 tSirMacAddr peerMacAddr;
257 tANI_U16 aid;
258 tAniAuthType authType;
259 tAniSSID ssId;
260 tSirRSNie rsnIE;
Jeff Johnson1250df42012-12-10 14:31:52 -0800261 tSirAddie addIE; // additional IE received from the peer, which possibly includes WSC IE and/or P2P IE.
Jeff Johnson295189b2012-06-20 16:38:30 -0700262 tSirMacCapabilityInfo capabilityInfo;
Jeff Johnson295189b2012-06-20 16:38:30 -0700263 tAniBool spectrumMgtIndicator;
264 tSirMacPowerCapInfo powerCap;
265 tSirSupChnl supportedChannels;
266 tANI_U8 sessionId;
267
268
Jeff Johnson295189b2012-06-20 16:38:30 -0700269 tAniBool WmmStaInfoPresent;
Jeff Johnson295189b2012-06-20 16:38:30 -0700270
Jeff Johnson295189b2012-06-20 16:38:30 -0700271 // Required for indicating the frames to upper layer
272 tANI_U32 beaconLength;
273 tANI_U8* beaconPtr;
274 tANI_U32 assocReqLength;
275 tANI_U8* assocReqPtr;
276} tLimMlmAssocInd, *tpLimMlmAssocInd;
277
278typedef struct sLimMlmReassocReq
279{
280 tSirMacAddr peerMacAddr;
281 tANI_U32 reassocFailureTimeout;
282 tANI_U16 capabilityInfo;
283 tSirMacListenInterval listenInterval;
284 tANI_U8 sessionId;
285} tLimMlmReassocReq, *tpLimMlmReassocReq;
286
287typedef struct sLimMlmReassocCnf
288{
289 tSirResultCodes resultCode;
290 tANI_U16 protStatusCode; //Protocol Status code.
291 tANI_U8 sessionId;
292} tLimMlmReassocCnf, *tpLimMlmReassocCnf;
293
294typedef struct sLimMlmReassocInd
295{
296 tSirMacAddr peerMacAddr;
297 tSirMacAddr currentApAddr;
298 tANI_U16 aid;
299 tAniAuthType authType;
300 tAniSSID ssId;
301 tSirRSNie rsnIE;
Jeff Johnson1250df42012-12-10 14:31:52 -0800302 tSirAddie addIE; // additional IE received from the peer, which can be WSC IE and/or P2P IE.
Jeff Johnson295189b2012-06-20 16:38:30 -0700303 tSirMacCapabilityInfo capabilityInfo;
Jeff Johnson295189b2012-06-20 16:38:30 -0700304 tAniBool spectrumMgtIndicator;
305 tSirMacPowerCapInfo powerCap;
306 tSirSupChnl supportedChannels;
307
Jeff Johnson295189b2012-06-20 16:38:30 -0700308 tAniBool WmmStaInfoPresent;
Jeff Johnson295189b2012-06-20 16:38:30 -0700309
Jeff Johnson295189b2012-06-20 16:38:30 -0700310 // Required for indicating the frames to upper layer
311 tANI_U32 beaconLength;
312 tANI_U8* beaconPtr;
313 tANI_U32 assocReqLength;
314 tANI_U8* assocReqPtr;
315} tLimMlmReassocInd, *tpLimMlmReassocInd;
316
317typedef struct sLimMlmAuthCnf
318{
319 tSirMacAddr peerMacAddr;
320 tAniAuthType authType;
321 tSirResultCodes resultCode;
322 tANI_U16 protStatusCode;
323 tANI_U8 sessionId;
324} tLimMlmAuthCnf, *tpLimMlmAuthCnf;
325
326typedef struct sLimMlmAuthInd
327{
328 tSirMacAddr peerMacAddr;
329 tAniAuthType authType;
330 tANI_U8 sessionId;
331} tLimMlmAuthInd, *tpLimMlmAuthInd;
332
333typedef struct sLimMlmDeauthReq
334{
335 tSirMacAddr peerMacAddr;
336 tANI_U16 reasonCode;
337 tANI_U16 deauthTrigger;
338 tANI_U16 aid;
339 tANI_U8 sessionId; //Added for BT-AMP SUPPORT
340
341} tLimMlmDeauthReq, *tpLimMlmDeauthReq;
342
343typedef struct sLimMlmDeauthCnf
344{
345 tSirMacAddr peerMacAddr;
346 tSirResultCodes resultCode;
347 tANI_U16 deauthTrigger;
348 tANI_U16 aid;
349 tANI_U8 sessionId;
350} tLimMlmDeauthCnf, *tpLimMLmDeauthCnf;
351
352typedef struct sLimMlmDeauthInd
353{
354 tSirMacAddr peerMacAddr;
355 tANI_U16 reasonCode;
356 tANI_U16 deauthTrigger;
357 tANI_U16 aid;
358} tLimMlmDeauthInd, *tpLimMlmDeauthInd;
359
360typedef struct sLimMlmDisassocReq
361{
362 tSirMacAddr peerMacAddr;
363 tANI_U16 reasonCode;
364 tANI_U16 disassocTrigger;
365 tANI_U16 aid;
366 tANI_U8 sessionId;
367} tLimMlmDisassocReq, *tpLimMlmDisassocReq;
368
369typedef struct sLimMlmDisassocCnf
370{
371 tSirMacAddr peerMacAddr;
372 tSirResultCodes resultCode;
373 tANI_U16 disassocTrigger;
374 tANI_U16 aid;
375 tANI_U8 sessionId;
376} tLimMlmDisassocCnf, *tpLimMlmDisassocCnf;
377
378typedef struct sLimMlmDisassocInd
379{
380 tSirMacAddr peerMacAddr;
381 tANI_U16 reasonCode;
382 tANI_U16 disassocTrigger;
383 tANI_U16 aid;
384 tANI_U8 sessionId;
385} tLimMlmDisassocInd, *tpLimMlmDisassocInd;
386
387typedef struct sLimMlmPurgeStaReq
388{
389 tSirMacAddr peerMacAddr;
390 tANI_U16 aid;
391 tANI_U8 sessionId;//Added For BT-AMP Support
392} tLimMlmPurgeStaReq, *tpLimMlmPurgeStaReq;
393
394typedef struct sLimMlmPurgeStaInd
395{
396 tSirMacAddr peerMacAddr;
397 tANI_U16 reasonCode;
398 tANI_U16 purgeTrigger;
399 tANI_U16 aid;
400 tANI_U8 sessionId;
401} tLimMlmPurgeStaInd, *tpLimMlmPurgeStaInd;
402
403typedef struct sLimMlmSetKeysReq
404{
405 tSirMacAddr peerMacAddr;
406 tANI_U8 sessionId; //Added For BT-AMP Support
407 tANI_U16 aid;
408 tAniEdType edType; // Encryption/Decryption type
409 tANI_U8 numKeys;
410 tSirKeys key[SIR_MAC_MAX_NUM_OF_DEFAULT_KEYS];
411} tLimMlmSetKeysReq, *tpLimMlmSetKeysReq;
412
413typedef struct sLimMlmSetKeysCnf
414{
415 tSirMacAddr peerMacAddr;
416 tANI_U16 resultCode;
417 tANI_U16 aid;
418 tANI_U8 sessionId;
419} tLimMlmSetKeysCnf, *tpLimMlmSetKeysCnf;
420
421typedef struct sLimMlmRemoveKeyReq
422{
423 tSirMacAddr peerMacAddr;
424 tANI_U8 sessionId; //Added FOr BT-AMP Support
425 tAniEdType edType; // Encryption/Decryption type
426 tANI_U8 wepType; //STATIC / DYNAMIC specifier
427 tANI_U8 keyId; //Key Id To be removed.
428 tANI_BOOLEAN unicast;
429} tLimMlmRemoveKeyReq, *tpLimMlmRemoveKeyReq;
430
431typedef struct sLimMlmRemoveKeyCnf
432{
433 tSirMacAddr peerMacAddr;
434 tANI_U16 resultCode;
435 tANI_U8 sessionId;
436} tLimMlmRemoveKeyCnf, *tpLimMlmRemoveKeyCnf;
437
438
439typedef struct sLimMlmResetReq
440{
441 tSirMacAddr macAddr;
442 tANI_U8 performCleanup;
443 tANI_U8 sessionId;
444} tLimMlmResetReq, *tpLimMlmResetReq;
445
446typedef struct sLimMlmResetCnf
447{
448 tSirMacAddr macAddr;
449 tSirResultCodes resultCode;
450 tANI_U8 sessionId;
451} tLimMlmResetCnf, *tpLimMlmResetCnf;
452
453
454typedef struct sLimMlmLinkTestStopReq
455{
456 tSirMacAddr peerMacAddr;
457 tANI_U8 sessionId;
Jeff Johnson295189b2012-06-20 16:38:30 -0700458} tLimMlmLinkTestStopReq, *tpLimMlmLinkTestStopReq;
459
460
461//
462// Block ACK related MLME data structures
463//
464
465typedef struct sLimMlmAddBAReq
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 policy
478 // 0 - Delayed BA (Not supported)
479 // 1 - Immediate BA
480 tANI_U8 baPolicy;
481
482 // BA buffer size - (0..127) max size MSDU's
483 tANI_U16 baBufferSize;
484
485 // BA timeout in TU's
486 // 0 means no timeout will occur
487 tANI_U16 baTimeout;
488
489 // ADDBA failure timeout in TU's
490 // Greater than or equal to 1
491 tANI_U16 addBAFailureTimeout;
492
493 // BA Starting Sequence Number
494 tANI_U16 baSSN;
495
496 tANI_U8 sessionId;
497
498} tLimMlmAddBAReq, *tpLimMlmAddBAReq;
499
500typedef struct sLimMlmAddBACnf
501{
502
503 // ADDBA recipient
504 tSirMacAddr peerMacAddr;
505
506 // ADDBA Action Frame dialog token
507 tANI_U8 baDialogToken;
508
509 // ADDBA requested for TID
510 tANI_U8 baTID;
511
512 // BA status code
513 tSirMacStatusCodes addBAResultCode;
514
515 // BA policy
516 // 0 - Delayed BA (Not supported)
517 // 1 - Immediate BA
518 tANI_U8 baPolicy;
519
520 // BA buffer size - (0..127) max size MSDU's
521 tANI_U16 baBufferSize;
522
523 // BA timeout in TU's
524 // 0 means no timeout will occur
525 tANI_U16 baTimeout;
526
527 // ADDBA direction
528 // 1 - Originator
529 // 0 - Recipient
530 tANI_U8 baDirection;
531 tANI_U8 sessionId;
532
533
534} tLimMlmAddBACnf, *tpLimMlmAddBACnf;
535
536typedef struct sLimMlmAddBAInd
537{
538
539 // ADDBA recipient
540 tSirMacAddr peerMacAddr;
541
542 // ADDBA Action Frame dialog token
543 tANI_U8 baDialogToken;
544
545 // ADDBA requested for TID
546 tANI_U8 baTID;
547
548 // BA policy
549 // 0 - Delayed BA (Not supported)
550 // 1 - Immediate BA
551 tANI_U8 baPolicy;
552
553 // BA buffer size - (0..127) max size MSDU's
554 tANI_U16 baBufferSize;
555
556 // BA timeout in TU's
557 // 0 means no timeout will occur
558 tANI_U16 baTimeout;
559
560} tLimMlmAddBAInd, *tpLimMlmAddBAInd;
561
562typedef struct sLimMlmAddBARsp
563{
564
565 // ADDBA recipient
566 tSirMacAddr peerMacAddr;
567
568 // ADDBA Action Frame dialog token
569 tANI_U8 baDialogToken;
570
571 // ADDBA requested for TID
572 tANI_U8 baTID;
573
574 // BA status code
575 tSirMacStatusCodes addBAResultCode;
576
577 // BA policy
578 // 0 - Delayed BA (Not supported)
579 // 1 - Immediate BA
580 tANI_U8 baPolicy;
581
582 // BA buffer size - (0..127) max size MSDU's
583 tANI_U16 baBufferSize;
584
585 // BA timeout in TU's
586 // 0 means no timeout will occur
587 tANI_U16 baTimeout;
588
589 //reserved for alignment
590 tANI_U8 rsvd[2];
591
592 /* PE session id*/
593 tANI_U8 sessionId;
594
595 } tLimMlmAddBARsp, *tpLimMlmAddBARsp;
596
597//
598// NOTE - Overloading DELBA IND and DELBA CNF
599// to use the same data structure as DELBA REQ
600// as the parameters do not vary too much.
601//
602typedef struct sLimMlmDelBAReq
603{
604
605 // ADDBA recipient
606 tSirMacAddr peerMacAddr;
607
608 // DELBA direction
609 // 1 - Originator
610 // 0 - Recipient
611 tANI_U8 baDirection;
612
613 // DELBA requested for TID
614 tANI_U8 baTID;
615
616 // DELBA reason code
617 tSirMacReasonCodes delBAReasonCode;
618
619 tANI_U8 sessionId;
620
621} tLimMlmDelBAReq, *tpLimMlmDelBAReq, tLimMlmDelBAInd, *tpLimMlmDelBAInd, tLimMlmDelBACnf, *tpLimMlmDelBACnf;
622
623// Function templates
624
625tANI_BOOLEAN limProcessSmeReqMessages(tpAniSirGlobal, tpSirMsgQ);
626void limProcessMlmReqMessages(tpAniSirGlobal, tpSirMsgQ);
627void limProcessMlmRspMessages(tpAniSirGlobal, tANI_U32, tANI_U32 *);
628void limProcessLmmMessages(tpAniSirGlobal, tANI_U32, tANI_U32 *);
629void limProcessSmeDelBssRsp( tpAniSirGlobal , tANI_U32,tpPESession);
630
631void limGetRandomBssid(tpAniSirGlobal pMac ,tANI_U8 *data);
632
Jeff Johnson295189b2012-06-20 16:38:30 -0700633// Function to handle HT and HT IE CFG parameter intializations
Jeff Johnsone7245742012-09-05 17:12:55 -0700634void handleHTCapabilityandHTInfo(struct sAniSirGlobal *pMac, tpPESession psessionEntry);
Jeff Johnson295189b2012-06-20 16:38:30 -0700635
636// Function to handle CFG parameter updates
637void limHandleCFGparamUpdate(tpAniSirGlobal, tANI_U32);
638
639// Function to apply CFG parameters before join/reassoc/start BSS
640void limApplyConfiguration(tpAniSirGlobal,tpPESession);
641
Jeff Johnson295189b2012-06-20 16:38:30 -0700642void limSetCfgProtection(tpAniSirGlobal pMac, tpPESession pesessionEntry);
Jeff Johnson295189b2012-06-20 16:38:30 -0700643
644
645// Function to Initialize MLM state machine on STA
646void limInitMlm(tpAniSirGlobal);
647
648// Function to cleanup MLM state machine
649void limCleanupMlm(tpAniSirGlobal);
650
651// Function to cleanup LMM state machine
652void limCleanupLmm(tpAniSirGlobal);
653
Jeff Johnson295189b2012-06-20 16:38:30 -0700654// Management frame handling functions
655void limProcessBeaconFrame(tpAniSirGlobal, tANI_U8 *,tpPESession);
656void limProcessBeaconFrameNoSession(tpAniSirGlobal, tANI_U8 *);
657void limProcessProbeReqFrame(tpAniSirGlobal, tANI_U8 *, tpPESession);
658void limProcessProbeRspFrame(tpAniSirGlobal, tANI_U8 *, tpPESession);
659void limProcessProbeRspFrameNoSession(tpAniSirGlobal, tANI_U8 *);
660void limProcessProbeReqFrame_multiple_BSS(tpAniSirGlobal, tANI_U8 *,tpPESession);
661
662
663// Process Auth frame when we have a session in progress.
664void limProcessAuthFrame(tpAniSirGlobal, tANI_U8 *,tpPESession);
665#ifdef WLAN_FEATURE_VOWIFI_11R
Srikant Kuppaa3ed0a32013-02-20 07:24:43 -0800666tSirRetStatus limProcessAuthFrameNoSession(tpAniSirGlobal pMac, tANI_U8 *, void *body);
Jeff Johnson295189b2012-06-20 16:38:30 -0700667#endif
668
669void limProcessAssocReqFrame(tpAniSirGlobal, tANI_U8 *, tANI_U8, tpPESession);
670void limSendMlmAssocInd(tpAniSirGlobal pMac, tpDphHashNode pStaDs, tpPESession psessionEntry);
671
672
673void limProcessAssocRspFrame(tpAniSirGlobal, tANI_U8 *, tANI_U8,tpPESession);
674void limProcessDisassocFrame(tpAniSirGlobal, tANI_U8 *,tpPESession);
675void limProcessDeauthFrame(tpAniSirGlobal, tANI_U8 *,tpPESession);
676void limProcessActionFrame(tpAniSirGlobal, tANI_U8 *,tpPESession);
Jeff Johnson295189b2012-06-20 16:38:30 -0700677void limProcessActionFrameNoSession(tpAniSirGlobal pMac, tANI_U8 *pRxMetaInfo);
Jeff Johnson295189b2012-06-20 16:38:30 -0700678
679
680tSirRetStatus limPopulateMacHeader(tpAniSirGlobal, tANI_U8*, tANI_U8, tANI_U8, tSirMacAddr,tSirMacAddr);
681tSirRetStatus limSendProbeReqMgmtFrame(tpAniSirGlobal, tSirMacSSid *, tSirMacAddr, tANI_U8, tSirMacAddr, tANI_U32, tANI_U32, tANI_U8 *);
682void limSendProbeRspMgmtFrame(tpAniSirGlobal, tSirMacAddr, tpAniSSID, short, tANI_U8, tpPESession, tANI_U8);
683void limSendAuthMgmtFrame(tpAniSirGlobal, tSirMacAuthFrameBody *, tSirMacAddr, tANI_U8,tpPESession);
684void limSendAssocReqMgmtFrame(tpAniSirGlobal, tLimMlmAssocReq *,tpPESession);
685void limSendReassocReqMgmtFrame(tpAniSirGlobal, tLimMlmReassocReq *,tpPESession);
686#ifdef WLAN_FEATURE_VOWIFI_11R
687void limSendReassocReqWithFTIEsMgmtFrame(tpAniSirGlobal pMac,
688 tLimMlmReassocReq *pMlmReassocReq,tpPESession psessionEntry);
689#endif
690void limSendDeltsReqActionFrame(tpAniSirGlobal pMac, tSirMacAddr peer,
691 tANI_U8 wmmTspecPresent, tSirMacTSInfo *pTsinfo,
692 tSirMacTspecIE *pTspecIe, tpPESession psessionEntry);
693void limSendAddtsReqActionFrame(tpAniSirGlobal pMac, tSirMacAddr peerMacAddr,
694 tSirAddtsReqInfo *addts,tpPESession);
695void limSendAddtsRspActionFrame(tpAniSirGlobal pMac, tSirMacAddr peerMacAddr,
696 tANI_U16 statusCode, tSirAddtsReqInfo *addts, tSirMacScheduleIE *pSchedule,tpPESession);
697
Jeff Johnson295189b2012-06-20 16:38:30 -0700698void limSendAssocRspMgmtFrame(tpAniSirGlobal, tANI_U16, tANI_U16, tSirMacAddr, tANI_U8, tpDphHashNode pSta,tpPESession);
699
700void limSendNullDataFrame(tpAniSirGlobal, tpDphHashNode);
Madan Mohan Koyyalamudi521ff192012-11-15 17:13:08 -0800701void limSendDisassocMgmtFrame(tpAniSirGlobal, tANI_U16, tSirMacAddr, tpPESession, tANI_BOOLEAN waitForAck);
702void limSendDeauthMgmtFrame(tpAniSirGlobal, tANI_U16, tSirMacAddr, tpPESession, tANI_BOOLEAN waitForAck);
Jeff Johnson295189b2012-06-20 16:38:30 -0700703
704void limContinueChannelScan(tpAniSirGlobal);
705tSirResultCodes limMlmAddBss(tpAniSirGlobal, tLimMlmStartReq *,tpPESession psessionEntry);
706
Jeff Johnsone7245742012-09-05 17:12:55 -0700707tSirRetStatus limSendChannelSwitchMgmtFrame(tpAniSirGlobal, tSirMacAddr, tANI_U8, tANI_U8, tANI_U8, tpPESession);
Jeff Johnson295189b2012-06-20 16:38:30 -0700708
Mohit Khanna4a70d262012-09-11 16:30:12 -0700709#ifdef WLAN_FEATURE_11AC
710tSirRetStatus limSendVHTOpmodeNotificationFrame(tpAniSirGlobal pMac,tSirMacAddr peer,tANI_U8 nMode, tpPESession psessionEntry );
Madan Mohan Koyyalamudic6226de2012-09-18 16:33:31 -0700711tSirRetStatus limSendVHTChannelSwitchMgmtFrame(tpAniSirGlobal pMac,tSirMacAddr peer,tANI_U8 nChanWidth, tANI_U8 nNewChannel, tANI_U8 ncbMode, tpPESession psessionEntry );
Mohit Khanna4a70d262012-09-11 16:30:12 -0700712#endif
713
Jeff Johnson295189b2012-06-20 16:38:30 -0700714#if defined WLAN_FEATURE_VOWIFI
715tSirRetStatus limSendNeighborReportRequestFrame(tpAniSirGlobal, tpSirMacNeighborReportReq, tSirMacAddr, tpPESession);
716tSirRetStatus limSendLinkReportActionFrame(tpAniSirGlobal, tpSirMacLinkReport, tSirMacAddr, tpPESession );
717tSirRetStatus limSendRadioMeasureReportActionFrame(tpAniSirGlobal, tANI_U8, tANI_U8, tpSirMacRadioMeasureReport, tSirMacAddr, tpPESession);
718#endif
719
720#ifdef FEATURE_WLAN_CCX
721void limProcessIappFrame(tpAniSirGlobal, tANI_U8 *,tpPESession);
722#endif
723
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800724#ifdef FEATURE_WLAN_TDLS_INTERNAL
725tSirRetStatus limSendTdlsDisReqFrame(tpAniSirGlobal pMac,
726 tSirMacAddr peer_mac, tANI_U8 dialog, tpPESession psessionEntry);
727tSirRetStatus limSendTdlsLinkSetupReqFrame(tpAniSirGlobal pMac,
728 tSirMacAddr peerMac, tANI_U8 dialog, tpPESession psessionEntry,
729 tANI_U8* addIe, tANI_U16 len);
730
731eHalStatus limTdlsPrepareSetupReqFrame(tpAniSirGlobal pMac,
732 tLimTdlsLinkSetupInfo *linkSetupInfo,
733 tANI_U8 dialog, tSirMacAddr peerMac,
734 tpPESession psessionEntry);
735#endif
736#ifdef FEATURE_WLAN_TDLS
Gopichand Nakkala777e6032012-12-31 16:39:21 -0800737void limInitTdlsData(tpAniSirGlobal, tpPESession);
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800738tSirRetStatus limProcessSmeTdlsMgmtSendReq(tpAniSirGlobal pMac,
739 tANI_U32 *pMsgBuf);
740tSirRetStatus limProcessSmeTdlsAddStaReq(tpAniSirGlobal pMac,
741 tANI_U32 *pMsgBuf);
742tSirRetStatus limProcessSmeTdlsDelStaReq(tpAniSirGlobal pMac,
743 tANI_U32 *pMsgBuf);
Gopichand Nakkala2a0a1572013-02-10 21:39:16 -0800744void limSendSmeTDLSDeleteAllPeerInd(tpAniSirGlobal pMac, tpPESession psessionEntry);
Gopichand Nakkalab977a972013-02-18 19:15:09 -0800745void limSendSmeMgmtTXCompletion(tpAniSirGlobal pMac,
746 tpPESession psessionEntry,
747 tANI_U32 txCompleteStatus);
Gopichand Nakkala2a0a1572013-02-10 21:39:16 -0800748tSirRetStatus limDeleteTDLSPeers(tpAniSirGlobal pMac, tpPESession psessionEntry);
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800749eHalStatus limProcessTdlsAddStaRsp(tpAniSirGlobal pMac, void *msg, tpPESession);
750tSirRetStatus limSendTdlsTeardownFrame(tpAniSirGlobal pMac,
Hoonki Leea34dd892013-02-05 22:56:02 -0800751 tSirMacAddr peerMac, tANI_U16 reason, tANI_U8 responder, tpPESession psessionEntry,
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800752 tANI_U8 *addIe, tANI_U16 addIeLen);
753#endif
754
Jeff Johnson295189b2012-06-20 16:38:30 -0700755// Algorithms & Link Monitoring related functions
756tSirBackgroundScanMode limSelectsBackgroundScanMode(tpAniSirGlobal);
757void limTriggerBackgroundScan(tpAniSirGlobal);
758void limAbortBackgroundScan(tpAniSirGlobal);
759
760/// Function that handles heartbeat failure
761void limHandleHeartBeatFailure(tpAniSirGlobal,tpPESession);
762
763/// Function that triggers link tear down with AP upon HB failure
764void limTearDownLinkWithAp(tpAniSirGlobal,tANI_U8, tSirMacReasonCodes);
765
Jeff Johnson295189b2012-06-20 16:38:30 -0700766
767/// Function that sends keep alive message to peer(s)
768void limSendKeepAliveToPeer(tpAniSirGlobal);
769
770/// Function that processes Max retries interrupt from TFP
771void limHandleMaxRetriesInterrupt(tANI_U32);
772
773/// Function that processes messages deferred during Learn mode
774void limProcessDeferredMessageQueue(tpAniSirGlobal);
775
776/// Function that defers the messages received
777tANI_U32 limDeferMsg(tpAniSirGlobal, tSirMsgQ *);
778
779/// Function that sets system into scan mode
780void limSetScanMode(tpAniSirGlobal pMac);
781
782/// Function that Switches the Channel and sets the CB Mode
Jeff Johnsone7245742012-09-05 17:12:55 -0700783void limSetChannel(tpAniSirGlobal pMac, tANI_U8 channel, tANI_U8 secChannelOffset, tPowerdBm maxTxPower, tANI_U8 peSessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -0700784
785/// Function that completes channel scan
786void limCompleteMlmScan(tpAniSirGlobal, tSirResultCodes);
787
Jeff Johnsone7245742012-09-05 17:12:55 -0700788#ifdef FEATURE_OEM_DATA_SUPPORT
789/// Funtion that sets system into meas mode for oem data req
790void limSetOemDataReqMode(tpAniSirGlobal pMac, eHalStatus status, tANI_U32* data);
791#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700792
793#ifdef ANI_SUPPORT_11H
794/// Function that sends Measurement Report action frame
795tSirRetStatus limSendMeasReportFrame(tpAniSirGlobal, tpSirMacMeasReqActionFrame, tSirMacAddr);
796
797/// Function that sends TPC Report action frame
798tSirRetStatus limSendTpcReportFrame(tpAniSirGlobal, tpSirMacTpcReqActionFrame, tSirMacAddr);
799#endif
800
801/// Function that sends TPC Request action frame
802void limSendTpcRequestFrame(tpAniSirGlobal, tSirMacAddr);
803
804// Function(s) to handle responses received from HAL
805void limProcessMlmAddBssRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ );
806void limProcessMlmAddStaRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQt,tpPESession psessionEntry);
807void limProcessMlmDelStaRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ );
808void limProcessMlmDelBssRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ,tpPESession);
Jeff Johnson295189b2012-06-20 16:38:30 -0700809void limProcessStaMlmAddStaRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ ,tpPESession psessionEntry);
810void limProcessStaMlmDelStaRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ,tpPESession psessionEntry);
811void limProcessStaMlmDelBssRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ ,tpPESession psessionEntry);
812void limProcessMlmSetStaKeyRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ );
813void limProcessMlmSetBssKeyRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ );
814
815
816
817#ifdef GEN4_SCAN
818// Function to process WDA_INIT_SCAN_RSP message
819void limProcessInitScanRsp(tpAniSirGlobal, void * );
820
821// Function to process WDA_START_SCAN_RSP message
822void limProcessStartScanRsp(tpAniSirGlobal, void * );
823
824// Function to process WDA_END_SCAN_RSP message
825void limProcessEndScanRsp(tpAniSirGlobal, void * );
826
827// Function to process WDA_FINISH_SCAN_RSP message
828void limProcessFinishScanRsp(tpAniSirGlobal, void * );
829
830// Function to process WDA_SWITCH_CHANNEL_RSP message
831void limProcessSwitchChannelRsp(tpAniSirGlobal pMac, void * );
832
833void limSendHalInitScanReq( tpAniSirGlobal, tLimLimHalScanState, tSirLinkTrafficCheck);
834void limSendHalStartScanReq( tpAniSirGlobal, tANI_U8, tLimLimHalScanState);
835void limSendHalEndScanReq( tpAniSirGlobal, tANI_U8, tLimLimHalScanState);
836void limSendHalFinishScanReq( tpAniSirGlobal, tLimLimHalScanState);
837
838void limContinuePostChannelScan(tpAniSirGlobal pMac);
839void limContinueChannelLearn( tpAniSirGlobal );
840//WLAN_SUSPEND_LINK Related
841tANI_U8 limIsLinkSuspended(tpAniSirGlobal pMac);
842void limSuspendLink(tpAniSirGlobal, tSirLinkTrafficCheck, SUSPEND_RESUME_LINK_CALLBACK, tANI_U32*);
843void limResumeLink(tpAniSirGlobal, SUSPEND_RESUME_LINK_CALLBACK, tANI_U32*);
844//end WLAN_SUSPEND_LINK Related
845#endif // GEN4_SCAN
846
847tSirRetStatus limSendAddBAReq( tpAniSirGlobal pMac,
848 tpLimMlmAddBAReq pMlmAddBAReq,tpPESession);
849
850tSirRetStatus limSendAddBARsp( tpAniSirGlobal pMac,
851 tpLimMlmAddBARsp pMlmAddBARsp,tpPESession);
852
853tSirRetStatus limSendDelBAInd( tpAniSirGlobal pMac,
854 tpLimMlmDelBAReq pMlmDelBAReq ,tpPESession psessionEntry);
855#if 0
856tSirRetStatus limSendSMPowerStateFrame( tpAniSirGlobal pMac,
857 tSirMacAddr peer, tSirMacHTMIMOPowerSaveState State );
858#endif
859
860void limProcessMlmHalAddBARsp( tpAniSirGlobal pMac,
861 tpSirMsgQ limMsgQ );
862
863void limProcessMlmHalBADeleteInd( tpAniSirGlobal pMac,
864 tpSirMsgQ limMsgQ );
865
866void limProcessMlmRemoveKeyRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ );
867
868void limProcessLearnIntervalTimeout(tpAniSirGlobal pMac);
869#ifdef WLAN_FEATURE_11W
870//11w SA query request action frame handler
871tSirRetStatus limSendSaQueryResponseFrame( tpAniSirGlobal pMac,
872 tANI_U16 transId, tSirMacAddr peer,tpPESession psessionEntry);
873#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 {
906 limLog(pMac, LOGE,FL("Buffer is Pointing to NULL\n"));
907 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)
914 limProcessSmeReqMessages(pMac, &msg);
915 else
916 limProcessMlmRspMessages(pMac, msgType, pMsgBuf);
917} /*** end limPostSmeMessage() ***/
918
919/**
920 * limPostMlmMessage()
921 *
922 *FUNCTION:
923 * This function is called by limProcessSmeMessages(). In this
924 * function SME invokes MLME primitives.
925 *
926 *PARAMS:
927 *
928 *LOGIC:
929 * Initially SME makes an MLM function call to invoke MLM primitive.
930 * In future this can be enhanced to 'post' messages to MLM.
931 *
932 *ASSUMPTIONS:
933 * NA
934 *
935 *NOTE:
936 * NA
937 *
938 * @param pMac Pointer to Global MAC structure
939 * @param msgType Indicates the MLM primitive message type
940 * @param *pMsgBuf A pointer to the MLM message buffer
941 *
942 * @return None
943 */
944static inline void
945limPostMlmMessage(tpAniSirGlobal pMac, tANI_U32 msgType, tANI_U32 *pMsgBuf)
946{
947
948 tSirMsgQ msg;
949 if(pMsgBuf == NULL)
950 {
951 limLog(pMac, LOGE,FL("Buffer is Pointing to NULL\n"));
952 return;
953 }
954 msg.type = (tANI_U16) msgType;
955 msg.bodyptr = pMsgBuf;
956 msg.bodyval = 0;
957 limProcessMlmReqMessages(pMac, &msg);
958} /*** end limPostMlmMessage() ***/
959
960
961
962/**
963 * limGetCurrentScanChannel()
964 *
965 *FUNCTION:
966 * This function is called in various places to get current channel
967 * number being scanned.
968 *
969 *PARAMS:
970 *
971 *LOGIC:
972 *
973 *ASSUMPTIONS:
974 * NA
975 *
976 *NOTE:
977 * NA
978 *
979 * @param pMac Pointer to Global MAC structure
980 * @return Channel number
981 */
982static inline tANI_U8
983limGetCurrentScanChannel(tpAniSirGlobal pMac)
984{
985 tANI_U8 *pChanNum = pMac->lim.gpLimMlmScanReq->channelList.channelNumber;
986
987 return (*(pChanNum + pMac->lim.gLimCurrentScanChannelId));
988} /*** end limGetCurrentScanChannel() ***/
989
990
991
992/**
993 * limGetIElenFromBssDescription()
994 *
995 *FUNCTION:
996 * This function is called in various places to get IE length
997 * from tSirBssDescription structure
998 * number being scanned.
999 *
1000 *PARAMS:
1001 *
1002 *LOGIC:
1003 *
1004 *ASSUMPTIONS:
1005 * NA
1006 *
1007 *NOTE:
1008 * NA
1009 *
1010 * @param pBssDescr
1011 * @return Total IE length
1012 */
1013
1014static inline tANI_U16
1015limGetIElenFromBssDescription(tpSirBssDescription pBssDescr)
1016{
1017 if (!pBssDescr)
1018 return 0;
1019
1020 return ((tANI_U16) (pBssDescr->length + sizeof(tANI_U16) +
1021 sizeof(tANI_U32) - sizeof(tSirBssDescription)));
1022} /*** end limGetIElenFromBssDescription() ***/
1023
Jeff Johnson295189b2012-06-20 16:38:30 -07001024/**
1025 * limSendBeaconInd()
1026 *
1027 *FUNCTION:
1028 * This function is called to send the beacon indication
1029 * number being scanned.
1030 *
1031 *PARAMS:
1032 *
1033 *LOGIC:
1034 *
1035 *ASSUMPTIONS:
1036*/
1037
1038void
1039limSendBeaconInd(tpAniSirGlobal pMac, tpPESession psessionEntry);
Jeff Johnson295189b2012-06-20 16:38:30 -07001040
Jeff Johnson295189b2012-06-20 16:38:30 -07001041
1042void limGetWPSPBCSessions(tpAniSirGlobal pMac, tANI_U8 *addr, tANI_U8 *uuid_e, eWPSPBCOverlap *overlap, tpPESession psessionEntry);
1043void limWPSPBCTimeout(tpAniSirGlobal pMac, tpPESession psessionEntry);
1044void limWPSPBCClose(tpAniSirGlobal pMac, tpPESession psessionEntry);
1045void limRemovePBCSessions(tpAniSirGlobal pMac, tSirMacAddr pRemoveMac,tpPESession psessionEntry);
1046
1047
1048tSirRetStatus
1049limIsSmeGetWPSPBCSessionsReqValid(tpAniSirGlobal pMac, tSirSmeGetWPSPBCSessionsReq *pGetWPSPBCSessionsReq, tANI_U8 *pBuf);
1050
1051#define LIM_WPS_OVERLAP_TIMER_MS 10000
Jeff Johnson295189b2012-06-20 16:38:30 -07001052
1053void
1054limSuspendLink(tpAniSirGlobal pMac, tSirLinkTrafficCheck trafficCheck, SUSPEND_RESUME_LINK_CALLBACK callback, tANI_U32 *data);
1055void
1056limResumeLink(tpAniSirGlobal pMac, SUSPEND_RESUME_LINK_CALLBACK callback, tANI_U32 *data);
1057
1058void
1059limChangeChannelWithCallback(tpAniSirGlobal pMac, tANI_U8 newChannel,
1060 CHANGE_CHANNEL_CALLBACK callback, tANI_U32 *cbdata, tpPESession psessionEntry);
1061
Jeff Johnson295189b2012-06-20 16:38:30 -07001062void limSendSmeMgmtFrameInd(
1063 tpAniSirGlobal pMac, tANI_U8 frameType,
1064 tANI_U8 *frame, tANI_U32 frameLen, tANI_U16 sessionId,
Chilam NG571c65a2013-01-19 12:27:36 +05301065 tANI_U32 rxChan, tpPESession psessionEntry,
1066 tANI_S8 rxRssi);
Jeff Johnson295189b2012-06-20 16:38:30 -07001067void limProcessRemainOnChnTimeout(tpAniSirGlobal pMac);
Gopichand Nakkala4261ea52012-12-31 16:43:00 -08001068void limProcessInsertSingleShotNOATimeout(tpAniSirGlobal pMac);
Jeff Johnson295189b2012-06-20 16:38:30 -07001069void limSendP2PActionFrame(tpAniSirGlobal pMac, tpSirMsgQ pMsg);
1070void limAbortRemainOnChan(tpAniSirGlobal pMac);
1071tSirRetStatus __limProcessSmeNoAUpdate(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf);
Viral Modid440e682013-03-06 02:25:31 -08001072void limProcessRegdDefdSmeReqAfterNOAStart(tpAniSirGlobal pMac);
Mohit Khanna698ba2a2012-12-04 15:08:18 -08001073#ifdef FEATURE_WLAN_TDLS_INTERNAL
1074void limProcessTdlsFrame(tpAniSirGlobal, tANI_U32 *);
Mohit Khanna698ba2a2012-12-04 15:08:18 -08001075void limProcessTdlsPublicActionFrame(tpAniSirGlobal pMac, tANI_U32 *pBd,
1076 tpPESession) ;
1077#ifdef FEATURE_WLAN_TDLS_NEGATIVE
1078#define LIM_TDLS_NEGATIVE_WRONG_BSSID_IN_DSCV_REQ 0x1 /* 5.1.4-5 */
1079#define LIM_TDLS_NEGATIVE_WRONG_BSSID_IN_SETUP_REQ 0x2 /* 5.2.4-16 */
1080#define LIM_TDLS_NEGATIVE_STATUS_37_IN_SETUP_CNF 0x4 /* 5.2.4-10 */
1081#define LIM_TDLS_NEGATIVE_SEND_REQ_TO_SETUP_REQ 0x8 /* 5.2.4-20/32 */
1082#define LIM_TDLS_NEGATIVE_RSP_TIMEOUT_TO_SETUP_REQ 0x10 /* 5.2.3.4 */
1083#define LIM_TDLS_NEGATIVE_TREAT_TDLS_PROHIBIT_AP 0x20 /* 5.2.4-49 */
1084 /* following is not paticularily tested in WFA test plan, but will help to validate our TDLS behavior in-house */
1085#define LIM_TDLS_NEGATIVE_WRONG_BSSID_IN_DSCV_RSP 0x40
1086#define LIM_TDLS_NEGATIVE_WRONG_BSSID_IN_SETUP_RSP 0x80
1087
1088void limTdlsSetNegativeBehavior(tpAniSirGlobal pMac, tANI_U8 value, tANI_BOOLEAN on);
1089#endif
1090#endif
1091
Madan Mohan Koyyalamudi521ff192012-11-15 17:13:08 -08001092void limProcessDisassocAckTimeout(tpAniSirGlobal pMac);
1093void limProcessDeauthAckTimeout(tpAniSirGlobal pMac);
1094eHalStatus limSendDisassocCnf(tpAniSirGlobal pMac);
1095eHalStatus limSendDeauthCnf(tpAniSirGlobal pMac);
Dhanashri Atre4a6e3ea2012-12-12 14:10:33 -08001096
1097#ifdef WLAN_FEATURE_VOWIFI_11R
1098typedef struct sSetLinkCbackParams
1099{
1100 void * cbackDataPtr;
1101} tSetLinkCbackParams;
1102#endif
Jeff Johnson295189b2012-06-20 16:38:30 -07001103#endif /* __LIM_TYPES_H */
1104