blob: 8b4705a8dda4aa81f845aa55222201aaf652f58d [file] [log] [blame]
Jeff Johnson295189b2012-06-20 16:38:30 -07001/*
Padma, Santhosh Kumarf4966dc2017-01-03 18:56:00 +05302 * Copyright (c) 2012-2014, 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.
Gopichand Nakkala92f07d82013-01-08 21:16:34 -080020 */
Kiet Lam842dad02014-02-18 18:44:02 -080021
22/*
23 * This file was originally distributed by Qualcomm Atheros, Inc.
24 * under proprietary terms before Copyright ownership was assigned
25 * to the Linux Foundation.
26 */
27
Gopichand Nakkala92f07d82013-01-08 21:16:34 -080028/*
Jeff Johnson295189b2012-06-20 16:38:30 -070029 * This file limAssocUtils.h contains the utility definitions
30 * LIM uses while processing Re/Association messages.
31 * Author: Chandra Modumudi
32 * Date: 02/13/02
33 * History:-
34 * Date Modified by Modification Information
35 * --------------------------------------------------------------------
36 * 05/26/10 js WPA handling in (Re)Assoc frames
Jeff Johnson3c3e1782013-02-27 10:48:42 -080037 *
Jeff Johnson295189b2012-06-20 16:38:30 -070038 */
39#ifndef __LIM_ASSOC_UTILS_H
40#define __LIM_ASSOC_UTILS_H
41
42#include "sirApi.h"
43#include "sirDebug.h"
44#include "cfgApi.h"
45
46#include "limTypes.h"
47
48
49tANI_U8 limCmpSSid(tpAniSirGlobal, tSirMacSSid *,tpPESession);
50tANI_U8 limCompareCapabilities(tpAniSirGlobal,
51 tSirAssocReq *,
52 tSirMacCapabilityInfo *,tpPESession);
53tANI_U8 limCheckRxBasicRates(tpAniSirGlobal, tSirMacRateSet,tpPESession);
Chet Lanctot4b9abd72013-06-27 11:14:56 -070054tANI_U8 limCheckRxRSNIeMatch(tpAniSirGlobal, tDot11fIERSN, tpPESession, tANI_U8, tANI_BOOLEAN *);
Jeff Johnson295189b2012-06-20 16:38:30 -070055tANI_U8 limCheckRxWPAIeMatch(tpAniSirGlobal, tDot11fIEWPA, tpPESession, tANI_U8);
Jeff Johnson295189b2012-06-20 16:38:30 -070056tANI_U8 limCheckMCSSet(tpAniSirGlobal pMac, tANI_U8* supportedMCSSet);
57void limPostDummyToTmRing(tpAniSirGlobal, tpDphHashNode);
58void limPostPacketToTdRing(tpAniSirGlobal,
59 tpDphHashNode,
60 tANI_U8);
61tSirRetStatus limCleanupRxPath(tpAniSirGlobal, tpDphHashNode,tpPESession);
62void limRejectAssociation(tpAniSirGlobal , tSirMacAddr, tANI_U8,
63 tANI_U8 , tAniAuthType,
64 tANI_U16, tANI_U8, tSirResultCodes, tpPESession);
65
Jeff Johnsone7245742012-09-05 17:12:55 -070066#ifdef WLAN_FEATURE_11AC
Leela Venkata Kiran Kumar Reddy Chirala85c9fb12013-09-05 20:47:36 -070067tSirRetStatus limPopulatePeerRateSet(tpAniSirGlobal pMac,
68 tpSirSupportedRates pRates,
69 tANI_U8* pSupportedMCSSet,
70 tANI_U8 basicOnly,
71 tpPESession psessionEntry,
72 tDot11fIEVHTCaps *pVHTCaps);
73#else
74tSirRetStatus limPopulatePeerRateSet(tpAniSirGlobal pMac,
75 tpSirSupportedRates pRates,
76 tANI_U8* pSupportedMCSSet,
77 tANI_U8 basicOnly,
78 tpPESession psessionEntry);
79#endif
80
81#ifdef WLAN_FEATURE_11AC
Jeff Johnsone7245742012-09-05 17:12:55 -070082tSirRetStatus limPopulateOwnRateSet(tpAniSirGlobal pMac,
83 tpSirSupportedRates pRates,
84 tANI_U8* pSupportedMCSSet,
85 tANI_U8 basicOnly,
86 tpPESession psessionEntry,
87 tDot11fIEVHTCaps *pVHTCaps);
88
89#else
Jeff Johnson295189b2012-06-20 16:38:30 -070090tSirRetStatus limPopulateOwnRateSet(tpAniSirGlobal pMac,
91 tpSirSupportedRates pRates,
92 tANI_U8* pSupportedMCSSet,
93 tANI_U8 basicOnly,
94 tpPESession psessionEntry);
Jeff Johnsone7245742012-09-05 17:12:55 -070095#endif
Jeff Johnson295189b2012-06-20 16:38:30 -070096
Jeff Johnsone7245742012-09-05 17:12:55 -070097#ifdef WLAN_FEATURE_11AC
98tSirRetStatus
99limPopulateMatchingRateSet(tpAniSirGlobal pMac,
100 tpDphHashNode pStaDs,
101 tSirMacRateSet *pOperRateSet,
102 tSirMacRateSet *pExtRateSet,
103 tANI_U8* pSupportedMCSSet,
104 tSirMacPropRateSet *pAniLegRateSet,
105 tpPESession psessionEntry,
106 tDot11fIEVHTCaps *pVHTCaps);
107#else
Jeff Johnson295189b2012-06-20 16:38:30 -0700108tSirRetStatus limPopulateMatchingRateSet(tpAniSirGlobal,
109 tpDphHashNode,
110 tSirMacRateSet *,
111 tSirMacRateSet *,
112 tANI_U8* pSupportedMCSSet,
113 tSirMacPropRateSet *, tpPESession);
Jeff Johnsone7245742012-09-05 17:12:55 -0700114
115
116#endif
Gopichand Nakkala681989c2013-03-06 22:27:48 -0800117tSirRetStatus limAddSta(tpAniSirGlobal, tpDphHashNode, tANI_U8, tpPESession);
Jeff Johnson295189b2012-06-20 16:38:30 -0700118tSirRetStatus limDelBss(tpAniSirGlobal, tpDphHashNode, tANI_U16, tpPESession);
119tSirRetStatus limDelSta(tpAniSirGlobal, tpDphHashNode, tANI_BOOLEAN, tpPESession);
120#ifdef WLAN_FEATURE_VOWIFI_11R
Jeff Johnson3c3e1782013-02-27 10:48:42 -0800121tSirRetStatus limAddFTStaSelf(tpAniSirGlobal pMac, tANI_U16 assocId,
Jeff Johnson295189b2012-06-20 16:38:30 -0700122 tpPESession psessionEntry);
123#endif /* WLAN_FEATURE_VOWIFI_11R */
124tSirRetStatus limAddStaSelf(tpAniSirGlobal, tANI_U16, tANI_U8, tpPESession);
125tStaRateMode limGetStaRateMode(tANI_U8 dot11Mode);
126
127
128void limTeardownInfraBss(tpAniSirGlobal,tpPESession);
129void limRestorePreReassocState(tpAniSirGlobal,
130 tSirResultCodes,
131 tANI_U16,tpPESession);
Madan Mohan Koyyalamudi85d140a2012-10-18 20:23:01 -0700132void limPostReassocFailure(tpAniSirGlobal,
133 tSirResultCodes,
134 tANI_U16,tpPESession);
Jeff Johnson295189b2012-06-20 16:38:30 -0700135eAniBoolean limIsReassocInProgress(tpAniSirGlobal,tpPESession);
136void
137limSendDelStaCnf(tpAniSirGlobal pMac, tSirMacAddr staDsAddr,
138 tANI_U16 staDsAssocId, tLimMlmStaContext mlmStaContext, tSirResultCodes statusCode,tpPESession psessionEntry);
139
140void limHandleCnfWaitTimeout(tpAniSirGlobal pMac, tANI_U16 staId);
141void limDeleteDphHashEntry(tpAniSirGlobal, tSirMacAddr, tANI_U16,tpPESession);
142void limCheckAndAnnounceJoinSuccess(tpAniSirGlobal,
143 tSirProbeRespBeacon *,
144 tpSirMacMgmtHdr,tpPESession);
145void limUpdateReAssocGlobals(tpAniSirGlobal pMac,
146 tpSirAssocRsp pAssocRsp,tpPESession psessionEntry);
147
148void limUpdateAssocStaDatas(tpAniSirGlobal pMac,
149 tpDphHashNode pStaDs,tpSirAssocRsp pAssocRsp,tpPESession psessionEntry);
150void
151limFillSupportedRatesInfo(
152 tpAniSirGlobal pMac,
153 tpDphHashNode pSta,
154 tpSirSupportedRates pRates,
155 tpPESession psessionEntry);
156
Jeff Johnson62c27982013-02-27 17:53:55 -0800157tSirRetStatus limStaSendAddBss(tpAniSirGlobal pMac, tpSirAssocRsp pAssocRsp,
Jeff Johnson295189b2012-06-20 16:38:30 -0700158 tpSchBeaconStruct pBeaconStruct, tpSirBssDescription bssDescription, tANI_U8 updateEntry, tpPESession psessionEntry);
159tSirRetStatus limStaSendAddBssPreAssoc( tpAniSirGlobal pMac, tANI_U8 updateEntry, tpPESession psessionEntry);
160
Jeff Johnson295189b2012-06-20 16:38:30 -0700161void limPrepareAndSendDelStaCnf(tpAniSirGlobal pMac, tpDphHashNode pStaDs, tSirResultCodes statusCode,tpPESession);
162tSirRetStatus limExtractApCapabilities(tpAniSirGlobal pMac, tANI_U8 * pIE, tANI_U16 ieLen, tpSirProbeRespBeacon beaconStruct);
163void limInitPreAuthTimerTable(tpAniSirGlobal pMac, tpLimPreAuthTable pPreAuthTimerTable);
164tpLimPreAuthNode limAcquireFreePreAuthNode(tpAniSirGlobal pMac, tpLimPreAuthTable pPreAuthTimerTable);
165tpLimPreAuthNode limGetPreAuthNodeFromIndex(tpAniSirGlobal pMac, tpLimPreAuthTable pAuthTable, tANI_U32 authNodeIdx);
166
167/* Util API to check if the channels supported by STA is within range */
168tSirRetStatus limIsDot11hSupportedChannelsValid(tpAniSirGlobal pMac, tSirAssocReq *assoc);
169
170/* Util API to check if the txpower supported by STA is within range */
171tSirRetStatus limIsDot11hPowerCapabilitiesInRange(tpAniSirGlobal pMac, tSirAssocReq *assoc,tpPESession);
172
173/* API to re-add the same BSS during re-association */
174void limHandleAddBssInReAssocContext(tpAniSirGlobal pMac, tpDphHashNode pStaDs, tpPESession psessionEntry);
175
176/* API to fill in RX Highest Supported data Rate */
177void limFillRxHighestSupportedRate(tpAniSirGlobal pMac, tANI_U16 *rxHighestRate, tANI_U8* pSupportedMCSSet);
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800178#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
Madan Mohan Koyyalamudi61bc5662012-11-02 14:33:10 -0700179void limSendRetryReassocReqFrame(tpAniSirGlobal pMac, tLimMlmReassocReq *pMlmReassocReq, tpPESession psessionEntry);
180#endif
Chet Lanctot186b5732013-03-18 10:26:30 -0700181#ifdef WLAN_FEATURE_11W
182void limSendSmeUnprotectedMgmtFrameInd(tpAniSirGlobal pMac, tANI_U8 frameType,
183 tANI_U8 *frame, tANI_U32 frameLen, tANI_U16 sessionId, tpPESession psessionEntry);
184#endif
Jeff Johnson295189b2012-06-20 16:38:30 -0700185
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800186#if defined(FEATURE_WLAN_ESE) && defined(FEATURE_WLAN_ESE_UPLOAD)
Srinivas Girigowda5cecb202013-10-08 09:13:25 -0700187void limSendSmeTsmIEInd( tpAniSirGlobal pMac, tpPESession psessionEntry,
188 tANI_U8 tid, tANI_U8 state, tANI_U16 measInterval);
Varun Reddy Yeturu5d5e2c62014-02-27 13:31:29 -0800189#endif /* FEATURE_WLAN_ESE && FEATURE_WLAN_ESE_UPLOAD */
Srinivas Girigowda5cecb202013-10-08 09:13:25 -0700190
Padma, Santhosh Kumarf4966dc2017-01-03 18:56:00 +0530191tANI_U16 __limGetSmeJoinReqSizeForAlloc(tANI_U8 *pBuf);
Jeff Johnson295189b2012-06-20 16:38:30 -0700192
193#endif /* __LIM_ASSOC_UTILS_H */
194