blob: b346ee52ddbdcc206de02c0c1057e4163cae4ebc [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;
Jeff Johnson295189b2012-06-20 16:38:30 -0700277} tLimMlmAssocInd, *tpLimMlmAssocInd;
278
279typedef struct sLimMlmReassocReq
280{
281 tSirMacAddr peerMacAddr;
282 tANI_U32 reassocFailureTimeout;
283 tANI_U16 capabilityInfo;
284 tSirMacListenInterval listenInterval;
285 tANI_U8 sessionId;
286} tLimMlmReassocReq, *tpLimMlmReassocReq;
287
288typedef struct sLimMlmReassocCnf
289{
290 tSirResultCodes resultCode;
291 tANI_U16 protStatusCode; //Protocol Status code.
292 tANI_U8 sessionId;
293} tLimMlmReassocCnf, *tpLimMlmReassocCnf;
294
295typedef struct sLimMlmReassocInd
296{
297 tSirMacAddr peerMacAddr;
298 tSirMacAddr currentApAddr;
299 tANI_U16 aid;
300 tAniAuthType authType;
301 tAniSSID ssId;
302 tSirRSNie rsnIE;
Jeff Johnson1250df42012-12-10 14:31:52 -0800303 tSirAddie addIE; // additional IE received from the peer, which can be WSC IE and/or P2P IE.
Jeff Johnson295189b2012-06-20 16:38:30 -0700304 tSirMacCapabilityInfo capabilityInfo;
Jeff Johnson295189b2012-06-20 16:38:30 -0700305 tAniBool spectrumMgtIndicator;
306 tSirMacPowerCapInfo powerCap;
307 tSirSupChnl supportedChannels;
308
Jeff Johnson295189b2012-06-20 16:38:30 -0700309 tAniBool WmmStaInfoPresent;
Hardik Kantilal Patel1ba630f2014-11-21 04:32:05 +0530310#ifdef WLAN_FEATURE_AP_HT40_24G
311 tAniBool HT40MHzIntoPresent;
312#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700313
Jeff Johnson295189b2012-06-20 16:38:30 -0700314 // Required for indicating the frames to upper layer
315 tANI_U32 beaconLength;
316 tANI_U8* beaconPtr;
317 tANI_U32 assocReqLength;
318 tANI_U8* assocReqPtr;
319} tLimMlmReassocInd, *tpLimMlmReassocInd;
320
321typedef struct sLimMlmAuthCnf
322{
323 tSirMacAddr peerMacAddr;
324 tAniAuthType authType;
325 tSirResultCodes resultCode;
326 tANI_U16 protStatusCode;
327 tANI_U8 sessionId;
328} tLimMlmAuthCnf, *tpLimMlmAuthCnf;
329
330typedef struct sLimMlmAuthInd
331{
332 tSirMacAddr peerMacAddr;
333 tAniAuthType authType;
334 tANI_U8 sessionId;
335} tLimMlmAuthInd, *tpLimMlmAuthInd;
336
337typedef struct sLimMlmDeauthReq
338{
339 tSirMacAddr peerMacAddr;
340 tANI_U16 reasonCode;
341 tANI_U16 deauthTrigger;
342 tANI_U16 aid;
343 tANI_U8 sessionId; //Added for BT-AMP SUPPORT
344
345} tLimMlmDeauthReq, *tpLimMlmDeauthReq;
346
347typedef struct sLimMlmDeauthCnf
348{
349 tSirMacAddr peerMacAddr;
350 tSirResultCodes resultCode;
351 tANI_U16 deauthTrigger;
352 tANI_U16 aid;
353 tANI_U8 sessionId;
354} tLimMlmDeauthCnf, *tpLimMLmDeauthCnf;
355
356typedef struct sLimMlmDeauthInd
357{
358 tSirMacAddr peerMacAddr;
359 tANI_U16 reasonCode;
360 tANI_U16 deauthTrigger;
361 tANI_U16 aid;
362} tLimMlmDeauthInd, *tpLimMlmDeauthInd;
363
364typedef struct sLimMlmDisassocReq
365{
366 tSirMacAddr peerMacAddr;
367 tANI_U16 reasonCode;
368 tANI_U16 disassocTrigger;
369 tANI_U16 aid;
370 tANI_U8 sessionId;
371} tLimMlmDisassocReq, *tpLimMlmDisassocReq;
372
373typedef struct sLimMlmDisassocCnf
374{
375 tSirMacAddr peerMacAddr;
376 tSirResultCodes resultCode;
377 tANI_U16 disassocTrigger;
378 tANI_U16 aid;
379 tANI_U8 sessionId;
380} tLimMlmDisassocCnf, *tpLimMlmDisassocCnf;
381
382typedef struct sLimMlmDisassocInd
383{
384 tSirMacAddr peerMacAddr;
385 tANI_U16 reasonCode;
386 tANI_U16 disassocTrigger;
387 tANI_U16 aid;
388 tANI_U8 sessionId;
389} tLimMlmDisassocInd, *tpLimMlmDisassocInd;
390
391typedef struct sLimMlmPurgeStaReq
392{
393 tSirMacAddr peerMacAddr;
394 tANI_U16 aid;
395 tANI_U8 sessionId;//Added For BT-AMP Support
396} tLimMlmPurgeStaReq, *tpLimMlmPurgeStaReq;
397
398typedef struct sLimMlmPurgeStaInd
399{
400 tSirMacAddr peerMacAddr;
401 tANI_U16 reasonCode;
402 tANI_U16 purgeTrigger;
403 tANI_U16 aid;
404 tANI_U8 sessionId;
405} tLimMlmPurgeStaInd, *tpLimMlmPurgeStaInd;
406
407typedef struct sLimMlmSetKeysReq
408{
409 tSirMacAddr peerMacAddr;
410 tANI_U8 sessionId; //Added For BT-AMP Support
411 tANI_U16 aid;
412 tAniEdType edType; // Encryption/Decryption type
413 tANI_U8 numKeys;
414 tSirKeys key[SIR_MAC_MAX_NUM_OF_DEFAULT_KEYS];
415} tLimMlmSetKeysReq, *tpLimMlmSetKeysReq;
416
417typedef struct sLimMlmSetKeysCnf
418{
419 tSirMacAddr peerMacAddr;
420 tANI_U16 resultCode;
421 tANI_U16 aid;
422 tANI_U8 sessionId;
423} tLimMlmSetKeysCnf, *tpLimMlmSetKeysCnf;
424
425typedef struct sLimMlmRemoveKeyReq
426{
427 tSirMacAddr peerMacAddr;
428 tANI_U8 sessionId; //Added FOr BT-AMP Support
429 tAniEdType edType; // Encryption/Decryption type
430 tANI_U8 wepType; //STATIC / DYNAMIC specifier
431 tANI_U8 keyId; //Key Id To be removed.
432 tANI_BOOLEAN unicast;
433} tLimMlmRemoveKeyReq, *tpLimMlmRemoveKeyReq;
434
435typedef struct sLimMlmRemoveKeyCnf
436{
437 tSirMacAddr peerMacAddr;
438 tANI_U16 resultCode;
439 tANI_U8 sessionId;
440} tLimMlmRemoveKeyCnf, *tpLimMlmRemoveKeyCnf;
441
442
443typedef struct sLimMlmResetReq
444{
445 tSirMacAddr macAddr;
446 tANI_U8 performCleanup;
447 tANI_U8 sessionId;
448} tLimMlmResetReq, *tpLimMlmResetReq;
449
450typedef struct sLimMlmResetCnf
451{
452 tSirMacAddr macAddr;
453 tSirResultCodes resultCode;
454 tANI_U8 sessionId;
455} tLimMlmResetCnf, *tpLimMlmResetCnf;
456
457
458typedef struct sLimMlmLinkTestStopReq
459{
460 tSirMacAddr peerMacAddr;
461 tANI_U8 sessionId;
Jeff Johnson295189b2012-06-20 16:38:30 -0700462} tLimMlmLinkTestStopReq, *tpLimMlmLinkTestStopReq;
463
464
465//
466// Block ACK related MLME data structures
467//
468
469typedef struct sLimMlmAddBAReq
470{
471
472 // ADDBA recipient
473 tSirMacAddr peerMacAddr;
474
475 // ADDBA Action Frame dialog token
476 tANI_U8 baDialogToken;
477
478 // ADDBA requested for TID
479 tANI_U8 baTID;
480
481 // BA policy
482 // 0 - Delayed BA (Not supported)
483 // 1 - Immediate BA
484 tANI_U8 baPolicy;
485
486 // BA buffer size - (0..127) max size MSDU's
487 tANI_U16 baBufferSize;
488
489 // BA timeout in TU's
490 // 0 means no timeout will occur
491 tANI_U16 baTimeout;
492
493 // ADDBA failure timeout in TU's
494 // Greater than or equal to 1
495 tANI_U16 addBAFailureTimeout;
496
497 // BA Starting Sequence Number
498 tANI_U16 baSSN;
499
500 tANI_U8 sessionId;
501
502} tLimMlmAddBAReq, *tpLimMlmAddBAReq;
503
504typedef struct sLimMlmAddBACnf
505{
506
507 // ADDBA recipient
508 tSirMacAddr peerMacAddr;
509
510 // ADDBA Action Frame dialog token
511 tANI_U8 baDialogToken;
512
513 // ADDBA requested for TID
514 tANI_U8 baTID;
515
516 // BA status code
517 tSirMacStatusCodes addBAResultCode;
518
519 // BA policy
520 // 0 - Delayed BA (Not supported)
521 // 1 - Immediate BA
522 tANI_U8 baPolicy;
523
524 // BA buffer size - (0..127) max size MSDU's
525 tANI_U16 baBufferSize;
526
527 // BA timeout in TU's
528 // 0 means no timeout will occur
529 tANI_U16 baTimeout;
530
531 // ADDBA direction
532 // 1 - Originator
533 // 0 - Recipient
534 tANI_U8 baDirection;
535 tANI_U8 sessionId;
536
537
538} tLimMlmAddBACnf, *tpLimMlmAddBACnf;
539
540typedef struct sLimMlmAddBAInd
541{
542
543 // ADDBA recipient
544 tSirMacAddr peerMacAddr;
545
546 // ADDBA Action Frame dialog token
547 tANI_U8 baDialogToken;
548
549 // ADDBA requested for TID
550 tANI_U8 baTID;
551
552 // BA policy
553 // 0 - Delayed BA (Not supported)
554 // 1 - Immediate BA
555 tANI_U8 baPolicy;
556
557 // BA buffer size - (0..127) max size MSDU's
558 tANI_U16 baBufferSize;
559
560 // BA timeout in TU's
561 // 0 means no timeout will occur
562 tANI_U16 baTimeout;
563
564} tLimMlmAddBAInd, *tpLimMlmAddBAInd;
565
566typedef struct sLimMlmAddBARsp
567{
568
569 // ADDBA recipient
570 tSirMacAddr peerMacAddr;
571
572 // ADDBA Action Frame dialog token
573 tANI_U8 baDialogToken;
574
575 // ADDBA requested for TID
576 tANI_U8 baTID;
577
578 // BA status code
579 tSirMacStatusCodes addBAResultCode;
580
581 // BA policy
582 // 0 - Delayed BA (Not supported)
583 // 1 - Immediate BA
584 tANI_U8 baPolicy;
585
586 // BA buffer size - (0..127) max size MSDU's
587 tANI_U16 baBufferSize;
588
589 // BA timeout in TU's
590 // 0 means no timeout will occur
591 tANI_U16 baTimeout;
592
593 //reserved for alignment
594 tANI_U8 rsvd[2];
595
596 /* PE session id*/
597 tANI_U8 sessionId;
598
599 } tLimMlmAddBARsp, *tpLimMlmAddBARsp;
600
601//
602// NOTE - Overloading DELBA IND and DELBA CNF
603// to use the same data structure as DELBA REQ
604// as the parameters do not vary too much.
605//
606typedef struct sLimMlmDelBAReq
607{
608
609 // ADDBA recipient
610 tSirMacAddr peerMacAddr;
611
612 // DELBA direction
613 // 1 - Originator
614 // 0 - Recipient
615 tANI_U8 baDirection;
616
617 // DELBA requested for TID
618 tANI_U8 baTID;
619
620 // DELBA reason code
621 tSirMacReasonCodes delBAReasonCode;
622
623 tANI_U8 sessionId;
624
625} tLimMlmDelBAReq, *tpLimMlmDelBAReq, tLimMlmDelBAInd, *tpLimMlmDelBAInd, tLimMlmDelBACnf, *tpLimMlmDelBACnf;
626
627// Function templates
628
629tANI_BOOLEAN limProcessSmeReqMessages(tpAniSirGlobal, tpSirMsgQ);
630void limProcessMlmReqMessages(tpAniSirGlobal, tpSirMsgQ);
631void limProcessMlmRspMessages(tpAniSirGlobal, tANI_U32, tANI_U32 *);
632void limProcessLmmMessages(tpAniSirGlobal, tANI_U32, tANI_U32 *);
633void limProcessSmeDelBssRsp( tpAniSirGlobal , tANI_U32,tpPESession);
634
635void limGetRandomBssid(tpAniSirGlobal pMac ,tANI_U8 *data);
636
Jeff Johnson295189b2012-06-20 16:38:30 -0700637// Function to handle HT and HT IE CFG parameter intializations
Jeff Johnsone7245742012-09-05 17:12:55 -0700638void handleHTCapabilityandHTInfo(struct sAniSirGlobal *pMac, tpPESession psessionEntry);
Jeff Johnson295189b2012-06-20 16:38:30 -0700639
640// Function to handle CFG parameter updates
641void limHandleCFGparamUpdate(tpAniSirGlobal, tANI_U32);
642
643// Function to apply CFG parameters before join/reassoc/start BSS
644void limApplyConfiguration(tpAniSirGlobal,tpPESession);
645
Jeff Johnson295189b2012-06-20 16:38:30 -0700646void limSetCfgProtection(tpAniSirGlobal pMac, tpPESession pesessionEntry);
Jeff Johnson295189b2012-06-20 16:38:30 -0700647
648
649// Function to Initialize MLM state machine on STA
650void limInitMlm(tpAniSirGlobal);
651
652// Function to cleanup MLM state machine
653void limCleanupMlm(tpAniSirGlobal);
654
655// Function to cleanup LMM state machine
656void limCleanupLmm(tpAniSirGlobal);
657
Jeff Johnson295189b2012-06-20 16:38:30 -0700658// Management frame handling functions
659void limProcessBeaconFrame(tpAniSirGlobal, tANI_U8 *,tpPESession);
660void limProcessBeaconFrameNoSession(tpAniSirGlobal, tANI_U8 *);
661void limProcessProbeReqFrame(tpAniSirGlobal, tANI_U8 *, tpPESession);
662void limProcessProbeRspFrame(tpAniSirGlobal, tANI_U8 *, tpPESession);
663void limProcessProbeRspFrameNoSession(tpAniSirGlobal, tANI_U8 *);
664void limProcessProbeReqFrame_multiple_BSS(tpAniSirGlobal, tANI_U8 *,tpPESession);
665
666
667// Process Auth frame when we have a session in progress.
668void limProcessAuthFrame(tpAniSirGlobal, tANI_U8 *,tpPESession);
669#ifdef WLAN_FEATURE_VOWIFI_11R
Srikant Kuppaa3ed0a32013-02-20 07:24:43 -0800670tSirRetStatus limProcessAuthFrameNoSession(tpAniSirGlobal pMac, tANI_U8 *, void *body);
Jeff Johnson295189b2012-06-20 16:38:30 -0700671#endif
672
673void limProcessAssocReqFrame(tpAniSirGlobal, tANI_U8 *, tANI_U8, tpPESession);
674void limSendMlmAssocInd(tpAniSirGlobal pMac, tpDphHashNode pStaDs, tpPESession psessionEntry);
675
676
677void limProcessAssocRspFrame(tpAniSirGlobal, tANI_U8 *, tANI_U8,tpPESession);
678void limProcessDisassocFrame(tpAniSirGlobal, tANI_U8 *,tpPESession);
679void limProcessDeauthFrame(tpAniSirGlobal, tANI_U8 *,tpPESession);
680void limProcessActionFrame(tpAniSirGlobal, tANI_U8 *,tpPESession);
Jeff Johnson295189b2012-06-20 16:38:30 -0700681void limProcessActionFrameNoSession(tpAniSirGlobal pMac, tANI_U8 *pRxMetaInfo);
Jeff Johnson295189b2012-06-20 16:38:30 -0700682
683
684tSirRetStatus limPopulateMacHeader(tpAniSirGlobal, tANI_U8*, tANI_U8, tANI_U8, tSirMacAddr,tSirMacAddr);
685tSirRetStatus limSendProbeReqMgmtFrame(tpAniSirGlobal, tSirMacSSid *, tSirMacAddr, tANI_U8, tSirMacAddr, tANI_U32, tANI_U32, tANI_U8 *);
686void limSendProbeRspMgmtFrame(tpAniSirGlobal, tSirMacAddr, tpAniSSID, short, tANI_U8, tpPESession, tANI_U8);
Sushant Kaushik9e923872015-04-02 17:09:31 +0530687void limSendAuthMgmtFrame(tpAniSirGlobal, tSirMacAuthFrameBody *, tSirMacAddr,
688 tANI_U8, tpPESession , tAniBool);
Jeff Johnson295189b2012-06-20 16:38:30 -0700689void limSendAssocReqMgmtFrame(tpAniSirGlobal, tLimMlmAssocReq *,tpPESession);
690void limSendReassocReqMgmtFrame(tpAniSirGlobal, tLimMlmReassocReq *,tpPESession);
691#ifdef WLAN_FEATURE_VOWIFI_11R
692void limSendReassocReqWithFTIEsMgmtFrame(tpAniSirGlobal pMac,
693 tLimMlmReassocReq *pMlmReassocReq,tpPESession psessionEntry);
694#endif
695void limSendDeltsReqActionFrame(tpAniSirGlobal pMac, tSirMacAddr peer,
696 tANI_U8 wmmTspecPresent, tSirMacTSInfo *pTsinfo,
697 tSirMacTspecIE *pTspecIe, tpPESession psessionEntry);
698void limSendAddtsReqActionFrame(tpAniSirGlobal pMac, tSirMacAddr peerMacAddr,
699 tSirAddtsReqInfo *addts,tpPESession);
700void limSendAddtsRspActionFrame(tpAniSirGlobal pMac, tSirMacAddr peerMacAddr,
701 tANI_U16 statusCode, tSirAddtsReqInfo *addts, tSirMacScheduleIE *pSchedule,tpPESession);
702
Kapil Gupta956c0c42017-06-16 19:24:31 +0530703void limSendAssocRspMgmtFrame(tpAniSirGlobal, tANI_U16, tANI_U16, tSirMacAddr,
704 tANI_U8, tpDphHashNode pSta,tpPESession,
705 assoc_rsp_tx_context *tx_complete_context);
Jeff Johnson295189b2012-06-20 16:38:30 -0700706
707void limSendNullDataFrame(tpAniSirGlobal, tpDphHashNode);
Madan Mohan Koyyalamudi521ff192012-11-15 17:13:08 -0800708void limSendDisassocMgmtFrame(tpAniSirGlobal, tANI_U16, tSirMacAddr, tpPESession, tANI_BOOLEAN waitForAck);
709void limSendDeauthMgmtFrame(tpAniSirGlobal, tANI_U16, tSirMacAddr, tpPESession, tANI_BOOLEAN waitForAck);
Padma, Santhosh Kumar05600d32015-07-24 13:00:57 +0530710void limSendSmeDisassocDeauthNtf( tpAniSirGlobal pMac,
711 eHalStatus status, tANI_U32 *pCtx );
Paul Zhang83289792017-02-28 18:58:52 +0800712void limDoSendAuthMgmtFrame(tpAniSirGlobal, tpPESession);
Jeff Johnson295189b2012-06-20 16:38:30 -0700713
714void limContinueChannelScan(tpAniSirGlobal);
715tSirResultCodes limMlmAddBss(tpAniSirGlobal, tLimMlmStartReq *,tpPESession psessionEntry);
716
Jeff Johnsone7245742012-09-05 17:12:55 -0700717tSirRetStatus limSendChannelSwitchMgmtFrame(tpAniSirGlobal, tSirMacAddr, tANI_U8, tANI_U8, tANI_U8, tpPESession);
Jeff Johnson295189b2012-06-20 16:38:30 -0700718
Abhishek Singh2b0cf1c2017-10-30 17:36:38 +0530719/**
720 * lim_send_extended_chan_switch_action_frame()- function to send ECSA
721 * action frame over the air .
722 * @mac_ctx: pointer to global mac structure
723 * @peer: Destination mac.
724 * @mode: channel switch mode
725 * @new_op_class: new op class
726 * @new_channel: new channel to switch
727 * @count: channel switch count
728 *
729 * This function is called to send ECSA frame.
730 *
731 * Return: success if frame is sent else return failure
732 */
733tSirRetStatus
734lim_send_extended_chan_switch_action_frame(tpAniSirGlobal mac_ctx,
735 tSirMacAddr peer, uint8_t mode, uint8_t new_op_class,
736 uint8_t new_channel, uint8_t count, tpPESession session_entry);
737
738
Mohit Khanna4a70d262012-09-11 16:30:12 -0700739#ifdef WLAN_FEATURE_11AC
740tSirRetStatus limSendVHTOpmodeNotificationFrame(tpAniSirGlobal pMac,tSirMacAddr peer,tANI_U8 nMode, tpPESession psessionEntry );
Madan Mohan Koyyalamudic6226de2012-09-18 16:33:31 -0700741tSirRetStatus limSendVHTChannelSwitchMgmtFrame(tpAniSirGlobal pMac,tSirMacAddr peer,tANI_U8 nChanWidth, tANI_U8 nNewChannel, tANI_U8 ncbMode, tpPESession psessionEntry );
Mohit Khanna4a70d262012-09-11 16:30:12 -0700742#endif
743
Jeff Johnson295189b2012-06-20 16:38:30 -0700744#if defined WLAN_FEATURE_VOWIFI
745tSirRetStatus limSendNeighborReportRequestFrame(tpAniSirGlobal, tpSirMacNeighborReportReq, tSirMacAddr, tpPESession);
746tSirRetStatus limSendLinkReportActionFrame(tpAniSirGlobal, tpSirMacLinkReport, tSirMacAddr, tpPESession );
747tSirRetStatus limSendRadioMeasureReportActionFrame(tpAniSirGlobal, tANI_U8, tANI_U8, tpSirMacRadioMeasureReport, tSirMacAddr, tpPESession);
748#endif
749
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800750#if defined(FEATURE_WLAN_ESE) && !defined(FEATURE_WLAN_ESE_UPLOAD)
Jeff Johnson295189b2012-06-20 16:38:30 -0700751void limProcessIappFrame(tpAniSirGlobal, tANI_U8 *,tpPESession);
752#endif
753
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800754#ifdef FEATURE_WLAN_TDLS
Gopichand Nakkala777e6032012-12-31 16:39:21 -0800755void limInitTdlsData(tpAniSirGlobal, tpPESession);
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800756tSirRetStatus limProcessSmeTdlsMgmtSendReq(tpAniSirGlobal pMac,
757 tANI_U32 *pMsgBuf);
758tSirRetStatus limProcessSmeTdlsAddStaReq(tpAniSirGlobal pMac,
759 tANI_U32 *pMsgBuf);
Gopichand Nakkala79ff85d2013-05-27 17:05:29 +0530760tSirRetStatus limProcesSmeTdlsLinkEstablishReq(tpAniSirGlobal pMac,
761 tANI_U32 *pMsgBuf);
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800762tSirRetStatus limProcessSmeTdlsDelStaReq(tpAniSirGlobal pMac,
763 tANI_U32 *pMsgBuf);
Gopichand Nakkala2a0a1572013-02-10 21:39:16 -0800764void limSendSmeTDLSDeleteAllPeerInd(tpAniSirGlobal pMac, tpPESession psessionEntry);
Gopichand Nakkalab977a972013-02-18 19:15:09 -0800765void limSendSmeMgmtTXCompletion(tpAniSirGlobal pMac,
Ganesh Kondabattiniff987022015-08-11 19:43:44 +0530766 tANI_U32 smeSessionId,
Gopichand Nakkalab977a972013-02-18 19:15:09 -0800767 tANI_U32 txCompleteStatus);
Gopichand Nakkala2a0a1572013-02-10 21:39:16 -0800768tSirRetStatus limDeleteTDLSPeers(tpAniSirGlobal pMac, tpPESession psessionEntry);
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800769eHalStatus limProcessTdlsAddStaRsp(tpAniSirGlobal pMac, void *msg, tpPESession);
770tSirRetStatus limSendTdlsTeardownFrame(tpAniSirGlobal pMac,
Hoonki Leea34dd892013-02-05 22:56:02 -0800771 tSirMacAddr peerMac, tANI_U16 reason, tANI_U8 responder, tpPESession psessionEntry,
Atul Mittalc0f739f2014-07-31 13:47:47 +0530772 tANI_U8 *addIe, tANI_U16 addIeLen);
773// tdlsoffchan
774tSirRetStatus limProcesSmeTdlsChanSwitchReq(tpAniSirGlobal pMac,
775 tANI_U32 *pMsgBuf);
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800776#endif
777
Jeff Johnson295189b2012-06-20 16:38:30 -0700778// Algorithms & Link Monitoring related functions
779tSirBackgroundScanMode limSelectsBackgroundScanMode(tpAniSirGlobal);
780void limTriggerBackgroundScan(tpAniSirGlobal);
781void limAbortBackgroundScan(tpAniSirGlobal);
782
783/// Function that handles heartbeat failure
784void limHandleHeartBeatFailure(tpAniSirGlobal,tpPESession);
785
786/// Function that triggers link tear down with AP upon HB failure
787void limTearDownLinkWithAp(tpAniSirGlobal,tANI_U8, tSirMacReasonCodes);
788
Jeff Johnson295189b2012-06-20 16:38:30 -0700789
790/// Function that sends keep alive message to peer(s)
791void limSendKeepAliveToPeer(tpAniSirGlobal);
792
793/// Function that processes Max retries interrupt from TFP
794void limHandleMaxRetriesInterrupt(tANI_U32);
795
796/// Function that processes messages deferred during Learn mode
797void limProcessDeferredMessageQueue(tpAniSirGlobal);
798
799/// Function that defers the messages received
800tANI_U32 limDeferMsg(tpAniSirGlobal, tSirMsgQ *);
801
802/// Function that sets system into scan mode
803void limSetScanMode(tpAniSirGlobal pMac);
804
805/// Function that Switches the Channel and sets the CB Mode
Jeff Johnsone7245742012-09-05 17:12:55 -0700806void limSetChannel(tpAniSirGlobal pMac, tANI_U8 channel, tANI_U8 secChannelOffset, tPowerdBm maxTxPower, tANI_U8 peSessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -0700807
808/// Function that completes channel scan
809void limCompleteMlmScan(tpAniSirGlobal, tSirResultCodes);
810
Jeff Johnsone7245742012-09-05 17:12:55 -0700811#ifdef FEATURE_OEM_DATA_SUPPORT
812/// Funtion that sets system into meas mode for oem data req
813void limSetOemDataReqMode(tpAniSirGlobal pMac, eHalStatus status, tANI_U32* data);
814#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700815
816#ifdef ANI_SUPPORT_11H
817/// Function that sends Measurement Report action frame
818tSirRetStatus limSendMeasReportFrame(tpAniSirGlobal, tpSirMacMeasReqActionFrame, tSirMacAddr);
819
820/// Function that sends TPC Report action frame
821tSirRetStatus limSendTpcReportFrame(tpAniSirGlobal, tpSirMacTpcReqActionFrame, tSirMacAddr);
822#endif
823
824/// Function that sends TPC Request action frame
825void limSendTpcRequestFrame(tpAniSirGlobal, tSirMacAddr);
826
827// Function(s) to handle responses received from HAL
828void limProcessMlmAddBssRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ );
829void limProcessMlmAddStaRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQt,tpPESession psessionEntry);
830void limProcessMlmDelStaRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ );
831void limProcessMlmDelBssRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ,tpPESession);
Jeff Johnson295189b2012-06-20 16:38:30 -0700832void limProcessStaMlmAddStaRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ ,tpPESession psessionEntry);
833void limProcessStaMlmDelStaRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ,tpPESession psessionEntry);
834void limProcessStaMlmDelBssRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ ,tpPESession psessionEntry);
835void limProcessMlmSetStaKeyRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ );
836void limProcessMlmSetBssKeyRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ );
837
838
839
840#ifdef GEN4_SCAN
841// Function to process WDA_INIT_SCAN_RSP message
842void limProcessInitScanRsp(tpAniSirGlobal, void * );
843
844// Function to process WDA_START_SCAN_RSP message
845void limProcessStartScanRsp(tpAniSirGlobal, void * );
846
847// Function to process WDA_END_SCAN_RSP message
848void limProcessEndScanRsp(tpAniSirGlobal, void * );
849
850// Function to process WDA_FINISH_SCAN_RSP message
851void limProcessFinishScanRsp(tpAniSirGlobal, void * );
852
853// Function to process WDA_SWITCH_CHANNEL_RSP message
854void limProcessSwitchChannelRsp(tpAniSirGlobal pMac, void * );
855
856void limSendHalInitScanReq( tpAniSirGlobal, tLimLimHalScanState, tSirLinkTrafficCheck);
857void limSendHalStartScanReq( tpAniSirGlobal, tANI_U8, tLimLimHalScanState);
858void limSendHalEndScanReq( tpAniSirGlobal, tANI_U8, tLimLimHalScanState);
Bhargav Shahe3a6ff02016-04-11 16:31:49 +0530859void limSendTLPauseInd(tpAniSirGlobal pMac, uint16_t staId);
Jeff Johnson295189b2012-06-20 16:38:30 -0700860void limSendHalFinishScanReq( tpAniSirGlobal, tLimLimHalScanState);
861
862void limContinuePostChannelScan(tpAniSirGlobal pMac);
Gopichand Nakkalad492d202013-05-10 02:50:47 +0530863void limCovertChannelScanType(tpAniSirGlobal pMac,tANI_U8 channelNum, tANI_BOOLEAN passiveToActive);
864void limSetDFSChannelList(tpAniSirGlobal pMac,tANI_U8 channelNum, tSirDFSChannelList *dfsChannelList);
Jeff Johnson295189b2012-06-20 16:38:30 -0700865void limContinueChannelLearn( tpAniSirGlobal );
866//WLAN_SUSPEND_LINK Related
867tANI_U8 limIsLinkSuspended(tpAniSirGlobal pMac);
868void limSuspendLink(tpAniSirGlobal, tSirLinkTrafficCheck, SUSPEND_RESUME_LINK_CALLBACK, tANI_U32*);
869void limResumeLink(tpAniSirGlobal, SUSPEND_RESUME_LINK_CALLBACK, tANI_U32*);
870//end WLAN_SUSPEND_LINK Related
871#endif // GEN4_SCAN
872
873tSirRetStatus limSendAddBAReq( tpAniSirGlobal pMac,
874 tpLimMlmAddBAReq pMlmAddBAReq,tpPESession);
875
876tSirRetStatus limSendAddBARsp( tpAniSirGlobal pMac,
877 tpLimMlmAddBARsp pMlmAddBARsp,tpPESession);
878
879tSirRetStatus limSendDelBAInd( tpAniSirGlobal pMac,
880 tpLimMlmDelBAReq pMlmDelBAReq ,tpPESession psessionEntry);
881#if 0
882tSirRetStatus limSendSMPowerStateFrame( tpAniSirGlobal pMac,
883 tSirMacAddr peer, tSirMacHTMIMOPowerSaveState State );
884#endif
885
886void limProcessMlmHalAddBARsp( tpAniSirGlobal pMac,
887 tpSirMsgQ limMsgQ );
888
889void limProcessMlmHalBADeleteInd( tpAniSirGlobal pMac,
890 tpSirMsgQ limMsgQ );
891
892void limProcessMlmRemoveKeyRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ );
893
894void limProcessLearnIntervalTimeout(tpAniSirGlobal pMac);
Chet Lanctot8cecea22014-02-11 19:09:36 -0800895
Jeff Johnson295189b2012-06-20 16:38:30 -0700896#ifdef WLAN_FEATURE_11W
Chet Lanctot8cecea22014-02-11 19:09:36 -0800897//11w send SA query request action frame
898tSirRetStatus limSendSaQueryRequestFrame( tpAniSirGlobal pMac, tANI_U8 *transId,
899 tSirMacAddr peer, tpPESession psessionEntry );
Jeff Johnson295189b2012-06-20 16:38:30 -0700900//11w SA query request action frame handler
901tSirRetStatus limSendSaQueryResponseFrame( tpAniSirGlobal pMac,
Chet Lanctot186b5732013-03-18 10:26:30 -0700902 tANI_U8 *transId, tSirMacAddr peer,tpPESession psessionEntry);
Jeff Johnson295189b2012-06-20 16:38:30 -0700903#endif
Abhishek Singh00b71972016-01-07 10:51:04 +0530904
905#ifdef WLAN_FEATURE_RMC
906void limProcessRMCMessages(tpAniSirGlobal pMac, eRmcMessageType msgType,
907 tANI_U32 *pMsgBuf);
908tSirRetStatus limSendRMCActionFrame(tpAniSirGlobal pMac,
909 tSirMacAddr peerMacAddr, tSirRMCInfo *pRMC,
910 tpPESession psessionEntry);
911#endif /* WLAN_FEATURE_RMC */
912
Jeff Johnson295189b2012-06-20 16:38:30 -0700913// Inline functions
914
915/**
916 * limPostSmeMessage()
917 *
918 *FUNCTION:
919 * This function is called by limProcessMlmMessages(). In this
920 * function MLM sub-module invokes MLM ind/cnf primitives.
921 *
922 *LOGIC:
923 * Initially MLM makes an SME function call to invoke MLM ind/cnf
924 * primitive. In future this can be enhanced to 'post' messages to SME.
925 *
926 *ASSUMPTIONS:
927 * NA
928 *
929 *NOTE:
930 * NA
931 *
932 * @param pMac Pointer to Global MAC structure
933 * @param msgType Indicates the MLM primitive message type
934 * @param *pMsgBuf A pointer to the MLM message buffer
935 *
936 * @return None
937 */
938static inline void
939limPostSmeMessage(tpAniSirGlobal pMac, tANI_U32 msgType, tANI_U32 *pMsgBuf)
940{
941 tSirMsgQ msg;
942
943 if(pMsgBuf == NULL)
944 {
Kiran Kumar Lokere5be73a62013-04-01 18:40:00 -0700945 limLog(pMac, LOGE,FL("Buffer is Pointing to NULL"));
Jeff Johnson295189b2012-06-20 16:38:30 -0700946 return;
947 }
948
949 msg.type = (tANI_U16)msgType;
950 msg.bodyptr = pMsgBuf;
951 msg.bodyval = 0;
952 if (msgType > eWNI_SME_MSG_TYPES_BEGIN)
Konamki, Sreelakshmi2bfb8b02015-07-29 11:41:24 +0530953 {
954 MTRACE(macTrace(pMac, TRACE_CODE_TX_SME_MSG, NO_SESSION, msg.type));
Jeff Johnson295189b2012-06-20 16:38:30 -0700955 limProcessSmeReqMessages(pMac, &msg);
Konamki, Sreelakshmi2bfb8b02015-07-29 11:41:24 +0530956 }
Jeff Johnson295189b2012-06-20 16:38:30 -0700957 else
958 limProcessMlmRspMessages(pMac, msgType, pMsgBuf);
959} /*** end limPostSmeMessage() ***/
960
961/**
962 * limPostMlmMessage()
963 *
964 *FUNCTION:
965 * This function is called by limProcessSmeMessages(). In this
966 * function SME invokes MLME primitives.
967 *
968 *PARAMS:
969 *
970 *LOGIC:
971 * Initially SME makes an MLM function call to invoke MLM primitive.
972 * In future this can be enhanced to 'post' messages to MLM.
973 *
974 *ASSUMPTIONS:
975 * NA
976 *
977 *NOTE:
978 * NA
979 *
980 * @param pMac Pointer to Global MAC structure
981 * @param msgType Indicates the MLM primitive message type
982 * @param *pMsgBuf A pointer to the MLM message buffer
983 *
984 * @return None
985 */
986static inline void
987limPostMlmMessage(tpAniSirGlobal pMac, tANI_U32 msgType, tANI_U32 *pMsgBuf)
988{
989
990 tSirMsgQ msg;
991 if(pMsgBuf == NULL)
992 {
Kiran Kumar Lokere5be73a62013-04-01 18:40:00 -0700993 limLog(pMac, LOGE,FL("Buffer is Pointing to NULL"));
Jeff Johnson295189b2012-06-20 16:38:30 -0700994 return;
995 }
996 msg.type = (tANI_U16) msgType;
997 msg.bodyptr = pMsgBuf;
998 msg.bodyval = 0;
Konamki, Sreelakshmi2bfb8b02015-07-29 11:41:24 +0530999 MTRACE(macTraceMsgRx(pMac, NO_SESSION, msg.type));
Jeff Johnson295189b2012-06-20 16:38:30 -07001000 limProcessMlmReqMessages(pMac, &msg);
1001} /*** end limPostMlmMessage() ***/
1002
1003
1004
1005/**
1006 * limGetCurrentScanChannel()
1007 *
1008 *FUNCTION:
1009 * This function is called in various places to get current channel
1010 * number being scanned.
1011 *
1012 *PARAMS:
1013 *
1014 *LOGIC:
1015 *
1016 *ASSUMPTIONS:
1017 * NA
1018 *
1019 *NOTE:
1020 * NA
1021 *
1022 * @param pMac Pointer to Global MAC structure
1023 * @return Channel number
1024 */
1025static inline tANI_U8
1026limGetCurrentScanChannel(tpAniSirGlobal pMac)
1027{
1028 tANI_U8 *pChanNum = pMac->lim.gpLimMlmScanReq->channelList.channelNumber;
1029
1030 return (*(pChanNum + pMac->lim.gLimCurrentScanChannelId));
1031} /*** end limGetCurrentScanChannel() ***/
1032
Jeff Johnson295189b2012-06-20 16:38:30 -07001033/**
1034 * limSendBeaconInd()
1035 *
1036 *FUNCTION:
1037 * This function is called to send the beacon indication
1038 * number being scanned.
1039 *
1040 *PARAMS:
1041 *
1042 *LOGIC:
1043 *
1044 *ASSUMPTIONS:
1045*/
1046
1047void
1048limSendBeaconInd(tpAniSirGlobal pMac, tpPESession psessionEntry);
Jeff Johnson295189b2012-06-20 16:38:30 -07001049
Jeff Johnson295189b2012-06-20 16:38:30 -07001050
1051void limGetWPSPBCSessions(tpAniSirGlobal pMac, tANI_U8 *addr, tANI_U8 *uuid_e, eWPSPBCOverlap *overlap, tpPESession psessionEntry);
1052void limWPSPBCTimeout(tpAniSirGlobal pMac, tpPESession psessionEntry);
1053void limWPSPBCClose(tpAniSirGlobal pMac, tpPESession psessionEntry);
1054void limRemovePBCSessions(tpAniSirGlobal pMac, tSirMacAddr pRemoveMac,tpPESession psessionEntry);
1055
1056
1057tSirRetStatus
1058limIsSmeGetWPSPBCSessionsReqValid(tpAniSirGlobal pMac, tSirSmeGetWPSPBCSessionsReq *pGetWPSPBCSessionsReq, tANI_U8 *pBuf);
1059
1060#define LIM_WPS_OVERLAP_TIMER_MS 10000
Jeff Johnson295189b2012-06-20 16:38:30 -07001061
1062void
1063limSuspendLink(tpAniSirGlobal pMac, tSirLinkTrafficCheck trafficCheck, SUSPEND_RESUME_LINK_CALLBACK callback, tANI_U32 *data);
1064void
1065limResumeLink(tpAniSirGlobal pMac, SUSPEND_RESUME_LINK_CALLBACK callback, tANI_U32 *data);
1066
1067void
1068limChangeChannelWithCallback(tpAniSirGlobal pMac, tANI_U8 newChannel,
1069 CHANGE_CHANNEL_CALLBACK callback, tANI_U32 *cbdata, tpPESession psessionEntry);
1070
Jeff Johnson295189b2012-06-20 16:38:30 -07001071void limSendSmeMgmtFrameInd(
Rashmi Ramanna0d0adec2014-02-05 20:35:37 +05301072 tpAniSirGlobal pMac, tANI_U16 sessionId,
1073 tANI_U8 *pRxPacketInfo,
1074 tpPESession psessionEntry, tANI_S8 rxRssi);
Jeff Johnson295189b2012-06-20 16:38:30 -07001075void limProcessRemainOnChnTimeout(tpAniSirGlobal pMac);
Gopichand Nakkala4261ea52012-12-31 16:43:00 -08001076void limProcessInsertSingleShotNOATimeout(tpAniSirGlobal pMac);
Gopichand Nakkalad492d202013-05-10 02:50:47 +05301077void limConvertActiveChannelToPassiveChannel(tpAniSirGlobal pMac);
Jeff Johnson295189b2012-06-20 16:38:30 -07001078void limSendP2PActionFrame(tpAniSirGlobal pMac, tpSirMsgQ pMsg);
1079void limAbortRemainOnChan(tpAniSirGlobal pMac);
1080tSirRetStatus __limProcessSmeNoAUpdate(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf);
Viral Modid440e682013-03-06 02:25:31 -08001081void limProcessRegdDefdSmeReqAfterNOAStart(tpAniSirGlobal pMac);
Madan Mohan Koyyalamudi521ff192012-11-15 17:13:08 -08001082void limProcessDisassocAckTimeout(tpAniSirGlobal pMac);
1083void limProcessDeauthAckTimeout(tpAniSirGlobal pMac);
Abhishek Singh550aa8c2017-10-30 17:34:53 +05301084/**
1085 * lim_process_ap_ecsa_timeout() -process ECSA timeout which indicate ECSA IE TX
1086 * complete in beacon
1087 * @mac_ctx - A pointer to Global MAC structure
1088 *
1089 * Return None
1090 */
1091void lim_process_ap_ecsa_timeout(tpAniSirGlobal mac_ctx);
1092/**
1093 * lim_send_sme_ap_channel_switch_resp() -process channel switch resp for ecsa
1094 * channel switch req
1095 * @mac_ctx - A pointer to Global MAC structure
1096 * @session: session on which channel switch was done
1097 * @chan_param: channel switch resp params
1098 *
1099 * Return None
1100 */
1101void lim_send_sme_ap_channel_switch_resp(tpAniSirGlobal mac_ctx,
1102 tpPESession session, tpSwitchChannelParams chan_param);
1103
Madan Mohan Koyyalamudi521ff192012-11-15 17:13:08 -08001104eHalStatus limSendDisassocCnf(tpAniSirGlobal pMac);
1105eHalStatus limSendDeauthCnf(tpAniSirGlobal pMac);
Dhanashri Atre4a6e3ea2012-12-12 14:10:33 -08001106
1107#ifdef WLAN_FEATURE_VOWIFI_11R
1108typedef struct sSetLinkCbackParams
1109{
1110 void * cbackDataPtr;
1111} tSetLinkCbackParams;
1112#endif
Gopichand Nakkala2c231c82013-06-11 17:49:16 +05301113
1114void limProcessRxScanEvent(tpAniSirGlobal mac, void *buf);
Sudhir Sattayappa Kohalliabf751c2013-06-30 15:37:18 -07001115
1116int limProcessRemainOnChnlReq(tpAniSirGlobal pMac, tANI_U32 *pMsg);
1117void limRemainOnChnRsp(tpAniSirGlobal pMac, eHalStatus status, tANI_U32 *data);
Siddharth Bhal4f3187c2014-10-09 21:38:08 +05301118void limProcessMlmSpoofMacAddrRsp(tpAniSirGlobal pMac, tSirRetStatus rspStatus);
Pradeep Reddy POTTETI31505892015-04-16 16:47:54 +05301119tSirRetStatus limProcessSmeSetTdls2040BSSCoexReq(tpAniSirGlobal pMac,
1120 tANI_U32 *pMsgBuf);
Masti, Narayanraddi1fb32a92015-06-29 13:14:06 +05301121tSirRetStatus limProcessSmeDelAllTdlsPeers(tpAniSirGlobal pMac,
1122 tANI_U32 *pMsgBuf);
Manjeet Singh3ed79242017-01-11 19:04:32 +05301123
1124tSirRetStatus lim_process_sme_cap_tsf_req(tpAniSirGlobal pMac,
1125 tANI_U32 *pMsgBuf);
1126
1127tSirRetStatus lim_process_sme_get_tsf_req(tpAniSirGlobal pMac,
1128 tANI_U32 *pMsgBuf);
SaidiReddy Yenugac341fbf2017-02-01 20:22:45 +05301129
1130tSirRetStatus lim_process_sme_del_ba_ses_req(tpAniSirGlobal pMac,
1131 tANI_U32 *pMsgBuf);
1132
Jeff Johnson295189b2012-06-20 16:38:30 -07001133#endif /* __LIM_TYPES_H */
1134