blob: fc9c41ff900f6f6adf31f0a6b51fc3eeda7ab336 [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
Kiet Lamb1233192013-11-28 13:38:20 +0530138#define IS_CURRENT_BSSID(pMac, addr,psessionEntry) (vos_mem_compare( addr, \
139 psessionEntry->bssId, \
140 sizeof(psessionEntry->bssId)))
Jeff Johnson295189b2012-06-20 16:38:30 -0700141/// Verifies whether given addr matches the REASSOC Bssid
Kiet Lamb1233192013-11-28 13:38:20 +0530142#define IS_REASSOC_BSSID(pMac, addr,psessionEntry) (vos_mem_compare( addr, \
143 psessionEntry->limReAssocbssId, \
144 sizeof(psessionEntry->limReAssocbssId)))
Jeff Johnson295189b2012-06-20 16:38:30 -0700145
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
Srinivas Girigowda5cecb202013-10-08 09:13:25 -0700720#if defined(FEATURE_WLAN_CCX) && !defined(FEATURE_WLAN_CCX_UPLOAD)
Jeff Johnson295189b2012-06-20 16:38:30 -0700721void 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);
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +0530742tSirRetStatus limProcesSmeTdlsLinkEstablishReq(tpAniSirGlobal pMac,
743 tANI_U32 *pMsgBuf);
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800744tSirRetStatus limProcessSmeTdlsDelStaReq(tpAniSirGlobal pMac,
745 tANI_U32 *pMsgBuf);
Gopichand Nakkala2a0a1572013-02-10 21:39:16 -0800746void limSendSmeTDLSDeleteAllPeerInd(tpAniSirGlobal pMac, tpPESession psessionEntry);
Gopichand Nakkalab977a972013-02-18 19:15:09 -0800747void limSendSmeMgmtTXCompletion(tpAniSirGlobal pMac,
748 tpPESession psessionEntry,
749 tANI_U32 txCompleteStatus);
Gopichand Nakkala2a0a1572013-02-10 21:39:16 -0800750tSirRetStatus limDeleteTDLSPeers(tpAniSirGlobal pMac, tpPESession psessionEntry);
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800751eHalStatus limProcessTdlsAddStaRsp(tpAniSirGlobal pMac, void *msg, tpPESession);
752tSirRetStatus limSendTdlsTeardownFrame(tpAniSirGlobal pMac,
Hoonki Leea34dd892013-02-05 22:56:02 -0800753 tSirMacAddr peerMac, tANI_U16 reason, tANI_U8 responder, tpPESession psessionEntry,
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800754 tANI_U8 *addIe, tANI_U16 addIeLen);
755#endif
756
Jeff Johnson295189b2012-06-20 16:38:30 -0700757// Algorithms & Link Monitoring related functions
758tSirBackgroundScanMode limSelectsBackgroundScanMode(tpAniSirGlobal);
759void limTriggerBackgroundScan(tpAniSirGlobal);
760void limAbortBackgroundScan(tpAniSirGlobal);
761
762/// Function that handles heartbeat failure
763void limHandleHeartBeatFailure(tpAniSirGlobal,tpPESession);
764
765/// Function that triggers link tear down with AP upon HB failure
766void limTearDownLinkWithAp(tpAniSirGlobal,tANI_U8, tSirMacReasonCodes);
767
Jeff Johnson295189b2012-06-20 16:38:30 -0700768
769/// Function that sends keep alive message to peer(s)
770void limSendKeepAliveToPeer(tpAniSirGlobal);
771
772/// Function that processes Max retries interrupt from TFP
773void limHandleMaxRetriesInterrupt(tANI_U32);
774
775/// Function that processes messages deferred during Learn mode
776void limProcessDeferredMessageQueue(tpAniSirGlobal);
777
778/// Function that defers the messages received
779tANI_U32 limDeferMsg(tpAniSirGlobal, tSirMsgQ *);
780
781/// Function that sets system into scan mode
782void limSetScanMode(tpAniSirGlobal pMac);
783
784/// Function that Switches the Channel and sets the CB Mode
Jeff Johnsone7245742012-09-05 17:12:55 -0700785void limSetChannel(tpAniSirGlobal pMac, tANI_U8 channel, tANI_U8 secChannelOffset, tPowerdBm maxTxPower, tANI_U8 peSessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -0700786
787/// Function that completes channel scan
788void limCompleteMlmScan(tpAniSirGlobal, tSirResultCodes);
789
Jeff Johnsone7245742012-09-05 17:12:55 -0700790#ifdef FEATURE_OEM_DATA_SUPPORT
791/// Funtion that sets system into meas mode for oem data req
792void limSetOemDataReqMode(tpAniSirGlobal pMac, eHalStatus status, tANI_U32* data);
793#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700794
795#ifdef ANI_SUPPORT_11H
796/// Function that sends Measurement Report action frame
797tSirRetStatus limSendMeasReportFrame(tpAniSirGlobal, tpSirMacMeasReqActionFrame, tSirMacAddr);
798
799/// Function that sends TPC Report action frame
800tSirRetStatus limSendTpcReportFrame(tpAniSirGlobal, tpSirMacTpcReqActionFrame, tSirMacAddr);
801#endif
802
803/// Function that sends TPC Request action frame
804void limSendTpcRequestFrame(tpAniSirGlobal, tSirMacAddr);
805
806// Function(s) to handle responses received from HAL
807void limProcessMlmAddBssRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ );
808void limProcessMlmAddStaRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQt,tpPESession psessionEntry);
809void limProcessMlmDelStaRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ );
810void limProcessMlmDelBssRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ,tpPESession);
Jeff Johnson295189b2012-06-20 16:38:30 -0700811void limProcessStaMlmAddStaRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ ,tpPESession psessionEntry);
812void limProcessStaMlmDelStaRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ,tpPESession psessionEntry);
813void limProcessStaMlmDelBssRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ ,tpPESession psessionEntry);
814void limProcessMlmSetStaKeyRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ );
815void limProcessMlmSetBssKeyRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ );
816
817
818
819#ifdef GEN4_SCAN
820// Function to process WDA_INIT_SCAN_RSP message
821void limProcessInitScanRsp(tpAniSirGlobal, void * );
822
823// Function to process WDA_START_SCAN_RSP message
824void limProcessStartScanRsp(tpAniSirGlobal, void * );
825
826// Function to process WDA_END_SCAN_RSP message
827void limProcessEndScanRsp(tpAniSirGlobal, void * );
828
829// Function to process WDA_FINISH_SCAN_RSP message
830void limProcessFinishScanRsp(tpAniSirGlobal, void * );
831
832// Function to process WDA_SWITCH_CHANNEL_RSP message
833void limProcessSwitchChannelRsp(tpAniSirGlobal pMac, void * );
834
835void limSendHalInitScanReq( tpAniSirGlobal, tLimLimHalScanState, tSirLinkTrafficCheck);
836void limSendHalStartScanReq( tpAniSirGlobal, tANI_U8, tLimLimHalScanState);
837void limSendHalEndScanReq( tpAniSirGlobal, tANI_U8, tLimLimHalScanState);
838void limSendHalFinishScanReq( tpAniSirGlobal, tLimLimHalScanState);
839
840void limContinuePostChannelScan(tpAniSirGlobal pMac);
Gopichand Nakkalad492d202013-05-10 02:50:47 +0530841void limCovertChannelScanType(tpAniSirGlobal pMac,tANI_U8 channelNum, tANI_BOOLEAN passiveToActive);
842void limSetDFSChannelList(tpAniSirGlobal pMac,tANI_U8 channelNum, tSirDFSChannelList *dfsChannelList);
Jeff Johnson295189b2012-06-20 16:38:30 -0700843void limContinueChannelLearn( tpAniSirGlobal );
844//WLAN_SUSPEND_LINK Related
845tANI_U8 limIsLinkSuspended(tpAniSirGlobal pMac);
846void limSuspendLink(tpAniSirGlobal, tSirLinkTrafficCheck, SUSPEND_RESUME_LINK_CALLBACK, tANI_U32*);
847void limResumeLink(tpAniSirGlobal, SUSPEND_RESUME_LINK_CALLBACK, tANI_U32*);
848//end WLAN_SUSPEND_LINK Related
849#endif // GEN4_SCAN
850
851tSirRetStatus limSendAddBAReq( tpAniSirGlobal pMac,
852 tpLimMlmAddBAReq pMlmAddBAReq,tpPESession);
853
854tSirRetStatus limSendAddBARsp( tpAniSirGlobal pMac,
855 tpLimMlmAddBARsp pMlmAddBARsp,tpPESession);
856
857tSirRetStatus limSendDelBAInd( tpAniSirGlobal pMac,
858 tpLimMlmDelBAReq pMlmDelBAReq ,tpPESession psessionEntry);
859#if 0
860tSirRetStatus limSendSMPowerStateFrame( tpAniSirGlobal pMac,
861 tSirMacAddr peer, tSirMacHTMIMOPowerSaveState State );
862#endif
863
864void limProcessMlmHalAddBARsp( tpAniSirGlobal pMac,
865 tpSirMsgQ limMsgQ );
866
867void limProcessMlmHalBADeleteInd( tpAniSirGlobal pMac,
868 tpSirMsgQ limMsgQ );
869
870void limProcessMlmRemoveKeyRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ );
871
872void limProcessLearnIntervalTimeout(tpAniSirGlobal pMac);
873#ifdef WLAN_FEATURE_11W
874//11w SA query request action frame handler
875tSirRetStatus limSendSaQueryResponseFrame( tpAniSirGlobal pMac,
Chet Lanctot186b5732013-03-18 10:26:30 -0700876 tANI_U8 *transId, tSirMacAddr peer,tpPESession psessionEntry);
Jeff Johnson295189b2012-06-20 16:38:30 -0700877#endif
878// Inline functions
879
880/**
881 * limPostSmeMessage()
882 *
883 *FUNCTION:
884 * This function is called by limProcessMlmMessages(). In this
885 * function MLM sub-module invokes MLM ind/cnf primitives.
886 *
887 *LOGIC:
888 * Initially MLM makes an SME function call to invoke MLM ind/cnf
889 * primitive. In future this can be enhanced to 'post' messages to SME.
890 *
891 *ASSUMPTIONS:
892 * NA
893 *
894 *NOTE:
895 * NA
896 *
897 * @param pMac Pointer to Global MAC structure
898 * @param msgType Indicates the MLM primitive message type
899 * @param *pMsgBuf A pointer to the MLM message buffer
900 *
901 * @return None
902 */
903static inline void
904limPostSmeMessage(tpAniSirGlobal pMac, tANI_U32 msgType, tANI_U32 *pMsgBuf)
905{
906 tSirMsgQ msg;
907
908 if(pMsgBuf == NULL)
909 {
Kiran Kumar Lokere5be73a62013-04-01 18:40:00 -0700910 limLog(pMac, LOGE,FL("Buffer is Pointing to NULL"));
Jeff Johnson295189b2012-06-20 16:38:30 -0700911 return;
912 }
913
914 msg.type = (tANI_U16)msgType;
915 msg.bodyptr = pMsgBuf;
916 msg.bodyval = 0;
917 if (msgType > eWNI_SME_MSG_TYPES_BEGIN)
918 limProcessSmeReqMessages(pMac, &msg);
919 else
920 limProcessMlmRspMessages(pMac, msgType, pMsgBuf);
921} /*** end limPostSmeMessage() ***/
922
923/**
924 * limPostMlmMessage()
925 *
926 *FUNCTION:
927 * This function is called by limProcessSmeMessages(). In this
928 * function SME invokes MLME primitives.
929 *
930 *PARAMS:
931 *
932 *LOGIC:
933 * Initially SME makes an MLM function call to invoke MLM primitive.
934 * In future this can be enhanced to 'post' messages to MLM.
935 *
936 *ASSUMPTIONS:
937 * NA
938 *
939 *NOTE:
940 * NA
941 *
942 * @param pMac Pointer to Global MAC structure
943 * @param msgType Indicates the MLM primitive message type
944 * @param *pMsgBuf A pointer to the MLM message buffer
945 *
946 * @return None
947 */
948static inline void
949limPostMlmMessage(tpAniSirGlobal pMac, tANI_U32 msgType, tANI_U32 *pMsgBuf)
950{
951
952 tSirMsgQ msg;
953 if(pMsgBuf == NULL)
954 {
Kiran Kumar Lokere5be73a62013-04-01 18:40:00 -0700955 limLog(pMac, LOGE,FL("Buffer is Pointing to NULL"));
Jeff Johnson295189b2012-06-20 16:38:30 -0700956 return;
957 }
958 msg.type = (tANI_U16) msgType;
959 msg.bodyptr = pMsgBuf;
960 msg.bodyval = 0;
961 limProcessMlmReqMessages(pMac, &msg);
962} /*** end limPostMlmMessage() ***/
963
964
965
966/**
967 * limGetCurrentScanChannel()
968 *
969 *FUNCTION:
970 * This function is called in various places to get current channel
971 * number being scanned.
972 *
973 *PARAMS:
974 *
975 *LOGIC:
976 *
977 *ASSUMPTIONS:
978 * NA
979 *
980 *NOTE:
981 * NA
982 *
983 * @param pMac Pointer to Global MAC structure
984 * @return Channel number
985 */
986static inline tANI_U8
987limGetCurrentScanChannel(tpAniSirGlobal pMac)
988{
989 tANI_U8 *pChanNum = pMac->lim.gpLimMlmScanReq->channelList.channelNumber;
990
991 return (*(pChanNum + pMac->lim.gLimCurrentScanChannelId));
992} /*** end limGetCurrentScanChannel() ***/
993
994
995
996/**
997 * limGetIElenFromBssDescription()
998 *
999 *FUNCTION:
1000 * This function is called in various places to get IE length
1001 * from tSirBssDescription structure
1002 * number being scanned.
1003 *
1004 *PARAMS:
1005 *
1006 *LOGIC:
1007 *
1008 *ASSUMPTIONS:
1009 * NA
1010 *
1011 *NOTE:
1012 * NA
1013 *
1014 * @param pBssDescr
1015 * @return Total IE length
1016 */
1017
1018static inline tANI_U16
1019limGetIElenFromBssDescription(tpSirBssDescription pBssDescr)
1020{
1021 if (!pBssDescr)
1022 return 0;
1023
1024 return ((tANI_U16) (pBssDescr->length + sizeof(tANI_U16) +
1025 sizeof(tANI_U32) - sizeof(tSirBssDescription)));
1026} /*** end limGetIElenFromBssDescription() ***/
1027
Jeff Johnson295189b2012-06-20 16:38:30 -07001028/**
1029 * limSendBeaconInd()
1030 *
1031 *FUNCTION:
1032 * This function is called to send the beacon indication
1033 * number being scanned.
1034 *
1035 *PARAMS:
1036 *
1037 *LOGIC:
1038 *
1039 *ASSUMPTIONS:
1040*/
1041
1042void
1043limSendBeaconInd(tpAniSirGlobal pMac, tpPESession psessionEntry);
Jeff Johnson295189b2012-06-20 16:38:30 -07001044
Jeff Johnson295189b2012-06-20 16:38:30 -07001045
1046void limGetWPSPBCSessions(tpAniSirGlobal pMac, tANI_U8 *addr, tANI_U8 *uuid_e, eWPSPBCOverlap *overlap, tpPESession psessionEntry);
1047void limWPSPBCTimeout(tpAniSirGlobal pMac, tpPESession psessionEntry);
1048void limWPSPBCClose(tpAniSirGlobal pMac, tpPESession psessionEntry);
1049void limRemovePBCSessions(tpAniSirGlobal pMac, tSirMacAddr pRemoveMac,tpPESession psessionEntry);
1050
1051
1052tSirRetStatus
1053limIsSmeGetWPSPBCSessionsReqValid(tpAniSirGlobal pMac, tSirSmeGetWPSPBCSessionsReq *pGetWPSPBCSessionsReq, tANI_U8 *pBuf);
1054
1055#define LIM_WPS_OVERLAP_TIMER_MS 10000
Jeff Johnson295189b2012-06-20 16:38:30 -07001056
1057void
1058limSuspendLink(tpAniSirGlobal pMac, tSirLinkTrafficCheck trafficCheck, SUSPEND_RESUME_LINK_CALLBACK callback, tANI_U32 *data);
1059void
1060limResumeLink(tpAniSirGlobal pMac, SUSPEND_RESUME_LINK_CALLBACK callback, tANI_U32 *data);
1061
1062void
1063limChangeChannelWithCallback(tpAniSirGlobal pMac, tANI_U8 newChannel,
1064 CHANGE_CHANNEL_CALLBACK callback, tANI_U32 *cbdata, tpPESession psessionEntry);
1065
Jeff Johnson295189b2012-06-20 16:38:30 -07001066void limSendSmeMgmtFrameInd(
1067 tpAniSirGlobal pMac, tANI_U8 frameType,
1068 tANI_U8 *frame, tANI_U32 frameLen, tANI_U16 sessionId,
Chilam NG571c65a2013-01-19 12:27:36 +05301069 tANI_U32 rxChan, tpPESession psessionEntry,
1070 tANI_S8 rxRssi);
Jeff Johnson295189b2012-06-20 16:38:30 -07001071void limProcessRemainOnChnTimeout(tpAniSirGlobal pMac);
Gopichand Nakkala4261ea52012-12-31 16:43:00 -08001072void limProcessInsertSingleShotNOATimeout(tpAniSirGlobal pMac);
Gopichand Nakkalad492d202013-05-10 02:50:47 +05301073void limConvertActiveChannelToPassiveChannel(tpAniSirGlobal pMac);
Jeff Johnson295189b2012-06-20 16:38:30 -07001074void limSendP2PActionFrame(tpAniSirGlobal pMac, tpSirMsgQ pMsg);
1075void limAbortRemainOnChan(tpAniSirGlobal pMac);
1076tSirRetStatus __limProcessSmeNoAUpdate(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf);
Viral Modid440e682013-03-06 02:25:31 -08001077void limProcessRegdDefdSmeReqAfterNOAStart(tpAniSirGlobal pMac);
Mohit Khanna698ba2a2012-12-04 15:08:18 -08001078#ifdef FEATURE_WLAN_TDLS_INTERNAL
1079void limProcessTdlsFrame(tpAniSirGlobal, tANI_U32 *);
Mohit Khanna698ba2a2012-12-04 15:08:18 -08001080void limProcessTdlsPublicActionFrame(tpAniSirGlobal pMac, tANI_U32 *pBd,
1081 tpPESession) ;
1082#ifdef FEATURE_WLAN_TDLS_NEGATIVE
1083#define LIM_TDLS_NEGATIVE_WRONG_BSSID_IN_DSCV_REQ 0x1 /* 5.1.4-5 */
1084#define LIM_TDLS_NEGATIVE_WRONG_BSSID_IN_SETUP_REQ 0x2 /* 5.2.4-16 */
1085#define LIM_TDLS_NEGATIVE_STATUS_37_IN_SETUP_CNF 0x4 /* 5.2.4-10 */
1086#define LIM_TDLS_NEGATIVE_SEND_REQ_TO_SETUP_REQ 0x8 /* 5.2.4-20/32 */
1087#define LIM_TDLS_NEGATIVE_RSP_TIMEOUT_TO_SETUP_REQ 0x10 /* 5.2.3.4 */
1088#define LIM_TDLS_NEGATIVE_TREAT_TDLS_PROHIBIT_AP 0x20 /* 5.2.4-49 */
1089 /* following is not paticularily tested in WFA test plan, but will help to validate our TDLS behavior in-house */
1090#define LIM_TDLS_NEGATIVE_WRONG_BSSID_IN_DSCV_RSP 0x40
1091#define LIM_TDLS_NEGATIVE_WRONG_BSSID_IN_SETUP_RSP 0x80
1092
1093void limTdlsSetNegativeBehavior(tpAniSirGlobal pMac, tANI_U8 value, tANI_BOOLEAN on);
1094#endif
1095#endif
1096
Madan Mohan Koyyalamudi521ff192012-11-15 17:13:08 -08001097void limProcessDisassocAckTimeout(tpAniSirGlobal pMac);
1098void limProcessDeauthAckTimeout(tpAniSirGlobal pMac);
1099eHalStatus limSendDisassocCnf(tpAniSirGlobal pMac);
1100eHalStatus limSendDeauthCnf(tpAniSirGlobal pMac);
Dhanashri Atre4a6e3ea2012-12-12 14:10:33 -08001101
1102#ifdef WLAN_FEATURE_VOWIFI_11R
1103typedef struct sSetLinkCbackParams
1104{
1105 void * cbackDataPtr;
1106} tSetLinkCbackParams;
1107#endif
Gopichand Nakkala2c231c82013-06-11 17:49:16 +05301108
1109void limProcessRxScanEvent(tpAniSirGlobal mac, void *buf);
Sudhir Sattayappa Kohalliabf751c2013-06-30 15:37:18 -07001110
1111int limProcessRemainOnChnlReq(tpAniSirGlobal pMac, tANI_U32 *pMsg);
1112void limRemainOnChnRsp(tpAniSirGlobal pMac, eHalStatus status, tANI_U32 *data);
Jeff Johnson295189b2012-06-20 16:38:30 -07001113#endif /* __LIM_TYPES_H */
1114