blob: 32ea68a9128950e310ce069c3d5e14a597c8a756 [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 limUtils.h contains the utility definitions
44 * LIM uses.
45 * Author: Chandra Modumudi
46 * Date: 02/13/02
47 * History:-
48 * Date Modified by Modification Information
49 * --------------------------------------------------------------------
50 */
51#ifndef __LIM_UTILS_H
52#define __LIM_UTILS_H
53
54#include "sirApi.h"
55#include "sirDebug.h"
56#include "cfgApi.h"
57
58#include "limTypes.h"
59#include "limScanResultUtils.h"
60#include "limTimerUtils.h"
61#include "limTrace.h"
62typedef enum
63{
64 ONE_BYTE = 1,
65 TWO_BYTE = 2
66} eSizeOfLenField;
67
68#define LIM_STA_ID_MASK 0x00FF
69#define LIM_AID_MASK 0xC000
70#define LIM_SPECTRUM_MANAGEMENT_BIT_MASK 0x0100
Hema Aparna Medicharlafa1d2bb2013-12-23 02:28:09 +053071#define LIM_RRM_BIT_MASK 0x1000
Madan Mohan Koyyalamudi61bc5662012-11-02 14:33:10 -070072#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_CCX) || defined(FEATURE_WLAN_LFR)
73#define LIM_MAX_REASSOC_RETRY_LIMIT 2
74#endif
Jeff Johnson295189b2012-06-20 16:38:30 -070075
76// classifier ID is coded as 0-3: tsid, 4-5:direction
77#define LIM_MAKE_CLSID(tsid, dir) (((tsid) & 0x0F) | (((dir) & 0x03) << 4))
78
79#define LIM_SET_STA_BA_STATE(pSta, tid, newVal) \
80{\
81 pSta->baState = ((pSta->baState | (0x3 << tid*2)) & ((newVal << tid*2) | ~(0x3 << tid*2)));\
82}
83
84#define LIM_GET_STA_BA_STATE(pSta, tid, pCurVal)\
85{\
86 *pCurVal = (tLimBAState)(((pSta->baState >> tid*2) & 0x3));\
87}
88
Jeff Johnson295189b2012-06-20 16:38:30 -070089typedef struct sAddBaInfo
90{
91 tANI_U16 fBaEnable : 1;
92 tANI_U16 startingSeqNum: 12;
93 tANI_U16 reserved : 3;
94}tAddBaInfo, *tpAddBaInfo;
95
96typedef struct sAddBaCandidate
97{
98 tSirMacAddr staAddr;
99 tAddBaInfo baInfo[STACFG_MAX_TC];
100}tAddBaCandidate, *tpAddBaCandidate;
Jeff Johnson295189b2012-06-20 16:38:30 -0700101
Jeff Johnson1250df42012-12-10 14:31:52 -0800102// LIM utility functions
Jeff Johnson295189b2012-06-20 16:38:30 -0700103void limGetBssidFromPkt(tpAniSirGlobal, tANI_U8 *, tANI_U8 *, tANI_U32 *);
104char * limMlmStateStr(tLimMlmStates state);
105char * limSmeStateStr(tLimSmeStates state);
106char * limMsgStr(tANI_U32 msgType);
107char * limResultCodeStr(tSirResultCodes resultCode);
108char* limDot11ModeStr(tpAniSirGlobal pMac, tANI_U8 dot11Mode);
109char* limStaOpRateModeStr(tStaRateMode opRateMode);
110void limPrintMlmState(tpAniSirGlobal pMac, tANI_U16 logLevel, tLimMlmStates state);
111void limPrintSmeState(tpAniSirGlobal pMac, tANI_U16 logLevel, tLimSmeStates state);
112void limPrintMsgName(tpAniSirGlobal pMac, tANI_U16 logLevel, tANI_U32 msgType);
113void limPrintMsgInfo(tpAniSirGlobal pMac, tANI_U16 logLevel, tSirMsgQ *msg);
114char* limBssTypeStr(tSirBssType bssType);
115
116#if defined FEATURE_WLAN_CCX || defined WLAN_FEATURE_VOWIFI
117extern tSirRetStatus limSendSetMaxTxPowerReq ( tpAniSirGlobal pMac,
118 tPowerdBm txPower,
119 tpPESession pSessionEntry );
Madan Mohan Koyyalamudi3282c572012-11-09 17:01:41 -0800120extern tANI_U8 limGetMaxTxPower(tPowerdBm regMax, tPowerdBm apTxPower, tANI_U8 iniTxPower);
Jeff Johnson295189b2012-06-20 16:38:30 -0700121#endif
122
123tANI_U32 limPostMsgApiNoWait(tpAniSirGlobal, tSirMsgQ *);
124tANI_U8 limIsAddrBC(tSirMacAddr);
125tANI_U8 limIsGroupAddr(tSirMacAddr);
126
127// check for type of scan allowed
128tANI_U8 limActiveScanAllowed(tpAniSirGlobal, tANI_U8);
129
130// AID pool management functions
Gopichand Nakkala777e6032012-12-31 16:39:21 -0800131void limInitPeerIdxpool(tpAniSirGlobal,tpPESession);
132tANI_U16 limAssignPeerIdx(tpAniSirGlobal,tpPESession);
Jeff Johnson295189b2012-06-20 16:38:30 -0700133
134void limEnableOverlap11gProtection(tpAniSirGlobal pMac, tpUpdateBeaconParams pBeaconParams, tpSirMacMgmtHdr pMh,tpPESession psessionEntry);
135void limUpdateOverlapStaParam(tpAniSirGlobal pMac, tSirMacAddr bssId, tpLimProtStaParams pStaParams);
136void limUpdateShortPreamble(tpAniSirGlobal pMac, tSirMacAddr peerMacAddr, tpUpdateBeaconParams pBeaconParams, tpPESession psessionEntry);
137void limUpdateShortSlotTime(tpAniSirGlobal pMac, tSirMacAddr peerMacAddr, tpUpdateBeaconParams pBeaconParams, tpPESession psessionEntry);
138
139/*
140 * The below 'product' check tobe removed if 'Association' is
141 * allowed in IBSS.
142 */
Gopichand Nakkala777e6032012-12-31 16:39:21 -0800143void limReleasePeerIdx(tpAniSirGlobal, tANI_U16, tpPESession);
Jeff Johnson295189b2012-06-20 16:38:30 -0700144
Jeff Johnson295189b2012-06-20 16:38:30 -0700145
Jeff Johnson295189b2012-06-20 16:38:30 -0700146void limDecideApProtection(tpAniSirGlobal pMac, tSirMacAddr peerMacAddr, tpUpdateBeaconParams pBeaconParams,tpPESession);
147void
148limDecideApProtectionOnDelete(tpAniSirGlobal pMac,
149 tpDphHashNode pStaDs, tpUpdateBeaconParams pBeaconParams, tpPESession psessionEntry);
Jeff Johnson295189b2012-06-20 16:38:30 -0700150
151extern tSirRetStatus limEnable11aProtection(tpAniSirGlobal pMac, tANI_U8 enable, tANI_U8 overlap, tpUpdateBeaconParams pBeaconParams,tpPESession);
152extern tSirRetStatus limEnable11gProtection(tpAniSirGlobal pMac, tANI_U8 enable, tANI_U8 overlap, tpUpdateBeaconParams pBeaconParams,tpPESession psessionEntry);
153extern tSirRetStatus limEnableHtProtectionFrom11g(tpAniSirGlobal pMac, tANI_U8 enable, tANI_U8 overlap, tpUpdateBeaconParams pBeaconParams,tpPESession psessionEntry);
154extern tSirRetStatus limEnableHT20Protection(tpAniSirGlobal pMac, tANI_U8 enable, tANI_U8 overlap, tpUpdateBeaconParams pBeaconParams,tpPESession sessionEntry);
155extern tSirRetStatus limEnableHTNonGfProtection(tpAniSirGlobal pMac, tANI_U8 enable, tANI_U8 overlap, tpUpdateBeaconParams pBeaconParams,tpPESession);
156extern tSirRetStatus limEnableHtRifsProtection(tpAniSirGlobal pMac, tANI_U8 enable, tANI_U8 overlap, tpUpdateBeaconParams pBeaconParams,tpPESession psessionEntry);
157extern tSirRetStatus limEnableHTLsigTxopProtection(tpAniSirGlobal pMac, tANI_U8 enable, tANI_U8 overlap, tpUpdateBeaconParams pBeaconParams,tpPESession);
Jeff Johnson295189b2012-06-20 16:38:30 -0700158extern tSirRetStatus limEnableShortPreamble(tpAniSirGlobal pMac, tANI_U8 enable, tpUpdateBeaconParams pBeaconParams, tpPESession psessionEntry);
Jeff Johnson295189b2012-06-20 16:38:30 -0700159extern tSirRetStatus limEnableHtOBSSProtection (tpAniSirGlobal pMac, tANI_U8 enable, tANI_U8 overlap, tpUpdateBeaconParams pBeaconParams, tpPESession);
160void limDecideStaProtection(tpAniSirGlobal pMac, tpSchBeaconStruct pBeaconStruct, tpUpdateBeaconParams pBeaconParams, tpPESession psessionEntry);
161void limDecideStaProtectionOnAssoc(tpAniSirGlobal pMac, tpSchBeaconStruct pBeaconStruct, tpPESession psessionEntry);
162void limUpdateStaRunTimeHTSwitchChnlParams(tpAniSirGlobal pMac, tDot11fIEHTInfo * pHTInfo, tANI_U8 bssIdx, tpPESession psessionEntry);
163// Print MAC address utility function
164void limPrintMacAddr(tpAniSirGlobal, tSirMacAddr, tANI_U8);
165
166
167
168// Deferred Message Queue read/write
169tANI_U8 limWriteDeferredMsgQ(tpAniSirGlobal pMac, tpSirMsgQ limMsg);
170tSirMsgQ* limReadDeferredMsgQ(tpAniSirGlobal pMac);
171void limHandleDeferMsgError(tpAniSirGlobal pMac, tpSirMsgQ pLimMsg);
172
173// Deferred Message Queue Reset
174void limResetDeferredMsgQ(tpAniSirGlobal pMac);
175
176tSirRetStatus limSysProcessMmhMsgApi(tpAniSirGlobal, tSirMsgQ*, tANI_U8);
177
Jeff Johnson295189b2012-06-20 16:38:30 -0700178void limHandleUpdateOlbcCache(tpAniSirGlobal pMac);
Jeff Johnson295189b2012-06-20 16:38:30 -0700179
180tANI_U8 limIsNullSsid( tSirMacSSid *pSsid );
181
182void limProcessAddtsRspTimeout(tpAniSirGlobal pMac, tANI_U32 param);
183
184// 11h Support
Jeff Johnson295189b2012-06-20 16:38:30 -0700185void limStopTxAndSwitchChannel(tpAniSirGlobal pMac, tANI_U8 sessionId);
186void limProcessChannelSwitchTimeout(tpAniSirGlobal);
187tSirRetStatus limStartChannelSwitch(tpAniSirGlobal pMac, tpPESession psessionEntry);
188void limUpdateChannelSwitch(tpAniSirGlobal, tpSirProbeRespBeacon, tpPESession psessionEntry);
189void limProcessQuietTimeout(tpAniSirGlobal);
190void limProcessQuietBssTimeout(tpAniSirGlobal);
191
Jeff Johnson295189b2012-06-20 16:38:30 -0700192#if 0
193void limProcessWPSOverlapTimeout(tpAniSirGlobal pMac);
194#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700195
196void limStartQuietTimer(tpAniSirGlobal pMac, tANI_U8 sessionId);
Jeff Johnson295189b2012-06-20 16:38:30 -0700197void limSwitchPrimaryChannel(tpAniSirGlobal, tANI_U8,tpPESession);
Jeff Johnsone7245742012-09-05 17:12:55 -0700198void limSwitchPrimarySecondaryChannel(tpAniSirGlobal, tpPESession, tANI_U8, ePhyChanBondState);
Jeff Johnson295189b2012-06-20 16:38:30 -0700199tAniBool limTriggerBackgroundScanDuringQuietBss(tpAniSirGlobal);
200void limUpdateStaRunTimeHTSwtichChnlParams(tpAniSirGlobal pMac, tDot11fIEHTInfo *pRcvdHTInfo, tANI_U8 bssIdx);
201void limUpdateStaRunTimeHTCapability(tpAniSirGlobal pMac, tDot11fIEHTCaps *pHTCaps);
202void limUpdateStaRunTimeHTInfo(struct sAniSirGlobal *pMac, tDot11fIEHTInfo *pRcvdHTInfo, tpPESession psessionEntry);
203void limCancelDot11hChannelSwitch(tpAniSirGlobal pMac, tpPESession psessionEntry);
204void limCancelDot11hQuiet(tpAniSirGlobal pMac, tpPESession psessionEntry);
205tAniBool limIsChannelValidForChannelSwitch(tpAniSirGlobal pMac, tANI_U8 channel);
206void limFrameTransmissionControl(tpAniSirGlobal pMac, tLimQuietTxMode type, tLimControlTx mode);
207tSirRetStatus limRestorePreChannelSwitchState(tpAniSirGlobal pMac, tpPESession psessionEntry);
Jeff Johnsone7245742012-09-05 17:12:55 -0700208tSirRetStatus limRestorePreQuietState(tpAniSirGlobal pMac, tpPESession psessionEntry);
Jeff Johnson295189b2012-06-20 16:38:30 -0700209
210void limPrepareFor11hChannelSwitch(tpAniSirGlobal pMac, tpPESession psessionEntry);
211void limSwitchChannelCback(tpAniSirGlobal pMac, eHalStatus status,
212 tANI_U32 *data, tpPESession psessionEntry);
213
214static inline tSirRFBand limGetRFBand(tANI_U8 channel)
215{
216 if ((channel >= SIR_11A_CHANNEL_BEGIN) &&
217 (channel <= SIR_11A_CHANNEL_END))
218 return SIR_BAND_5_GHZ;
219
220 if ((channel >= SIR_11B_CHANNEL_BEGIN) &&
221 (channel <= SIR_11B_CHANNEL_END))
222 return SIR_BAND_2_4_GHZ;
223
224 return SIR_BAND_UNKNOWN;
225}
226
227
228static inline tSirRetStatus
229limGetMgmtStaid(tpAniSirGlobal pMac, tANI_U16 *staid, tpPESession psessionEntry)
230{
231 if (psessionEntry->limSystemRole == eLIM_AP_ROLE)
232 *staid = 1;
233 else if (psessionEntry->limSystemRole == eLIM_STA_ROLE)
234 *staid = 0;
235 else
236 return eSIR_FAILURE;
237
238 return eSIR_SUCCESS;
239}
240
241static inline tANI_U8
242limIsSystemInSetMimopsState(tpAniSirGlobal pMac)
243{
244 if (pMac->lim.gLimMlmState == eLIM_MLM_WT_SET_MIMOPS_STATE)
245 return true;
246 return false;
247}
248
249static inline tANI_U8
250 isEnteringMimoPS(tSirMacHTMIMOPowerSaveState curState, tSirMacHTMIMOPowerSaveState newState)
251 {
252 if (curState == eSIR_HT_MIMO_PS_NO_LIMIT &&
253 (newState == eSIR_HT_MIMO_PS_DYNAMIC ||newState == eSIR_HT_MIMO_PS_STATIC))
254 return TRUE;
255 return FALSE;
256}
257
258/// ANI peer station count management and associated actions
259void limUtilCountStaAdd(tpAniSirGlobal pMac, tpDphHashNode pSta, tpPESession psessionEntry);
260void limUtilCountStaDel(tpAniSirGlobal pMac, tpDphHashNode pSta, tpPESession psessionEntry);
261
Jeff Johnson295189b2012-06-20 16:38:30 -0700262tANI_U8 limGetHTCapability( tpAniSirGlobal, tANI_U32, tpPESession);
Jeff Johnson295189b2012-06-20 16:38:30 -0700263void limTxComplete( tHalHandle hHal, void *pData );
264
265/**********Admit Control***************************************/
266
267//callback function for HAL to issue DelTS request to PE.
268//This function will be registered with HAL for callback when TSPEC inactivity timer fires.
269
270void limProcessDelTsInd(tpAniSirGlobal pMac, tpSirMsgQ limMsg);
271tSirRetStatus limProcessHalIndMessages(tpAniSirGlobal pMac, tANI_U32 mesgId, void *mesgParam );
272tSirRetStatus limValidateDeltsReq(tpAniSirGlobal pMac, tpSirDeltsReq pDeltsReq, tSirMacAddr peerMacAddr,tpPESession psessionEntry);
273/**********************************************************/
274
275//callback function registration to HAL for any indication.
276void limRegisterHalIndCallBack(tpAniSirGlobal pMac);
277void limPktFree (
278 tpAniSirGlobal pMac,
279 eFrameType frmType,
280 tANI_U8 *pBD,
281 void *body);
282
283
284
285void limGetBDfromRxPacket(tpAniSirGlobal pMac, void *body, tANI_U32 **pBD);
286
287/**
288 * \brief Given a base(X) and power(Y), this API will return
289 * the result of base raised to power - (X ^ Y)
290 *
291 * \sa utilsPowerXY
292 *
293 * \param base Base value
294 *
295 * \param power Base raised to this Power value
296 *
297 * \return Result of X^Y
298 *
299 */
300static inline tANI_U32 utilsPowerXY( tANI_U16 base, tANI_U16 power )
301{
302tANI_U32 result = 1, i;
303
304 for( i = 0; i < power; i++ )
305 result *= base;
306
307 return result;
308}
309
310
311
312tSirRetStatus limPostMlmAddBAReq( tpAniSirGlobal pMac,
313 tpDphHashNode pStaDs,
314 tANI_U8 tid, tANI_U16 startingSeqNum,tpPESession psessionEntry);
315tSirRetStatus limPostMlmAddBARsp( tpAniSirGlobal pMac,
316 tSirMacAddr peerMacAddr,
317 tSirMacStatusCodes baStatusCode,
318 tANI_U8 baDialogToken,
319 tANI_U8 baTID,
320 tANI_U8 baPolicy,
321 tANI_U16 baBufferSize,
322 tANI_U16 baTimeout,
323 tpPESession psessionEntry);
324tSirRetStatus limPostMlmDelBAReq( tpAniSirGlobal pMac,
325 tpDphHashNode pSta,
326 tANI_U8 baDirection,
327 tANI_U8 baTID,
328 tSirMacReasonCodes baReasonCode ,
329 tpPESession psessionEntry);
330tSirRetStatus limPostMsgAddBAReq( tpAniSirGlobal pMac,
331 tpDphHashNode pSta,
332 tANI_U8 baDialogToken,
333 tANI_U8 baTID,
334 tANI_U8 baPolicy,
335 tANI_U16 baBufferSize,
336 tANI_U16 baTimeout,
337 tANI_U16 baSSN,
338 tANI_U8 baDirection,
339 tpPESession psessionEntry);
340tSirRetStatus limPostMsgDelBAInd( tpAniSirGlobal pMac,
341 tpDphHashNode pSta,
342 tANI_U8 baTID,
343 tANI_U8 baDirection,
344 tpPESession psessionEntry);
345
346tSirRetStatus limPostSMStateUpdate(tpAniSirGlobal pMac,
347 tANI_U16 StaIdx,
348 tSirMacHTMIMOPowerSaveState MIMOPSState);
349
350void limDeleteStaContext(tpAniSirGlobal pMac, tpSirMsgQ limMsg);
351void limProcessAddBaInd(tpAniSirGlobal pMac, tpSirMsgQ limMsg);
Kiran Kumar Lokere458d7322013-05-29 14:29:43 -0700352void limDeleteBASessions(tpAniSirGlobal pMac, tpPESession pSessionEntry, tANI_U32 baDirection);
Leela Venkata Kiran Kumar Reddy Chiralab8dadc22013-11-05 12:34:32 -0800353void limDelPerBssBASessionsBtc(tpAniSirGlobal pMac);
Jeff Johnson295189b2012-06-20 16:38:30 -0700354void limDelAllBASessions(tpAniSirGlobal pMac);
355void limDeleteDialogueTokenList(tpAniSirGlobal pMac);
356tSirRetStatus limSearchAndDeleteDialogueToken(tpAniSirGlobal pMac, tANI_U8 token, tANI_U16 assocId, tANI_U16 tid);
357void limRessetScanChannelInfo(tpAniSirGlobal pMac);
358void limAddScanChannelInfo(tpAniSirGlobal pMac, tANI_U8 channelId);
359
360tANI_U8 limGetChannelFromBeacon(tpAniSirGlobal pMac, tpSchBeaconStruct pBeacon);
361tSirNwType limGetNwType(tpAniSirGlobal pMac, tANI_U8 channelNum, tANI_U32 type, tpSchBeaconStruct pBeacon);
362void limSetTspecUapsdMask(tpAniSirGlobal pMac, tSirMacTSInfo *pTsInfo, tANI_U32 action);
363void limHandleHeartBeatTimeout(tpAniSirGlobal pMac);
Leela Venkata Kiran Kumar Reddy Chirala3ca17902013-02-27 19:50:05 -0800364void limHandleHeartBeatTimeoutForSession(tpAniSirGlobal pMac, tpPESession psessionEntry);
365
Jeff Johnson295189b2012-06-20 16:38:30 -0700366//void limProcessBtampAddBssRsp(tpAniSirGlobal pMac,tpSirMsgQ pMsgQ,tpPESession peSession);
367void limProcessAddStaRsp(tpAniSirGlobal pMac,tpSirMsgQ pMsgQ);
368
369void limUpdateBeacon(tpAniSirGlobal pMac);
370
371void limProcessBtAmpApMlmAddStaRsp(tpAniSirGlobal pMac,tpSirMsgQ limMsgQ, tpPESession psessionEntry);
372void limProcessBtAmpApMlmDelBssRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ,tpPESession psessionEntry);
373
374void limProcessBtAmpApMlmDelStaRsp(tpAniSirGlobal pMac,tpSirMsgQ limMsgQ,tpPESession psessionEntry);
375tpPESession limIsIBSSSessionActive(tpAniSirGlobal pMac);
376tpPESession limIsApSessionActive(tpAniSirGlobal pMac);
377void limHandleHeartBeatFailureTimeout(tpAniSirGlobal pMac);
378
379void limProcessDelStaSelfRsp(tpAniSirGlobal pMac,tpSirMsgQ limMsgQ);
380void limProcessAddStaSelfRsp(tpAniSirGlobal pMac,tpSirMsgQ limMsgQ);
381v_U8_t* limGetIEPtr(tpAniSirGlobal pMac, v_U8_t *pIes, int length, v_U8_t eid,eSizeOfLenField size_of_len_field);
382
383tANI_U8 limUnmapChannel(tANI_U8 mapChannel);
384
385#define limGetWscIEPtr(pMac, ie, ie_len) \
386 limGetVendorIEOuiPtr(pMac, SIR_MAC_WSC_OUI, SIR_MAC_WSC_OUI_SIZE, ie, ie_len)
387
Jeff Johnson295189b2012-06-20 16:38:30 -0700388#define limGetP2pIEPtr(pMac, ie, ie_len) \
389 limGetVendorIEOuiPtr(pMac, SIR_MAC_P2P_OUI, SIR_MAC_P2P_OUI_SIZE, ie, ie_len)
390
391v_U8_t limGetNoaAttrStreamInMultP2pIes(tpAniSirGlobal pMac,v_U8_t* noaStream,v_U8_t noaLen,v_U8_t overFlowLen);
392v_U8_t limGetNoaAttrStream(tpAniSirGlobal pMac, v_U8_t*pNoaStream,tpPESession psessionEntry);
393
394v_U8_t limBuildP2pIe(tpAniSirGlobal pMac, tANI_U8 *ie, tANI_U8 *data, tANI_U8 ie_len);
Viral Modid86bde22012-12-10 13:09:21 -0800395tANI_BOOLEAN limIsNOAInsertReqd(tpAniSirGlobal pMac);
Jeff Johnson295189b2012-06-20 16:38:30 -0700396v_U8_t* limGetVendorIEOuiPtr(tpAniSirGlobal pMac, tANI_U8 *oui, tANI_U8 oui_size, tANI_U8 *ie, tANI_U16 ie_len);
397tANI_BOOLEAN limIsconnectedOnDFSChannel(tANI_U8 currentChannel);
398tANI_U8 limGetCurrentOperatingChannel(tpAniSirGlobal pMac);
399
Mohit Khanna4a70d262012-09-11 16:30:12 -0700400#ifdef WLAN_FEATURE_11AC
Sandeep Puligilla60342762014-01-30 21:05:37 +0530401tANI_BOOLEAN limCheckVHTOpModeChange( tpAniSirGlobal pMac,
Madan Mohan Koyyalamudi1bed5982012-10-22 14:38:06 -0700402 tpPESession psessionEntry, tANI_U8 chanWidth, tANI_U8 staId);
Mohit Khanna4a70d262012-09-11 16:30:12 -0700403#endif
Sandeep Puligilla60342762014-01-30 21:05:37 +0530404tANI_BOOLEAN limCheckHTChanBondModeChange(tpAniSirGlobal pMac,
405 tpPESession psessionEntry,
406 tANI_U8 beaconSecChanWidth,
407 tANI_U8 currentSecChanWidth,
408 tANI_U8 staId);
Jeff Johnson295189b2012-06-20 16:38:30 -0700409#ifdef FEATURE_WLAN_DIAG_SUPPORT
410
411typedef enum
412{
413 WLAN_PE_DIAG_SCAN_REQ_EVENT = 0,
414 WLAN_PE_DIAG_SCAN_ABORT_IND_EVENT,
415 WLAN_PE_DIAG_SCAN_RSP_EVENT,
416 WLAN_PE_DIAG_JOIN_REQ_EVENT,
417 WLAN_PE_DIAG_JOIN_RSP_EVENT,
418 WLAN_PE_DIAG_SETCONTEXT_REQ_EVENT,
419 WLAN_PE_DIAG_SETCONTEXT_RSP_EVENT,
420 WLAN_PE_DIAG_REASSOC_REQ_EVENT,
421 WLAN_PE_DIAG_REASSOC_RSP_EVENT,
422 WLAN_PE_DIAG_AUTH_REQ_EVENT,
423 WLAN_PE_DIAG_AUTH_RSP_EVENT,
424 WLAN_PE_DIAG_DISASSOC_REQ_EVENT,
425 WLAN_PE_DIAG_DISASSOC_RSP_EVENT,
426 WLAN_PE_DIAG_DISASSOC_IND_EVENT,
427 WLAN_PE_DIAG_DISASSOC_CNF_EVENT,
428 WLAN_PE_DIAG_DEAUTH_REQ_EVENT,
429 WLAN_PE_DIAG_DEAUTH_RSP_EVENT,
430 WLAN_PE_DIAG_DEAUTH_IND_EVENT,
431 WLAN_PE_DIAG_START_BSS_REQ_EVENT,
432 WLAN_PE_DIAG_START_BSS_RSP_EVENT,
433 WLAN_PE_DIAG_AUTH_IND_EVENT,
434 WLAN_PE_DIAG_ASSOC_IND_EVENT,
435 WLAN_PE_DIAG_ASSOC_CNF_EVENT,
436 WLAN_PE_DIAG_REASSOC_IND_EVENT,
437 WLAN_PE_DIAG_SWITCH_CHL_REQ_EVENT,
438 WLAN_PE_DIAG_SWITCH_CHL_RSP_EVENT,
439 WLAN_PE_DIAG_STOP_BSS_REQ_EVENT,
440 WLAN_PE_DIAG_STOP_BSS_RSP_EVENT,
441 WLAN_PE_DIAG_DEAUTH_CNF_EVENT,
442 WLAN_PE_DIAG_ADDTS_REQ_EVENT,
443 WLAN_PE_DIAG_ADDTS_RSP_EVENT,
444 WLAN_PE_DIAG_DELTS_REQ_EVENT,
445 WLAN_PE_DIAG_DELTS_RSP_EVENT,
446 WLAN_PE_DIAG_DELTS_IND_EVENT,
447 WLAN_PE_DIAG_ENTER_BMPS_REQ_EVENT,
448 WLAN_PE_DIAG_ENTER_BMPS_RSP_EVENT,
449 WLAN_PE_DIAG_EXIT_BMPS_REQ_EVENT,
450 WLAN_PE_DIAG_EXIT_BMPS_RSP_EVENT,
451 WLAN_PE_DIAG_EXIT_BMPS_IND_EVENT,
452 WLAN_PE_DIAG_ENTER_IMPS_REQ_EVENT,
453 WLAN_PE_DIAG_ENTER_IMPS_RSP_EVENT,
454 WLAN_PE_DIAG_EXIT_IMPS_REQ_EVENT,
455 WLAN_PE_DIAG_EXIT_IMPS_RSP_EVENT,
456 WLAN_PE_DIAG_ENTER_UAPSD_REQ_EVENT,
457 WLAN_PE_DIAG_ENTER_UAPSD_RSP_EVENT,
458 WLAN_PE_DIAG_EXIT_UAPSD_REQ_EVENT,
459 WLAN_PE_DIAG_EXIT_UAPSD_RSP_EVENT,
460 WLAN_PE_DIAG_WOWL_ADD_BCAST_PTRN_EVENT,
461 WLAN_PE_DIAG_WOWL_DEL_BCAST_PTRN_EVENT,
462 WLAN_PE_DIAG_ENTER_WOWL_REQ_EVENT,
463 WLAN_PE_DIAG_ENTER_WOWL_RSP_EVENT,
464 WLAN_PE_DIAG_EXIT_WOWL_REQ_EVENT,
465 WLAN_PE_DIAG_EXIT_WOWL_RSP_EVENT,
466 WLAN_PE_DIAG_HAL_ADDBA_REQ_EVENT,
467 WLAN_PE_DIAG_HAL_ADDBA_RSP_EVENT,
468 WLAN_PE_DIAG_HAL_DELBA_IND_EVENT,
Leela Venkata Kiran Kumar Reddy Chirala2365ee62013-05-09 17:30:12 -0700469 WLAN_PE_DIAG_HB_FAILURE_TIMEOUT,
470 WLAN_PE_DIAG_PRE_AUTH_REQ_EVENT,
471 WLAN_PE_DIAG_PRE_AUTH_RSP_EVENT,
472 WLAN_PE_DIAG_PREAUTH_DONE,
473 WLAN_PE_DIAG_REASSOCIATING,
474 WLAN_PE_DIAG_CONNECTED,
Jeff Johnson295189b2012-06-20 16:38:30 -0700475}WLAN_PE_DIAG_EVENT_TYPE;
476
477void limDiagEventReport(tpAniSirGlobal pMac, tANI_U16 eventType, tpPESession pSessionEntry, tANI_U16 status, tANI_U16 reasonCode);
478#endif /* FEATURE_WLAN_DIAG_SUPPORT */
479
Jeff Johnsone7245742012-09-05 17:12:55 -0700480void peSetResumeChannel(tpAniSirGlobal pMac, tANI_U16 channel, ePhyChanBondState cbState);
Jeff Johnson295189b2012-06-20 16:38:30 -0700481/*--------------------------------------------------------------------------
482
483 \brief peGetResumeChannel() - Returns the channel number for scanning, from a valid session.
484
Jeff Johnsone7245742012-09-05 17:12:55 -0700485 This function returns the channel to resume to during link resume. channel id of 0 means HAL will
486 resume to previous channel before link suspend
Jeff Johnson295189b2012-06-20 16:38:30 -0700487
488 \param pMac - pointer to global adapter context
489 \return - channel to scan from valid session else zero.
490
491 \sa
492
493 --------------------------------------------------------------------------*/
Jeff Johnsone7245742012-09-05 17:12:55 -0700494void peGetResumeChannel(tpAniSirGlobal pMac, tANI_U8* resumeChannel, ePhyChanBondState* resumePhyCbState);
Jeff Johnson295189b2012-06-20 16:38:30 -0700495
Mohit Khanna698ba2a2012-12-04 15:08:18 -0800496#ifdef FEATURE_WLAN_TDLS_INTERNAL
497tANI_U8 limTdlsFindLinkPeer(tpAniSirGlobal pMac, tSirMacAddr peerMac, tLimTdlsLinkSetupPeer **setupPeer);
498void limTdlsDelLinkPeer(tpAniSirGlobal pMac, tSirMacAddr peerMac);
499void limStartTdlsTimer(tpAniSirGlobal pMac, tANI_U8 sessionId, TX_TIMER *timer, tANI_U32 timerId,
500 tANI_U16 timerType, tANI_U32 timerMsg);
501#endif
Madan Mohan Koyyalamudi6db7ad12012-10-29 16:14:41 -0700502tANI_U8 limGetShortSlotFromPhyMode(tpAniSirGlobal pMac, tpPESession psessionEntry, tANI_U32 phyMode);
503
Madan Mohan Koyyalamudia67d4332012-11-29 11:35:23 -0800504void limCleanUpDisassocDeauthReq(tpAniSirGlobal pMac, tANI_U8 *staMac, tANI_BOOLEAN cleanRxPath);
505
Madan Mohan Koyyalamudi25b6f8b2012-12-04 16:17:31 -0800506tANI_BOOLEAN limCheckDisassocDeauthAckPending(tpAniSirGlobal pMac, tANI_U8 *staMac);
507
Jeff Johnson295189b2012-06-20 16:38:30 -0700508#endif /* __LIM_UTILS_H */