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