blob: a7c9ead8b898286eec1291e57d4d84dbf0c925c5 [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
61#ifdef FEATURE_WLAN_NON_INTEGRATED_SOC
62#include "halCommonApi.h"
63#endif
64#ifdef FEATURE_WLAN_INTEGRATED_SOC
65#include "wlan_qct_wdi_ds.h"
66#endif
67
68#include "limApi.h"
69#include "limDebug.h"
70#include "limSendSmeRspMessages.h"
71#include "sysGlobal.h"
72#include "dphGlobal.h"
73#include "parserApi.h"
74
75#define LINK_TEST_DEFER 1
76
77#define TRACE_EVENT_CNF_TIMER_DEACT 0x6600
78#define TRACE_EVENT_CNF_TIMER_ACT 0x6601
79#define TRACE_EVENT_AUTH_RSP_TIMER_DEACT 0x6602
80#define TRACE_EVENT_AUTH_RSP_TIMER_ACT 0x6603
81
82// MLM message types
83#define LIM_MLM_MSG_START 1000
84#define LIM_MLM_SCAN_REQ LIM_MLM_MSG_START
Madan Mohan Koyyalamudia53c4dc2012-11-13 10:35:42 -080085#define LIM_MLM_SCAN_CNF (LIM_MLM_MSG_START + 1)
86#define LIM_MLM_START_REQ (LIM_MLM_MSG_START + 2)
87#define LIM_MLM_START_CNF (LIM_MLM_MSG_START + 3)
88#define LIM_MLM_JOIN_REQ (LIM_MLM_MSG_START + 4)
89#define LIM_MLM_JOIN_CNF (LIM_MLM_MSG_START + 5)
90#define LIM_MLM_AUTH_REQ (LIM_MLM_MSG_START + 6)
91#define LIM_MLM_AUTH_CNF (LIM_MLM_MSG_START + 7)
92#define LIM_MLM_AUTH_IND (LIM_MLM_MSG_START + 8)
93#define LIM_MLM_ASSOC_REQ (LIM_MLM_MSG_START + 9)
94#define LIM_MLM_ASSOC_CNF (LIM_MLM_MSG_START + 10)
95#define LIM_MLM_ASSOC_IND (LIM_MLM_MSG_START + 11)
96#define LIM_MLM_DISASSOC_REQ (LIM_MLM_MSG_START + 12)
97#define LIM_MLM_DISASSOC_CNF (LIM_MLM_MSG_START + 13)
98#define LIM_MLM_DISASSOC_IND (LIM_MLM_MSG_START + 14)
99#define LIM_MLM_REASSOC_REQ (LIM_MLM_MSG_START + 15)
100#define LIM_MLM_REASSOC_CNF (LIM_MLM_MSG_START + 16)
101#define LIM_MLM_REASSOC_IND (LIM_MLM_MSG_START + 17)
102#define LIM_MLM_DEAUTH_REQ (LIM_MLM_MSG_START + 18)
103#define LIM_MLM_DEAUTH_CNF (LIM_MLM_MSG_START + 19)
104#define LIM_MLM_DEAUTH_IND (LIM_MLM_MSG_START + 20)
105#define LIM_MLM_TSPEC_REQ (LIM_MLM_MSG_START + 21)
106#define LIM_MLM_TSPEC_CNF (LIM_MLM_MSG_START + 22)
107#define LIM_MLM_TSPEC_IND (LIM_MLM_MSG_START + 23)
108#define LIM_MLM_SETKEYS_REQ (LIM_MLM_MSG_START + 24)
109#define LIM_MLM_SETKEYS_CNF (LIM_MLM_MSG_START + 25)
110#define LIM_MLM_LINK_TEST_STOP_REQ (LIM_MLM_MSG_START + 30)
111#define LIM_MLM_PURGE_STA_IND (LIM_MLM_MSG_START + 31)
112#define LIM_MLM_ADDBA_REQ (LIM_MLM_MSG_START + 32)
113#define LIM_MLM_ADDBA_CNF (LIM_MLM_MSG_START + 33)
114#define LIM_MLM_ADDBA_IND (LIM_MLM_MSG_START + 34)
115#define LIM_MLM_ADDBA_RSP (LIM_MLM_MSG_START + 35)
116#define LIM_MLM_DELBA_REQ (LIM_MLM_MSG_START + 36)
117#define LIM_MLM_DELBA_CNF (LIM_MLM_MSG_START + 37)
118#define LIM_MLM_DELBA_IND (LIM_MLM_MSG_START + 38)
119#define LIM_MLM_REMOVEKEY_REQ (LIM_MLM_MSG_START + 39)
120#define LIM_MLM_REMOVEKEY_CNF (LIM_MLM_MSG_START + 40)
Jeff Johnson295189b2012-06-20 16:38:30 -0700121
Jeff Johnsone7245742012-09-05 17:12:55 -0700122#ifdef FEATURE_OEM_DATA_SUPPORT
Madan Mohan Koyyalamudia53c4dc2012-11-13 10:35:42 -0800123#define LIM_MLM_OEM_DATA_REQ (LIM_MLM_MSG_START + 41)
124#define LIM_MLM_OEM_DATA_CNF (LIM_MLM_MSG_START + 42)
Jeff Johnsone7245742012-09-05 17:12:55 -0700125#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700126
127#define LIM_HASH_ADD 0
128#define LIM_HASH_UPDATE 1
129
130#define LIM_WEP_IN_FC 1
131#define LIM_NO_WEP_IN_FC 0
132
133#define LIM_DECRYPT_ICV_FAIL 1
134
135/// Definitions to distinquish between Association/Reassociaton
136#define LIM_ASSOC 0
137#define LIM_REASSOC 1
138
139/// Minimum Memory blocks require for different scenario
140#define LIM_MIN_MEM_ASSOC 4
141
142/// Verifies whether given mac addr matches the CURRENT Bssid
143#define IS_CURRENT_BSSID(pMac, addr,psessionEntry) (palEqualMemory(pMac->hHdd, addr, \
144 psessionEntry->bssId, \
145 sizeof(psessionEntry->bssId)))
146/// Verifies whether given addr matches the REASSOC Bssid
147#define IS_REASSOC_BSSID(pMac, addr,psessionEntry) (palEqualMemory(pMac->hHdd, addr, \
148 psessionEntry->limReAssocbssId, \
149 sizeof(psessionEntry->limReAssocbssId)))
150
151#define REQ_TYPE_REGISTRAR (0x2)
152#define REQ_TYPE_WLAN_MANAGER_REGISTRAR (0x3)
153
154#define RESP_TYPE_REGISTRAR (0x2)
155#define RESP_TYPE_ENROLLEE_INFO_ONLY (0x0)
156#define RESP_TYPE_ENROLLEE_OPEN_8021X (0x1)
157#define RESP_TYPE_AP (0x3)
158#define LIM_TX_FRAMES_THRESHOLD_ON_CHIP 300
159
160
161// enums used by LIM are as follows
162
163enum eLimDisassocTrigger
164{
165 eLIM_HOST_DISASSOC,
166 eLIM_PEER_ENTITY_DISASSOC,
167 eLIM_LINK_MONITORING_DISASSOC,
168 eLIM_PROMISCUOUS_MODE_DISASSOC,
169 eLIM_HOST_DEAUTH,
170 eLIM_PEER_ENTITY_DEAUTH,
171 eLIM_LINK_MONITORING_DEAUTH,
172 eLIM_JOIN_FAILURE,
173 eLIM_REASSOC_REJECT
174};
175
176/* Reason code to determine the channel change context while sending
177 * WDA_CHNL_SWITCH_REQ message to HAL
178 */
179enum eChannelChangeReasonCodes
180{
181 LIM_SWITCH_CHANNEL_REASSOC,
182 LIM_SWITCH_CHANNEL_JOIN,
183 LIM_SWITCH_CHANNEL_OPERATION, // Generic change channel
184};
185
186typedef struct sLimAuthRspTimeout
187{
188 tSirMacAddr peerMacAddr;
189} tLimAuthRspTimeout;
190
191typedef struct sLimMlmStartReq
192{
193 tSirMacSSid ssId;
194 tSirBssType bssType;
195 tSirMacAddr bssId;
196 tSirMacBeaconInterval beaconPeriod;
197 tANI_U8 dtimPeriod;
198 tSirMacCfParamSet cfParamSet;
199 tSirMacChanNum channelNumber;
Jeff Johnsone7245742012-09-05 17:12:55 -0700200 ePhyChanBondState cbMode;
Jeff Johnson295189b2012-06-20 16:38:30 -0700201 tANI_U16 atimWindow;
202 tSirMacRateSet rateSet;
203 tANI_U8 sessionId; //Added For BT-AMP Support
204
205 // Parameters reqd for new HAL (message) interface
206 tSirNwType nwType;
207 tANI_U8 htCapable;
208 tSirMacHTOperatingMode htOperMode;
209 tANI_U8 dualCTSProtection;
210 tANI_U8 txChannelWidthSet;
211#ifdef WLAN_SOFTAP_FEATURE
212 tANI_U8 ssidHidden;
213 tANI_U8 wps_state;
214 tANI_U8 obssProtEnabled;
215#endif
216} tLimMlmStartReq, *tpLimMlmStartReq;
217
218typedef struct sLimMlmStartCnf
219{
220 tSirResultCodes resultCode;
221 tANI_U8 sessionId;
222} tLimMlmStartCnf, *tpLimMlmStartCnf;
223
224typedef struct sLimMlmScanCnf
225{
226 tSirResultCodes resultCode;
227 tANI_U16 scanResultLength;
228 tSirBssDescription bssDescription[1];
229 tANI_U8 sessionId;
230} tLimMlmScanCnf, *tpLimMlmScanCnf;
231
232typedef struct sLimScanResult
233{
234 tANI_U16 numBssDescriptions;
235 tSirBssDescription bssDescription[1];
236} tLimScanResult;
237
238typedef struct sLimMlmJoinCnf
239{
240 tSirResultCodes resultCode;
241 tANI_U16 protStatusCode;
242 tANI_U8 sessionId;
243} tLimMlmJoinCnf, *tpLimMlmJoinCnf;
244
245typedef struct sLimMlmAssocReq
246{
247 tSirMacAddr peerMacAddr;
248 tANI_U32 assocFailureTimeout;
249 tANI_U16 capabilityInfo;
250 tSirMacListenInterval listenInterval;
251 tANI_U8 sessionId;
252} tLimMlmAssocReq, *tpLimMlmAssocReq;
253
254typedef struct sLimMlmAssocCnf
255{
256 tSirResultCodes resultCode; //Internal status code.
257 tANI_U16 protStatusCode; //Protocol Status code.
258 tANI_U8 sessionId;
259} tLimMlmAssocCnf, *tpLimMlmAssocCnf;
260
261typedef struct sLimMlmAssocInd
262{
263 tSirMacAddr peerMacAddr;
264 tANI_U16 aid;
265 tAniAuthType authType;
266 tAniSSID ssId;
267 tSirRSNie rsnIE;
Jeff Johnson1250df42012-12-10 14:31:52 -0800268 tSirAddie addIE; // additional IE received from the peer, which possibly includes WSC IE and/or P2P IE.
Jeff Johnson295189b2012-06-20 16:38:30 -0700269 tSirMacCapabilityInfo capabilityInfo;
Jeff Johnson295189b2012-06-20 16:38:30 -0700270 tAniBool spectrumMgtIndicator;
271 tSirMacPowerCapInfo powerCap;
272 tSirSupChnl supportedChannels;
273 tANI_U8 sessionId;
274
275
276#ifdef WLAN_SOFTAP_FEATURE
277 tAniBool WmmStaInfoPresent;
278#endif
279
280#if (WNI_POLARIS_FW_PACKAGE == ADVANCED)
281 tANI_U16 seqNum;
282 tAniBool wniIndicator;
283 tAniBool bpIndicator;
284 tSirBpIndicatorType bpType;
285 tSirNwType nwType;
286 tSirAssocType assocType; // Indicates whether STA is LB'ed or not
287 tSirLoad load; // Current load on the radio for LB
288 tANI_U32 numBss; // List received from STA
289 tSirNeighborBssInfo neighborList[1]; // List received from STA
290#endif
291 // Required for indicating the frames to upper layer
292 tANI_U32 beaconLength;
293 tANI_U8* beaconPtr;
294 tANI_U32 assocReqLength;
295 tANI_U8* assocReqPtr;
296} tLimMlmAssocInd, *tpLimMlmAssocInd;
297
298typedef struct sLimMlmReassocReq
299{
300 tSirMacAddr peerMacAddr;
301 tANI_U32 reassocFailureTimeout;
302 tANI_U16 capabilityInfo;
303 tSirMacListenInterval listenInterval;
304 tANI_U8 sessionId;
305} tLimMlmReassocReq, *tpLimMlmReassocReq;
306
307typedef struct sLimMlmReassocCnf
308{
309 tSirResultCodes resultCode;
310 tANI_U16 protStatusCode; //Protocol Status code.
311 tANI_U8 sessionId;
312} tLimMlmReassocCnf, *tpLimMlmReassocCnf;
313
314typedef struct sLimMlmReassocInd
315{
316 tSirMacAddr peerMacAddr;
317 tSirMacAddr currentApAddr;
318 tANI_U16 aid;
319 tAniAuthType authType;
320 tAniSSID ssId;
321 tSirRSNie rsnIE;
Jeff Johnson1250df42012-12-10 14:31:52 -0800322 tSirAddie addIE; // additional IE received from the peer, which can be WSC IE and/or P2P IE.
Jeff Johnson295189b2012-06-20 16:38:30 -0700323 tSirMacCapabilityInfo capabilityInfo;
Jeff Johnson295189b2012-06-20 16:38:30 -0700324 tAniBool spectrumMgtIndicator;
325 tSirMacPowerCapInfo powerCap;
326 tSirSupChnl supportedChannels;
327
328#ifdef WLAN_SOFTAP_FEATURE
329 tAniBool WmmStaInfoPresent;
330#endif
331
332#if (WNI_POLARIS_FW_PACKAGE == ADVANCED)
333 tANI_U16 seqNum;
334 tAniBool wniIndicator;
335 tAniBool bpIndicator;
336 tSirBpIndicatorType bpType;
337 tSirNwType nwType;
338 tSirAssocType reassocType; // Indicates whether STA is LB'ed or not
339 tSirLoad load; // Current load on the radio for LB
340 tANI_U32 numBss; // List received from STA
341 tSirNeighborBssInfo neighborList[1]; // List received from STA
342#endif
343 // Required for indicating the frames to upper layer
344 tANI_U32 beaconLength;
345 tANI_U8* beaconPtr;
346 tANI_U32 assocReqLength;
347 tANI_U8* assocReqPtr;
348} tLimMlmReassocInd, *tpLimMlmReassocInd;
349
350typedef struct sLimMlmAuthCnf
351{
352 tSirMacAddr peerMacAddr;
353 tAniAuthType authType;
354 tSirResultCodes resultCode;
355 tANI_U16 protStatusCode;
356 tANI_U8 sessionId;
357} tLimMlmAuthCnf, *tpLimMlmAuthCnf;
358
359typedef struct sLimMlmAuthInd
360{
361 tSirMacAddr peerMacAddr;
362 tAniAuthType authType;
363 tANI_U8 sessionId;
364} tLimMlmAuthInd, *tpLimMlmAuthInd;
365
366typedef struct sLimMlmDeauthReq
367{
368 tSirMacAddr peerMacAddr;
369 tANI_U16 reasonCode;
370 tANI_U16 deauthTrigger;
371 tANI_U16 aid;
372 tANI_U8 sessionId; //Added for BT-AMP SUPPORT
373
374} tLimMlmDeauthReq, *tpLimMlmDeauthReq;
375
376typedef struct sLimMlmDeauthCnf
377{
378 tSirMacAddr peerMacAddr;
379 tSirResultCodes resultCode;
380 tANI_U16 deauthTrigger;
381 tANI_U16 aid;
382 tANI_U8 sessionId;
383} tLimMlmDeauthCnf, *tpLimMLmDeauthCnf;
384
385typedef struct sLimMlmDeauthInd
386{
387 tSirMacAddr peerMacAddr;
388 tANI_U16 reasonCode;
389 tANI_U16 deauthTrigger;
390 tANI_U16 aid;
391} tLimMlmDeauthInd, *tpLimMlmDeauthInd;
392
393typedef struct sLimMlmDisassocReq
394{
395 tSirMacAddr peerMacAddr;
396 tANI_U16 reasonCode;
397 tANI_U16 disassocTrigger;
398 tANI_U16 aid;
399 tANI_U8 sessionId;
400} tLimMlmDisassocReq, *tpLimMlmDisassocReq;
401
402typedef struct sLimMlmDisassocCnf
403{
404 tSirMacAddr peerMacAddr;
405 tSirResultCodes resultCode;
406 tANI_U16 disassocTrigger;
407 tANI_U16 aid;
408 tANI_U8 sessionId;
409} tLimMlmDisassocCnf, *tpLimMlmDisassocCnf;
410
411typedef struct sLimMlmDisassocInd
412{
413 tSirMacAddr peerMacAddr;
414 tANI_U16 reasonCode;
415 tANI_U16 disassocTrigger;
416 tANI_U16 aid;
417 tANI_U8 sessionId;
418} tLimMlmDisassocInd, *tpLimMlmDisassocInd;
419
420typedef struct sLimMlmPurgeStaReq
421{
422 tSirMacAddr peerMacAddr;
423 tANI_U16 aid;
424 tANI_U8 sessionId;//Added For BT-AMP Support
425} tLimMlmPurgeStaReq, *tpLimMlmPurgeStaReq;
426
427typedef struct sLimMlmPurgeStaInd
428{
429 tSirMacAddr peerMacAddr;
430 tANI_U16 reasonCode;
431 tANI_U16 purgeTrigger;
432 tANI_U16 aid;
433 tANI_U8 sessionId;
434} tLimMlmPurgeStaInd, *tpLimMlmPurgeStaInd;
435
436typedef struct sLimMlmSetKeysReq
437{
438 tSirMacAddr peerMacAddr;
439 tANI_U8 sessionId; //Added For BT-AMP Support
440 tANI_U16 aid;
441 tAniEdType edType; // Encryption/Decryption type
442 tANI_U8 numKeys;
443 tSirKeys key[SIR_MAC_MAX_NUM_OF_DEFAULT_KEYS];
444} tLimMlmSetKeysReq, *tpLimMlmSetKeysReq;
445
446typedef struct sLimMlmSetKeysCnf
447{
448 tSirMacAddr peerMacAddr;
449 tANI_U16 resultCode;
450 tANI_U16 aid;
451 tANI_U8 sessionId;
452} tLimMlmSetKeysCnf, *tpLimMlmSetKeysCnf;
453
454typedef struct sLimMlmRemoveKeyReq
455{
456 tSirMacAddr peerMacAddr;
457 tANI_U8 sessionId; //Added FOr BT-AMP Support
458 tAniEdType edType; // Encryption/Decryption type
459 tANI_U8 wepType; //STATIC / DYNAMIC specifier
460 tANI_U8 keyId; //Key Id To be removed.
461 tANI_BOOLEAN unicast;
462} tLimMlmRemoveKeyReq, *tpLimMlmRemoveKeyReq;
463
464typedef struct sLimMlmRemoveKeyCnf
465{
466 tSirMacAddr peerMacAddr;
467 tANI_U16 resultCode;
468 tANI_U8 sessionId;
469} tLimMlmRemoveKeyCnf, *tpLimMlmRemoveKeyCnf;
470
471
472typedef struct sLimMlmResetReq
473{
474 tSirMacAddr macAddr;
475 tANI_U8 performCleanup;
476 tANI_U8 sessionId;
477} tLimMlmResetReq, *tpLimMlmResetReq;
478
479typedef struct sLimMlmResetCnf
480{
481 tSirMacAddr macAddr;
482 tSirResultCodes resultCode;
483 tANI_U8 sessionId;
484} tLimMlmResetCnf, *tpLimMlmResetCnf;
485
486
487typedef struct sLimMlmLinkTestStopReq
488{
489 tSirMacAddr peerMacAddr;
490 tANI_U8 sessionId;
491#ifdef ANI_PRODUCT_TYPE_AP
492 tANI_U16 aid;
493#endif
494} tLimMlmLinkTestStopReq, *tpLimMlmLinkTestStopReq;
495
496
497//
498// Block ACK related MLME data structures
499//
500
501typedef struct sLimMlmAddBAReq
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 // ADDBA failure timeout in TU's
526 // Greater than or equal to 1
527 tANI_U16 addBAFailureTimeout;
528
529 // BA Starting Sequence Number
530 tANI_U16 baSSN;
531
532 tANI_U8 sessionId;
533
534} tLimMlmAddBAReq, *tpLimMlmAddBAReq;
535
536typedef struct sLimMlmAddBACnf
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 status code
549 tSirMacStatusCodes addBAResultCode;
550
551 // BA policy
552 // 0 - Delayed BA (Not supported)
553 // 1 - Immediate BA
554 tANI_U8 baPolicy;
555
556 // BA buffer size - (0..127) max size MSDU's
557 tANI_U16 baBufferSize;
558
559 // BA timeout in TU's
560 // 0 means no timeout will occur
561 tANI_U16 baTimeout;
562
563 // ADDBA direction
564 // 1 - Originator
565 // 0 - Recipient
566 tANI_U8 baDirection;
567 tANI_U8 sessionId;
568
569
570} tLimMlmAddBACnf, *tpLimMlmAddBACnf;
571
572typedef struct sLimMlmAddBAInd
573{
574
575 // ADDBA recipient
576 tSirMacAddr peerMacAddr;
577
578 // ADDBA Action Frame dialog token
579 tANI_U8 baDialogToken;
580
581 // ADDBA requested for TID
582 tANI_U8 baTID;
583
584 // BA policy
585 // 0 - Delayed BA (Not supported)
586 // 1 - Immediate BA
587 tANI_U8 baPolicy;
588
589 // BA buffer size - (0..127) max size MSDU's
590 tANI_U16 baBufferSize;
591
592 // BA timeout in TU's
593 // 0 means no timeout will occur
594 tANI_U16 baTimeout;
595
596} tLimMlmAddBAInd, *tpLimMlmAddBAInd;
597
598typedef struct sLimMlmAddBARsp
599{
600
601 // ADDBA recipient
602 tSirMacAddr peerMacAddr;
603
604 // ADDBA Action Frame dialog token
605 tANI_U8 baDialogToken;
606
607 // ADDBA requested for TID
608 tANI_U8 baTID;
609
610 // BA status code
611 tSirMacStatusCodes addBAResultCode;
612
613 // BA policy
614 // 0 - Delayed BA (Not supported)
615 // 1 - Immediate BA
616 tANI_U8 baPolicy;
617
618 // BA buffer size - (0..127) max size MSDU's
619 tANI_U16 baBufferSize;
620
621 // BA timeout in TU's
622 // 0 means no timeout will occur
623 tANI_U16 baTimeout;
624
625 //reserved for alignment
626 tANI_U8 rsvd[2];
627
628 /* PE session id*/
629 tANI_U8 sessionId;
630
631 } tLimMlmAddBARsp, *tpLimMlmAddBARsp;
632
633//
634// NOTE - Overloading DELBA IND and DELBA CNF
635// to use the same data structure as DELBA REQ
636// as the parameters do not vary too much.
637//
638typedef struct sLimMlmDelBAReq
639{
640
641 // ADDBA recipient
642 tSirMacAddr peerMacAddr;
643
644 // DELBA direction
645 // 1 - Originator
646 // 0 - Recipient
647 tANI_U8 baDirection;
648
649 // DELBA requested for TID
650 tANI_U8 baTID;
651
652 // DELBA reason code
653 tSirMacReasonCodes delBAReasonCode;
654
655 tANI_U8 sessionId;
656
657} tLimMlmDelBAReq, *tpLimMlmDelBAReq, tLimMlmDelBAInd, *tpLimMlmDelBAInd, tLimMlmDelBACnf, *tpLimMlmDelBACnf;
658
659// Function templates
660
661tANI_BOOLEAN limProcessSmeReqMessages(tpAniSirGlobal, tpSirMsgQ);
662void limProcessMlmReqMessages(tpAniSirGlobal, tpSirMsgQ);
663void limProcessMlmRspMessages(tpAniSirGlobal, tANI_U32, tANI_U32 *);
664void limProcessLmmMessages(tpAniSirGlobal, tANI_U32, tANI_U32 *);
665void limProcessSmeDelBssRsp( tpAniSirGlobal , tANI_U32,tpPESession);
666
667void limGetRandomBssid(tpAniSirGlobal pMac ,tANI_U8 *data);
668
Jeff Johnson295189b2012-06-20 16:38:30 -0700669// Function to handle HT and HT IE CFG parameter intializations
Jeff Johnsone7245742012-09-05 17:12:55 -0700670void handleHTCapabilityandHTInfo(struct sAniSirGlobal *pMac, tpPESession psessionEntry);
Jeff Johnson295189b2012-06-20 16:38:30 -0700671
672// Function to handle CFG parameter updates
673void limHandleCFGparamUpdate(tpAniSirGlobal, tANI_U32);
674
675// Function to apply CFG parameters before join/reassoc/start BSS
676void limApplyConfiguration(tpAniSirGlobal,tpPESession);
677
678#ifdef WLAN_SOFTAP_FEATURE
679void limSetCfgProtection(tpAniSirGlobal pMac, tpPESession pesessionEntry);
680#else
681void limSetCfgProtection(tpAniSirGlobal pMac);
682#endif
683
684
685// Function to Initialize MLM state machine on STA
686void limInitMlm(tpAniSirGlobal);
687
688// Function to cleanup MLM state machine
689void limCleanupMlm(tpAniSirGlobal);
690
691// Function to cleanup LMM state machine
692void limCleanupLmm(tpAniSirGlobal);
693
Jeff Johnson295189b2012-06-20 16:38:30 -0700694// Management frame handling functions
695void limProcessBeaconFrame(tpAniSirGlobal, tANI_U8 *,tpPESession);
696void limProcessBeaconFrameNoSession(tpAniSirGlobal, tANI_U8 *);
697void limProcessProbeReqFrame(tpAniSirGlobal, tANI_U8 *, tpPESession);
698void limProcessProbeRspFrame(tpAniSirGlobal, tANI_U8 *, tpPESession);
699void limProcessProbeRspFrameNoSession(tpAniSirGlobal, tANI_U8 *);
700void limProcessProbeReqFrame_multiple_BSS(tpAniSirGlobal, tANI_U8 *,tpPESession);
701
702
703// Process Auth frame when we have a session in progress.
704void limProcessAuthFrame(tpAniSirGlobal, tANI_U8 *,tpPESession);
705#ifdef WLAN_FEATURE_VOWIFI_11R
Srikant Kuppaa3ed0a32013-02-20 07:24:43 -0800706tSirRetStatus limProcessAuthFrameNoSession(tpAniSirGlobal pMac, tANI_U8 *, void *body);
Jeff Johnson295189b2012-06-20 16:38:30 -0700707#endif
708
709void limProcessAssocReqFrame(tpAniSirGlobal, tANI_U8 *, tANI_U8, tpPESession);
710void limSendMlmAssocInd(tpAniSirGlobal pMac, tpDphHashNode pStaDs, tpPESession psessionEntry);
711
712
713void limProcessAssocRspFrame(tpAniSirGlobal, tANI_U8 *, tANI_U8,tpPESession);
714void limProcessDisassocFrame(tpAniSirGlobal, tANI_U8 *,tpPESession);
715void limProcessDeauthFrame(tpAniSirGlobal, tANI_U8 *,tpPESession);
716void limProcessActionFrame(tpAniSirGlobal, tANI_U8 *,tpPESession);
717#if defined WLAN_FEATURE_P2P
718void limProcessActionFrameNoSession(tpAniSirGlobal pMac, tANI_U8 *pRxMetaInfo);
719#endif
720
721
722tSirRetStatus limPopulateMacHeader(tpAniSirGlobal, tANI_U8*, tANI_U8, tANI_U8, tSirMacAddr,tSirMacAddr);
723tSirRetStatus limSendProbeReqMgmtFrame(tpAniSirGlobal, tSirMacSSid *, tSirMacAddr, tANI_U8, tSirMacAddr, tANI_U32, tANI_U32, tANI_U8 *);
724void limSendProbeRspMgmtFrame(tpAniSirGlobal, tSirMacAddr, tpAniSSID, short, tANI_U8, tpPESession, tANI_U8);
725void limSendAuthMgmtFrame(tpAniSirGlobal, tSirMacAuthFrameBody *, tSirMacAddr, tANI_U8,tpPESession);
726void limSendAssocReqMgmtFrame(tpAniSirGlobal, tLimMlmAssocReq *,tpPESession);
727void limSendReassocReqMgmtFrame(tpAniSirGlobal, tLimMlmReassocReq *,tpPESession);
728#ifdef WLAN_FEATURE_VOWIFI_11R
729void limSendReassocReqWithFTIEsMgmtFrame(tpAniSirGlobal pMac,
730 tLimMlmReassocReq *pMlmReassocReq,tpPESession psessionEntry);
731#endif
732void limSendDeltsReqActionFrame(tpAniSirGlobal pMac, tSirMacAddr peer,
733 tANI_U8 wmmTspecPresent, tSirMacTSInfo *pTsinfo,
734 tSirMacTspecIE *pTspecIe, tpPESession psessionEntry);
735void limSendAddtsReqActionFrame(tpAniSirGlobal pMac, tSirMacAddr peerMacAddr,
736 tSirAddtsReqInfo *addts,tpPESession);
737void limSendAddtsRspActionFrame(tpAniSirGlobal pMac, tSirMacAddr peerMacAddr,
738 tANI_U16 statusCode, tSirAddtsReqInfo *addts, tSirMacScheduleIE *pSchedule,tpPESession);
739
740#ifdef ANI_PRODUCT_TYPE_AP
741void limSendAssocRspMgmtFrame(tpAniSirGlobal, tANI_U16, tANI_U16, tSirMacAddr, tANI_U8, tpDphHashNode pSta,tpPESession);
742#endif
743void limSendAssocRspMgmtFrame(tpAniSirGlobal, tANI_U16, tANI_U16, tSirMacAddr, tANI_U8, tpDphHashNode pSta,tpPESession);
744
745void limSendNullDataFrame(tpAniSirGlobal, tpDphHashNode);
Madan Mohan Koyyalamudi521ff192012-11-15 17:13:08 -0800746void limSendDisassocMgmtFrame(tpAniSirGlobal, tANI_U16, tSirMacAddr, tpPESession, tANI_BOOLEAN waitForAck);
747void limSendDeauthMgmtFrame(tpAniSirGlobal, tANI_U16, tSirMacAddr, tpPESession, tANI_BOOLEAN waitForAck);
Jeff Johnson295189b2012-06-20 16:38:30 -0700748
749void limContinueChannelScan(tpAniSirGlobal);
750tSirResultCodes limMlmAddBss(tpAniSirGlobal, tLimMlmStartReq *,tpPESession psessionEntry);
751
Jeff Johnsone7245742012-09-05 17:12:55 -0700752#if 1 //(WNI_POLARIS_FW_PACKAGE == ADVANCED) && defined(ANI_PRODUCT_TYPE_AP)
753tSirRetStatus limSendChannelSwitchMgmtFrame(tpAniSirGlobal, tSirMacAddr, tANI_U8, tANI_U8, tANI_U8, tpPESession);
Jeff Johnson295189b2012-06-20 16:38:30 -0700754#endif
755
Mohit Khanna4a70d262012-09-11 16:30:12 -0700756#ifdef WLAN_FEATURE_11AC
757tSirRetStatus limSendVHTOpmodeNotificationFrame(tpAniSirGlobal pMac,tSirMacAddr peer,tANI_U8 nMode, tpPESession psessionEntry );
Madan Mohan Koyyalamudic6226de2012-09-18 16:33:31 -0700758tSirRetStatus limSendVHTChannelSwitchMgmtFrame(tpAniSirGlobal pMac,tSirMacAddr peer,tANI_U8 nChanWidth, tANI_U8 nNewChannel, tANI_U8 ncbMode, tpPESession psessionEntry );
Mohit Khanna4a70d262012-09-11 16:30:12 -0700759#endif
760
Jeff Johnson295189b2012-06-20 16:38:30 -0700761#if defined WLAN_FEATURE_VOWIFI
762tSirRetStatus limSendNeighborReportRequestFrame(tpAniSirGlobal, tpSirMacNeighborReportReq, tSirMacAddr, tpPESession);
763tSirRetStatus limSendLinkReportActionFrame(tpAniSirGlobal, tpSirMacLinkReport, tSirMacAddr, tpPESession );
764tSirRetStatus limSendRadioMeasureReportActionFrame(tpAniSirGlobal, tANI_U8, tANI_U8, tpSirMacRadioMeasureReport, tSirMacAddr, tpPESession);
765#endif
766
767#ifdef FEATURE_WLAN_CCX
768void limProcessIappFrame(tpAniSirGlobal, tANI_U8 *,tpPESession);
769#endif
770
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800771#ifdef FEATURE_WLAN_TDLS_INTERNAL
772tSirRetStatus limSendTdlsDisReqFrame(tpAniSirGlobal pMac,
773 tSirMacAddr peer_mac, tANI_U8 dialog, tpPESession psessionEntry);
774tSirRetStatus limSendTdlsLinkSetupReqFrame(tpAniSirGlobal pMac,
775 tSirMacAddr peerMac, tANI_U8 dialog, tpPESession psessionEntry,
776 tANI_U8* addIe, tANI_U16 len);
777
778eHalStatus limTdlsPrepareSetupReqFrame(tpAniSirGlobal pMac,
779 tLimTdlsLinkSetupInfo *linkSetupInfo,
780 tANI_U8 dialog, tSirMacAddr peerMac,
781 tpPESession psessionEntry);
782#endif
783#ifdef FEATURE_WLAN_TDLS
Gopichand Nakkala777e6032012-12-31 16:39:21 -0800784void limInitTdlsData(tpAniSirGlobal, tpPESession);
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800785tSirRetStatus limProcessSmeTdlsMgmtSendReq(tpAniSirGlobal pMac,
786 tANI_U32 *pMsgBuf);
787tSirRetStatus limProcessSmeTdlsAddStaReq(tpAniSirGlobal pMac,
788 tANI_U32 *pMsgBuf);
789tSirRetStatus limProcessSmeTdlsDelStaReq(tpAniSirGlobal pMac,
790 tANI_U32 *pMsgBuf);
Gopichand Nakkala2a0a1572013-02-10 21:39:16 -0800791void limSendSmeTDLSDeleteAllPeerInd(tpAniSirGlobal pMac, tpPESession psessionEntry);
792tSirRetStatus limDeleteTDLSPeers(tpAniSirGlobal pMac, tpPESession psessionEntry);
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800793eHalStatus limProcessTdlsAddStaRsp(tpAniSirGlobal pMac, void *msg, tpPESession);
794tSirRetStatus limSendTdlsTeardownFrame(tpAniSirGlobal pMac,
Hoonki Leea34dd892013-02-05 22:56:02 -0800795 tSirMacAddr peerMac, tANI_U16 reason, tANI_U8 responder, tpPESession psessionEntry,
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800796 tANI_U8 *addIe, tANI_U16 addIeLen);
797#endif
798
Jeff Johnson295189b2012-06-20 16:38:30 -0700799// Algorithms & Link Monitoring related functions
800tSirBackgroundScanMode limSelectsBackgroundScanMode(tpAniSirGlobal);
801void limTriggerBackgroundScan(tpAniSirGlobal);
802void limAbortBackgroundScan(tpAniSirGlobal);
803
804/// Function that handles heartbeat failure
805void limHandleHeartBeatFailure(tpAniSirGlobal,tpPESession);
806
807/// Function that triggers link tear down with AP upon HB failure
808void limTearDownLinkWithAp(tpAniSirGlobal,tANI_U8, tSirMacReasonCodes);
809
810#ifdef ANI_PRODUCT_TYPE_AP
811/// Function that performs periodic release of AIDs
812void limReleaseAIDHandler(tpAniSirGlobal);
813
814/// Function that performs periodic cleanup of Pre-auth contexts
815void limPreAuthClnupHandler(tpAniSirGlobal);
816
817/// Function that processes CF-poll response message from SCH
818void limHandleCFpollRsp(tANI_U32);
819
820/// Function that processes PS-poll message from PMM
821void limHandlePSpoll(tANI_U32);
822#endif
823
824/// Function that sends keep alive message to peer(s)
825void limSendKeepAliveToPeer(tpAniSirGlobal);
826
827/// Function that processes Max retries interrupt from TFP
828void limHandleMaxRetriesInterrupt(tANI_U32);
829
830/// Function that processes messages deferred during Learn mode
831void limProcessDeferredMessageQueue(tpAniSirGlobal);
832
833/// Function that defers the messages received
834tANI_U32 limDeferMsg(tpAniSirGlobal, tSirMsgQ *);
835
836/// Function that sets system into scan mode
837void limSetScanMode(tpAniSirGlobal pMac);
838
839/// Function that Switches the Channel and sets the CB Mode
Jeff Johnsone7245742012-09-05 17:12:55 -0700840void limSetChannel(tpAniSirGlobal pMac, tANI_U8 channel, tANI_U8 secChannelOffset, tPowerdBm maxTxPower, tANI_U8 peSessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -0700841
842/// Function that completes channel scan
843void limCompleteMlmScan(tpAniSirGlobal, tSirResultCodes);
844
Jeff Johnsone7245742012-09-05 17:12:55 -0700845#ifdef FEATURE_OEM_DATA_SUPPORT
846/// Funtion that sets system into meas mode for oem data req
847void limSetOemDataReqMode(tpAniSirGlobal pMac, eHalStatus status, tANI_U32* data);
848#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700849
850#ifdef ANI_SUPPORT_11H
851/// Function that sends Measurement Report action frame
852tSirRetStatus limSendMeasReportFrame(tpAniSirGlobal, tpSirMacMeasReqActionFrame, tSirMacAddr);
853
854/// Function that sends TPC Report action frame
855tSirRetStatus limSendTpcReportFrame(tpAniSirGlobal, tpSirMacTpcReqActionFrame, tSirMacAddr);
856#endif
857
858/// Function that sends TPC Request action frame
859void limSendTpcRequestFrame(tpAniSirGlobal, tSirMacAddr);
860
861// Function(s) to handle responses received from HAL
862void limProcessMlmAddBssRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ );
863void limProcessMlmAddStaRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQt,tpPESession psessionEntry);
864void limProcessMlmDelStaRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ );
865void limProcessMlmDelBssRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ,tpPESession);
Jeff Johnson295189b2012-06-20 16:38:30 -0700866void limProcessStaMlmAddStaRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ ,tpPESession psessionEntry);
867void limProcessStaMlmDelStaRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ,tpPESession psessionEntry);
868void limProcessStaMlmDelBssRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ ,tpPESession psessionEntry);
869void limProcessMlmSetStaKeyRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ );
870void limProcessMlmSetBssKeyRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ );
871
872
873
874#ifdef GEN4_SCAN
875// Function to process WDA_INIT_SCAN_RSP message
876void limProcessInitScanRsp(tpAniSirGlobal, void * );
877
878// Function to process WDA_START_SCAN_RSP message
879void limProcessStartScanRsp(tpAniSirGlobal, void * );
880
881// Function to process WDA_END_SCAN_RSP message
882void limProcessEndScanRsp(tpAniSirGlobal, void * );
883
884// Function to process WDA_FINISH_SCAN_RSP message
885void limProcessFinishScanRsp(tpAniSirGlobal, void * );
886
887// Function to process WDA_SWITCH_CHANNEL_RSP message
888void limProcessSwitchChannelRsp(tpAniSirGlobal pMac, void * );
889
890void limSendHalInitScanReq( tpAniSirGlobal, tLimLimHalScanState, tSirLinkTrafficCheck);
891void limSendHalStartScanReq( tpAniSirGlobal, tANI_U8, tLimLimHalScanState);
892void limSendHalEndScanReq( tpAniSirGlobal, tANI_U8, tLimLimHalScanState);
893void limSendHalFinishScanReq( tpAniSirGlobal, tLimLimHalScanState);
894
895void limContinuePostChannelScan(tpAniSirGlobal pMac);
896void limContinueChannelLearn( tpAniSirGlobal );
897//WLAN_SUSPEND_LINK Related
898tANI_U8 limIsLinkSuspended(tpAniSirGlobal pMac);
899void limSuspendLink(tpAniSirGlobal, tSirLinkTrafficCheck, SUSPEND_RESUME_LINK_CALLBACK, tANI_U32*);
900void limResumeLink(tpAniSirGlobal, SUSPEND_RESUME_LINK_CALLBACK, tANI_U32*);
901//end WLAN_SUSPEND_LINK Related
902#endif // GEN4_SCAN
903
904tSirRetStatus limSendAddBAReq( tpAniSirGlobal pMac,
905 tpLimMlmAddBAReq pMlmAddBAReq,tpPESession);
906
907tSirRetStatus limSendAddBARsp( tpAniSirGlobal pMac,
908 tpLimMlmAddBARsp pMlmAddBARsp,tpPESession);
909
910tSirRetStatus limSendDelBAInd( tpAniSirGlobal pMac,
911 tpLimMlmDelBAReq pMlmDelBAReq ,tpPESession psessionEntry);
912#if 0
913tSirRetStatus limSendSMPowerStateFrame( tpAniSirGlobal pMac,
914 tSirMacAddr peer, tSirMacHTMIMOPowerSaveState State );
915#endif
916
917void limProcessMlmHalAddBARsp( tpAniSirGlobal pMac,
918 tpSirMsgQ limMsgQ );
919
920void limProcessMlmHalBADeleteInd( tpAniSirGlobal pMac,
921 tpSirMsgQ limMsgQ );
922
923void limProcessMlmRemoveKeyRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ );
924
925void limProcessLearnIntervalTimeout(tpAniSirGlobal pMac);
926#ifdef WLAN_FEATURE_11W
927//11w SA query request action frame handler
928tSirRetStatus limSendSaQueryResponseFrame( tpAniSirGlobal pMac,
929 tANI_U16 transId, tSirMacAddr peer,tpPESession psessionEntry);
930#endif
931// Inline functions
932
933/**
934 * limPostSmeMessage()
935 *
936 *FUNCTION:
937 * This function is called by limProcessMlmMessages(). In this
938 * function MLM sub-module invokes MLM ind/cnf primitives.
939 *
940 *LOGIC:
941 * Initially MLM makes an SME function call to invoke MLM ind/cnf
942 * primitive. In future this can be enhanced to 'post' messages to SME.
943 *
944 *ASSUMPTIONS:
945 * NA
946 *
947 *NOTE:
948 * NA
949 *
950 * @param pMac Pointer to Global MAC structure
951 * @param msgType Indicates the MLM primitive message type
952 * @param *pMsgBuf A pointer to the MLM message buffer
953 *
954 * @return None
955 */
956static inline void
957limPostSmeMessage(tpAniSirGlobal pMac, tANI_U32 msgType, tANI_U32 *pMsgBuf)
958{
959 tSirMsgQ msg;
960
961 if(pMsgBuf == NULL)
962 {
963 limLog(pMac, LOGE,FL("Buffer is Pointing to NULL\n"));
964 return;
965 }
966
967 msg.type = (tANI_U16)msgType;
968 msg.bodyptr = pMsgBuf;
969 msg.bodyval = 0;
970 if (msgType > eWNI_SME_MSG_TYPES_BEGIN)
971 limProcessSmeReqMessages(pMac, &msg);
972 else
973 limProcessMlmRspMessages(pMac, msgType, pMsgBuf);
974} /*** end limPostSmeMessage() ***/
975
976/**
977 * limPostMlmMessage()
978 *
979 *FUNCTION:
980 * This function is called by limProcessSmeMessages(). In this
981 * function SME invokes MLME primitives.
982 *
983 *PARAMS:
984 *
985 *LOGIC:
986 * Initially SME makes an MLM function call to invoke MLM primitive.
987 * In future this can be enhanced to 'post' messages to MLM.
988 *
989 *ASSUMPTIONS:
990 * NA
991 *
992 *NOTE:
993 * NA
994 *
995 * @param pMac Pointer to Global MAC structure
996 * @param msgType Indicates the MLM primitive message type
997 * @param *pMsgBuf A pointer to the MLM message buffer
998 *
999 * @return None
1000 */
1001static inline void
1002limPostMlmMessage(tpAniSirGlobal pMac, tANI_U32 msgType, tANI_U32 *pMsgBuf)
1003{
1004
1005 tSirMsgQ msg;
1006 if(pMsgBuf == NULL)
1007 {
1008 limLog(pMac, LOGE,FL("Buffer is Pointing to NULL\n"));
1009 return;
1010 }
1011 msg.type = (tANI_U16) msgType;
1012 msg.bodyptr = pMsgBuf;
1013 msg.bodyval = 0;
1014 limProcessMlmReqMessages(pMac, &msg);
1015} /*** end limPostMlmMessage() ***/
1016
1017
1018
1019/**
1020 * limGetCurrentScanChannel()
1021 *
1022 *FUNCTION:
1023 * This function is called in various places to get current channel
1024 * number being scanned.
1025 *
1026 *PARAMS:
1027 *
1028 *LOGIC:
1029 *
1030 *ASSUMPTIONS:
1031 * NA
1032 *
1033 *NOTE:
1034 * NA
1035 *
1036 * @param pMac Pointer to Global MAC structure
1037 * @return Channel number
1038 */
1039static inline tANI_U8
1040limGetCurrentScanChannel(tpAniSirGlobal pMac)
1041{
1042 tANI_U8 *pChanNum = pMac->lim.gpLimMlmScanReq->channelList.channelNumber;
1043
1044 return (*(pChanNum + pMac->lim.gLimCurrentScanChannelId));
1045} /*** end limGetCurrentScanChannel() ***/
1046
1047
1048
1049/**
1050 * limGetIElenFromBssDescription()
1051 *
1052 *FUNCTION:
1053 * This function is called in various places to get IE length
1054 * from tSirBssDescription structure
1055 * number being scanned.
1056 *
1057 *PARAMS:
1058 *
1059 *LOGIC:
1060 *
1061 *ASSUMPTIONS:
1062 * NA
1063 *
1064 *NOTE:
1065 * NA
1066 *
1067 * @param pBssDescr
1068 * @return Total IE length
1069 */
1070
1071static inline tANI_U16
1072limGetIElenFromBssDescription(tpSirBssDescription pBssDescr)
1073{
1074 if (!pBssDescr)
1075 return 0;
1076
1077 return ((tANI_U16) (pBssDescr->length + sizeof(tANI_U16) +
1078 sizeof(tANI_U32) - sizeof(tSirBssDescription)));
1079} /*** end limGetIElenFromBssDescription() ***/
1080
1081#ifdef WLAN_SOFTAP_FEATURE
1082/**
1083 * limSendBeaconInd()
1084 *
1085 *FUNCTION:
1086 * This function is called to send the beacon indication
1087 * number being scanned.
1088 *
1089 *PARAMS:
1090 *
1091 *LOGIC:
1092 *
1093 *ASSUMPTIONS:
1094*/
1095
1096void
1097limSendBeaconInd(tpAniSirGlobal pMac, tpPESession psessionEntry);
1098#endif
1099
1100#ifdef WLAN_SOFTAP_FEATURE
1101
1102void limGetWPSPBCSessions(tpAniSirGlobal pMac, tANI_U8 *addr, tANI_U8 *uuid_e, eWPSPBCOverlap *overlap, tpPESession psessionEntry);
1103void limWPSPBCTimeout(tpAniSirGlobal pMac, tpPESession psessionEntry);
1104void limWPSPBCClose(tpAniSirGlobal pMac, tpPESession psessionEntry);
1105void limRemovePBCSessions(tpAniSirGlobal pMac, tSirMacAddr pRemoveMac,tpPESession psessionEntry);
1106
1107
1108tSirRetStatus
1109limIsSmeGetWPSPBCSessionsReqValid(tpAniSirGlobal pMac, tSirSmeGetWPSPBCSessionsReq *pGetWPSPBCSessionsReq, tANI_U8 *pBuf);
1110
1111#define LIM_WPS_OVERLAP_TIMER_MS 10000
1112#endif
1113
1114void
1115limSuspendLink(tpAniSirGlobal pMac, tSirLinkTrafficCheck trafficCheck, SUSPEND_RESUME_LINK_CALLBACK callback, tANI_U32 *data);
1116void
1117limResumeLink(tpAniSirGlobal pMac, SUSPEND_RESUME_LINK_CALLBACK callback, tANI_U32 *data);
1118
1119void
1120limChangeChannelWithCallback(tpAniSirGlobal pMac, tANI_U8 newChannel,
1121 CHANGE_CHANNEL_CALLBACK callback, tANI_U32 *cbdata, tpPESession psessionEntry);
1122
1123#ifdef WLAN_FEATURE_P2P
1124void limSendSmeMgmtFrameInd(
1125 tpAniSirGlobal pMac, tANI_U8 frameType,
1126 tANI_U8 *frame, tANI_U32 frameLen, tANI_U16 sessionId,
Chilam NG571c65a2013-01-19 12:27:36 +05301127 tANI_U32 rxChan, tpPESession psessionEntry,
1128 tANI_S8 rxRssi);
Jeff Johnson295189b2012-06-20 16:38:30 -07001129void limProcessRemainOnChnTimeout(tpAniSirGlobal pMac);
Gopichand Nakkala4261ea52012-12-31 16:43:00 -08001130void limProcessInsertSingleShotNOATimeout(tpAniSirGlobal pMac);
Jeff Johnson295189b2012-06-20 16:38:30 -07001131void limSendP2PActionFrame(tpAniSirGlobal pMac, tpSirMsgQ pMsg);
1132void limAbortRemainOnChan(tpAniSirGlobal pMac);
1133tSirRetStatus __limProcessSmeNoAUpdate(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf);
1134#endif
Mohit Khanna698ba2a2012-12-04 15:08:18 -08001135#ifdef FEATURE_WLAN_TDLS_INTERNAL
1136void limProcessTdlsFrame(tpAniSirGlobal, tANI_U32 *);
Mohit Khanna698ba2a2012-12-04 15:08:18 -08001137void limProcessTdlsPublicActionFrame(tpAniSirGlobal pMac, tANI_U32 *pBd,
1138 tpPESession) ;
1139#ifdef FEATURE_WLAN_TDLS_NEGATIVE
1140#define LIM_TDLS_NEGATIVE_WRONG_BSSID_IN_DSCV_REQ 0x1 /* 5.1.4-5 */
1141#define LIM_TDLS_NEGATIVE_WRONG_BSSID_IN_SETUP_REQ 0x2 /* 5.2.4-16 */
1142#define LIM_TDLS_NEGATIVE_STATUS_37_IN_SETUP_CNF 0x4 /* 5.2.4-10 */
1143#define LIM_TDLS_NEGATIVE_SEND_REQ_TO_SETUP_REQ 0x8 /* 5.2.4-20/32 */
1144#define LIM_TDLS_NEGATIVE_RSP_TIMEOUT_TO_SETUP_REQ 0x10 /* 5.2.3.4 */
1145#define LIM_TDLS_NEGATIVE_TREAT_TDLS_PROHIBIT_AP 0x20 /* 5.2.4-49 */
1146 /* following is not paticularily tested in WFA test plan, but will help to validate our TDLS behavior in-house */
1147#define LIM_TDLS_NEGATIVE_WRONG_BSSID_IN_DSCV_RSP 0x40
1148#define LIM_TDLS_NEGATIVE_WRONG_BSSID_IN_SETUP_RSP 0x80
1149
1150void limTdlsSetNegativeBehavior(tpAniSirGlobal pMac, tANI_U8 value, tANI_BOOLEAN on);
1151#endif
1152#endif
1153
Madan Mohan Koyyalamudi521ff192012-11-15 17:13:08 -08001154void limProcessDisassocAckTimeout(tpAniSirGlobal pMac);
1155void limProcessDeauthAckTimeout(tpAniSirGlobal pMac);
1156eHalStatus limSendDisassocCnf(tpAniSirGlobal pMac);
1157eHalStatus limSendDeauthCnf(tpAniSirGlobal pMac);
Dhanashri Atre4a6e3ea2012-12-12 14:10:33 -08001158
1159#ifdef WLAN_FEATURE_VOWIFI_11R
1160typedef struct sSetLinkCbackParams
1161{
1162 void * cbackDataPtr;
1163} tSetLinkCbackParams;
1164#endif
Jeff Johnson295189b2012-06-20 16:38:30 -07001165#endif /* __LIM_TYPES_H */
1166