Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1 | /* |
| 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 | |
| 43 | tANI_U8 limCmpSSid(tpAniSirGlobal, tSirMacSSid *,tpPESession); |
| 44 | tANI_U8 limCompareCapabilities(tpAniSirGlobal, |
| 45 | tSirAssocReq *, |
| 46 | tSirMacCapabilityInfo *,tpPESession); |
| 47 | tANI_U8 limCheckRxBasicRates(tpAniSirGlobal, tSirMacRateSet,tpPESession); |
| 48 | #ifdef WLAN_SOFTAP_FEATURE |
| 49 | tANI_U8 limCheckRxRSNIeMatch(tpAniSirGlobal, tDot11fIERSN, tpPESession, tANI_U8); |
| 50 | tANI_U8 limCheckRxWPAIeMatch(tpAniSirGlobal, tDot11fIEWPA, tpPESession, tANI_U8); |
| 51 | #endif |
| 52 | tANI_U8 limCheckMCSSet(tpAniSirGlobal pMac, tANI_U8* supportedMCSSet); |
| 53 | void limPostDummyToTmRing(tpAniSirGlobal, tpDphHashNode); |
| 54 | void limPostPacketToTdRing(tpAniSirGlobal, |
| 55 | tpDphHashNode, |
| 56 | tANI_U8); |
| 57 | tSirRetStatus limCleanupRxPath(tpAniSirGlobal, tpDphHashNode,tpPESession); |
| 58 | void limRejectAssociation(tpAniSirGlobal , tSirMacAddr, tANI_U8, |
| 59 | tANI_U8 , tAniAuthType, |
| 60 | tANI_U16, tANI_U8, tSirResultCodes, tpPESession); |
| 61 | |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame^] | 62 | #ifdef WLAN_FEATURE_11AC |
| 63 | tSirRetStatus limPopulateOwnRateSet(tpAniSirGlobal pMac, |
| 64 | tpSirSupportedRates pRates, |
| 65 | tANI_U8* pSupportedMCSSet, |
| 66 | tANI_U8 basicOnly, |
| 67 | tpPESession psessionEntry, |
| 68 | tDot11fIEVHTCaps *pVHTCaps); |
| 69 | |
| 70 | #else |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 71 | tSirRetStatus limPopulateOwnRateSet(tpAniSirGlobal pMac, |
| 72 | tpSirSupportedRates pRates, |
| 73 | tANI_U8* pSupportedMCSSet, |
| 74 | tANI_U8 basicOnly, |
| 75 | tpPESession psessionEntry); |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame^] | 76 | #endif |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 77 | |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame^] | 78 | #ifdef WLAN_FEATURE_11AC |
| 79 | tSirRetStatus |
| 80 | limPopulateMatchingRateSet(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 Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 89 | tSirRetStatus limPopulateMatchingRateSet(tpAniSirGlobal, |
| 90 | tpDphHashNode, |
| 91 | tSirMacRateSet *, |
| 92 | tSirMacRateSet *, |
| 93 | tANI_U8* pSupportedMCSSet, |
| 94 | tSirMacPropRateSet *, tpPESession); |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame^] | 95 | |
| 96 | |
| 97 | #endif |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 98 | tSirRetStatus limAddSta(tpAniSirGlobal, tpDphHashNode,tpPESession); |
| 99 | tSirRetStatus limDelBss(tpAniSirGlobal, tpDphHashNode, tANI_U16, tpPESession); |
| 100 | tSirRetStatus limDelSta(tpAniSirGlobal, tpDphHashNode, tANI_BOOLEAN, tpPESession); |
| 101 | #ifdef WLAN_FEATURE_VOWIFI_11R |
| 102 | tSirRetStatus limAddFTStaSelf(tpAniSirGlobal pMac, tANI_U16 assocId, |
| 103 | tpPESession psessionEntry); |
| 104 | #endif /* WLAN_FEATURE_VOWIFI_11R */ |
| 105 | tSirRetStatus limAddStaSelf(tpAniSirGlobal, tANI_U16, tANI_U8, tpPESession); |
| 106 | tStaRateMode limGetStaRateMode(tANI_U8 dot11Mode); |
| 107 | |
| 108 | |
| 109 | void limTeardownInfraBss(tpAniSirGlobal,tpPESession); |
| 110 | void limRestorePreReassocState(tpAniSirGlobal, |
| 111 | tSirResultCodes, |
| 112 | tANI_U16,tpPESession); |
| 113 | eAniBoolean limIsReassocInProgress(tpAniSirGlobal,tpPESession); |
| 114 | void |
| 115 | limSendDelStaCnf(tpAniSirGlobal pMac, tSirMacAddr staDsAddr, |
| 116 | tANI_U16 staDsAssocId, tLimMlmStaContext mlmStaContext, tSirResultCodes statusCode,tpPESession psessionEntry); |
| 117 | |
| 118 | void limHandleCnfWaitTimeout(tpAniSirGlobal pMac, tANI_U16 staId); |
| 119 | void limDeleteDphHashEntry(tpAniSirGlobal, tSirMacAddr, tANI_U16,tpPESession); |
| 120 | void limCheckAndAnnounceJoinSuccess(tpAniSirGlobal, |
| 121 | tSirProbeRespBeacon *, |
| 122 | tpSirMacMgmtHdr,tpPESession); |
| 123 | void limUpdateReAssocGlobals(tpAniSirGlobal pMac, |
| 124 | tpSirAssocRsp pAssocRsp,tpPESession psessionEntry); |
| 125 | |
| 126 | void limUpdateAssocStaDatas(tpAniSirGlobal pMac, |
| 127 | tpDphHashNode pStaDs,tpSirAssocRsp pAssocRsp,tpPESession psessionEntry); |
| 128 | void |
| 129 | limFillSupportedRatesInfo( |
| 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 |
| 137 | tSirRetStatus limStaSendAddBss(tpAniSirGlobal pMac, tpSirAssocRsp pAssocRsp, |
| 138 | tpSchBeaconStruct pBeaconStruct, tpSirBssDescription bssDescription, tANI_U8 updateEntry, tpPESession psessionEntry); |
| 139 | tSirRetStatus limStaSendAddBssPreAssoc( tpAniSirGlobal pMac, tANI_U8 updateEntry, tpPESession psessionEntry); |
| 140 | |
| 141 | |
| 142 | |
| 143 | #elif defined(ANI_AP_CLIENT_SDK) |
| 144 | tSirRetStatus limStaSendAddBss(tpAniSirGlobal pMac, tpSirAssocRsp pAssocRsp, |
| 145 | tpSirNeighborBssInfo neighborBssInfo,tANI_U8 updateEntry, |
| 146 | tpPESession psessionEntry); |
| 147 | #endif |
| 148 | |
| 149 | void limPrepareAndSendDelStaCnf(tpAniSirGlobal pMac, tpDphHashNode pStaDs, tSirResultCodes statusCode,tpPESession); |
| 150 | tSirRetStatus limExtractApCapabilities(tpAniSirGlobal pMac, tANI_U8 * pIE, tANI_U16 ieLen, tpSirProbeRespBeacon beaconStruct); |
| 151 | void limInitPreAuthTimerTable(tpAniSirGlobal pMac, tpLimPreAuthTable pPreAuthTimerTable); |
| 152 | tpLimPreAuthNode limAcquireFreePreAuthNode(tpAniSirGlobal pMac, tpLimPreAuthTable pPreAuthTimerTable); |
| 153 | tpLimPreAuthNode limGetPreAuthNodeFromIndex(tpAniSirGlobal pMac, tpLimPreAuthTable pAuthTable, tANI_U32 authNodeIdx); |
| 154 | |
| 155 | /* Util API to check if the channels supported by STA is within range */ |
| 156 | tSirRetStatus limIsDot11hSupportedChannelsValid(tpAniSirGlobal pMac, tSirAssocReq *assoc); |
| 157 | |
| 158 | /* Util API to check if the txpower supported by STA is within range */ |
| 159 | tSirRetStatus limIsDot11hPowerCapabilitiesInRange(tpAniSirGlobal pMac, tSirAssocReq *assoc,tpPESession); |
| 160 | |
| 161 | /* API to re-add the same BSS during re-association */ |
| 162 | void limHandleAddBssInReAssocContext(tpAniSirGlobal pMac, tpDphHashNode pStaDs, tpPESession psessionEntry); |
| 163 | |
| 164 | /* API to fill in RX Highest Supported data Rate */ |
| 165 | void limFillRxHighestSupportedRate(tpAniSirGlobal pMac, tANI_U16 *rxHighestRate, tANI_U8* pSupportedMCSSet); |
| 166 | |
| 167 | |
| 168 | #endif /* __LIM_ASSOC_UTILS_H */ |
| 169 | |