blob: adbc8424ca864a79094be6a7650febc765eb63f4 [file] [log] [blame]
Jeff Johnson295189b2012-06-20 16:38:30 -07001/*
Manjeet Singh3ed79242017-01-11 19:04:32 +05302 * Copyright (c) 2012-2017 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"
Konamki, Sreelakshmi2bfb8b02015-07-29 11:41:24 +053054#include "limTrace.h"
Jeff Johnson295189b2012-06-20 16:38:30 -070055#include "limSendSmeRspMessages.h"
56#include "sysGlobal.h"
57#include "dphGlobal.h"
58#include "parserApi.h"
59
60#define LINK_TEST_DEFER 1
61
62#define TRACE_EVENT_CNF_TIMER_DEACT 0x6600
63#define TRACE_EVENT_CNF_TIMER_ACT 0x6601
64#define TRACE_EVENT_AUTH_RSP_TIMER_DEACT 0x6602
65#define TRACE_EVENT_AUTH_RSP_TIMER_ACT 0x6603
66
67// MLM message types
68#define LIM_MLM_MSG_START 1000
69#define LIM_MLM_SCAN_REQ LIM_MLM_MSG_START
Madan Mohan Koyyalamudia53c4dc2012-11-13 10:35:42 -080070#define LIM_MLM_SCAN_CNF (LIM_MLM_MSG_START + 1)
71#define LIM_MLM_START_REQ (LIM_MLM_MSG_START + 2)
72#define LIM_MLM_START_CNF (LIM_MLM_MSG_START + 3)
73#define LIM_MLM_JOIN_REQ (LIM_MLM_MSG_START + 4)
74#define LIM_MLM_JOIN_CNF (LIM_MLM_MSG_START + 5)
75#define LIM_MLM_AUTH_REQ (LIM_MLM_MSG_START + 6)
76#define LIM_MLM_AUTH_CNF (LIM_MLM_MSG_START + 7)
77#define LIM_MLM_AUTH_IND (LIM_MLM_MSG_START + 8)
78#define LIM_MLM_ASSOC_REQ (LIM_MLM_MSG_START + 9)
79#define LIM_MLM_ASSOC_CNF (LIM_MLM_MSG_START + 10)
80#define LIM_MLM_ASSOC_IND (LIM_MLM_MSG_START + 11)
81#define LIM_MLM_DISASSOC_REQ (LIM_MLM_MSG_START + 12)
82#define LIM_MLM_DISASSOC_CNF (LIM_MLM_MSG_START + 13)
83#define LIM_MLM_DISASSOC_IND (LIM_MLM_MSG_START + 14)
84#define LIM_MLM_REASSOC_REQ (LIM_MLM_MSG_START + 15)
85#define LIM_MLM_REASSOC_CNF (LIM_MLM_MSG_START + 16)
86#define LIM_MLM_REASSOC_IND (LIM_MLM_MSG_START + 17)
87#define LIM_MLM_DEAUTH_REQ (LIM_MLM_MSG_START + 18)
88#define LIM_MLM_DEAUTH_CNF (LIM_MLM_MSG_START + 19)
89#define LIM_MLM_DEAUTH_IND (LIM_MLM_MSG_START + 20)
90#define LIM_MLM_TSPEC_REQ (LIM_MLM_MSG_START + 21)
91#define LIM_MLM_TSPEC_CNF (LIM_MLM_MSG_START + 22)
92#define LIM_MLM_TSPEC_IND (LIM_MLM_MSG_START + 23)
93#define LIM_MLM_SETKEYS_REQ (LIM_MLM_MSG_START + 24)
94#define LIM_MLM_SETKEYS_CNF (LIM_MLM_MSG_START + 25)
95#define LIM_MLM_LINK_TEST_STOP_REQ (LIM_MLM_MSG_START + 30)
96#define LIM_MLM_PURGE_STA_IND (LIM_MLM_MSG_START + 31)
97#define LIM_MLM_ADDBA_REQ (LIM_MLM_MSG_START + 32)
98#define LIM_MLM_ADDBA_CNF (LIM_MLM_MSG_START + 33)
99#define LIM_MLM_ADDBA_IND (LIM_MLM_MSG_START + 34)
100#define LIM_MLM_ADDBA_RSP (LIM_MLM_MSG_START + 35)
101#define LIM_MLM_DELBA_REQ (LIM_MLM_MSG_START + 36)
102#define LIM_MLM_DELBA_CNF (LIM_MLM_MSG_START + 37)
103#define LIM_MLM_DELBA_IND (LIM_MLM_MSG_START + 38)
104#define LIM_MLM_REMOVEKEY_REQ (LIM_MLM_MSG_START + 39)
105#define LIM_MLM_REMOVEKEY_CNF (LIM_MLM_MSG_START + 40)
Jeff Johnson295189b2012-06-20 16:38:30 -0700106
Jeff Johnsone7245742012-09-05 17:12:55 -0700107#ifdef FEATURE_OEM_DATA_SUPPORT
Madan Mohan Koyyalamudia53c4dc2012-11-13 10:35:42 -0800108#define LIM_MLM_OEM_DATA_REQ (LIM_MLM_MSG_START + 41)
109#define LIM_MLM_OEM_DATA_CNF (LIM_MLM_MSG_START + 42)
Jeff Johnsone7245742012-09-05 17:12:55 -0700110#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700111
112#define LIM_HASH_ADD 0
113#define LIM_HASH_UPDATE 1
114
115#define LIM_WEP_IN_FC 1
116#define LIM_NO_WEP_IN_FC 0
117
118#define LIM_DECRYPT_ICV_FAIL 1
119
120/// Definitions to distinquish between Association/Reassociaton
121#define LIM_ASSOC 0
122#define LIM_REASSOC 1
123
124/// Minimum Memory blocks require for different scenario
125#define LIM_MIN_MEM_ASSOC 4
126
127/// Verifies whether given mac addr matches the CURRENT Bssid
Kiet Lamb1233192013-11-28 13:38:20 +0530128#define IS_CURRENT_BSSID(pMac, addr,psessionEntry) (vos_mem_compare( addr, \
129 psessionEntry->bssId, \
130 sizeof(psessionEntry->bssId)))
Jeff Johnson295189b2012-06-20 16:38:30 -0700131/// Verifies whether given addr matches the REASSOC Bssid
Kiet Lamb1233192013-11-28 13:38:20 +0530132#define IS_REASSOC_BSSID(pMac, addr,psessionEntry) (vos_mem_compare( addr, \
133 psessionEntry->limReAssocbssId, \
134 sizeof(psessionEntry->limReAssocbssId)))
Jeff Johnson295189b2012-06-20 16:38:30 -0700135
136#define REQ_TYPE_REGISTRAR (0x2)
137#define REQ_TYPE_WLAN_MANAGER_REGISTRAR (0x3)
138
139#define RESP_TYPE_REGISTRAR (0x2)
140#define RESP_TYPE_ENROLLEE_INFO_ONLY (0x0)
141#define RESP_TYPE_ENROLLEE_OPEN_8021X (0x1)
142#define RESP_TYPE_AP (0x3)
143#define LIM_TX_FRAMES_THRESHOLD_ON_CHIP 300
144
145
146// enums used by LIM are as follows
147
148enum eLimDisassocTrigger
149{
150 eLIM_HOST_DISASSOC,
151 eLIM_PEER_ENTITY_DISASSOC,
152 eLIM_LINK_MONITORING_DISASSOC,
153 eLIM_PROMISCUOUS_MODE_DISASSOC,
154 eLIM_HOST_DEAUTH,
155 eLIM_PEER_ENTITY_DEAUTH,
156 eLIM_LINK_MONITORING_DEAUTH,
157 eLIM_JOIN_FAILURE,
158 eLIM_REASSOC_REJECT
159};
160
161/* Reason code to determine the channel change context while sending
162 * WDA_CHNL_SWITCH_REQ message to HAL
163 */
164enum eChannelChangeReasonCodes
165{
166 LIM_SWITCH_CHANNEL_REASSOC,
167 LIM_SWITCH_CHANNEL_JOIN,
168 LIM_SWITCH_CHANNEL_OPERATION, // Generic change channel
Kalikinkar dhara085c02f2014-02-28 15:32:12 -0800169 LIM_SWITCH_CHANNEL_CSA,
Abhishek Singh550aa8c2017-10-30 17:34:53 +0530170 LIM_SWITCH_CHANNEL_SAP_ECSA,
Jeff Johnson295189b2012-06-20 16:38:30 -0700171};
172
173typedef struct sLimAuthRspTimeout
174{
175 tSirMacAddr peerMacAddr;
176} tLimAuthRspTimeout;
177
178typedef struct sLimMlmStartReq
179{
180 tSirMacSSid ssId;
181 tSirBssType bssType;
182 tSirMacAddr bssId;
183 tSirMacBeaconInterval beaconPeriod;
184 tANI_U8 dtimPeriod;
185 tSirMacCfParamSet cfParamSet;
186 tSirMacChanNum channelNumber;
Jeff Johnsone7245742012-09-05 17:12:55 -0700187 ePhyChanBondState cbMode;
Jeff Johnson295189b2012-06-20 16:38:30 -0700188 tANI_U16 atimWindow;
189 tSirMacRateSet rateSet;
190 tANI_U8 sessionId; //Added For BT-AMP Support
191
192 // Parameters reqd for new HAL (message) interface
193 tSirNwType nwType;
194 tANI_U8 htCapable;
195 tSirMacHTOperatingMode htOperMode;
196 tANI_U8 dualCTSProtection;
197 tANI_U8 txChannelWidthSet;
Jeff Johnson295189b2012-06-20 16:38:30 -0700198 tANI_U8 ssidHidden;
199 tANI_U8 wps_state;
200 tANI_U8 obssProtEnabled;
Jeff Johnson295189b2012-06-20 16:38:30 -0700201} tLimMlmStartReq, *tpLimMlmStartReq;
202
203typedef struct sLimMlmStartCnf
204{
205 tSirResultCodes resultCode;
206 tANI_U8 sessionId;
207} tLimMlmStartCnf, *tpLimMlmStartCnf;
208
209typedef struct sLimMlmScanCnf
210{
211 tSirResultCodes resultCode;
212 tANI_U16 scanResultLength;
Jeff Johnson295189b2012-06-20 16:38:30 -0700213 tANI_U8 sessionId;
Sridhar Selvarajb59cd8c2017-07-17 18:43:55 +0530214 tSirBssDescription bssDescription[1];
215 /*
216 * WARNING: Pls make bssDescription as last variable in struct
217 * tLimMlmScanCnf as it has ieFields followed after this bss
218 * description. Adding a variable after this corrupts the ieFields
219 */
Jeff Johnson295189b2012-06-20 16:38:30 -0700220} tLimMlmScanCnf, *tpLimMlmScanCnf;
221
222typedef struct sLimScanResult
223{
224 tANI_U16 numBssDescriptions;
225 tSirBssDescription bssDescription[1];
226} tLimScanResult;
227
228typedef struct sLimMlmJoinCnf
229{
230 tSirResultCodes resultCode;
231 tANI_U16 protStatusCode;
232 tANI_U8 sessionId;
233} tLimMlmJoinCnf, *tpLimMlmJoinCnf;
234
235typedef struct sLimMlmAssocReq
236{
237 tSirMacAddr peerMacAddr;
238 tANI_U32 assocFailureTimeout;
239 tANI_U16 capabilityInfo;
240 tSirMacListenInterval listenInterval;
241 tANI_U8 sessionId;
242} tLimMlmAssocReq, *tpLimMlmAssocReq;
243
244typedef struct sLimMlmAssocCnf
245{
246 tSirResultCodes resultCode; //Internal status code.
247 tANI_U16 protStatusCode; //Protocol Status code.
248 tANI_U8 sessionId;
249} tLimMlmAssocCnf, *tpLimMlmAssocCnf;
250
251typedef struct sLimMlmAssocInd
252{
253 tSirMacAddr peerMacAddr;
254 tANI_U16 aid;
255 tAniAuthType authType;
256 tAniSSID ssId;
257 tSirRSNie rsnIE;
Jeff Johnson1250df42012-12-10 14:31:52 -0800258 tSirAddie addIE; // additional IE received from the peer, which possibly includes WSC IE and/or P2P IE.
Jeff Johnson295189b2012-06-20 16:38:30 -0700259 tSirMacCapabilityInfo capabilityInfo;
Jeff Johnson295189b2012-06-20 16:38:30 -0700260 tAniBool spectrumMgtIndicator;
261 tSirMacPowerCapInfo powerCap;
262 tSirSupChnl supportedChannels;
263 tANI_U8 sessionId;
264
265
Jeff Johnson295189b2012-06-20 16:38:30 -0700266 tAniBool WmmStaInfoPresent;
Hardik Kantilal Patel1ba630f2014-11-21 04:32:05 +0530267#ifdef WLAN_FEATURE_AP_HT40_24G
268 tAniBool HT40MHzIntoPresent;
269#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700270
Jeff Johnson295189b2012-06-20 16:38:30 -0700271 // Required for indicating the frames to upper layer
272 tANI_U32 beaconLength;
273 tANI_U8* beaconPtr;
274 tANI_U32 assocReqLength;
Deepthi Gowriae6a1662015-10-12 12:59:37 +0530275 tANI_U8* assocReqPtr;
276 uint32_t rate_flags;
Hanumanth Reddy Pothula57323632017-12-06 17:55:09 +0530277 tSirSmeChanInfo chan_info;
278 tSirMacHTChannelWidth ch_width;
279 tDot11fIEHTCaps HTCaps;
280 tDot11fIEVHTCaps VHTCaps;
Jeff Johnson295189b2012-06-20 16:38:30 -0700281} tLimMlmAssocInd, *tpLimMlmAssocInd;
282
283typedef struct sLimMlmReassocReq
284{
285 tSirMacAddr peerMacAddr;
286 tANI_U32 reassocFailureTimeout;
287 tANI_U16 capabilityInfo;
288 tSirMacListenInterval listenInterval;
289 tANI_U8 sessionId;
290} tLimMlmReassocReq, *tpLimMlmReassocReq;
291
292typedef struct sLimMlmReassocCnf
293{
294 tSirResultCodes resultCode;
295 tANI_U16 protStatusCode; //Protocol Status code.
296 tANI_U8 sessionId;
297} tLimMlmReassocCnf, *tpLimMlmReassocCnf;
298
299typedef struct sLimMlmReassocInd
300{
301 tSirMacAddr peerMacAddr;
302 tSirMacAddr currentApAddr;
303 tANI_U16 aid;
304 tAniAuthType authType;
305 tAniSSID ssId;
306 tSirRSNie rsnIE;
Jeff Johnson1250df42012-12-10 14:31:52 -0800307 tSirAddie addIE; // additional IE received from the peer, which can be WSC IE and/or P2P IE.
Jeff Johnson295189b2012-06-20 16:38:30 -0700308 tSirMacCapabilityInfo capabilityInfo;
Jeff Johnson295189b2012-06-20 16:38:30 -0700309 tAniBool spectrumMgtIndicator;
310 tSirMacPowerCapInfo powerCap;
311 tSirSupChnl supportedChannels;
312
Jeff Johnson295189b2012-06-20 16:38:30 -0700313 tAniBool WmmStaInfoPresent;
Hardik Kantilal Patel1ba630f2014-11-21 04:32:05 +0530314#ifdef WLAN_FEATURE_AP_HT40_24G
315 tAniBool HT40MHzIntoPresent;
316#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700317
Jeff Johnson295189b2012-06-20 16:38:30 -0700318 // Required for indicating the frames to upper layer
319 tANI_U32 beaconLength;
320 tANI_U8* beaconPtr;
321 tANI_U32 assocReqLength;
322 tANI_U8* assocReqPtr;
323} tLimMlmReassocInd, *tpLimMlmReassocInd;
324
325typedef struct sLimMlmAuthCnf
326{
327 tSirMacAddr peerMacAddr;
328 tAniAuthType authType;
329 tSirResultCodes resultCode;
330 tANI_U16 protStatusCode;
331 tANI_U8 sessionId;
332} tLimMlmAuthCnf, *tpLimMlmAuthCnf;
333
334typedef struct sLimMlmAuthInd
335{
336 tSirMacAddr peerMacAddr;
337 tAniAuthType authType;
338 tANI_U8 sessionId;
339} tLimMlmAuthInd, *tpLimMlmAuthInd;
340
341typedef struct sLimMlmDeauthReq
342{
343 tSirMacAddr peerMacAddr;
344 tANI_U16 reasonCode;
345 tANI_U16 deauthTrigger;
346 tANI_U16 aid;
347 tANI_U8 sessionId; //Added for BT-AMP SUPPORT
348
349} tLimMlmDeauthReq, *tpLimMlmDeauthReq;
350
351typedef struct sLimMlmDeauthCnf
352{
353 tSirMacAddr peerMacAddr;
354 tSirResultCodes resultCode;
355 tANI_U16 deauthTrigger;
356 tANI_U16 aid;
357 tANI_U8 sessionId;
358} tLimMlmDeauthCnf, *tpLimMLmDeauthCnf;
359
360typedef struct sLimMlmDeauthInd
361{
362 tSirMacAddr peerMacAddr;
363 tANI_U16 reasonCode;
364 tANI_U16 deauthTrigger;
365 tANI_U16 aid;
366} tLimMlmDeauthInd, *tpLimMlmDeauthInd;
367
368typedef struct sLimMlmDisassocReq
369{
370 tSirMacAddr peerMacAddr;
371 tANI_U16 reasonCode;
372 tANI_U16 disassocTrigger;
373 tANI_U16 aid;
374 tANI_U8 sessionId;
375} tLimMlmDisassocReq, *tpLimMlmDisassocReq;
376
377typedef struct sLimMlmDisassocCnf
378{
379 tSirMacAddr peerMacAddr;
380 tSirResultCodes resultCode;
381 tANI_U16 disassocTrigger;
382 tANI_U16 aid;
383 tANI_U8 sessionId;
384} tLimMlmDisassocCnf, *tpLimMlmDisassocCnf;
385
386typedef struct sLimMlmDisassocInd
387{
388 tSirMacAddr peerMacAddr;
389 tANI_U16 reasonCode;
390 tANI_U16 disassocTrigger;
391 tANI_U16 aid;
392 tANI_U8 sessionId;
393} tLimMlmDisassocInd, *tpLimMlmDisassocInd;
394
395typedef struct sLimMlmPurgeStaReq
396{
397 tSirMacAddr peerMacAddr;
398 tANI_U16 aid;
399 tANI_U8 sessionId;//Added For BT-AMP Support
400} tLimMlmPurgeStaReq, *tpLimMlmPurgeStaReq;
401
402typedef struct sLimMlmPurgeStaInd
403{
404 tSirMacAddr peerMacAddr;
405 tANI_U16 reasonCode;
406 tANI_U16 purgeTrigger;
407 tANI_U16 aid;
408 tANI_U8 sessionId;
409} tLimMlmPurgeStaInd, *tpLimMlmPurgeStaInd;
410
411typedef struct sLimMlmSetKeysReq
412{
413 tSirMacAddr peerMacAddr;
414 tANI_U8 sessionId; //Added For BT-AMP Support
415 tANI_U16 aid;
416 tAniEdType edType; // Encryption/Decryption type
417 tANI_U8 numKeys;
418 tSirKeys key[SIR_MAC_MAX_NUM_OF_DEFAULT_KEYS];
419} tLimMlmSetKeysReq, *tpLimMlmSetKeysReq;
420
421typedef struct sLimMlmSetKeysCnf
422{
423 tSirMacAddr peerMacAddr;
424 tANI_U16 resultCode;
425 tANI_U16 aid;
426 tANI_U8 sessionId;
427} tLimMlmSetKeysCnf, *tpLimMlmSetKeysCnf;
428
429typedef struct sLimMlmRemoveKeyReq
430{
431 tSirMacAddr peerMacAddr;
432 tANI_U8 sessionId; //Added FOr BT-AMP Support
433 tAniEdType edType; // Encryption/Decryption type
434 tANI_U8 wepType; //STATIC / DYNAMIC specifier
435 tANI_U8 keyId; //Key Id To be removed.
436 tANI_BOOLEAN unicast;
437} tLimMlmRemoveKeyReq, *tpLimMlmRemoveKeyReq;
438
439typedef struct sLimMlmRemoveKeyCnf
440{
441 tSirMacAddr peerMacAddr;
442 tANI_U16 resultCode;
443 tANI_U8 sessionId;
444} tLimMlmRemoveKeyCnf, *tpLimMlmRemoveKeyCnf;
445
446
447typedef struct sLimMlmResetReq
448{
449 tSirMacAddr macAddr;
450 tANI_U8 performCleanup;
451 tANI_U8 sessionId;
452} tLimMlmResetReq, *tpLimMlmResetReq;
453
454typedef struct sLimMlmResetCnf
455{
456 tSirMacAddr macAddr;
457 tSirResultCodes resultCode;
458 tANI_U8 sessionId;
459} tLimMlmResetCnf, *tpLimMlmResetCnf;
460
461
462typedef struct sLimMlmLinkTestStopReq
463{
464 tSirMacAddr peerMacAddr;
465 tANI_U8 sessionId;
Jeff Johnson295189b2012-06-20 16:38:30 -0700466} tLimMlmLinkTestStopReq, *tpLimMlmLinkTestStopReq;
467
468
469//
470// Block ACK related MLME data structures
471//
472
473typedef struct sLimMlmAddBAReq
474{
475
476 // ADDBA recipient
477 tSirMacAddr peerMacAddr;
478
479 // ADDBA Action Frame dialog token
480 tANI_U8 baDialogToken;
481
482 // ADDBA requested for TID
483 tANI_U8 baTID;
484
485 // BA policy
486 // 0 - Delayed BA (Not supported)
487 // 1 - Immediate BA
488 tANI_U8 baPolicy;
489
490 // BA buffer size - (0..127) max size MSDU's
491 tANI_U16 baBufferSize;
492
493 // BA timeout in TU's
494 // 0 means no timeout will occur
495 tANI_U16 baTimeout;
496
497 // ADDBA failure timeout in TU's
498 // Greater than or equal to 1
499 tANI_U16 addBAFailureTimeout;
500
501 // BA Starting Sequence Number
502 tANI_U16 baSSN;
503
504 tANI_U8 sessionId;
505
506} tLimMlmAddBAReq, *tpLimMlmAddBAReq;
507
508typedef struct sLimMlmAddBACnf
509{
510
511 // ADDBA recipient
512 tSirMacAddr peerMacAddr;
513
514 // ADDBA Action Frame dialog token
515 tANI_U8 baDialogToken;
516
517 // ADDBA requested for TID
518 tANI_U8 baTID;
519
520 // BA status code
521 tSirMacStatusCodes addBAResultCode;
522
523 // BA policy
524 // 0 - Delayed BA (Not supported)
525 // 1 - Immediate BA
526 tANI_U8 baPolicy;
527
528 // BA buffer size - (0..127) max size MSDU's
529 tANI_U16 baBufferSize;
530
531 // BA timeout in TU's
532 // 0 means no timeout will occur
533 tANI_U16 baTimeout;
534
535 // ADDBA direction
536 // 1 - Originator
537 // 0 - Recipient
538 tANI_U8 baDirection;
539 tANI_U8 sessionId;
540
541
542} tLimMlmAddBACnf, *tpLimMlmAddBACnf;
543
544typedef struct sLimMlmAddBAInd
545{
546
547 // ADDBA recipient
548 tSirMacAddr peerMacAddr;
549
550 // ADDBA Action Frame dialog token
551 tANI_U8 baDialogToken;
552
553 // ADDBA requested for TID
554 tANI_U8 baTID;
555
556 // BA policy
557 // 0 - Delayed BA (Not supported)
558 // 1 - Immediate BA
559 tANI_U8 baPolicy;
560
561 // BA buffer size - (0..127) max size MSDU's
562 tANI_U16 baBufferSize;
563
564 // BA timeout in TU's
565 // 0 means no timeout will occur
566 tANI_U16 baTimeout;
567
568} tLimMlmAddBAInd, *tpLimMlmAddBAInd;
569
570typedef struct sLimMlmAddBARsp
571{
572
573 // ADDBA recipient
574 tSirMacAddr peerMacAddr;
575
576 // ADDBA Action Frame dialog token
577 tANI_U8 baDialogToken;
578
579 // ADDBA requested for TID
580 tANI_U8 baTID;
581
582 // BA status code
583 tSirMacStatusCodes addBAResultCode;
584
585 // BA policy
586 // 0 - Delayed BA (Not supported)
587 // 1 - Immediate BA
588 tANI_U8 baPolicy;
589
590 // BA buffer size - (0..127) max size MSDU's
591 tANI_U16 baBufferSize;
592
593 // BA timeout in TU's
594 // 0 means no timeout will occur
595 tANI_U16 baTimeout;
596
597 //reserved for alignment
598 tANI_U8 rsvd[2];
599
600 /* PE session id*/
601 tANI_U8 sessionId;
602
603 } tLimMlmAddBARsp, *tpLimMlmAddBARsp;
604
605//
606// NOTE - Overloading DELBA IND and DELBA CNF
607// to use the same data structure as DELBA REQ
608// as the parameters do not vary too much.
609//
610typedef struct sLimMlmDelBAReq
611{
612
613 // ADDBA recipient
614 tSirMacAddr peerMacAddr;
615
616 // DELBA direction
617 // 1 - Originator
618 // 0 - Recipient
619 tANI_U8 baDirection;
620
621 // DELBA requested for TID
622 tANI_U8 baTID;
623
624 // DELBA reason code
625 tSirMacReasonCodes delBAReasonCode;
626
627 tANI_U8 sessionId;
628
629} tLimMlmDelBAReq, *tpLimMlmDelBAReq, tLimMlmDelBAInd, *tpLimMlmDelBAInd, tLimMlmDelBACnf, *tpLimMlmDelBACnf;
630
631// Function templates
632
633tANI_BOOLEAN limProcessSmeReqMessages(tpAniSirGlobal, tpSirMsgQ);
634void limProcessMlmReqMessages(tpAniSirGlobal, tpSirMsgQ);
635void limProcessMlmRspMessages(tpAniSirGlobal, tANI_U32, tANI_U32 *);
636void limProcessLmmMessages(tpAniSirGlobal, tANI_U32, tANI_U32 *);
637void limProcessSmeDelBssRsp( tpAniSirGlobal , tANI_U32,tpPESession);
638
639void limGetRandomBssid(tpAniSirGlobal pMac ,tANI_U8 *data);
640
Jeff Johnson295189b2012-06-20 16:38:30 -0700641// Function to handle HT and HT IE CFG parameter intializations
Jeff Johnsone7245742012-09-05 17:12:55 -0700642void handleHTCapabilityandHTInfo(struct sAniSirGlobal *pMac, tpPESession psessionEntry);
Jeff Johnson295189b2012-06-20 16:38:30 -0700643
644// Function to handle CFG parameter updates
645void limHandleCFGparamUpdate(tpAniSirGlobal, tANI_U32);
646
647// Function to apply CFG parameters before join/reassoc/start BSS
648void limApplyConfiguration(tpAniSirGlobal,tpPESession);
649
Jeff Johnson295189b2012-06-20 16:38:30 -0700650void limSetCfgProtection(tpAniSirGlobal pMac, tpPESession pesessionEntry);
Jeff Johnson295189b2012-06-20 16:38:30 -0700651
652
653// Function to Initialize MLM state machine on STA
654void limInitMlm(tpAniSirGlobal);
655
656// Function to cleanup MLM state machine
657void limCleanupMlm(tpAniSirGlobal);
658
659// Function to cleanup LMM state machine
660void limCleanupLmm(tpAniSirGlobal);
661
Jeff Johnson295189b2012-06-20 16:38:30 -0700662// Management frame handling functions
663void limProcessBeaconFrame(tpAniSirGlobal, tANI_U8 *,tpPESession);
664void limProcessBeaconFrameNoSession(tpAniSirGlobal, tANI_U8 *);
665void limProcessProbeReqFrame(tpAniSirGlobal, tANI_U8 *, tpPESession);
666void limProcessProbeRspFrame(tpAniSirGlobal, tANI_U8 *, tpPESession);
667void limProcessProbeRspFrameNoSession(tpAniSirGlobal, tANI_U8 *);
668void limProcessProbeReqFrame_multiple_BSS(tpAniSirGlobal, tANI_U8 *,tpPESession);
669
670
671// Process Auth frame when we have a session in progress.
672void limProcessAuthFrame(tpAniSirGlobal, tANI_U8 *,tpPESession);
673#ifdef WLAN_FEATURE_VOWIFI_11R
Srikant Kuppaa3ed0a32013-02-20 07:24:43 -0800674tSirRetStatus limProcessAuthFrameNoSession(tpAniSirGlobal pMac, tANI_U8 *, void *body);
Jeff Johnson295189b2012-06-20 16:38:30 -0700675#endif
676
677void limProcessAssocReqFrame(tpAniSirGlobal, tANI_U8 *, tANI_U8, tpPESession);
678void limSendMlmAssocInd(tpAniSirGlobal pMac, tpDphHashNode pStaDs, tpPESession psessionEntry);
679
680
681void limProcessAssocRspFrame(tpAniSirGlobal, tANI_U8 *, tANI_U8,tpPESession);
682void limProcessDisassocFrame(tpAniSirGlobal, tANI_U8 *,tpPESession);
683void limProcessDeauthFrame(tpAniSirGlobal, tANI_U8 *,tpPESession);
684void limProcessActionFrame(tpAniSirGlobal, tANI_U8 *,tpPESession);
Jeff Johnson295189b2012-06-20 16:38:30 -0700685void limProcessActionFrameNoSession(tpAniSirGlobal pMac, tANI_U8 *pRxMetaInfo);
Jeff Johnson295189b2012-06-20 16:38:30 -0700686
687
688tSirRetStatus limPopulateMacHeader(tpAniSirGlobal, tANI_U8*, tANI_U8, tANI_U8, tSirMacAddr,tSirMacAddr);
689tSirRetStatus limSendProbeReqMgmtFrame(tpAniSirGlobal, tSirMacSSid *, tSirMacAddr, tANI_U8, tSirMacAddr, tANI_U32, tANI_U32, tANI_U8 *);
690void limSendProbeRspMgmtFrame(tpAniSirGlobal, tSirMacAddr, tpAniSSID, short, tANI_U8, tpPESession, tANI_U8);
Sushant Kaushik9e923872015-04-02 17:09:31 +0530691void limSendAuthMgmtFrame(tpAniSirGlobal, tSirMacAuthFrameBody *, tSirMacAddr,
692 tANI_U8, tpPESession , tAniBool);
Jeff Johnson295189b2012-06-20 16:38:30 -0700693void limSendAssocReqMgmtFrame(tpAniSirGlobal, tLimMlmAssocReq *,tpPESession);
694void limSendReassocReqMgmtFrame(tpAniSirGlobal, tLimMlmReassocReq *,tpPESession);
695#ifdef WLAN_FEATURE_VOWIFI_11R
696void limSendReassocReqWithFTIEsMgmtFrame(tpAniSirGlobal pMac,
697 tLimMlmReassocReq *pMlmReassocReq,tpPESession psessionEntry);
698#endif
699void limSendDeltsReqActionFrame(tpAniSirGlobal pMac, tSirMacAddr peer,
700 tANI_U8 wmmTspecPresent, tSirMacTSInfo *pTsinfo,
701 tSirMacTspecIE *pTspecIe, tpPESession psessionEntry);
702void limSendAddtsReqActionFrame(tpAniSirGlobal pMac, tSirMacAddr peerMacAddr,
703 tSirAddtsReqInfo *addts,tpPESession);
704void limSendAddtsRspActionFrame(tpAniSirGlobal pMac, tSirMacAddr peerMacAddr,
705 tANI_U16 statusCode, tSirAddtsReqInfo *addts, tSirMacScheduleIE *pSchedule,tpPESession);
706
Kapil Gupta956c0c42017-06-16 19:24:31 +0530707void limSendAssocRspMgmtFrame(tpAniSirGlobal, tANI_U16, tANI_U16, tSirMacAddr,
708 tANI_U8, tpDphHashNode pSta,tpPESession,
709 assoc_rsp_tx_context *tx_complete_context);
Jeff Johnson295189b2012-06-20 16:38:30 -0700710
711void limSendNullDataFrame(tpAniSirGlobal, tpDphHashNode);
Madan Mohan Koyyalamudi521ff192012-11-15 17:13:08 -0800712void limSendDisassocMgmtFrame(tpAniSirGlobal, tANI_U16, tSirMacAddr, tpPESession, tANI_BOOLEAN waitForAck);
713void limSendDeauthMgmtFrame(tpAniSirGlobal, tANI_U16, tSirMacAddr, tpPESession, tANI_BOOLEAN waitForAck);
Padma, Santhosh Kumar05600d32015-07-24 13:00:57 +0530714void limSendSmeDisassocDeauthNtf( tpAniSirGlobal pMac,
715 eHalStatus status, tANI_U32 *pCtx );
Paul Zhang83289792017-02-28 18:58:52 +0800716void limDoSendAuthMgmtFrame(tpAniSirGlobal, tpPESession);
Jeff Johnson295189b2012-06-20 16:38:30 -0700717
718void limContinueChannelScan(tpAniSirGlobal);
719tSirResultCodes limMlmAddBss(tpAniSirGlobal, tLimMlmStartReq *,tpPESession psessionEntry);
720
Jeff Johnsone7245742012-09-05 17:12:55 -0700721tSirRetStatus limSendChannelSwitchMgmtFrame(tpAniSirGlobal, tSirMacAddr, tANI_U8, tANI_U8, tANI_U8, tpPESession);
Jeff Johnson295189b2012-06-20 16:38:30 -0700722
Abhishek Singh2b0cf1c2017-10-30 17:36:38 +0530723/**
724 * lim_send_extended_chan_switch_action_frame()- function to send ECSA
725 * action frame over the air .
726 * @mac_ctx: pointer to global mac structure
727 * @peer: Destination mac.
728 * @mode: channel switch mode
729 * @new_op_class: new op class
730 * @new_channel: new channel to switch
731 * @count: channel switch count
732 *
733 * This function is called to send ECSA frame.
734 *
735 * Return: success if frame is sent else return failure
736 */
737tSirRetStatus
738lim_send_extended_chan_switch_action_frame(tpAniSirGlobal mac_ctx,
739 tSirMacAddr peer, uint8_t mode, uint8_t new_op_class,
740 uint8_t new_channel, uint8_t count, tpPESession session_entry);
741
742
Mohit Khanna4a70d262012-09-11 16:30:12 -0700743#ifdef WLAN_FEATURE_11AC
744tSirRetStatus limSendVHTOpmodeNotificationFrame(tpAniSirGlobal pMac,tSirMacAddr peer,tANI_U8 nMode, tpPESession psessionEntry );
Madan Mohan Koyyalamudic6226de2012-09-18 16:33:31 -0700745tSirRetStatus limSendVHTChannelSwitchMgmtFrame(tpAniSirGlobal pMac,tSirMacAddr peer,tANI_U8 nChanWidth, tANI_U8 nNewChannel, tANI_U8 ncbMode, tpPESession psessionEntry );
Mohit Khanna4a70d262012-09-11 16:30:12 -0700746#endif
747
Jeff Johnson295189b2012-06-20 16:38:30 -0700748#if defined WLAN_FEATURE_VOWIFI
749tSirRetStatus limSendNeighborReportRequestFrame(tpAniSirGlobal, tpSirMacNeighborReportReq, tSirMacAddr, tpPESession);
750tSirRetStatus limSendLinkReportActionFrame(tpAniSirGlobal, tpSirMacLinkReport, tSirMacAddr, tpPESession );
751tSirRetStatus limSendRadioMeasureReportActionFrame(tpAniSirGlobal, tANI_U8, tANI_U8, tpSirMacRadioMeasureReport, tSirMacAddr, tpPESession);
752#endif
753
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800754#if defined(FEATURE_WLAN_ESE) && !defined(FEATURE_WLAN_ESE_UPLOAD)
Jeff Johnson295189b2012-06-20 16:38:30 -0700755void limProcessIappFrame(tpAniSirGlobal, tANI_U8 *,tpPESession);
756#endif
757
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800758#ifdef FEATURE_WLAN_TDLS
Gopichand Nakkala777e6032012-12-31 16:39:21 -0800759void limInitTdlsData(tpAniSirGlobal, tpPESession);
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800760tSirRetStatus limProcessSmeTdlsMgmtSendReq(tpAniSirGlobal pMac,
761 tANI_U32 *pMsgBuf);
762tSirRetStatus limProcessSmeTdlsAddStaReq(tpAniSirGlobal pMac,
763 tANI_U32 *pMsgBuf);
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +0530764tSirRetStatus limProcesSmeTdlsLinkEstablishReq(tpAniSirGlobal pMac,
765 tANI_U32 *pMsgBuf);
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800766tSirRetStatus limProcessSmeTdlsDelStaReq(tpAniSirGlobal pMac,
767 tANI_U32 *pMsgBuf);
Gopichand Nakkala2a0a1572013-02-10 21:39:16 -0800768void limSendSmeTDLSDeleteAllPeerInd(tpAniSirGlobal pMac, tpPESession psessionEntry);
Gopichand Nakkalab977a972013-02-18 19:15:09 -0800769void limSendSmeMgmtTXCompletion(tpAniSirGlobal pMac,
Ganesh Kondabattiniff987022015-08-11 19:43:44 +0530770 tANI_U32 smeSessionId,
Gopichand Nakkalab977a972013-02-18 19:15:09 -0800771 tANI_U32 txCompleteStatus);
Gopichand Nakkala2a0a1572013-02-10 21:39:16 -0800772tSirRetStatus limDeleteTDLSPeers(tpAniSirGlobal pMac, tpPESession psessionEntry);
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800773eHalStatus limProcessTdlsAddStaRsp(tpAniSirGlobal pMac, void *msg, tpPESession);
774tSirRetStatus limSendTdlsTeardownFrame(tpAniSirGlobal pMac,
Hoonki Leea34dd892013-02-05 22:56:02 -0800775 tSirMacAddr peerMac, tANI_U16 reason, tANI_U8 responder, tpPESession psessionEntry,
Atul Mittalc0f739f2014-07-31 13:47:47 +0530776 tANI_U8 *addIe, tANI_U16 addIeLen);
777// tdlsoffchan
778tSirRetStatus limProcesSmeTdlsChanSwitchReq(tpAniSirGlobal pMac,
779 tANI_U32 *pMsgBuf);
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800780#endif
781
Jeff Johnson295189b2012-06-20 16:38:30 -0700782// Algorithms & Link Monitoring related functions
783tSirBackgroundScanMode limSelectsBackgroundScanMode(tpAniSirGlobal);
784void limTriggerBackgroundScan(tpAniSirGlobal);
785void limAbortBackgroundScan(tpAniSirGlobal);
786
787/// Function that handles heartbeat failure
788void limHandleHeartBeatFailure(tpAniSirGlobal,tpPESession);
789
790/// Function that triggers link tear down with AP upon HB failure
791void limTearDownLinkWithAp(tpAniSirGlobal,tANI_U8, tSirMacReasonCodes);
792
Jeff Johnson295189b2012-06-20 16:38:30 -0700793
794/// Function that sends keep alive message to peer(s)
795void limSendKeepAliveToPeer(tpAniSirGlobal);
796
797/// Function that processes Max retries interrupt from TFP
798void limHandleMaxRetriesInterrupt(tANI_U32);
799
800/// Function that processes messages deferred during Learn mode
801void limProcessDeferredMessageQueue(tpAniSirGlobal);
802
803/// Function that defers the messages received
804tANI_U32 limDeferMsg(tpAniSirGlobal, tSirMsgQ *);
805
806/// Function that sets system into scan mode
807void limSetScanMode(tpAniSirGlobal pMac);
808
809/// Function that Switches the Channel and sets the CB Mode
Jeff Johnsone7245742012-09-05 17:12:55 -0700810void limSetChannel(tpAniSirGlobal pMac, tANI_U8 channel, tANI_U8 secChannelOffset, tPowerdBm maxTxPower, tANI_U8 peSessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -0700811
812/// Function that completes channel scan
813void limCompleteMlmScan(tpAniSirGlobal, tSirResultCodes);
814
Jeff Johnsone7245742012-09-05 17:12:55 -0700815#ifdef FEATURE_OEM_DATA_SUPPORT
816/// Funtion that sets system into meas mode for oem data req
817void limSetOemDataReqMode(tpAniSirGlobal pMac, eHalStatus status, tANI_U32* data);
818#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700819
820#ifdef ANI_SUPPORT_11H
821/// Function that sends Measurement Report action frame
822tSirRetStatus limSendMeasReportFrame(tpAniSirGlobal, tpSirMacMeasReqActionFrame, tSirMacAddr);
823
824/// Function that sends TPC Report action frame
825tSirRetStatus limSendTpcReportFrame(tpAniSirGlobal, tpSirMacTpcReqActionFrame, tSirMacAddr);
826#endif
827
828/// Function that sends TPC Request action frame
829void limSendTpcRequestFrame(tpAniSirGlobal, tSirMacAddr);
830
831// Function(s) to handle responses received from HAL
832void limProcessMlmAddBssRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ );
833void limProcessMlmAddStaRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQt,tpPESession psessionEntry);
834void limProcessMlmDelStaRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ );
835void limProcessMlmDelBssRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ,tpPESession);
Jeff Johnson295189b2012-06-20 16:38:30 -0700836void limProcessStaMlmAddStaRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ ,tpPESession psessionEntry);
837void limProcessStaMlmDelStaRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ,tpPESession psessionEntry);
838void limProcessStaMlmDelBssRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ ,tpPESession psessionEntry);
839void limProcessMlmSetStaKeyRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ );
840void limProcessMlmSetBssKeyRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ );
841
842
843
844#ifdef GEN4_SCAN
845// Function to process WDA_INIT_SCAN_RSP message
846void limProcessInitScanRsp(tpAniSirGlobal, void * );
847
848// Function to process WDA_START_SCAN_RSP message
849void limProcessStartScanRsp(tpAniSirGlobal, void * );
850
851// Function to process WDA_END_SCAN_RSP message
852void limProcessEndScanRsp(tpAniSirGlobal, void * );
853
854// Function to process WDA_FINISH_SCAN_RSP message
855void limProcessFinishScanRsp(tpAniSirGlobal, void * );
856
857// Function to process WDA_SWITCH_CHANNEL_RSP message
858void limProcessSwitchChannelRsp(tpAniSirGlobal pMac, void * );
859
860void limSendHalInitScanReq( tpAniSirGlobal, tLimLimHalScanState, tSirLinkTrafficCheck);
861void limSendHalStartScanReq( tpAniSirGlobal, tANI_U8, tLimLimHalScanState);
862void limSendHalEndScanReq( tpAniSirGlobal, tANI_U8, tLimLimHalScanState);
Bhargav Shahe3a6ff02016-04-11 16:31:49 +0530863void limSendTLPauseInd(tpAniSirGlobal pMac, uint16_t staId);
Jeff Johnson295189b2012-06-20 16:38:30 -0700864void limSendHalFinishScanReq( tpAniSirGlobal, tLimLimHalScanState);
865
866void limContinuePostChannelScan(tpAniSirGlobal pMac);
Gopichand Nakkalad492d202013-05-10 02:50:47 +0530867void limCovertChannelScanType(tpAniSirGlobal pMac,tANI_U8 channelNum, tANI_BOOLEAN passiveToActive);
868void limSetDFSChannelList(tpAniSirGlobal pMac,tANI_U8 channelNum, tSirDFSChannelList *dfsChannelList);
Jeff Johnson295189b2012-06-20 16:38:30 -0700869void limContinueChannelLearn( tpAniSirGlobal );
870//WLAN_SUSPEND_LINK Related
871tANI_U8 limIsLinkSuspended(tpAniSirGlobal pMac);
872void limSuspendLink(tpAniSirGlobal, tSirLinkTrafficCheck, SUSPEND_RESUME_LINK_CALLBACK, tANI_U32*);
873void limResumeLink(tpAniSirGlobal, SUSPEND_RESUME_LINK_CALLBACK, tANI_U32*);
874//end WLAN_SUSPEND_LINK Related
875#endif // GEN4_SCAN
876
877tSirRetStatus limSendAddBAReq( tpAniSirGlobal pMac,
878 tpLimMlmAddBAReq pMlmAddBAReq,tpPESession);
879
880tSirRetStatus limSendAddBARsp( tpAniSirGlobal pMac,
881 tpLimMlmAddBARsp pMlmAddBARsp,tpPESession);
882
883tSirRetStatus limSendDelBAInd( tpAniSirGlobal pMac,
884 tpLimMlmDelBAReq pMlmDelBAReq ,tpPESession psessionEntry);
885#if 0
886tSirRetStatus limSendSMPowerStateFrame( tpAniSirGlobal pMac,
887 tSirMacAddr peer, tSirMacHTMIMOPowerSaveState State );
888#endif
889
890void limProcessMlmHalAddBARsp( tpAniSirGlobal pMac,
891 tpSirMsgQ limMsgQ );
892
893void limProcessMlmHalBADeleteInd( tpAniSirGlobal pMac,
894 tpSirMsgQ limMsgQ );
895
896void limProcessMlmRemoveKeyRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ );
897
898void limProcessLearnIntervalTimeout(tpAniSirGlobal pMac);
Chet Lanctot8cecea22014-02-11 19:09:36 -0800899
Jeff Johnson295189b2012-06-20 16:38:30 -0700900#ifdef WLAN_FEATURE_11W
Chet Lanctot8cecea22014-02-11 19:09:36 -0800901//11w send SA query request action frame
902tSirRetStatus limSendSaQueryRequestFrame( tpAniSirGlobal pMac, tANI_U8 *transId,
903 tSirMacAddr peer, tpPESession psessionEntry );
Jeff Johnson295189b2012-06-20 16:38:30 -0700904//11w SA query request action frame handler
905tSirRetStatus limSendSaQueryResponseFrame( tpAniSirGlobal pMac,
Chet Lanctot186b5732013-03-18 10:26:30 -0700906 tANI_U8 *transId, tSirMacAddr peer,tpPESession psessionEntry);
Jeff Johnson295189b2012-06-20 16:38:30 -0700907#endif
Abhishek Singh00b71972016-01-07 10:51:04 +0530908
909#ifdef WLAN_FEATURE_RMC
910void limProcessRMCMessages(tpAniSirGlobal pMac, eRmcMessageType msgType,
911 tANI_U32 *pMsgBuf);
912tSirRetStatus limSendRMCActionFrame(tpAniSirGlobal pMac,
913 tSirMacAddr peerMacAddr, tSirRMCInfo *pRMC,
914 tpPESession psessionEntry);
915#endif /* WLAN_FEATURE_RMC */
916
Jeff Johnson295189b2012-06-20 16:38:30 -0700917// Inline functions
918
919/**
920 * limPostSmeMessage()
921 *
922 *FUNCTION:
923 * This function is called by limProcessMlmMessages(). In this
924 * function MLM sub-module invokes MLM ind/cnf primitives.
925 *
926 *LOGIC:
927 * Initially MLM makes an SME function call to invoke MLM ind/cnf
928 * primitive. In future this can be enhanced to 'post' messages to SME.
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
943limPostSmeMessage(tpAniSirGlobal pMac, tANI_U32 msgType, tANI_U32 *pMsgBuf)
944{
945 tSirMsgQ msg;
946
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
953 msg.type = (tANI_U16)msgType;
954 msg.bodyptr = pMsgBuf;
955 msg.bodyval = 0;
956 if (msgType > eWNI_SME_MSG_TYPES_BEGIN)
Konamki, Sreelakshmi2bfb8b02015-07-29 11:41:24 +0530957 {
958 MTRACE(macTrace(pMac, TRACE_CODE_TX_SME_MSG, NO_SESSION, msg.type));
Jeff Johnson295189b2012-06-20 16:38:30 -0700959 limProcessSmeReqMessages(pMac, &msg);
Konamki, Sreelakshmi2bfb8b02015-07-29 11:41:24 +0530960 }
Jeff Johnson295189b2012-06-20 16:38:30 -0700961 else
962 limProcessMlmRspMessages(pMac, msgType, pMsgBuf);
963} /*** end limPostSmeMessage() ***/
964
965/**
966 * limPostMlmMessage()
967 *
968 *FUNCTION:
969 * This function is called by limProcessSmeMessages(). In this
970 * function SME invokes MLME primitives.
971 *
972 *PARAMS:
973 *
974 *LOGIC:
975 * Initially SME makes an MLM function call to invoke MLM primitive.
976 * In future this can be enhanced to 'post' messages to MLM.
977 *
978 *ASSUMPTIONS:
979 * NA
980 *
981 *NOTE:
982 * NA
983 *
984 * @param pMac Pointer to Global MAC structure
985 * @param msgType Indicates the MLM primitive message type
986 * @param *pMsgBuf A pointer to the MLM message buffer
987 *
988 * @return None
989 */
990static inline void
991limPostMlmMessage(tpAniSirGlobal pMac, tANI_U32 msgType, tANI_U32 *pMsgBuf)
992{
993
994 tSirMsgQ msg;
995 if(pMsgBuf == NULL)
996 {
Kiran Kumar Lokere5be73a62013-04-01 18:40:00 -0700997 limLog(pMac, LOGE,FL("Buffer is Pointing to NULL"));
Jeff Johnson295189b2012-06-20 16:38:30 -0700998 return;
999 }
1000 msg.type = (tANI_U16) msgType;
1001 msg.bodyptr = pMsgBuf;
1002 msg.bodyval = 0;
Konamki, Sreelakshmi2bfb8b02015-07-29 11:41:24 +05301003 MTRACE(macTraceMsgRx(pMac, NO_SESSION, msg.type));
Jeff Johnson295189b2012-06-20 16:38:30 -07001004 limProcessMlmReqMessages(pMac, &msg);
1005} /*** end limPostMlmMessage() ***/
1006
1007
1008
1009/**
1010 * limGetCurrentScanChannel()
1011 *
1012 *FUNCTION:
1013 * This function is called in various places to get current channel
1014 * number being scanned.
1015 *
1016 *PARAMS:
1017 *
1018 *LOGIC:
1019 *
1020 *ASSUMPTIONS:
1021 * NA
1022 *
1023 *NOTE:
1024 * NA
1025 *
1026 * @param pMac Pointer to Global MAC structure
1027 * @return Channel number
1028 */
1029static inline tANI_U8
1030limGetCurrentScanChannel(tpAniSirGlobal pMac)
1031{
1032 tANI_U8 *pChanNum = pMac->lim.gpLimMlmScanReq->channelList.channelNumber;
1033
1034 return (*(pChanNum + pMac->lim.gLimCurrentScanChannelId));
1035} /*** end limGetCurrentScanChannel() ***/
1036
Jeff Johnson295189b2012-06-20 16:38:30 -07001037/**
1038 * limSendBeaconInd()
1039 *
1040 *FUNCTION:
1041 * This function is called to send the beacon indication
1042 * number being scanned.
1043 *
1044 *PARAMS:
1045 *
1046 *LOGIC:
1047 *
1048 *ASSUMPTIONS:
1049*/
1050
1051void
1052limSendBeaconInd(tpAniSirGlobal pMac, tpPESession psessionEntry);
Jeff Johnson295189b2012-06-20 16:38:30 -07001053
Jeff Johnson295189b2012-06-20 16:38:30 -07001054
1055void limGetWPSPBCSessions(tpAniSirGlobal pMac, tANI_U8 *addr, tANI_U8 *uuid_e, eWPSPBCOverlap *overlap, tpPESession psessionEntry);
1056void limWPSPBCTimeout(tpAniSirGlobal pMac, tpPESession psessionEntry);
1057void limWPSPBCClose(tpAniSirGlobal pMac, tpPESession psessionEntry);
1058void limRemovePBCSessions(tpAniSirGlobal pMac, tSirMacAddr pRemoveMac,tpPESession psessionEntry);
1059
1060
1061tSirRetStatus
1062limIsSmeGetWPSPBCSessionsReqValid(tpAniSirGlobal pMac, tSirSmeGetWPSPBCSessionsReq *pGetWPSPBCSessionsReq, tANI_U8 *pBuf);
1063
1064#define LIM_WPS_OVERLAP_TIMER_MS 10000
Jeff Johnson295189b2012-06-20 16:38:30 -07001065
1066void
1067limSuspendLink(tpAniSirGlobal pMac, tSirLinkTrafficCheck trafficCheck, SUSPEND_RESUME_LINK_CALLBACK callback, tANI_U32 *data);
1068void
1069limResumeLink(tpAniSirGlobal pMac, SUSPEND_RESUME_LINK_CALLBACK callback, tANI_U32 *data);
1070
1071void
1072limChangeChannelWithCallback(tpAniSirGlobal pMac, tANI_U8 newChannel,
1073 CHANGE_CHANNEL_CALLBACK callback, tANI_U32 *cbdata, tpPESession psessionEntry);
1074
Jeff Johnson295189b2012-06-20 16:38:30 -07001075void limSendSmeMgmtFrameInd(
Rashmi Ramanna0d0adec2014-02-05 20:35:37 +05301076 tpAniSirGlobal pMac, tANI_U16 sessionId,
1077 tANI_U8 *pRxPacketInfo,
1078 tpPESession psessionEntry, tANI_S8 rxRssi);
Jeff Johnson295189b2012-06-20 16:38:30 -07001079void limProcessRemainOnChnTimeout(tpAniSirGlobal pMac);
Gopichand Nakkala4261ea52012-12-31 16:43:00 -08001080void limProcessInsertSingleShotNOATimeout(tpAniSirGlobal pMac);
Gopichand Nakkalad492d202013-05-10 02:50:47 +05301081void limConvertActiveChannelToPassiveChannel(tpAniSirGlobal pMac);
Jeff Johnson295189b2012-06-20 16:38:30 -07001082void limSendP2PActionFrame(tpAniSirGlobal pMac, tpSirMsgQ pMsg);
1083void limAbortRemainOnChan(tpAniSirGlobal pMac);
1084tSirRetStatus __limProcessSmeNoAUpdate(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf);
Viral Modid440e682013-03-06 02:25:31 -08001085void limProcessRegdDefdSmeReqAfterNOAStart(tpAniSirGlobal pMac);
Madan Mohan Koyyalamudi521ff192012-11-15 17:13:08 -08001086void limProcessDisassocAckTimeout(tpAniSirGlobal pMac);
1087void limProcessDeauthAckTimeout(tpAniSirGlobal pMac);
Abhishek Singh550aa8c2017-10-30 17:34:53 +05301088/**
1089 * lim_process_ap_ecsa_timeout() -process ECSA timeout which indicate ECSA IE TX
1090 * complete in beacon
1091 * @mac_ctx - A pointer to Global MAC structure
1092 *
1093 * Return None
1094 */
1095void lim_process_ap_ecsa_timeout(tpAniSirGlobal mac_ctx);
1096/**
1097 * lim_send_sme_ap_channel_switch_resp() -process channel switch resp for ecsa
1098 * channel switch req
1099 * @mac_ctx - A pointer to Global MAC structure
1100 * @session: session on which channel switch was done
1101 * @chan_param: channel switch resp params
1102 *
1103 * Return None
1104 */
1105void lim_send_sme_ap_channel_switch_resp(tpAniSirGlobal mac_ctx,
1106 tpPESession session, tpSwitchChannelParams chan_param);
1107
Madan Mohan Koyyalamudi521ff192012-11-15 17:13:08 -08001108eHalStatus limSendDisassocCnf(tpAniSirGlobal pMac);
1109eHalStatus limSendDeauthCnf(tpAniSirGlobal pMac);
Dhanashri Atre4a6e3ea2012-12-12 14:10:33 -08001110
1111#ifdef WLAN_FEATURE_VOWIFI_11R
1112typedef struct sSetLinkCbackParams
1113{
1114 void * cbackDataPtr;
1115} tSetLinkCbackParams;
1116#endif
Gopichand Nakkala2c231c82013-06-11 17:49:16 +05301117
1118void limProcessRxScanEvent(tpAniSirGlobal mac, void *buf);
Sudhir Sattayappa Kohalliabf751c2013-06-30 15:37:18 -07001119
1120int limProcessRemainOnChnlReq(tpAniSirGlobal pMac, tANI_U32 *pMsg);
1121void limRemainOnChnRsp(tpAniSirGlobal pMac, eHalStatus status, tANI_U32 *data);
Siddharth Bhal4f3187c2014-10-09 21:38:08 +05301122void limProcessMlmSpoofMacAddrRsp(tpAniSirGlobal pMac, tSirRetStatus rspStatus);
Pradeep Reddy POTTETI31505892015-04-16 16:47:54 +05301123tSirRetStatus limProcessSmeSetTdls2040BSSCoexReq(tpAniSirGlobal pMac,
1124 tANI_U32 *pMsgBuf);
Masti, Narayanraddi1fb32a92015-06-29 13:14:06 +05301125tSirRetStatus limProcessSmeDelAllTdlsPeers(tpAniSirGlobal pMac,
1126 tANI_U32 *pMsgBuf);
Manjeet Singh3ed79242017-01-11 19:04:32 +05301127
1128tSirRetStatus lim_process_sme_cap_tsf_req(tpAniSirGlobal pMac,
1129 tANI_U32 *pMsgBuf);
1130
1131tSirRetStatus lim_process_sme_get_tsf_req(tpAniSirGlobal pMac,
1132 tANI_U32 *pMsgBuf);
SaidiReddy Yenugac341fbf2017-02-01 20:22:45 +05301133
1134tSirRetStatus lim_process_sme_del_ba_ses_req(tpAniSirGlobal pMac,
1135 tANI_U32 *pMsgBuf);
Abhishek Singh449c5372017-12-19 17:21:20 +05301136/**
1137 * lim_send_chan_switch_action_frame() - send channel switch action frame to all
1138 * connected peers
1139 * @mac_ctx: Pointer to Global MAC structure
1140 * @new_channel: new channel
1141 * @session_entry: ap session
1142 *
1143 * Return: None
1144 */
1145void lim_send_chan_switch_action_frame(tpAniSirGlobal mac_ctx,
1146 uint16_t new_channel, tpPESession session_entry);
1147
SaidiReddy Yenugac341fbf2017-02-01 20:22:45 +05301148
Jeff Johnson295189b2012-06-20 16:38:30 -07001149#endif /* __LIM_TYPES_H */
1150