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