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