blob: 8b123fef4df1639b9deb68903e3104b0f3c2f0cd [file] [log] [blame]
Jeff Johnson295189b2012-06-20 16:38:30 -07001/*
2 * Copyright (c) 2012, Code Aurora Forum. 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
22/*
23 * This file limAssocUtils.h contains the utility definitions
24 * LIM uses while processing Re/Association messages.
25 * Author: Chandra Modumudi
26 * Date: 02/13/02
27 * History:-
28 * Date Modified by Modification Information
29 * --------------------------------------------------------------------
30 * 05/26/10 js WPA handling in (Re)Assoc frames
31 *
32 */
33#ifndef __LIM_ASSOC_UTILS_H
34#define __LIM_ASSOC_UTILS_H
35
36#include "sirApi.h"
37#include "sirDebug.h"
38#include "cfgApi.h"
39
40#include "limTypes.h"
41
42
43tANI_U8 limCmpSSid(tpAniSirGlobal, tSirMacSSid *,tpPESession);
44tANI_U8 limCompareCapabilities(tpAniSirGlobal,
45 tSirAssocReq *,
46 tSirMacCapabilityInfo *,tpPESession);
47tANI_U8 limCheckRxBasicRates(tpAniSirGlobal, tSirMacRateSet,tpPESession);
48#ifdef WLAN_SOFTAP_FEATURE
49tANI_U8 limCheckRxRSNIeMatch(tpAniSirGlobal, tDot11fIERSN, tpPESession, tANI_U8);
50tANI_U8 limCheckRxWPAIeMatch(tpAniSirGlobal, tDot11fIEWPA, tpPESession, tANI_U8);
51#endif
52tANI_U8 limCheckMCSSet(tpAniSirGlobal pMac, tANI_U8* supportedMCSSet);
53void limPostDummyToTmRing(tpAniSirGlobal, tpDphHashNode);
54void limPostPacketToTdRing(tpAniSirGlobal,
55 tpDphHashNode,
56 tANI_U8);
57tSirRetStatus limCleanupRxPath(tpAniSirGlobal, tpDphHashNode,tpPESession);
58void limRejectAssociation(tpAniSirGlobal , tSirMacAddr, tANI_U8,
59 tANI_U8 , tAniAuthType,
60 tANI_U16, tANI_U8, tSirResultCodes, tpPESession);
61
Jeff Johnsone7245742012-09-05 17:12:55 -070062#ifdef WLAN_FEATURE_11AC
63tSirRetStatus limPopulateOwnRateSet(tpAniSirGlobal pMac,
64 tpSirSupportedRates pRates,
65 tANI_U8* pSupportedMCSSet,
66 tANI_U8 basicOnly,
67 tpPESession psessionEntry,
68 tDot11fIEVHTCaps *pVHTCaps);
69
70#else
Jeff Johnson295189b2012-06-20 16:38:30 -070071tSirRetStatus limPopulateOwnRateSet(tpAniSirGlobal pMac,
72 tpSirSupportedRates pRates,
73 tANI_U8* pSupportedMCSSet,
74 tANI_U8 basicOnly,
75 tpPESession psessionEntry);
Jeff Johnsone7245742012-09-05 17:12:55 -070076#endif
Jeff Johnson295189b2012-06-20 16:38:30 -070077
Jeff Johnsone7245742012-09-05 17:12:55 -070078#ifdef WLAN_FEATURE_11AC
79tSirRetStatus
80limPopulateMatchingRateSet(tpAniSirGlobal pMac,
81 tpDphHashNode pStaDs,
82 tSirMacRateSet *pOperRateSet,
83 tSirMacRateSet *pExtRateSet,
84 tANI_U8* pSupportedMCSSet,
85 tSirMacPropRateSet *pAniLegRateSet,
86 tpPESession psessionEntry,
87 tDot11fIEVHTCaps *pVHTCaps);
88#else
Jeff Johnson295189b2012-06-20 16:38:30 -070089tSirRetStatus limPopulateMatchingRateSet(tpAniSirGlobal,
90 tpDphHashNode,
91 tSirMacRateSet *,
92 tSirMacRateSet *,
93 tANI_U8* pSupportedMCSSet,
94 tSirMacPropRateSet *, tpPESession);
Jeff Johnsone7245742012-09-05 17:12:55 -070095
96
97#endif
Jeff Johnson295189b2012-06-20 16:38:30 -070098tSirRetStatus limAddSta(tpAniSirGlobal, tpDphHashNode,tpPESession);
99tSirRetStatus limDelBss(tpAniSirGlobal, tpDphHashNode, tANI_U16, tpPESession);
100tSirRetStatus limDelSta(tpAniSirGlobal, tpDphHashNode, tANI_BOOLEAN, tpPESession);
101#ifdef WLAN_FEATURE_VOWIFI_11R
102tSirRetStatus limAddFTStaSelf(tpAniSirGlobal pMac, tANI_U16 assocId,
103 tpPESession psessionEntry);
104#endif /* WLAN_FEATURE_VOWIFI_11R */
105tSirRetStatus limAddStaSelf(tpAniSirGlobal, tANI_U16, tANI_U8, tpPESession);
106tStaRateMode limGetStaRateMode(tANI_U8 dot11Mode);
107
108
109void limTeardownInfraBss(tpAniSirGlobal,tpPESession);
110void limRestorePreReassocState(tpAniSirGlobal,
111 tSirResultCodes,
112 tANI_U16,tpPESession);
113eAniBoolean limIsReassocInProgress(tpAniSirGlobal,tpPESession);
114void
115limSendDelStaCnf(tpAniSirGlobal pMac, tSirMacAddr staDsAddr,
116 tANI_U16 staDsAssocId, tLimMlmStaContext mlmStaContext, tSirResultCodes statusCode,tpPESession psessionEntry);
117
118void limHandleCnfWaitTimeout(tpAniSirGlobal pMac, tANI_U16 staId);
119void limDeleteDphHashEntry(tpAniSirGlobal, tSirMacAddr, tANI_U16,tpPESession);
120void limCheckAndAnnounceJoinSuccess(tpAniSirGlobal,
121 tSirProbeRespBeacon *,
122 tpSirMacMgmtHdr,tpPESession);
123void limUpdateReAssocGlobals(tpAniSirGlobal pMac,
124 tpSirAssocRsp pAssocRsp,tpPESession psessionEntry);
125
126void limUpdateAssocStaDatas(tpAniSirGlobal pMac,
127 tpDphHashNode pStaDs,tpSirAssocRsp pAssocRsp,tpPESession psessionEntry);
128void
129limFillSupportedRatesInfo(
130 tpAniSirGlobal pMac,
131 tpDphHashNode pSta,
132 tpSirSupportedRates pRates,
133 tpPESession psessionEntry);
134
135#ifdef ANI_PRODUCT_TYPE_CLIENT
136//make non-conditional until the caller is #ifdefed
137tSirRetStatus limStaSendAddBss(tpAniSirGlobal pMac, tpSirAssocRsp pAssocRsp,
138 tpSchBeaconStruct pBeaconStruct, tpSirBssDescription bssDescription, tANI_U8 updateEntry, tpPESession psessionEntry);
139tSirRetStatus limStaSendAddBssPreAssoc( tpAniSirGlobal pMac, tANI_U8 updateEntry, tpPESession psessionEntry);
140
141
142
143#elif defined(ANI_AP_CLIENT_SDK)
144tSirRetStatus limStaSendAddBss(tpAniSirGlobal pMac, tpSirAssocRsp pAssocRsp,
145 tpSirNeighborBssInfo neighborBssInfo,tANI_U8 updateEntry,
146 tpPESession psessionEntry);
147#endif
148
149void limPrepareAndSendDelStaCnf(tpAniSirGlobal pMac, tpDphHashNode pStaDs, tSirResultCodes statusCode,tpPESession);
150tSirRetStatus limExtractApCapabilities(tpAniSirGlobal pMac, tANI_U8 * pIE, tANI_U16 ieLen, tpSirProbeRespBeacon beaconStruct);
151void limInitPreAuthTimerTable(tpAniSirGlobal pMac, tpLimPreAuthTable pPreAuthTimerTable);
152tpLimPreAuthNode limAcquireFreePreAuthNode(tpAniSirGlobal pMac, tpLimPreAuthTable pPreAuthTimerTable);
153tpLimPreAuthNode limGetPreAuthNodeFromIndex(tpAniSirGlobal pMac, tpLimPreAuthTable pAuthTable, tANI_U32 authNodeIdx);
154
155/* Util API to check if the channels supported by STA is within range */
156tSirRetStatus limIsDot11hSupportedChannelsValid(tpAniSirGlobal pMac, tSirAssocReq *assoc);
157
158/* Util API to check if the txpower supported by STA is within range */
159tSirRetStatus limIsDot11hPowerCapabilitiesInRange(tpAniSirGlobal pMac, tSirAssocReq *assoc,tpPESession);
160
161/* API to re-add the same BSS during re-association */
162void limHandleAddBssInReAssocContext(tpAniSirGlobal pMac, tpDphHashNode pStaDs, tpPESession psessionEntry);
163
164/* API to fill in RX Highest Supported data Rate */
165void limFillRxHighestSupportedRate(tpAniSirGlobal pMac, tANI_U16 *rxHighestRate, tANI_U8* pSupportedMCSSet);
166
167
168#endif /* __LIM_ASSOC_UTILS_H */
169