blob: a46f7ab716c0c837b1ac3afa26c63d700a199449 [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
62tSirRetStatus limPopulateOwnRateSet(tpAniSirGlobal pMac,
63 tpSirSupportedRates pRates,
64 tANI_U8* pSupportedMCSSet,
65 tANI_U8 basicOnly,
66 tpPESession psessionEntry);
67
68tSirRetStatus limPopulateMatchingRateSet(tpAniSirGlobal,
69 tpDphHashNode,
70 tSirMacRateSet *,
71 tSirMacRateSet *,
72 tANI_U8* pSupportedMCSSet,
73 tSirMacPropRateSet *, tpPESession);
74tSirRetStatus limAddSta(tpAniSirGlobal, tpDphHashNode,tpPESession);
75tSirRetStatus limDelBss(tpAniSirGlobal, tpDphHashNode, tANI_U16, tpPESession);
76tSirRetStatus limDelSta(tpAniSirGlobal, tpDphHashNode, tANI_BOOLEAN, tpPESession);
77#ifdef WLAN_FEATURE_VOWIFI_11R
78tSirRetStatus limAddFTStaSelf(tpAniSirGlobal pMac, tANI_U16 assocId,
79 tpPESession psessionEntry);
80#endif /* WLAN_FEATURE_VOWIFI_11R */
81tSirRetStatus limAddStaSelf(tpAniSirGlobal, tANI_U16, tANI_U8, tpPESession);
82tStaRateMode limGetStaRateMode(tANI_U8 dot11Mode);
83
84
85void limTeardownInfraBss(tpAniSirGlobal,tpPESession);
86void limRestorePreReassocState(tpAniSirGlobal,
87 tSirResultCodes,
88 tANI_U16,tpPESession);
89eAniBoolean limIsReassocInProgress(tpAniSirGlobal,tpPESession);
90void
91limSendDelStaCnf(tpAniSirGlobal pMac, tSirMacAddr staDsAddr,
92 tANI_U16 staDsAssocId, tLimMlmStaContext mlmStaContext, tSirResultCodes statusCode,tpPESession psessionEntry);
93
94void limHandleCnfWaitTimeout(tpAniSirGlobal pMac, tANI_U16 staId);
95void limDeleteDphHashEntry(tpAniSirGlobal, tSirMacAddr, tANI_U16,tpPESession);
96void limCheckAndAnnounceJoinSuccess(tpAniSirGlobal,
97 tSirProbeRespBeacon *,
98 tpSirMacMgmtHdr,tpPESession);
99void limUpdateReAssocGlobals(tpAniSirGlobal pMac,
100 tpSirAssocRsp pAssocRsp,tpPESession psessionEntry);
101
102void limUpdateAssocStaDatas(tpAniSirGlobal pMac,
103 tpDphHashNode pStaDs,tpSirAssocRsp pAssocRsp,tpPESession psessionEntry);
104void
105limFillSupportedRatesInfo(
106 tpAniSirGlobal pMac,
107 tpDphHashNode pSta,
108 tpSirSupportedRates pRates,
109 tpPESession psessionEntry);
110
111#ifdef ANI_PRODUCT_TYPE_CLIENT
112//make non-conditional until the caller is #ifdefed
113tSirRetStatus limStaSendAddBss(tpAniSirGlobal pMac, tpSirAssocRsp pAssocRsp,
114 tpSchBeaconStruct pBeaconStruct, tpSirBssDescription bssDescription, tANI_U8 updateEntry, tpPESession psessionEntry);
115tSirRetStatus limStaSendAddBssPreAssoc( tpAniSirGlobal pMac, tANI_U8 updateEntry, tpPESession psessionEntry);
116
117
118
119#elif defined(ANI_AP_CLIENT_SDK)
120tSirRetStatus limStaSendAddBss(tpAniSirGlobal pMac, tpSirAssocRsp pAssocRsp,
121 tpSirNeighborBssInfo neighborBssInfo,tANI_U8 updateEntry,
122 tpPESession psessionEntry);
123#endif
124
125void limPrepareAndSendDelStaCnf(tpAniSirGlobal pMac, tpDphHashNode pStaDs, tSirResultCodes statusCode,tpPESession);
126tSirRetStatus limExtractApCapabilities(tpAniSirGlobal pMac, tANI_U8 * pIE, tANI_U16 ieLen, tpSirProbeRespBeacon beaconStruct);
127void limInitPreAuthTimerTable(tpAniSirGlobal pMac, tpLimPreAuthTable pPreAuthTimerTable);
128tpLimPreAuthNode limAcquireFreePreAuthNode(tpAniSirGlobal pMac, tpLimPreAuthTable pPreAuthTimerTable);
129tpLimPreAuthNode limGetPreAuthNodeFromIndex(tpAniSirGlobal pMac, tpLimPreAuthTable pAuthTable, tANI_U32 authNodeIdx);
130
131/* Util API to check if the channels supported by STA is within range */
132tSirRetStatus limIsDot11hSupportedChannelsValid(tpAniSirGlobal pMac, tSirAssocReq *assoc);
133
134/* Util API to check if the txpower supported by STA is within range */
135tSirRetStatus limIsDot11hPowerCapabilitiesInRange(tpAniSirGlobal pMac, tSirAssocReq *assoc,tpPESession);
136
137/* API to re-add the same BSS during re-association */
138void limHandleAddBssInReAssocContext(tpAniSirGlobal pMac, tpDphHashNode pStaDs, tpPESession psessionEntry);
139
140/* API to fill in RX Highest Supported data Rate */
141void limFillRxHighestSupportedRate(tpAniSirGlobal pMac, tANI_U16 *rxHighestRate, tANI_U8* pSupportedMCSSet);
142
143
144#endif /* __LIM_ASSOC_UTILS_H */
145