blob: 39e76de5601af156e840582992ea6f32015421d9 [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;
Jeff Johnson295189b2012-06-20 16:38:30 -0700260
Jeff Johnson295189b2012-06-20 16:38:30 -0700261 // Required for indicating the frames to upper layer
262 tANI_U32 beaconLength;
263 tANI_U8* beaconPtr;
264 tANI_U32 assocReqLength;
265 tANI_U8* assocReqPtr;
266} tLimMlmAssocInd, *tpLimMlmAssocInd;
267
268typedef struct sLimMlmReassocReq
269{
270 tSirMacAddr peerMacAddr;
271 tANI_U32 reassocFailureTimeout;
272 tANI_U16 capabilityInfo;
273 tSirMacListenInterval listenInterval;
274 tANI_U8 sessionId;
275} tLimMlmReassocReq, *tpLimMlmReassocReq;
276
277typedef struct sLimMlmReassocCnf
278{
279 tSirResultCodes resultCode;
280 tANI_U16 protStatusCode; //Protocol Status code.
281 tANI_U8 sessionId;
282} tLimMlmReassocCnf, *tpLimMlmReassocCnf;
283
284typedef struct sLimMlmReassocInd
285{
286 tSirMacAddr peerMacAddr;
287 tSirMacAddr currentApAddr;
288 tANI_U16 aid;
289 tAniAuthType authType;
290 tAniSSID ssId;
291 tSirRSNie rsnIE;
Jeff Johnson1250df42012-12-10 14:31:52 -0800292 tSirAddie addIE; // additional IE received from the peer, which can be WSC IE and/or P2P IE.
Jeff Johnson295189b2012-06-20 16:38:30 -0700293 tSirMacCapabilityInfo capabilityInfo;
Jeff Johnson295189b2012-06-20 16:38:30 -0700294 tAniBool spectrumMgtIndicator;
295 tSirMacPowerCapInfo powerCap;
296 tSirSupChnl supportedChannels;
297
Jeff Johnson295189b2012-06-20 16:38:30 -0700298 tAniBool WmmStaInfoPresent;
Jeff Johnson295189b2012-06-20 16:38:30 -0700299
Jeff Johnson295189b2012-06-20 16:38:30 -0700300 // Required for indicating the frames to upper layer
301 tANI_U32 beaconLength;
302 tANI_U8* beaconPtr;
303 tANI_U32 assocReqLength;
304 tANI_U8* assocReqPtr;
305} tLimMlmReassocInd, *tpLimMlmReassocInd;
306
307typedef struct sLimMlmAuthCnf
308{
309 tSirMacAddr peerMacAddr;
310 tAniAuthType authType;
311 tSirResultCodes resultCode;
312 tANI_U16 protStatusCode;
313 tANI_U8 sessionId;
314} tLimMlmAuthCnf, *tpLimMlmAuthCnf;
315
316typedef struct sLimMlmAuthInd
317{
318 tSirMacAddr peerMacAddr;
319 tAniAuthType authType;
320 tANI_U8 sessionId;
321} tLimMlmAuthInd, *tpLimMlmAuthInd;
322
323typedef struct sLimMlmDeauthReq
324{
325 tSirMacAddr peerMacAddr;
326 tANI_U16 reasonCode;
327 tANI_U16 deauthTrigger;
328 tANI_U16 aid;
329 tANI_U8 sessionId; //Added for BT-AMP SUPPORT
330
331} tLimMlmDeauthReq, *tpLimMlmDeauthReq;
332
333typedef struct sLimMlmDeauthCnf
334{
335 tSirMacAddr peerMacAddr;
336 tSirResultCodes resultCode;
337 tANI_U16 deauthTrigger;
338 tANI_U16 aid;
339 tANI_U8 sessionId;
340} tLimMlmDeauthCnf, *tpLimMLmDeauthCnf;
341
342typedef struct sLimMlmDeauthInd
343{
344 tSirMacAddr peerMacAddr;
345 tANI_U16 reasonCode;
346 tANI_U16 deauthTrigger;
347 tANI_U16 aid;
348} tLimMlmDeauthInd, *tpLimMlmDeauthInd;
349
350typedef struct sLimMlmDisassocReq
351{
352 tSirMacAddr peerMacAddr;
353 tANI_U16 reasonCode;
354 tANI_U16 disassocTrigger;
355 tANI_U16 aid;
356 tANI_U8 sessionId;
357} tLimMlmDisassocReq, *tpLimMlmDisassocReq;
358
359typedef struct sLimMlmDisassocCnf
360{
361 tSirMacAddr peerMacAddr;
362 tSirResultCodes resultCode;
363 tANI_U16 disassocTrigger;
364 tANI_U16 aid;
365 tANI_U8 sessionId;
366} tLimMlmDisassocCnf, *tpLimMlmDisassocCnf;
367
368typedef struct sLimMlmDisassocInd
369{
370 tSirMacAddr peerMacAddr;
371 tANI_U16 reasonCode;
372 tANI_U16 disassocTrigger;
373 tANI_U16 aid;
374 tANI_U8 sessionId;
375} tLimMlmDisassocInd, *tpLimMlmDisassocInd;
376
377typedef struct sLimMlmPurgeStaReq
378{
379 tSirMacAddr peerMacAddr;
380 tANI_U16 aid;
381 tANI_U8 sessionId;//Added For BT-AMP Support
382} tLimMlmPurgeStaReq, *tpLimMlmPurgeStaReq;
383
384typedef struct sLimMlmPurgeStaInd
385{
386 tSirMacAddr peerMacAddr;
387 tANI_U16 reasonCode;
388 tANI_U16 purgeTrigger;
389 tANI_U16 aid;
390 tANI_U8 sessionId;
391} tLimMlmPurgeStaInd, *tpLimMlmPurgeStaInd;
392
393typedef struct sLimMlmSetKeysReq
394{
395 tSirMacAddr peerMacAddr;
396 tANI_U8 sessionId; //Added For BT-AMP Support
397 tANI_U16 aid;
398 tAniEdType edType; // Encryption/Decryption type
399 tANI_U8 numKeys;
400 tSirKeys key[SIR_MAC_MAX_NUM_OF_DEFAULT_KEYS];
401} tLimMlmSetKeysReq, *tpLimMlmSetKeysReq;
402
403typedef struct sLimMlmSetKeysCnf
404{
405 tSirMacAddr peerMacAddr;
406 tANI_U16 resultCode;
407 tANI_U16 aid;
408 tANI_U8 sessionId;
409} tLimMlmSetKeysCnf, *tpLimMlmSetKeysCnf;
410
411typedef struct sLimMlmRemoveKeyReq
412{
413 tSirMacAddr peerMacAddr;
414 tANI_U8 sessionId; //Added FOr BT-AMP Support
415 tAniEdType edType; // Encryption/Decryption type
416 tANI_U8 wepType; //STATIC / DYNAMIC specifier
417 tANI_U8 keyId; //Key Id To be removed.
418 tANI_BOOLEAN unicast;
419} tLimMlmRemoveKeyReq, *tpLimMlmRemoveKeyReq;
420
421typedef struct sLimMlmRemoveKeyCnf
422{
423 tSirMacAddr peerMacAddr;
424 tANI_U16 resultCode;
425 tANI_U8 sessionId;
426} tLimMlmRemoveKeyCnf, *tpLimMlmRemoveKeyCnf;
427
428
429typedef struct sLimMlmResetReq
430{
431 tSirMacAddr macAddr;
432 tANI_U8 performCleanup;
433 tANI_U8 sessionId;
434} tLimMlmResetReq, *tpLimMlmResetReq;
435
436typedef struct sLimMlmResetCnf
437{
438 tSirMacAddr macAddr;
439 tSirResultCodes resultCode;
440 tANI_U8 sessionId;
441} tLimMlmResetCnf, *tpLimMlmResetCnf;
442
443
444typedef struct sLimMlmLinkTestStopReq
445{
446 tSirMacAddr peerMacAddr;
447 tANI_U8 sessionId;
Jeff Johnson295189b2012-06-20 16:38:30 -0700448} tLimMlmLinkTestStopReq, *tpLimMlmLinkTestStopReq;
449
450
451//
452// Block ACK related MLME data structures
453//
454
455typedef struct sLimMlmAddBAReq
456{
457
458 // ADDBA recipient
459 tSirMacAddr peerMacAddr;
460
461 // ADDBA Action Frame dialog token
462 tANI_U8 baDialogToken;
463
464 // ADDBA requested for TID
465 tANI_U8 baTID;
466
467 // BA policy
468 // 0 - Delayed BA (Not supported)
469 // 1 - Immediate BA
470 tANI_U8 baPolicy;
471
472 // BA buffer size - (0..127) max size MSDU's
473 tANI_U16 baBufferSize;
474
475 // BA timeout in TU's
476 // 0 means no timeout will occur
477 tANI_U16 baTimeout;
478
479 // ADDBA failure timeout in TU's
480 // Greater than or equal to 1
481 tANI_U16 addBAFailureTimeout;
482
483 // BA Starting Sequence Number
484 tANI_U16 baSSN;
485
486 tANI_U8 sessionId;
487
488} tLimMlmAddBAReq, *tpLimMlmAddBAReq;
489
490typedef struct sLimMlmAddBACnf
491{
492
493 // ADDBA recipient
494 tSirMacAddr peerMacAddr;
495
496 // ADDBA Action Frame dialog token
497 tANI_U8 baDialogToken;
498
499 // ADDBA requested for TID
500 tANI_U8 baTID;
501
502 // BA status code
503 tSirMacStatusCodes addBAResultCode;
504
505 // BA policy
506 // 0 - Delayed BA (Not supported)
507 // 1 - Immediate BA
508 tANI_U8 baPolicy;
509
510 // BA buffer size - (0..127) max size MSDU's
511 tANI_U16 baBufferSize;
512
513 // BA timeout in TU's
514 // 0 means no timeout will occur
515 tANI_U16 baTimeout;
516
517 // ADDBA direction
518 // 1 - Originator
519 // 0 - Recipient
520 tANI_U8 baDirection;
521 tANI_U8 sessionId;
522
523
524} tLimMlmAddBACnf, *tpLimMlmAddBACnf;
525
526typedef struct sLimMlmAddBAInd
527{
528
529 // ADDBA recipient
530 tSirMacAddr peerMacAddr;
531
532 // ADDBA Action Frame dialog token
533 tANI_U8 baDialogToken;
534
535 // ADDBA requested for TID
536 tANI_U8 baTID;
537
538 // BA policy
539 // 0 - Delayed BA (Not supported)
540 // 1 - Immediate BA
541 tANI_U8 baPolicy;
542
543 // BA buffer size - (0..127) max size MSDU's
544 tANI_U16 baBufferSize;
545
546 // BA timeout in TU's
547 // 0 means no timeout will occur
548 tANI_U16 baTimeout;
549
550} tLimMlmAddBAInd, *tpLimMlmAddBAInd;
551
552typedef struct sLimMlmAddBARsp
553{
554
555 // ADDBA recipient
556 tSirMacAddr peerMacAddr;
557
558 // ADDBA Action Frame dialog token
559 tANI_U8 baDialogToken;
560
561 // ADDBA requested for TID
562 tANI_U8 baTID;
563
564 // BA status code
565 tSirMacStatusCodes addBAResultCode;
566
567 // BA policy
568 // 0 - Delayed BA (Not supported)
569 // 1 - Immediate BA
570 tANI_U8 baPolicy;
571
572 // BA buffer size - (0..127) max size MSDU's
573 tANI_U16 baBufferSize;
574
575 // BA timeout in TU's
576 // 0 means no timeout will occur
577 tANI_U16 baTimeout;
578
579 //reserved for alignment
580 tANI_U8 rsvd[2];
581
582 /* PE session id*/
583 tANI_U8 sessionId;
584
585 } tLimMlmAddBARsp, *tpLimMlmAddBARsp;
586
587//
588// NOTE - Overloading DELBA IND and DELBA CNF
589// to use the same data structure as DELBA REQ
590// as the parameters do not vary too much.
591//
592typedef struct sLimMlmDelBAReq
593{
594
595 // ADDBA recipient
596 tSirMacAddr peerMacAddr;
597
598 // DELBA direction
599 // 1 - Originator
600 // 0 - Recipient
601 tANI_U8 baDirection;
602
603 // DELBA requested for TID
604 tANI_U8 baTID;
605
606 // DELBA reason code
607 tSirMacReasonCodes delBAReasonCode;
608
609 tANI_U8 sessionId;
610
611} tLimMlmDelBAReq, *tpLimMlmDelBAReq, tLimMlmDelBAInd, *tpLimMlmDelBAInd, tLimMlmDelBACnf, *tpLimMlmDelBACnf;
612
613// Function templates
614
615tANI_BOOLEAN limProcessSmeReqMessages(tpAniSirGlobal, tpSirMsgQ);
616void limProcessMlmReqMessages(tpAniSirGlobal, tpSirMsgQ);
617void limProcessMlmRspMessages(tpAniSirGlobal, tANI_U32, tANI_U32 *);
618void limProcessLmmMessages(tpAniSirGlobal, tANI_U32, tANI_U32 *);
619void limProcessSmeDelBssRsp( tpAniSirGlobal , tANI_U32,tpPESession);
620
621void limGetRandomBssid(tpAniSirGlobal pMac ,tANI_U8 *data);
622
Jeff Johnson295189b2012-06-20 16:38:30 -0700623// Function to handle HT and HT IE CFG parameter intializations
Jeff Johnsone7245742012-09-05 17:12:55 -0700624void handleHTCapabilityandHTInfo(struct sAniSirGlobal *pMac, tpPESession psessionEntry);
Jeff Johnson295189b2012-06-20 16:38:30 -0700625
626// Function to handle CFG parameter updates
627void limHandleCFGparamUpdate(tpAniSirGlobal, tANI_U32);
628
629// Function to apply CFG parameters before join/reassoc/start BSS
630void limApplyConfiguration(tpAniSirGlobal,tpPESession);
631
Jeff Johnson295189b2012-06-20 16:38:30 -0700632void limSetCfgProtection(tpAniSirGlobal pMac, tpPESession pesessionEntry);
Jeff Johnson295189b2012-06-20 16:38:30 -0700633
634
635// Function to Initialize MLM state machine on STA
636void limInitMlm(tpAniSirGlobal);
637
638// Function to cleanup MLM state machine
639void limCleanupMlm(tpAniSirGlobal);
640
641// Function to cleanup LMM state machine
642void limCleanupLmm(tpAniSirGlobal);
643
Jeff Johnson295189b2012-06-20 16:38:30 -0700644// Management frame handling functions
645void limProcessBeaconFrame(tpAniSirGlobal, tANI_U8 *,tpPESession);
646void limProcessBeaconFrameNoSession(tpAniSirGlobal, tANI_U8 *);
647void limProcessProbeReqFrame(tpAniSirGlobal, tANI_U8 *, tpPESession);
648void limProcessProbeRspFrame(tpAniSirGlobal, tANI_U8 *, tpPESession);
649void limProcessProbeRspFrameNoSession(tpAniSirGlobal, tANI_U8 *);
650void limProcessProbeReqFrame_multiple_BSS(tpAniSirGlobal, tANI_U8 *,tpPESession);
651
652
653// Process Auth frame when we have a session in progress.
654void limProcessAuthFrame(tpAniSirGlobal, tANI_U8 *,tpPESession);
655#ifdef WLAN_FEATURE_VOWIFI_11R
Srikant Kuppaa3ed0a32013-02-20 07:24:43 -0800656tSirRetStatus limProcessAuthFrameNoSession(tpAniSirGlobal pMac, tANI_U8 *, void *body);
Jeff Johnson295189b2012-06-20 16:38:30 -0700657#endif
658
659void limProcessAssocReqFrame(tpAniSirGlobal, tANI_U8 *, tANI_U8, tpPESession);
660void limSendMlmAssocInd(tpAniSirGlobal pMac, tpDphHashNode pStaDs, tpPESession psessionEntry);
661
662
663void limProcessAssocRspFrame(tpAniSirGlobal, tANI_U8 *, tANI_U8,tpPESession);
664void limProcessDisassocFrame(tpAniSirGlobal, tANI_U8 *,tpPESession);
665void limProcessDeauthFrame(tpAniSirGlobal, tANI_U8 *,tpPESession);
666void limProcessActionFrame(tpAniSirGlobal, tANI_U8 *,tpPESession);
Jeff Johnson295189b2012-06-20 16:38:30 -0700667void limProcessActionFrameNoSession(tpAniSirGlobal pMac, tANI_U8 *pRxMetaInfo);
Jeff Johnson295189b2012-06-20 16:38:30 -0700668
669
670tSirRetStatus limPopulateMacHeader(tpAniSirGlobal, tANI_U8*, tANI_U8, tANI_U8, tSirMacAddr,tSirMacAddr);
671tSirRetStatus limSendProbeReqMgmtFrame(tpAniSirGlobal, tSirMacSSid *, tSirMacAddr, tANI_U8, tSirMacAddr, tANI_U32, tANI_U32, tANI_U8 *);
672void limSendProbeRspMgmtFrame(tpAniSirGlobal, tSirMacAddr, tpAniSSID, short, tANI_U8, tpPESession, tANI_U8);
673void limSendAuthMgmtFrame(tpAniSirGlobal, tSirMacAuthFrameBody *, tSirMacAddr, tANI_U8,tpPESession);
674void limSendAssocReqMgmtFrame(tpAniSirGlobal, tLimMlmAssocReq *,tpPESession);
675void limSendReassocReqMgmtFrame(tpAniSirGlobal, tLimMlmReassocReq *,tpPESession);
676#ifdef WLAN_FEATURE_VOWIFI_11R
677void limSendReassocReqWithFTIEsMgmtFrame(tpAniSirGlobal pMac,
678 tLimMlmReassocReq *pMlmReassocReq,tpPESession psessionEntry);
679#endif
680void limSendDeltsReqActionFrame(tpAniSirGlobal pMac, tSirMacAddr peer,
681 tANI_U8 wmmTspecPresent, tSirMacTSInfo *pTsinfo,
682 tSirMacTspecIE *pTspecIe, tpPESession psessionEntry);
683void limSendAddtsReqActionFrame(tpAniSirGlobal pMac, tSirMacAddr peerMacAddr,
684 tSirAddtsReqInfo *addts,tpPESession);
685void limSendAddtsRspActionFrame(tpAniSirGlobal pMac, tSirMacAddr peerMacAddr,
686 tANI_U16 statusCode, tSirAddtsReqInfo *addts, tSirMacScheduleIE *pSchedule,tpPESession);
687
Jeff Johnson295189b2012-06-20 16:38:30 -0700688void limSendAssocRspMgmtFrame(tpAniSirGlobal, tANI_U16, tANI_U16, tSirMacAddr, tANI_U8, tpDphHashNode pSta,tpPESession);
689
690void limSendNullDataFrame(tpAniSirGlobal, tpDphHashNode);
Madan Mohan Koyyalamudi521ff192012-11-15 17:13:08 -0800691void limSendDisassocMgmtFrame(tpAniSirGlobal, tANI_U16, tSirMacAddr, tpPESession, tANI_BOOLEAN waitForAck);
692void limSendDeauthMgmtFrame(tpAniSirGlobal, tANI_U16, tSirMacAddr, tpPESession, tANI_BOOLEAN waitForAck);
Jeff Johnson295189b2012-06-20 16:38:30 -0700693
694void limContinueChannelScan(tpAniSirGlobal);
695tSirResultCodes limMlmAddBss(tpAniSirGlobal, tLimMlmStartReq *,tpPESession psessionEntry);
696
Jeff Johnsone7245742012-09-05 17:12:55 -0700697tSirRetStatus limSendChannelSwitchMgmtFrame(tpAniSirGlobal, tSirMacAddr, tANI_U8, tANI_U8, tANI_U8, tpPESession);
Jeff Johnson295189b2012-06-20 16:38:30 -0700698
Mohit Khanna4a70d262012-09-11 16:30:12 -0700699#ifdef WLAN_FEATURE_11AC
700tSirRetStatus limSendVHTOpmodeNotificationFrame(tpAniSirGlobal pMac,tSirMacAddr peer,tANI_U8 nMode, tpPESession psessionEntry );
Madan Mohan Koyyalamudic6226de2012-09-18 16:33:31 -0700701tSirRetStatus limSendVHTChannelSwitchMgmtFrame(tpAniSirGlobal pMac,tSirMacAddr peer,tANI_U8 nChanWidth, tANI_U8 nNewChannel, tANI_U8 ncbMode, tpPESession psessionEntry );
Mohit Khanna4a70d262012-09-11 16:30:12 -0700702#endif
703
Jeff Johnson295189b2012-06-20 16:38:30 -0700704#if defined WLAN_FEATURE_VOWIFI
705tSirRetStatus limSendNeighborReportRequestFrame(tpAniSirGlobal, tpSirMacNeighborReportReq, tSirMacAddr, tpPESession);
706tSirRetStatus limSendLinkReportActionFrame(tpAniSirGlobal, tpSirMacLinkReport, tSirMacAddr, tpPESession );
707tSirRetStatus limSendRadioMeasureReportActionFrame(tpAniSirGlobal, tANI_U8, tANI_U8, tpSirMacRadioMeasureReport, tSirMacAddr, tpPESession);
708#endif
709
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800710#if defined(FEATURE_WLAN_ESE) && !defined(FEATURE_WLAN_ESE_UPLOAD)
Jeff Johnson295189b2012-06-20 16:38:30 -0700711void limProcessIappFrame(tpAniSirGlobal, tANI_U8 *,tpPESession);
712#endif
713
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800714#ifdef FEATURE_WLAN_TDLS_INTERNAL
715tSirRetStatus limSendTdlsDisReqFrame(tpAniSirGlobal pMac,
716 tSirMacAddr peer_mac, tANI_U8 dialog, tpPESession psessionEntry);
717tSirRetStatus limSendTdlsLinkSetupReqFrame(tpAniSirGlobal pMac,
718 tSirMacAddr peerMac, tANI_U8 dialog, tpPESession psessionEntry,
719 tANI_U8* addIe, tANI_U16 len);
720
721eHalStatus limTdlsPrepareSetupReqFrame(tpAniSirGlobal pMac,
722 tLimTdlsLinkSetupInfo *linkSetupInfo,
723 tANI_U8 dialog, tSirMacAddr peerMac,
724 tpPESession psessionEntry);
725#endif
726#ifdef FEATURE_WLAN_TDLS
Gopichand Nakkala777e6032012-12-31 16:39:21 -0800727void limInitTdlsData(tpAniSirGlobal, tpPESession);
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800728tSirRetStatus limProcessSmeTdlsMgmtSendReq(tpAniSirGlobal pMac,
729 tANI_U32 *pMsgBuf);
730tSirRetStatus limProcessSmeTdlsAddStaReq(tpAniSirGlobal pMac,
731 tANI_U32 *pMsgBuf);
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +0530732tSirRetStatus limProcesSmeTdlsLinkEstablishReq(tpAniSirGlobal pMac,
733 tANI_U32 *pMsgBuf);
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800734tSirRetStatus limProcessSmeTdlsDelStaReq(tpAniSirGlobal pMac,
735 tANI_U32 *pMsgBuf);
Gopichand Nakkala2a0a1572013-02-10 21:39:16 -0800736void limSendSmeTDLSDeleteAllPeerInd(tpAniSirGlobal pMac, tpPESession psessionEntry);
Gopichand Nakkalab977a972013-02-18 19:15:09 -0800737void limSendSmeMgmtTXCompletion(tpAniSirGlobal pMac,
738 tpPESession psessionEntry,
739 tANI_U32 txCompleteStatus);
Gopichand Nakkala2a0a1572013-02-10 21:39:16 -0800740tSirRetStatus limDeleteTDLSPeers(tpAniSirGlobal pMac, tpPESession psessionEntry);
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800741eHalStatus limProcessTdlsAddStaRsp(tpAniSirGlobal pMac, void *msg, tpPESession);
742tSirRetStatus limSendTdlsTeardownFrame(tpAniSirGlobal pMac,
Hoonki Leea34dd892013-02-05 22:56:02 -0800743 tSirMacAddr peerMac, tANI_U16 reason, tANI_U8 responder, tpPESession psessionEntry,
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800744 tANI_U8 *addIe, tANI_U16 addIeLen);
745#endif
746
Jeff Johnson295189b2012-06-20 16:38:30 -0700747// Algorithms & Link Monitoring related functions
748tSirBackgroundScanMode limSelectsBackgroundScanMode(tpAniSirGlobal);
749void limTriggerBackgroundScan(tpAniSirGlobal);
750void limAbortBackgroundScan(tpAniSirGlobal);
751
752/// Function that handles heartbeat failure
753void limHandleHeartBeatFailure(tpAniSirGlobal,tpPESession);
754
755/// Function that triggers link tear down with AP upon HB failure
756void limTearDownLinkWithAp(tpAniSirGlobal,tANI_U8, tSirMacReasonCodes);
757
Jeff Johnson295189b2012-06-20 16:38:30 -0700758
759/// Function that sends keep alive message to peer(s)
760void limSendKeepAliveToPeer(tpAniSirGlobal);
761
762/// Function that processes Max retries interrupt from TFP
763void limHandleMaxRetriesInterrupt(tANI_U32);
764
765/// Function that processes messages deferred during Learn mode
766void limProcessDeferredMessageQueue(tpAniSirGlobal);
767
768/// Function that defers the messages received
769tANI_U32 limDeferMsg(tpAniSirGlobal, tSirMsgQ *);
770
771/// Function that sets system into scan mode
772void limSetScanMode(tpAniSirGlobal pMac);
773
774/// Function that Switches the Channel and sets the CB Mode
Jeff Johnsone7245742012-09-05 17:12:55 -0700775void limSetChannel(tpAniSirGlobal pMac, tANI_U8 channel, tANI_U8 secChannelOffset, tPowerdBm maxTxPower, tANI_U8 peSessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -0700776
777/// Function that completes channel scan
778void limCompleteMlmScan(tpAniSirGlobal, tSirResultCodes);
779
Jeff Johnsone7245742012-09-05 17:12:55 -0700780#ifdef FEATURE_OEM_DATA_SUPPORT
781/// Funtion that sets system into meas mode for oem data req
782void limSetOemDataReqMode(tpAniSirGlobal pMac, eHalStatus status, tANI_U32* data);
783#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700784
785#ifdef ANI_SUPPORT_11H
786/// Function that sends Measurement Report action frame
787tSirRetStatus limSendMeasReportFrame(tpAniSirGlobal, tpSirMacMeasReqActionFrame, tSirMacAddr);
788
789/// Function that sends TPC Report action frame
790tSirRetStatus limSendTpcReportFrame(tpAniSirGlobal, tpSirMacTpcReqActionFrame, tSirMacAddr);
791#endif
792
793/// Function that sends TPC Request action frame
794void limSendTpcRequestFrame(tpAniSirGlobal, tSirMacAddr);
795
796// Function(s) to handle responses received from HAL
797void limProcessMlmAddBssRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ );
798void limProcessMlmAddStaRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQt,tpPESession psessionEntry);
799void limProcessMlmDelStaRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ );
800void limProcessMlmDelBssRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ,tpPESession);
Jeff Johnson295189b2012-06-20 16:38:30 -0700801void limProcessStaMlmAddStaRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ ,tpPESession psessionEntry);
802void limProcessStaMlmDelStaRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ,tpPESession psessionEntry);
803void limProcessStaMlmDelBssRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ ,tpPESession psessionEntry);
804void limProcessMlmSetStaKeyRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ );
805void limProcessMlmSetBssKeyRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ );
806
807
808
809#ifdef GEN4_SCAN
810// Function to process WDA_INIT_SCAN_RSP message
811void limProcessInitScanRsp(tpAniSirGlobal, void * );
812
813// Function to process WDA_START_SCAN_RSP message
814void limProcessStartScanRsp(tpAniSirGlobal, void * );
815
816// Function to process WDA_END_SCAN_RSP message
817void limProcessEndScanRsp(tpAniSirGlobal, void * );
818
819// Function to process WDA_FINISH_SCAN_RSP message
820void limProcessFinishScanRsp(tpAniSirGlobal, void * );
821
822// Function to process WDA_SWITCH_CHANNEL_RSP message
823void limProcessSwitchChannelRsp(tpAniSirGlobal pMac, void * );
824
825void limSendHalInitScanReq( tpAniSirGlobal, tLimLimHalScanState, tSirLinkTrafficCheck);
826void limSendHalStartScanReq( tpAniSirGlobal, tANI_U8, tLimLimHalScanState);
827void limSendHalEndScanReq( tpAniSirGlobal, tANI_U8, tLimLimHalScanState);
828void limSendHalFinishScanReq( tpAniSirGlobal, tLimLimHalScanState);
829
830void limContinuePostChannelScan(tpAniSirGlobal pMac);
Gopichand Nakkalad492d202013-05-10 02:50:47 +0530831void limCovertChannelScanType(tpAniSirGlobal pMac,tANI_U8 channelNum, tANI_BOOLEAN passiveToActive);
832void limSetDFSChannelList(tpAniSirGlobal pMac,tANI_U8 channelNum, tSirDFSChannelList *dfsChannelList);
Jeff Johnson295189b2012-06-20 16:38:30 -0700833void limContinueChannelLearn( tpAniSirGlobal );
834//WLAN_SUSPEND_LINK Related
835tANI_U8 limIsLinkSuspended(tpAniSirGlobal pMac);
836void limSuspendLink(tpAniSirGlobal, tSirLinkTrafficCheck, SUSPEND_RESUME_LINK_CALLBACK, tANI_U32*);
837void limResumeLink(tpAniSirGlobal, SUSPEND_RESUME_LINK_CALLBACK, tANI_U32*);
838//end WLAN_SUSPEND_LINK Related
839#endif // GEN4_SCAN
840
841tSirRetStatus limSendAddBAReq( tpAniSirGlobal pMac,
842 tpLimMlmAddBAReq pMlmAddBAReq,tpPESession);
843
844tSirRetStatus limSendAddBARsp( tpAniSirGlobal pMac,
845 tpLimMlmAddBARsp pMlmAddBARsp,tpPESession);
846
847tSirRetStatus limSendDelBAInd( tpAniSirGlobal pMac,
848 tpLimMlmDelBAReq pMlmDelBAReq ,tpPESession psessionEntry);
849#if 0
850tSirRetStatus limSendSMPowerStateFrame( tpAniSirGlobal pMac,
851 tSirMacAddr peer, tSirMacHTMIMOPowerSaveState State );
852#endif
853
854void limProcessMlmHalAddBARsp( tpAniSirGlobal pMac,
855 tpSirMsgQ limMsgQ );
856
857void limProcessMlmHalBADeleteInd( tpAniSirGlobal pMac,
858 tpSirMsgQ limMsgQ );
859
860void limProcessMlmRemoveKeyRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ );
861
862void limProcessLearnIntervalTimeout(tpAniSirGlobal pMac);
Chet Lanctot8cecea22014-02-11 19:09:36 -0800863
Jeff Johnson295189b2012-06-20 16:38:30 -0700864#ifdef WLAN_FEATURE_11W
Chet Lanctot8cecea22014-02-11 19:09:36 -0800865//11w send SA query request action frame
866tSirRetStatus limSendSaQueryRequestFrame( tpAniSirGlobal pMac, tANI_U8 *transId,
867 tSirMacAddr peer, tpPESession psessionEntry );
Jeff Johnson295189b2012-06-20 16:38:30 -0700868//11w SA query request action frame handler
869tSirRetStatus limSendSaQueryResponseFrame( tpAniSirGlobal pMac,
Chet Lanctot186b5732013-03-18 10:26:30 -0700870 tANI_U8 *transId, tSirMacAddr peer,tpPESession psessionEntry);
Jeff Johnson295189b2012-06-20 16:38:30 -0700871#endif
872// Inline functions
873
874/**
875 * limPostSmeMessage()
876 *
877 *FUNCTION:
878 * This function is called by limProcessMlmMessages(). In this
879 * function MLM sub-module invokes MLM ind/cnf primitives.
880 *
881 *LOGIC:
882 * Initially MLM makes an SME function call to invoke MLM ind/cnf
883 * primitive. In future this can be enhanced to 'post' messages to SME.
884 *
885 *ASSUMPTIONS:
886 * NA
887 *
888 *NOTE:
889 * NA
890 *
891 * @param pMac Pointer to Global MAC structure
892 * @param msgType Indicates the MLM primitive message type
893 * @param *pMsgBuf A pointer to the MLM message buffer
894 *
895 * @return None
896 */
897static inline void
898limPostSmeMessage(tpAniSirGlobal pMac, tANI_U32 msgType, tANI_U32 *pMsgBuf)
899{
900 tSirMsgQ msg;
901
902 if(pMsgBuf == NULL)
903 {
Kiran Kumar Lokere5be73a62013-04-01 18:40:00 -0700904 limLog(pMac, LOGE,FL("Buffer is Pointing to NULL"));
Jeff Johnson295189b2012-06-20 16:38:30 -0700905 return;
906 }
907
908 msg.type = (tANI_U16)msgType;
909 msg.bodyptr = pMsgBuf;
910 msg.bodyval = 0;
911 if (msgType > eWNI_SME_MSG_TYPES_BEGIN)
912 limProcessSmeReqMessages(pMac, &msg);
913 else
914 limProcessMlmRspMessages(pMac, msgType, pMsgBuf);
915} /*** end limPostSmeMessage() ***/
916
917/**
918 * limPostMlmMessage()
919 *
920 *FUNCTION:
921 * This function is called by limProcessSmeMessages(). In this
922 * function SME invokes MLME primitives.
923 *
924 *PARAMS:
925 *
926 *LOGIC:
927 * Initially SME makes an MLM function call to invoke MLM primitive.
928 * In future this can be enhanced to 'post' messages to MLM.
929 *
930 *ASSUMPTIONS:
931 * NA
932 *
933 *NOTE:
934 * NA
935 *
936 * @param pMac Pointer to Global MAC structure
937 * @param msgType Indicates the MLM primitive message type
938 * @param *pMsgBuf A pointer to the MLM message buffer
939 *
940 * @return None
941 */
942static inline void
943limPostMlmMessage(tpAniSirGlobal pMac, tANI_U32 msgType, tANI_U32 *pMsgBuf)
944{
945
946 tSirMsgQ msg;
947 if(pMsgBuf == NULL)
948 {
Kiran Kumar Lokere5be73a62013-04-01 18:40:00 -0700949 limLog(pMac, LOGE,FL("Buffer is Pointing to NULL"));
Jeff Johnson295189b2012-06-20 16:38:30 -0700950 return;
951 }
952 msg.type = (tANI_U16) msgType;
953 msg.bodyptr = pMsgBuf;
954 msg.bodyval = 0;
955 limProcessMlmReqMessages(pMac, &msg);
956} /*** end limPostMlmMessage() ***/
957
958
959
960/**
961 * limGetCurrentScanChannel()
962 *
963 *FUNCTION:
964 * This function is called in various places to get current channel
965 * number being scanned.
966 *
967 *PARAMS:
968 *
969 *LOGIC:
970 *
971 *ASSUMPTIONS:
972 * NA
973 *
974 *NOTE:
975 * NA
976 *
977 * @param pMac Pointer to Global MAC structure
978 * @return Channel number
979 */
980static inline tANI_U8
981limGetCurrentScanChannel(tpAniSirGlobal pMac)
982{
983 tANI_U8 *pChanNum = pMac->lim.gpLimMlmScanReq->channelList.channelNumber;
984
985 return (*(pChanNum + pMac->lim.gLimCurrentScanChannelId));
986} /*** end limGetCurrentScanChannel() ***/
987
988
989
990/**
991 * limGetIElenFromBssDescription()
992 *
993 *FUNCTION:
994 * This function is called in various places to get IE length
995 * from tSirBssDescription structure
996 * number being scanned.
997 *
998 *PARAMS:
999 *
1000 *LOGIC:
1001 *
1002 *ASSUMPTIONS:
1003 * NA
1004 *
1005 *NOTE:
1006 * NA
1007 *
1008 * @param pBssDescr
1009 * @return Total IE length
1010 */
1011
1012static inline tANI_U16
1013limGetIElenFromBssDescription(tpSirBssDescription pBssDescr)
1014{
1015 if (!pBssDescr)
1016 return 0;
1017
1018 return ((tANI_U16) (pBssDescr->length + sizeof(tANI_U16) +
1019 sizeof(tANI_U32) - sizeof(tSirBssDescription)));
1020} /*** end limGetIElenFromBssDescription() ***/
1021
Jeff Johnson295189b2012-06-20 16:38:30 -07001022/**
1023 * limSendBeaconInd()
1024 *
1025 *FUNCTION:
1026 * This function is called to send the beacon indication
1027 * number being scanned.
1028 *
1029 *PARAMS:
1030 *
1031 *LOGIC:
1032 *
1033 *ASSUMPTIONS:
1034*/
1035
1036void
1037limSendBeaconInd(tpAniSirGlobal pMac, tpPESession psessionEntry);
Jeff Johnson295189b2012-06-20 16:38:30 -07001038
Jeff Johnson295189b2012-06-20 16:38:30 -07001039
1040void limGetWPSPBCSessions(tpAniSirGlobal pMac, tANI_U8 *addr, tANI_U8 *uuid_e, eWPSPBCOverlap *overlap, tpPESession psessionEntry);
1041void limWPSPBCTimeout(tpAniSirGlobal pMac, tpPESession psessionEntry);
1042void limWPSPBCClose(tpAniSirGlobal pMac, tpPESession psessionEntry);
1043void limRemovePBCSessions(tpAniSirGlobal pMac, tSirMacAddr pRemoveMac,tpPESession psessionEntry);
1044
1045
1046tSirRetStatus
1047limIsSmeGetWPSPBCSessionsReqValid(tpAniSirGlobal pMac, tSirSmeGetWPSPBCSessionsReq *pGetWPSPBCSessionsReq, tANI_U8 *pBuf);
1048
1049#define LIM_WPS_OVERLAP_TIMER_MS 10000
Jeff Johnson295189b2012-06-20 16:38:30 -07001050
1051void
1052limSuspendLink(tpAniSirGlobal pMac, tSirLinkTrafficCheck trafficCheck, SUSPEND_RESUME_LINK_CALLBACK callback, tANI_U32 *data);
1053void
1054limResumeLink(tpAniSirGlobal pMac, SUSPEND_RESUME_LINK_CALLBACK callback, tANI_U32 *data);
1055
1056void
1057limChangeChannelWithCallback(tpAniSirGlobal pMac, tANI_U8 newChannel,
1058 CHANGE_CHANNEL_CALLBACK callback, tANI_U32 *cbdata, tpPESession psessionEntry);
1059
Jeff Johnson295189b2012-06-20 16:38:30 -07001060void limSendSmeMgmtFrameInd(
Rashmi Ramanna0d0adec2014-02-05 20:35:37 +05301061 tpAniSirGlobal pMac, tANI_U16 sessionId,
1062 tANI_U8 *pRxPacketInfo,
1063 tpPESession psessionEntry, tANI_S8 rxRssi);
Jeff Johnson295189b2012-06-20 16:38:30 -07001064void limProcessRemainOnChnTimeout(tpAniSirGlobal pMac);
Gopichand Nakkala4261ea52012-12-31 16:43:00 -08001065void limProcessInsertSingleShotNOATimeout(tpAniSirGlobal pMac);
Gopichand Nakkalad492d202013-05-10 02:50:47 +05301066void limConvertActiveChannelToPassiveChannel(tpAniSirGlobal pMac);
Jeff Johnson295189b2012-06-20 16:38:30 -07001067void limSendP2PActionFrame(tpAniSirGlobal pMac, tpSirMsgQ pMsg);
1068void limAbortRemainOnChan(tpAniSirGlobal pMac);
1069tSirRetStatus __limProcessSmeNoAUpdate(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf);
Viral Modid440e682013-03-06 02:25:31 -08001070void limProcessRegdDefdSmeReqAfterNOAStart(tpAniSirGlobal pMac);
Mohit Khanna698ba2a2012-12-04 15:08:18 -08001071#ifdef FEATURE_WLAN_TDLS_INTERNAL
1072void limProcessTdlsFrame(tpAniSirGlobal, tANI_U32 *);
Mohit Khanna698ba2a2012-12-04 15:08:18 -08001073void limProcessTdlsPublicActionFrame(tpAniSirGlobal pMac, tANI_U32 *pBd,
1074 tpPESession) ;
1075#ifdef FEATURE_WLAN_TDLS_NEGATIVE
1076#define LIM_TDLS_NEGATIVE_WRONG_BSSID_IN_DSCV_REQ 0x1 /* 5.1.4-5 */
1077#define LIM_TDLS_NEGATIVE_WRONG_BSSID_IN_SETUP_REQ 0x2 /* 5.2.4-16 */
1078#define LIM_TDLS_NEGATIVE_STATUS_37_IN_SETUP_CNF 0x4 /* 5.2.4-10 */
1079#define LIM_TDLS_NEGATIVE_SEND_REQ_TO_SETUP_REQ 0x8 /* 5.2.4-20/32 */
1080#define LIM_TDLS_NEGATIVE_RSP_TIMEOUT_TO_SETUP_REQ 0x10 /* 5.2.3.4 */
1081#define LIM_TDLS_NEGATIVE_TREAT_TDLS_PROHIBIT_AP 0x20 /* 5.2.4-49 */
1082 /* following is not paticularily tested in WFA test plan, but will help to validate our TDLS behavior in-house */
1083#define LIM_TDLS_NEGATIVE_WRONG_BSSID_IN_DSCV_RSP 0x40
1084#define LIM_TDLS_NEGATIVE_WRONG_BSSID_IN_SETUP_RSP 0x80
1085
1086void limTdlsSetNegativeBehavior(tpAniSirGlobal pMac, tANI_U8 value, tANI_BOOLEAN on);
1087#endif
1088#endif
1089
Madan Mohan Koyyalamudi521ff192012-11-15 17:13:08 -08001090void limProcessDisassocAckTimeout(tpAniSirGlobal pMac);
1091void limProcessDeauthAckTimeout(tpAniSirGlobal pMac);
1092eHalStatus limSendDisassocCnf(tpAniSirGlobal pMac);
1093eHalStatus limSendDeauthCnf(tpAniSirGlobal pMac);
Dhanashri Atre4a6e3ea2012-12-12 14:10:33 -08001094
1095#ifdef WLAN_FEATURE_VOWIFI_11R
1096typedef struct sSetLinkCbackParams
1097{
1098 void * cbackDataPtr;
1099} tSetLinkCbackParams;
1100#endif
Gopichand Nakkala2c231c82013-06-11 17:49:16 +05301101
1102void limProcessRxScanEvent(tpAniSirGlobal mac, void *buf);
Sudhir Sattayappa Kohalliabf751c2013-06-30 15:37:18 -07001103
1104int limProcessRemainOnChnlReq(tpAniSirGlobal pMac, tANI_U32 *pMsg);
1105void limRemainOnChnRsp(tpAniSirGlobal pMac, eHalStatus status, tANI_U32 *data);
Jeff Johnson295189b2012-06-20 16:38:30 -07001106#endif /* __LIM_TYPES_H */
1107