blob: 7b15b9e94c47e9d098cce6f9377d89f3303c8062 [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);
Sushant Kaushik9e923872015-04-02 17:09:31 +0530679void limSendAuthMgmtFrame(tpAniSirGlobal, tSirMacAuthFrameBody *, tSirMacAddr,
680 tANI_U8, tpPESession , tAniBool);
Jeff Johnson295189b2012-06-20 16:38:30 -0700681void limSendAssocReqMgmtFrame(tpAniSirGlobal, tLimMlmAssocReq *,tpPESession);
682void limSendReassocReqMgmtFrame(tpAniSirGlobal, tLimMlmReassocReq *,tpPESession);
683#ifdef WLAN_FEATURE_VOWIFI_11R
684void limSendReassocReqWithFTIEsMgmtFrame(tpAniSirGlobal pMac,
685 tLimMlmReassocReq *pMlmReassocReq,tpPESession psessionEntry);
686#endif
687void limSendDeltsReqActionFrame(tpAniSirGlobal pMac, tSirMacAddr peer,
688 tANI_U8 wmmTspecPresent, tSirMacTSInfo *pTsinfo,
689 tSirMacTspecIE *pTspecIe, tpPESession psessionEntry);
690void limSendAddtsReqActionFrame(tpAniSirGlobal pMac, tSirMacAddr peerMacAddr,
691 tSirAddtsReqInfo *addts,tpPESession);
692void limSendAddtsRspActionFrame(tpAniSirGlobal pMac, tSirMacAddr peerMacAddr,
693 tANI_U16 statusCode, tSirAddtsReqInfo *addts, tSirMacScheduleIE *pSchedule,tpPESession);
694
Jeff Johnson295189b2012-06-20 16:38:30 -0700695void limSendAssocRspMgmtFrame(tpAniSirGlobal, tANI_U16, tANI_U16, tSirMacAddr, tANI_U8, tpDphHashNode pSta,tpPESession);
696
697void limSendNullDataFrame(tpAniSirGlobal, tpDphHashNode);
Madan Mohan Koyyalamudi521ff192012-11-15 17:13:08 -0800698void limSendDisassocMgmtFrame(tpAniSirGlobal, tANI_U16, tSirMacAddr, tpPESession, tANI_BOOLEAN waitForAck);
699void limSendDeauthMgmtFrame(tpAniSirGlobal, tANI_U16, tSirMacAddr, tpPESession, tANI_BOOLEAN waitForAck);
Jeff Johnson295189b2012-06-20 16:38:30 -0700700
701void limContinueChannelScan(tpAniSirGlobal);
702tSirResultCodes limMlmAddBss(tpAniSirGlobal, tLimMlmStartReq *,tpPESession psessionEntry);
703
Jeff Johnsone7245742012-09-05 17:12:55 -0700704tSirRetStatus limSendChannelSwitchMgmtFrame(tpAniSirGlobal, tSirMacAddr, tANI_U8, tANI_U8, tANI_U8, tpPESession);
Jeff Johnson295189b2012-06-20 16:38:30 -0700705
Mohit Khanna4a70d262012-09-11 16:30:12 -0700706#ifdef WLAN_FEATURE_11AC
707tSirRetStatus limSendVHTOpmodeNotificationFrame(tpAniSirGlobal pMac,tSirMacAddr peer,tANI_U8 nMode, tpPESession psessionEntry );
Madan Mohan Koyyalamudic6226de2012-09-18 16:33:31 -0700708tSirRetStatus limSendVHTChannelSwitchMgmtFrame(tpAniSirGlobal pMac,tSirMacAddr peer,tANI_U8 nChanWidth, tANI_U8 nNewChannel, tANI_U8 ncbMode, tpPESession psessionEntry );
Mohit Khanna4a70d262012-09-11 16:30:12 -0700709#endif
710
Jeff Johnson295189b2012-06-20 16:38:30 -0700711#if defined WLAN_FEATURE_VOWIFI
712tSirRetStatus limSendNeighborReportRequestFrame(tpAniSirGlobal, tpSirMacNeighborReportReq, tSirMacAddr, tpPESession);
713tSirRetStatus limSendLinkReportActionFrame(tpAniSirGlobal, tpSirMacLinkReport, tSirMacAddr, tpPESession );
714tSirRetStatus limSendRadioMeasureReportActionFrame(tpAniSirGlobal, tANI_U8, tANI_U8, tpSirMacRadioMeasureReport, tSirMacAddr, tpPESession);
715#endif
716
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800717#if defined(FEATURE_WLAN_ESE) && !defined(FEATURE_WLAN_ESE_UPLOAD)
Jeff Johnson295189b2012-06-20 16:38:30 -0700718void limProcessIappFrame(tpAniSirGlobal, tANI_U8 *,tpPESession);
719#endif
720
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800721#ifdef FEATURE_WLAN_TDLS_INTERNAL
722tSirRetStatus limSendTdlsDisReqFrame(tpAniSirGlobal pMac,
723 tSirMacAddr peer_mac, tANI_U8 dialog, tpPESession psessionEntry);
724tSirRetStatus limSendTdlsLinkSetupReqFrame(tpAniSirGlobal pMac,
725 tSirMacAddr peerMac, tANI_U8 dialog, tpPESession psessionEntry,
726 tANI_U8* addIe, tANI_U16 len);
727
728eHalStatus limTdlsPrepareSetupReqFrame(tpAniSirGlobal pMac,
729 tLimTdlsLinkSetupInfo *linkSetupInfo,
730 tANI_U8 dialog, tSirMacAddr peerMac,
731 tpPESession psessionEntry);
732#endif
733#ifdef FEATURE_WLAN_TDLS
Gopichand Nakkala777e6032012-12-31 16:39:21 -0800734void limInitTdlsData(tpAniSirGlobal, tpPESession);
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800735tSirRetStatus limProcessSmeTdlsMgmtSendReq(tpAniSirGlobal pMac,
736 tANI_U32 *pMsgBuf);
737tSirRetStatus limProcessSmeTdlsAddStaReq(tpAniSirGlobal pMac,
738 tANI_U32 *pMsgBuf);
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +0530739tSirRetStatus limProcesSmeTdlsLinkEstablishReq(tpAniSirGlobal pMac,
740 tANI_U32 *pMsgBuf);
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800741tSirRetStatus limProcessSmeTdlsDelStaReq(tpAniSirGlobal pMac,
742 tANI_U32 *pMsgBuf);
Gopichand Nakkala2a0a1572013-02-10 21:39:16 -0800743void limSendSmeTDLSDeleteAllPeerInd(tpAniSirGlobal pMac, tpPESession psessionEntry);
Gopichand Nakkalab977a972013-02-18 19:15:09 -0800744void limSendSmeMgmtTXCompletion(tpAniSirGlobal pMac,
745 tpPESession psessionEntry,
746 tANI_U32 txCompleteStatus);
Gopichand Nakkala2a0a1572013-02-10 21:39:16 -0800747tSirRetStatus limDeleteTDLSPeers(tpAniSirGlobal pMac, tpPESession psessionEntry);
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800748eHalStatus limProcessTdlsAddStaRsp(tpAniSirGlobal pMac, void *msg, tpPESession);
749tSirRetStatus limSendTdlsTeardownFrame(tpAniSirGlobal pMac,
Hoonki Leea34dd892013-02-05 22:56:02 -0800750 tSirMacAddr peerMac, tANI_U16 reason, tANI_U8 responder, tpPESession psessionEntry,
Atul Mittalc0f739f2014-07-31 13:47:47 +0530751 tANI_U8 *addIe, tANI_U16 addIeLen);
752// tdlsoffchan
753tSirRetStatus limProcesSmeTdlsChanSwitchReq(tpAniSirGlobal pMac,
754 tANI_U32 *pMsgBuf);
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800755#endif
756
Jeff Johnson295189b2012-06-20 16:38:30 -0700757// Algorithms & Link Monitoring related functions
758tSirBackgroundScanMode limSelectsBackgroundScanMode(tpAniSirGlobal);
759void limTriggerBackgroundScan(tpAniSirGlobal);
760void limAbortBackgroundScan(tpAniSirGlobal);
761
762/// Function that handles heartbeat failure
763void limHandleHeartBeatFailure(tpAniSirGlobal,tpPESession);
764
765/// Function that triggers link tear down with AP upon HB failure
766void limTearDownLinkWithAp(tpAniSirGlobal,tANI_U8, tSirMacReasonCodes);
767
Jeff Johnson295189b2012-06-20 16:38:30 -0700768
769/// Function that sends keep alive message to peer(s)
770void limSendKeepAliveToPeer(tpAniSirGlobal);
771
772/// Function that processes Max retries interrupt from TFP
773void limHandleMaxRetriesInterrupt(tANI_U32);
774
775/// Function that processes messages deferred during Learn mode
776void limProcessDeferredMessageQueue(tpAniSirGlobal);
777
778/// Function that defers the messages received
779tANI_U32 limDeferMsg(tpAniSirGlobal, tSirMsgQ *);
780
781/// Function that sets system into scan mode
782void limSetScanMode(tpAniSirGlobal pMac);
783
784/// Function that Switches the Channel and sets the CB Mode
Jeff Johnsone7245742012-09-05 17:12:55 -0700785void limSetChannel(tpAniSirGlobal pMac, tANI_U8 channel, tANI_U8 secChannelOffset, tPowerdBm maxTxPower, tANI_U8 peSessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -0700786
787/// Function that completes channel scan
788void limCompleteMlmScan(tpAniSirGlobal, tSirResultCodes);
789
Jeff Johnsone7245742012-09-05 17:12:55 -0700790#ifdef FEATURE_OEM_DATA_SUPPORT
791/// Funtion that sets system into meas mode for oem data req
792void limSetOemDataReqMode(tpAniSirGlobal pMac, eHalStatus status, tANI_U32* data);
793#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700794
795#ifdef ANI_SUPPORT_11H
796/// Function that sends Measurement Report action frame
797tSirRetStatus limSendMeasReportFrame(tpAniSirGlobal, tpSirMacMeasReqActionFrame, tSirMacAddr);
798
799/// Function that sends TPC Report action frame
800tSirRetStatus limSendTpcReportFrame(tpAniSirGlobal, tpSirMacTpcReqActionFrame, tSirMacAddr);
801#endif
802
803/// Function that sends TPC Request action frame
804void limSendTpcRequestFrame(tpAniSirGlobal, tSirMacAddr);
805
806// Function(s) to handle responses received from HAL
807void limProcessMlmAddBssRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ );
808void limProcessMlmAddStaRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQt,tpPESession psessionEntry);
809void limProcessMlmDelStaRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ );
810void limProcessMlmDelBssRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ,tpPESession);
Jeff Johnson295189b2012-06-20 16:38:30 -0700811void limProcessStaMlmAddStaRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ ,tpPESession psessionEntry);
812void limProcessStaMlmDelStaRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ,tpPESession psessionEntry);
813void limProcessStaMlmDelBssRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ ,tpPESession psessionEntry);
814void limProcessMlmSetStaKeyRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ );
815void limProcessMlmSetBssKeyRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ );
816
817
818
819#ifdef GEN4_SCAN
820// Function to process WDA_INIT_SCAN_RSP message
821void limProcessInitScanRsp(tpAniSirGlobal, void * );
822
823// Function to process WDA_START_SCAN_RSP message
824void limProcessStartScanRsp(tpAniSirGlobal, void * );
825
826// Function to process WDA_END_SCAN_RSP message
827void limProcessEndScanRsp(tpAniSirGlobal, void * );
828
829// Function to process WDA_FINISH_SCAN_RSP message
830void limProcessFinishScanRsp(tpAniSirGlobal, void * );
831
832// Function to process WDA_SWITCH_CHANNEL_RSP message
833void limProcessSwitchChannelRsp(tpAniSirGlobal pMac, void * );
834
835void limSendHalInitScanReq( tpAniSirGlobal, tLimLimHalScanState, tSirLinkTrafficCheck);
836void limSendHalStartScanReq( tpAniSirGlobal, tANI_U8, tLimLimHalScanState);
837void limSendHalEndScanReq( tpAniSirGlobal, tANI_U8, tLimLimHalScanState);
838void limSendHalFinishScanReq( tpAniSirGlobal, tLimLimHalScanState);
839
840void limContinuePostChannelScan(tpAniSirGlobal pMac);
Gopichand Nakkalad492d202013-05-10 02:50:47 +0530841void limCovertChannelScanType(tpAniSirGlobal pMac,tANI_U8 channelNum, tANI_BOOLEAN passiveToActive);
842void limSetDFSChannelList(tpAniSirGlobal pMac,tANI_U8 channelNum, tSirDFSChannelList *dfsChannelList);
Jeff Johnson295189b2012-06-20 16:38:30 -0700843void limContinueChannelLearn( tpAniSirGlobal );
844//WLAN_SUSPEND_LINK Related
845tANI_U8 limIsLinkSuspended(tpAniSirGlobal pMac);
846void limSuspendLink(tpAniSirGlobal, tSirLinkTrafficCheck, SUSPEND_RESUME_LINK_CALLBACK, tANI_U32*);
847void limResumeLink(tpAniSirGlobal, SUSPEND_RESUME_LINK_CALLBACK, tANI_U32*);
848//end WLAN_SUSPEND_LINK Related
849#endif // GEN4_SCAN
850
851tSirRetStatus limSendAddBAReq( tpAniSirGlobal pMac,
852 tpLimMlmAddBAReq pMlmAddBAReq,tpPESession);
853
854tSirRetStatus limSendAddBARsp( tpAniSirGlobal pMac,
855 tpLimMlmAddBARsp pMlmAddBARsp,tpPESession);
856
857tSirRetStatus limSendDelBAInd( tpAniSirGlobal pMac,
858 tpLimMlmDelBAReq pMlmDelBAReq ,tpPESession psessionEntry);
859#if 0
860tSirRetStatus limSendSMPowerStateFrame( tpAniSirGlobal pMac,
861 tSirMacAddr peer, tSirMacHTMIMOPowerSaveState State );
862#endif
863
864void limProcessMlmHalAddBARsp( tpAniSirGlobal pMac,
865 tpSirMsgQ limMsgQ );
866
867void limProcessMlmHalBADeleteInd( tpAniSirGlobal pMac,
868 tpSirMsgQ limMsgQ );
869
870void limProcessMlmRemoveKeyRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ );
871
872void limProcessLearnIntervalTimeout(tpAniSirGlobal pMac);
Chet Lanctot8cecea22014-02-11 19:09:36 -0800873
Jeff Johnson295189b2012-06-20 16:38:30 -0700874#ifdef WLAN_FEATURE_11W
Chet Lanctot8cecea22014-02-11 19:09:36 -0800875//11w send SA query request action frame
876tSirRetStatus limSendSaQueryRequestFrame( tpAniSirGlobal pMac, tANI_U8 *transId,
877 tSirMacAddr peer, tpPESession psessionEntry );
Jeff Johnson295189b2012-06-20 16:38:30 -0700878//11w SA query request action frame handler
879tSirRetStatus limSendSaQueryResponseFrame( tpAniSirGlobal pMac,
Chet Lanctot186b5732013-03-18 10:26:30 -0700880 tANI_U8 *transId, tSirMacAddr peer,tpPESession psessionEntry);
Jeff Johnson295189b2012-06-20 16:38:30 -0700881#endif
882// Inline functions
883
884/**
885 * limPostSmeMessage()
886 *
887 *FUNCTION:
888 * This function is called by limProcessMlmMessages(). In this
889 * function MLM sub-module invokes MLM ind/cnf primitives.
890 *
891 *LOGIC:
892 * Initially MLM makes an SME function call to invoke MLM ind/cnf
893 * primitive. In future this can be enhanced to 'post' messages to SME.
894 *
895 *ASSUMPTIONS:
896 * NA
897 *
898 *NOTE:
899 * NA
900 *
901 * @param pMac Pointer to Global MAC structure
902 * @param msgType Indicates the MLM primitive message type
903 * @param *pMsgBuf A pointer to the MLM message buffer
904 *
905 * @return None
906 */
907static inline void
908limPostSmeMessage(tpAniSirGlobal pMac, tANI_U32 msgType, tANI_U32 *pMsgBuf)
909{
910 tSirMsgQ msg;
911
912 if(pMsgBuf == NULL)
913 {
Kiran Kumar Lokere5be73a62013-04-01 18:40:00 -0700914 limLog(pMac, LOGE,FL("Buffer is Pointing to NULL"));
Jeff Johnson295189b2012-06-20 16:38:30 -0700915 return;
916 }
917
918 msg.type = (tANI_U16)msgType;
919 msg.bodyptr = pMsgBuf;
920 msg.bodyval = 0;
921 if (msgType > eWNI_SME_MSG_TYPES_BEGIN)
922 limProcessSmeReqMessages(pMac, &msg);
923 else
924 limProcessMlmRspMessages(pMac, msgType, pMsgBuf);
925} /*** end limPostSmeMessage() ***/
926
927/**
928 * limPostMlmMessage()
929 *
930 *FUNCTION:
931 * This function is called by limProcessSmeMessages(). In this
932 * function SME invokes MLME primitives.
933 *
934 *PARAMS:
935 *
936 *LOGIC:
937 * Initially SME makes an MLM function call to invoke MLM primitive.
938 * In future this can be enhanced to 'post' messages to MLM.
939 *
940 *ASSUMPTIONS:
941 * NA
942 *
943 *NOTE:
944 * NA
945 *
946 * @param pMac Pointer to Global MAC structure
947 * @param msgType Indicates the MLM primitive message type
948 * @param *pMsgBuf A pointer to the MLM message buffer
949 *
950 * @return None
951 */
952static inline void
953limPostMlmMessage(tpAniSirGlobal pMac, tANI_U32 msgType, tANI_U32 *pMsgBuf)
954{
955
956 tSirMsgQ msg;
957 if(pMsgBuf == NULL)
958 {
Kiran Kumar Lokere5be73a62013-04-01 18:40:00 -0700959 limLog(pMac, LOGE,FL("Buffer is Pointing to NULL"));
Jeff Johnson295189b2012-06-20 16:38:30 -0700960 return;
961 }
962 msg.type = (tANI_U16) msgType;
963 msg.bodyptr = pMsgBuf;
964 msg.bodyval = 0;
965 limProcessMlmReqMessages(pMac, &msg);
966} /*** end limPostMlmMessage() ***/
967
968
969
970/**
971 * limGetCurrentScanChannel()
972 *
973 *FUNCTION:
974 * This function is called in various places to get current channel
975 * number being scanned.
976 *
977 *PARAMS:
978 *
979 *LOGIC:
980 *
981 *ASSUMPTIONS:
982 * NA
983 *
984 *NOTE:
985 * NA
986 *
987 * @param pMac Pointer to Global MAC structure
988 * @return Channel number
989 */
990static inline tANI_U8
991limGetCurrentScanChannel(tpAniSirGlobal pMac)
992{
993 tANI_U8 *pChanNum = pMac->lim.gpLimMlmScanReq->channelList.channelNumber;
994
995 return (*(pChanNum + pMac->lim.gLimCurrentScanChannelId));
996} /*** end limGetCurrentScanChannel() ***/
997
998
999
1000/**
1001 * limGetIElenFromBssDescription()
1002 *
1003 *FUNCTION:
1004 * This function is called in various places to get IE length
1005 * from tSirBssDescription structure
1006 * number being scanned.
1007 *
1008 *PARAMS:
1009 *
1010 *LOGIC:
1011 *
1012 *ASSUMPTIONS:
1013 * NA
1014 *
1015 *NOTE:
1016 * NA
1017 *
1018 * @param pBssDescr
1019 * @return Total IE length
1020 */
1021
1022static inline tANI_U16
1023limGetIElenFromBssDescription(tpSirBssDescription pBssDescr)
1024{
1025 if (!pBssDescr)
1026 return 0;
1027
1028 return ((tANI_U16) (pBssDescr->length + sizeof(tANI_U16) +
1029 sizeof(tANI_U32) - sizeof(tSirBssDescription)));
1030} /*** end limGetIElenFromBssDescription() ***/
1031
Jeff Johnson295189b2012-06-20 16:38:30 -07001032/**
1033 * limSendBeaconInd()
1034 *
1035 *FUNCTION:
1036 * This function is called to send the beacon indication
1037 * number being scanned.
1038 *
1039 *PARAMS:
1040 *
1041 *LOGIC:
1042 *
1043 *ASSUMPTIONS:
1044*/
1045
1046void
1047limSendBeaconInd(tpAniSirGlobal pMac, tpPESession psessionEntry);
Jeff Johnson295189b2012-06-20 16:38:30 -07001048
Jeff Johnson295189b2012-06-20 16:38:30 -07001049
1050void limGetWPSPBCSessions(tpAniSirGlobal pMac, tANI_U8 *addr, tANI_U8 *uuid_e, eWPSPBCOverlap *overlap, tpPESession psessionEntry);
1051void limWPSPBCTimeout(tpAniSirGlobal pMac, tpPESession psessionEntry);
1052void limWPSPBCClose(tpAniSirGlobal pMac, tpPESession psessionEntry);
1053void limRemovePBCSessions(tpAniSirGlobal pMac, tSirMacAddr pRemoveMac,tpPESession psessionEntry);
1054
1055
1056tSirRetStatus
1057limIsSmeGetWPSPBCSessionsReqValid(tpAniSirGlobal pMac, tSirSmeGetWPSPBCSessionsReq *pGetWPSPBCSessionsReq, tANI_U8 *pBuf);
1058
1059#define LIM_WPS_OVERLAP_TIMER_MS 10000
Jeff Johnson295189b2012-06-20 16:38:30 -07001060
1061void
1062limSuspendLink(tpAniSirGlobal pMac, tSirLinkTrafficCheck trafficCheck, SUSPEND_RESUME_LINK_CALLBACK callback, tANI_U32 *data);
1063void
1064limResumeLink(tpAniSirGlobal pMac, SUSPEND_RESUME_LINK_CALLBACK callback, tANI_U32 *data);
1065
1066void
1067limChangeChannelWithCallback(tpAniSirGlobal pMac, tANI_U8 newChannel,
1068 CHANGE_CHANNEL_CALLBACK callback, tANI_U32 *cbdata, tpPESession psessionEntry);
1069
Jeff Johnson295189b2012-06-20 16:38:30 -07001070void limSendSmeMgmtFrameInd(
Rashmi Ramanna0d0adec2014-02-05 20:35:37 +05301071 tpAniSirGlobal pMac, tANI_U16 sessionId,
1072 tANI_U8 *pRxPacketInfo,
1073 tpPESession psessionEntry, tANI_S8 rxRssi);
Jeff Johnson295189b2012-06-20 16:38:30 -07001074void limProcessRemainOnChnTimeout(tpAniSirGlobal pMac);
Gopichand Nakkala4261ea52012-12-31 16:43:00 -08001075void limProcessInsertSingleShotNOATimeout(tpAniSirGlobal pMac);
Gopichand Nakkalad492d202013-05-10 02:50:47 +05301076void limConvertActiveChannelToPassiveChannel(tpAniSirGlobal pMac);
Jeff Johnson295189b2012-06-20 16:38:30 -07001077void limSendP2PActionFrame(tpAniSirGlobal pMac, tpSirMsgQ pMsg);
1078void limAbortRemainOnChan(tpAniSirGlobal pMac);
1079tSirRetStatus __limProcessSmeNoAUpdate(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf);
Viral Modid440e682013-03-06 02:25:31 -08001080void limProcessRegdDefdSmeReqAfterNOAStart(tpAniSirGlobal pMac);
Mohit Khanna698ba2a2012-12-04 15:08:18 -08001081#ifdef FEATURE_WLAN_TDLS_INTERNAL
1082void limProcessTdlsFrame(tpAniSirGlobal, tANI_U32 *);
Mohit Khanna698ba2a2012-12-04 15:08:18 -08001083void limProcessTdlsPublicActionFrame(tpAniSirGlobal pMac, tANI_U32 *pBd,
1084 tpPESession) ;
1085#ifdef FEATURE_WLAN_TDLS_NEGATIVE
1086#define LIM_TDLS_NEGATIVE_WRONG_BSSID_IN_DSCV_REQ 0x1 /* 5.1.4-5 */
1087#define LIM_TDLS_NEGATIVE_WRONG_BSSID_IN_SETUP_REQ 0x2 /* 5.2.4-16 */
1088#define LIM_TDLS_NEGATIVE_STATUS_37_IN_SETUP_CNF 0x4 /* 5.2.4-10 */
1089#define LIM_TDLS_NEGATIVE_SEND_REQ_TO_SETUP_REQ 0x8 /* 5.2.4-20/32 */
1090#define LIM_TDLS_NEGATIVE_RSP_TIMEOUT_TO_SETUP_REQ 0x10 /* 5.2.3.4 */
1091#define LIM_TDLS_NEGATIVE_TREAT_TDLS_PROHIBIT_AP 0x20 /* 5.2.4-49 */
1092 /* following is not paticularily tested in WFA test plan, but will help to validate our TDLS behavior in-house */
1093#define LIM_TDLS_NEGATIVE_WRONG_BSSID_IN_DSCV_RSP 0x40
1094#define LIM_TDLS_NEGATIVE_WRONG_BSSID_IN_SETUP_RSP 0x80
1095
1096void limTdlsSetNegativeBehavior(tpAniSirGlobal pMac, tANI_U8 value, tANI_BOOLEAN on);
1097#endif
1098#endif
1099
Madan Mohan Koyyalamudi521ff192012-11-15 17:13:08 -08001100void limProcessDisassocAckTimeout(tpAniSirGlobal pMac);
1101void limProcessDeauthAckTimeout(tpAniSirGlobal pMac);
1102eHalStatus limSendDisassocCnf(tpAniSirGlobal pMac);
1103eHalStatus limSendDeauthCnf(tpAniSirGlobal pMac);
Dhanashri Atre4a6e3ea2012-12-12 14:10:33 -08001104
1105#ifdef WLAN_FEATURE_VOWIFI_11R
1106typedef struct sSetLinkCbackParams
1107{
1108 void * cbackDataPtr;
1109} tSetLinkCbackParams;
1110#endif
Gopichand Nakkala2c231c82013-06-11 17:49:16 +05301111
1112void limProcessRxScanEvent(tpAniSirGlobal mac, void *buf);
Sudhir Sattayappa Kohalliabf751c2013-06-30 15:37:18 -07001113
1114int limProcessRemainOnChnlReq(tpAniSirGlobal pMac, tANI_U32 *pMsg);
1115void limRemainOnChnRsp(tpAniSirGlobal pMac, eHalStatus status, tANI_U32 *data);
Siddharth Bhal4f3187c2014-10-09 21:38:08 +05301116void limProcessMlmSpoofMacAddrRsp(tpAniSirGlobal pMac, tSirRetStatus rspStatus);
Jeff Johnson295189b2012-06-20 16:38:30 -07001117#endif /* __LIM_TYPES_H */
1118