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