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