Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1 | /* |
Yeshwanth Sriram Guntuka | a396161 | 2018-01-04 14:24:50 +0530 | [diff] [blame] | 2 | * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved. |
Kiet Lam | 842dad0 | 2014-02-18 18:44:02 -0800 | [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. |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 20 | */ |
Kiet Lam | 842dad0 | 2014-02-18 18:44:02 -0800 | [diff] [blame] | 21 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 22 | /* |
Kiet Lam | 842dad0 | 2014-02-18 18:44:02 -0800 | [diff] [blame] | 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 | |
| 28 | /* |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 29 | * This file limUtils.h contains the utility definitions |
| 30 | * LIM uses. |
| 31 | * Author: Chandra Modumudi |
| 32 | * Date: 02/13/02 |
| 33 | * History:- |
| 34 | * Date Modified by Modification Information |
| 35 | * -------------------------------------------------------------------- |
| 36 | */ |
| 37 | #ifndef __LIM_UTILS_H |
| 38 | #define __LIM_UTILS_H |
| 39 | |
| 40 | #include "sirApi.h" |
| 41 | #include "sirDebug.h" |
| 42 | #include "cfgApi.h" |
| 43 | |
| 44 | #include "limTypes.h" |
| 45 | #include "limScanResultUtils.h" |
| 46 | #include "limTimerUtils.h" |
| 47 | #include "limTrace.h" |
| 48 | typedef enum |
| 49 | { |
| 50 | ONE_BYTE = 1, |
| 51 | TWO_BYTE = 2 |
| 52 | } eSizeOfLenField; |
| 53 | |
| 54 | #define LIM_STA_ID_MASK 0x00FF |
| 55 | #define LIM_AID_MASK 0xC000 |
| 56 | #define LIM_SPECTRUM_MANAGEMENT_BIT_MASK 0x0100 |
Hema Aparna Medicharla | fa1d2bb | 2013-12-23 02:28:09 +0530 | [diff] [blame] | 57 | #define LIM_RRM_BIT_MASK 0x1000 |
Chandrasekaran, Manishekar | c949a8b | 2014-06-27 12:34:09 +0530 | [diff] [blame] | 58 | #define LIM_SHORT_PREAMBLE_BIT_MASK 0x0020 |
| 59 | #define LIM_IMMEDIATE_BLOCK_ACK_MASK 0x8000 |
Varun Reddy Yeturu | 5d5e2c6 | 2014-02-27 13:31:29 -0800 | [diff] [blame] | 60 | #if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR) |
Madan Mohan Koyyalamudi | 61bc566 | 2012-11-02 14:33:10 -0700 | [diff] [blame] | 61 | #define LIM_MAX_REASSOC_RETRY_LIMIT 2 |
| 62 | #endif |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 63 | |
Masti, Narayanraddi | 2f5dd65 | 2015-03-03 22:00:44 +0530 | [diff] [blame] | 64 | #define LIM_MAX_BANDS ( 48 ) |
| 65 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 66 | // classifier ID is coded as 0-3: tsid, 4-5:direction |
| 67 | #define LIM_MAKE_CLSID(tsid, dir) (((tsid) & 0x0F) | (((dir) & 0x03) << 4)) |
| 68 | |
| 69 | #define LIM_SET_STA_BA_STATE(pSta, tid, newVal) \ |
| 70 | {\ |
| 71 | pSta->baState = ((pSta->baState | (0x3 << tid*2)) & ((newVal << tid*2) | ~(0x3 << tid*2)));\ |
| 72 | } |
| 73 | |
| 74 | #define LIM_GET_STA_BA_STATE(pSta, tid, pCurVal)\ |
| 75 | {\ |
| 76 | *pCurVal = (tLimBAState)(((pSta->baState >> tid*2) & 0x3));\ |
| 77 | } |
| 78 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 79 | typedef struct sAddBaInfo |
| 80 | { |
| 81 | tANI_U16 fBaEnable : 1; |
| 82 | tANI_U16 startingSeqNum: 12; |
| 83 | tANI_U16 reserved : 3; |
| 84 | }tAddBaInfo, *tpAddBaInfo; |
| 85 | |
| 86 | typedef struct sAddBaCandidate |
| 87 | { |
| 88 | tSirMacAddr staAddr; |
| 89 | tAddBaInfo baInfo[STACFG_MAX_TC]; |
| 90 | }tAddBaCandidate, *tpAddBaCandidate; |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 91 | |
Chet Lanctot | 8cecea2 | 2014-02-11 19:09:36 -0800 | [diff] [blame] | 92 | #ifdef WLAN_FEATURE_11W |
| 93 | typedef union uPmfSaQueryTimerId |
| 94 | { |
| 95 | struct |
| 96 | { |
| 97 | tANI_U8 sessionId; |
| 98 | tANI_U16 peerIdx; |
| 99 | } fields; |
| 100 | tANI_U32 value; |
| 101 | } tPmfSaQueryTimerId, *tpPmfSaQueryTimerId; |
| 102 | #endif |
| 103 | |
Atul Mittal | b849d5a | 2014-07-29 12:08:39 +0530 | [diff] [blame] | 104 | typedef enum offset { |
| 105 | BW20, |
| 106 | BW40PLUS, |
| 107 | BW40MINUS, |
Pradeep Reddy POTTETI | e8bd41a | 2015-01-29 14:52:43 +0530 | [diff] [blame] | 108 | BW80, |
Atul Mittal | b849d5a | 2014-07-29 12:08:39 +0530 | [diff] [blame] | 109 | BWALL |
| 110 | } offset_t; |
| 111 | |
| 112 | typedef struct op_class_map { |
| 113 | tANI_U8 op_class; |
| 114 | tANI_U8 ch_spacing; |
| 115 | offset_t offset; |
Pradeep Reddy POTTETI | e8bd41a | 2015-01-29 14:52:43 +0530 | [diff] [blame] | 116 | tANI_U8 channels[25]; |
Atul Mittal | b849d5a | 2014-07-29 12:08:39 +0530 | [diff] [blame] | 117 | }op_class_map_t; |
Jeff Johnson | 1250df4 | 2012-12-10 14:31:52 -0800 | [diff] [blame] | 118 | // LIM utility functions |
Masti, Narayanraddi | 67ea591 | 2015-01-08 12:34:05 +0530 | [diff] [blame] | 119 | tANI_BOOLEAN limCheck11BRateBitmap(tANI_U16 RateBitmap); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 120 | void limGetBssidFromPkt(tpAniSirGlobal, tANI_U8 *, tANI_U8 *, tANI_U32 *); |
| 121 | char * limMlmStateStr(tLimMlmStates state); |
| 122 | char * limSmeStateStr(tLimSmeStates state); |
| 123 | char * limMsgStr(tANI_U32 msgType); |
| 124 | char * limResultCodeStr(tSirResultCodes resultCode); |
| 125 | char* limDot11ModeStr(tpAniSirGlobal pMac, tANI_U8 dot11Mode); |
| 126 | char* limStaOpRateModeStr(tStaRateMode opRateMode); |
| 127 | void limPrintMlmState(tpAniSirGlobal pMac, tANI_U16 logLevel, tLimMlmStates state); |
| 128 | void limPrintSmeState(tpAniSirGlobal pMac, tANI_U16 logLevel, tLimSmeStates state); |
| 129 | void limPrintMsgName(tpAniSirGlobal pMac, tANI_U16 logLevel, tANI_U32 msgType); |
| 130 | void limPrintMsgInfo(tpAniSirGlobal pMac, tANI_U16 logLevel, tSirMsgQ *msg); |
| 131 | char* limBssTypeStr(tSirBssType bssType); |
| 132 | |
Varun Reddy Yeturu | 5d5e2c6 | 2014-02-27 13:31:29 -0800 | [diff] [blame] | 133 | #if defined FEATURE_WLAN_ESE || defined WLAN_FEATURE_VOWIFI |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 134 | extern tSirRetStatus limSendSetMaxTxPowerReq ( tpAniSirGlobal pMac, |
| 135 | tPowerdBm txPower, |
| 136 | tpPESession pSessionEntry ); |
Madan Mohan Koyyalamudi | 3282c57 | 2012-11-09 17:01:41 -0800 | [diff] [blame] | 137 | extern tANI_U8 limGetMaxTxPower(tPowerdBm regMax, tPowerdBm apTxPower, tANI_U8 iniTxPower); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 138 | #endif |
| 139 | |
| 140 | tANI_U32 limPostMsgApiNoWait(tpAniSirGlobal, tSirMsgQ *); |
| 141 | tANI_U8 limIsAddrBC(tSirMacAddr); |
| 142 | tANI_U8 limIsGroupAddr(tSirMacAddr); |
| 143 | |
| 144 | // check for type of scan allowed |
| 145 | tANI_U8 limActiveScanAllowed(tpAniSirGlobal, tANI_U8); |
| 146 | |
| 147 | // AID pool management functions |
Gopichand Nakkala | 777e603 | 2012-12-31 16:39:21 -0800 | [diff] [blame] | 148 | void limInitPeerIdxpool(tpAniSirGlobal,tpPESession); |
| 149 | tANI_U16 limAssignPeerIdx(tpAniSirGlobal,tpPESession); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 150 | |
| 151 | void limEnableOverlap11gProtection(tpAniSirGlobal pMac, tpUpdateBeaconParams pBeaconParams, tpSirMacMgmtHdr pMh,tpPESession psessionEntry); |
| 152 | void limUpdateOverlapStaParam(tpAniSirGlobal pMac, tSirMacAddr bssId, tpLimProtStaParams pStaParams); |
| 153 | void limUpdateShortPreamble(tpAniSirGlobal pMac, tSirMacAddr peerMacAddr, tpUpdateBeaconParams pBeaconParams, tpPESession psessionEntry); |
| 154 | void limUpdateShortSlotTime(tpAniSirGlobal pMac, tSirMacAddr peerMacAddr, tpUpdateBeaconParams pBeaconParams, tpPESession psessionEntry); |
| 155 | |
| 156 | /* |
| 157 | * The below 'product' check tobe removed if 'Association' is |
| 158 | * allowed in IBSS. |
| 159 | */ |
Gopichand Nakkala | 777e603 | 2012-12-31 16:39:21 -0800 | [diff] [blame] | 160 | void limReleasePeerIdx(tpAniSirGlobal, tANI_U16, tpPESession); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 161 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 162 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 163 | void limDecideApProtection(tpAniSirGlobal pMac, tSirMacAddr peerMacAddr, tpUpdateBeaconParams pBeaconParams,tpPESession); |
| 164 | void |
| 165 | limDecideApProtectionOnDelete(tpAniSirGlobal pMac, |
| 166 | tpDphHashNode pStaDs, tpUpdateBeaconParams pBeaconParams, tpPESession psessionEntry); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 167 | |
| 168 | extern tSirRetStatus limEnable11aProtection(tpAniSirGlobal pMac, tANI_U8 enable, tANI_U8 overlap, tpUpdateBeaconParams pBeaconParams,tpPESession); |
| 169 | extern tSirRetStatus limEnable11gProtection(tpAniSirGlobal pMac, tANI_U8 enable, tANI_U8 overlap, tpUpdateBeaconParams pBeaconParams,tpPESession psessionEntry); |
| 170 | extern tSirRetStatus limEnableHtProtectionFrom11g(tpAniSirGlobal pMac, tANI_U8 enable, tANI_U8 overlap, tpUpdateBeaconParams pBeaconParams,tpPESession psessionEntry); |
| 171 | extern tSirRetStatus limEnableHT20Protection(tpAniSirGlobal pMac, tANI_U8 enable, tANI_U8 overlap, tpUpdateBeaconParams pBeaconParams,tpPESession sessionEntry); |
| 172 | extern tSirRetStatus limEnableHTNonGfProtection(tpAniSirGlobal pMac, tANI_U8 enable, tANI_U8 overlap, tpUpdateBeaconParams pBeaconParams,tpPESession); |
| 173 | extern tSirRetStatus limEnableHtRifsProtection(tpAniSirGlobal pMac, tANI_U8 enable, tANI_U8 overlap, tpUpdateBeaconParams pBeaconParams,tpPESession psessionEntry); |
| 174 | extern tSirRetStatus limEnableHTLsigTxopProtection(tpAniSirGlobal pMac, tANI_U8 enable, tANI_U8 overlap, tpUpdateBeaconParams pBeaconParams,tpPESession); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 175 | extern tSirRetStatus limEnableShortPreamble(tpAniSirGlobal pMac, tANI_U8 enable, tpUpdateBeaconParams pBeaconParams, tpPESession psessionEntry); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 176 | extern tSirRetStatus limEnableHtOBSSProtection (tpAniSirGlobal pMac, tANI_U8 enable, tANI_U8 overlap, tpUpdateBeaconParams pBeaconParams, tpPESession); |
| 177 | void limDecideStaProtection(tpAniSirGlobal pMac, tpSchBeaconStruct pBeaconStruct, tpUpdateBeaconParams pBeaconParams, tpPESession psessionEntry); |
| 178 | void limDecideStaProtectionOnAssoc(tpAniSirGlobal pMac, tpSchBeaconStruct pBeaconStruct, tpPESession psessionEntry); |
| 179 | void limUpdateStaRunTimeHTSwitchChnlParams(tpAniSirGlobal pMac, tDot11fIEHTInfo * pHTInfo, tANI_U8 bssIdx, tpPESession psessionEntry); |
| 180 | // Print MAC address utility function |
| 181 | void limPrintMacAddr(tpAniSirGlobal, tSirMacAddr, tANI_U8); |
| 182 | |
| 183 | |
| 184 | |
| 185 | // Deferred Message Queue read/write |
| 186 | tANI_U8 limWriteDeferredMsgQ(tpAniSirGlobal pMac, tpSirMsgQ limMsg); |
| 187 | tSirMsgQ* limReadDeferredMsgQ(tpAniSirGlobal pMac); |
| 188 | void limHandleDeferMsgError(tpAniSirGlobal pMac, tpSirMsgQ pLimMsg); |
| 189 | |
| 190 | // Deferred Message Queue Reset |
| 191 | void limResetDeferredMsgQ(tpAniSirGlobal pMac); |
| 192 | |
| 193 | tSirRetStatus limSysProcessMmhMsgApi(tpAniSirGlobal, tSirMsgQ*, tANI_U8); |
| 194 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 195 | void limHandleUpdateOlbcCache(tpAniSirGlobal pMac); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 196 | |
| 197 | tANI_U8 limIsNullSsid( tSirMacSSid *pSsid ); |
| 198 | |
| 199 | void limProcessAddtsRspTimeout(tpAniSirGlobal pMac, tANI_U32 param); |
| 200 | |
| 201 | // 11h Support |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 202 | void limStopTxAndSwitchChannel(tpAniSirGlobal pMac, tANI_U8 sessionId); |
| 203 | void limProcessChannelSwitchTimeout(tpAniSirGlobal); |
| 204 | tSirRetStatus limStartChannelSwitch(tpAniSirGlobal pMac, tpPESession psessionEntry); |
| 205 | void limUpdateChannelSwitch(tpAniSirGlobal, tpSirProbeRespBeacon, tpPESession psessionEntry); |
Abhishek Singh | 39ae47e | 2017-10-30 17:39:50 +0530 | [diff] [blame] | 206 | /** |
| 207 | * lim_handle_ecsa_req()- Process ECSA channel switch request |
| 208 | * @mac_ctx: pointer to global mac structure |
| 209 | * @ecsa_req: ecsa req |
| 210 | * @session: Session entry |
| 211 | * |
| 212 | * Return: void |
| 213 | */ |
| 214 | void lim_handle_ecsa_req(tpAniSirGlobal mac_ctx, |
| 215 | struct ecsa_frame_params *ecsa_req, |
| 216 | tpPESession session); |
| 217 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 218 | void limProcessQuietTimeout(tpAniSirGlobal); |
| 219 | void limProcessQuietBssTimeout(tpAniSirGlobal); |
Sandeep Puligilla | 70b6b16 | 2014-04-19 02:06:04 +0530 | [diff] [blame] | 220 | void limInitOBSSScanParams(tpAniSirGlobal pMac, |
| 221 | tpPESession psessionEntry); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 222 | #if 0 |
| 223 | void limProcessWPSOverlapTimeout(tpAniSirGlobal pMac); |
| 224 | #endif |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 225 | |
| 226 | void limStartQuietTimer(tpAniSirGlobal pMac, tANI_U8 sessionId); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 227 | void limSwitchPrimaryChannel(tpAniSirGlobal, tANI_U8,tpPESession); |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 228 | void limSwitchPrimarySecondaryChannel(tpAniSirGlobal, tpPESession, tANI_U8, ePhyChanBondState); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 229 | tAniBool limTriggerBackgroundScanDuringQuietBss(tpAniSirGlobal); |
| 230 | void limUpdateStaRunTimeHTSwtichChnlParams(tpAniSirGlobal pMac, tDot11fIEHTInfo *pRcvdHTInfo, tANI_U8 bssIdx); |
| 231 | void limUpdateStaRunTimeHTCapability(tpAniSirGlobal pMac, tDot11fIEHTCaps *pHTCaps); |
| 232 | void limUpdateStaRunTimeHTInfo(struct sAniSirGlobal *pMac, tDot11fIEHTInfo *pRcvdHTInfo, tpPESession psessionEntry); |
| 233 | void limCancelDot11hChannelSwitch(tpAniSirGlobal pMac, tpPESession psessionEntry); |
| 234 | void limCancelDot11hQuiet(tpAniSirGlobal pMac, tpPESession psessionEntry); |
| 235 | tAniBool limIsChannelValidForChannelSwitch(tpAniSirGlobal pMac, tANI_U8 channel); |
| 236 | void limFrameTransmissionControl(tpAniSirGlobal pMac, tLimQuietTxMode type, tLimControlTx mode); |
| 237 | tSirRetStatus limRestorePreChannelSwitchState(tpAniSirGlobal pMac, tpPESession psessionEntry); |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 238 | tSirRetStatus limRestorePreQuietState(tpAniSirGlobal pMac, tpPESession psessionEntry); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 239 | |
| 240 | void limPrepareFor11hChannelSwitch(tpAniSirGlobal pMac, tpPESession psessionEntry); |
| 241 | void limSwitchChannelCback(tpAniSirGlobal pMac, eHalStatus status, |
| 242 | tANI_U32 *data, tpPESession psessionEntry); |
| 243 | |
| 244 | static inline tSirRFBand limGetRFBand(tANI_U8 channel) |
| 245 | { |
| 246 | if ((channel >= SIR_11A_CHANNEL_BEGIN) && |
| 247 | (channel <= SIR_11A_CHANNEL_END)) |
| 248 | return SIR_BAND_5_GHZ; |
| 249 | |
| 250 | if ((channel >= SIR_11B_CHANNEL_BEGIN) && |
| 251 | (channel <= SIR_11B_CHANNEL_END)) |
| 252 | return SIR_BAND_2_4_GHZ; |
| 253 | |
| 254 | return SIR_BAND_UNKNOWN; |
| 255 | } |
| 256 | |
| 257 | |
| 258 | static inline tSirRetStatus |
| 259 | limGetMgmtStaid(tpAniSirGlobal pMac, tANI_U16 *staid, tpPESession psessionEntry) |
| 260 | { |
| 261 | if (psessionEntry->limSystemRole == eLIM_AP_ROLE) |
| 262 | *staid = 1; |
| 263 | else if (psessionEntry->limSystemRole == eLIM_STA_ROLE) |
| 264 | *staid = 0; |
| 265 | else |
| 266 | return eSIR_FAILURE; |
| 267 | |
| 268 | return eSIR_SUCCESS; |
| 269 | } |
| 270 | |
| 271 | static inline tANI_U8 |
| 272 | limIsSystemInSetMimopsState(tpAniSirGlobal pMac) |
| 273 | { |
| 274 | if (pMac->lim.gLimMlmState == eLIM_MLM_WT_SET_MIMOPS_STATE) |
| 275 | return true; |
| 276 | return false; |
| 277 | } |
| 278 | |
| 279 | static inline tANI_U8 |
| 280 | isEnteringMimoPS(tSirMacHTMIMOPowerSaveState curState, tSirMacHTMIMOPowerSaveState newState) |
| 281 | { |
| 282 | if (curState == eSIR_HT_MIMO_PS_NO_LIMIT && |
| 283 | (newState == eSIR_HT_MIMO_PS_DYNAMIC ||newState == eSIR_HT_MIMO_PS_STATIC)) |
| 284 | return TRUE; |
| 285 | return FALSE; |
| 286 | } |
| 287 | |
| 288 | /// ANI peer station count management and associated actions |
| 289 | void limUtilCountStaAdd(tpAniSirGlobal pMac, tpDphHashNode pSta, tpPESession psessionEntry); |
| 290 | void limUtilCountStaDel(tpAniSirGlobal pMac, tpDphHashNode pSta, tpPESession psessionEntry); |
| 291 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 292 | tANI_U8 limGetHTCapability( tpAniSirGlobal, tANI_U32, tpPESession); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 293 | void limTxComplete( tHalHandle hHal, void *pData ); |
| 294 | |
| 295 | /**********Admit Control***************************************/ |
| 296 | |
| 297 | //callback function for HAL to issue DelTS request to PE. |
| 298 | //This function will be registered with HAL for callback when TSPEC inactivity timer fires. |
| 299 | |
| 300 | void limProcessDelTsInd(tpAniSirGlobal pMac, tpSirMsgQ limMsg); |
| 301 | tSirRetStatus limProcessHalIndMessages(tpAniSirGlobal pMac, tANI_U32 mesgId, void *mesgParam ); |
| 302 | tSirRetStatus limValidateDeltsReq(tpAniSirGlobal pMac, tpSirDeltsReq pDeltsReq, tSirMacAddr peerMacAddr,tpPESession psessionEntry); |
| 303 | /**********************************************************/ |
| 304 | |
| 305 | //callback function registration to HAL for any indication. |
| 306 | void limRegisterHalIndCallBack(tpAniSirGlobal pMac); |
| 307 | void limPktFree ( |
| 308 | tpAniSirGlobal pMac, |
| 309 | eFrameType frmType, |
| 310 | tANI_U8 *pBD, |
| 311 | void *body); |
| 312 | |
| 313 | |
| 314 | |
| 315 | void limGetBDfromRxPacket(tpAniSirGlobal pMac, void *body, tANI_U32 **pBD); |
| 316 | |
| 317 | /** |
| 318 | * \brief Given a base(X) and power(Y), this API will return |
| 319 | * the result of base raised to power - (X ^ Y) |
| 320 | * |
| 321 | * \sa utilsPowerXY |
| 322 | * |
| 323 | * \param base Base value |
| 324 | * |
| 325 | * \param power Base raised to this Power value |
| 326 | * |
| 327 | * \return Result of X^Y |
| 328 | * |
| 329 | */ |
| 330 | static inline tANI_U32 utilsPowerXY( tANI_U16 base, tANI_U16 power ) |
| 331 | { |
| 332 | tANI_U32 result = 1, i; |
| 333 | |
| 334 | for( i = 0; i < power; i++ ) |
| 335 | result *= base; |
| 336 | |
| 337 | return result; |
| 338 | } |
| 339 | |
| 340 | |
| 341 | |
| 342 | tSirRetStatus limPostMlmAddBAReq( tpAniSirGlobal pMac, |
| 343 | tpDphHashNode pStaDs, |
| 344 | tANI_U8 tid, tANI_U16 startingSeqNum,tpPESession psessionEntry); |
| 345 | tSirRetStatus limPostMlmAddBARsp( tpAniSirGlobal pMac, |
| 346 | tSirMacAddr peerMacAddr, |
| 347 | tSirMacStatusCodes baStatusCode, |
| 348 | tANI_U8 baDialogToken, |
| 349 | tANI_U8 baTID, |
| 350 | tANI_U8 baPolicy, |
| 351 | tANI_U16 baBufferSize, |
| 352 | tANI_U16 baTimeout, |
| 353 | tpPESession psessionEntry); |
| 354 | tSirRetStatus limPostMlmDelBAReq( tpAniSirGlobal pMac, |
| 355 | tpDphHashNode pSta, |
| 356 | tANI_U8 baDirection, |
| 357 | tANI_U8 baTID, |
| 358 | tSirMacReasonCodes baReasonCode , |
| 359 | tpPESession psessionEntry); |
| 360 | tSirRetStatus limPostMsgAddBAReq( tpAniSirGlobal pMac, |
| 361 | tpDphHashNode pSta, |
| 362 | tANI_U8 baDialogToken, |
| 363 | tANI_U8 baTID, |
| 364 | tANI_U8 baPolicy, |
| 365 | tANI_U16 baBufferSize, |
| 366 | tANI_U16 baTimeout, |
| 367 | tANI_U16 baSSN, |
| 368 | tANI_U8 baDirection, |
| 369 | tpPESession psessionEntry); |
| 370 | tSirRetStatus limPostMsgDelBAInd( tpAniSirGlobal pMac, |
| 371 | tpDphHashNode pSta, |
| 372 | tANI_U8 baTID, |
| 373 | tANI_U8 baDirection, |
| 374 | tpPESession psessionEntry); |
| 375 | |
| 376 | tSirRetStatus limPostSMStateUpdate(tpAniSirGlobal pMac, |
| 377 | tANI_U16 StaIdx, |
| 378 | tSirMacHTMIMOPowerSaveState MIMOPSState); |
| 379 | |
| 380 | void limDeleteStaContext(tpAniSirGlobal pMac, tpSirMsgQ limMsg); |
| 381 | void limProcessAddBaInd(tpAniSirGlobal pMac, tpSirMsgQ limMsg); |
Ganesh Kondabattini | 01f75c9 | 2014-07-07 19:27:41 +0530 | [diff] [blame] | 382 | void limDeleteBASessions(tpAniSirGlobal pMac, tpPESession pSessionEntry, |
| 383 | tANI_U32 baDirection, tSirMacReasonCodes baReasonCode); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 384 | void limDelAllBASessions(tpAniSirGlobal pMac); |
| 385 | void limDeleteDialogueTokenList(tpAniSirGlobal pMac); |
| 386 | tSirRetStatus limSearchAndDeleteDialogueToken(tpAniSirGlobal pMac, tANI_U8 token, tANI_U16 assocId, tANI_U16 tid); |
| 387 | void limRessetScanChannelInfo(tpAniSirGlobal pMac); |
| 388 | void limAddScanChannelInfo(tpAniSirGlobal pMac, tANI_U8 channelId); |
| 389 | |
| 390 | tANI_U8 limGetChannelFromBeacon(tpAniSirGlobal pMac, tpSchBeaconStruct pBeacon); |
| 391 | tSirNwType limGetNwType(tpAniSirGlobal pMac, tANI_U8 channelNum, tANI_U32 type, tpSchBeaconStruct pBeacon); |
| 392 | void limSetTspecUapsdMask(tpAniSirGlobal pMac, tSirMacTSInfo *pTsInfo, tANI_U32 action); |
| 393 | void limHandleHeartBeatTimeout(tpAniSirGlobal pMac); |
Leela Venkata Kiran Kumar Reddy Chirala | 3ca1790 | 2013-02-27 19:50:05 -0800 | [diff] [blame] | 394 | void limHandleHeartBeatTimeoutForSession(tpAniSirGlobal pMac, tpPESession psessionEntry); |
| 395 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 396 | //void limProcessBtampAddBssRsp(tpAniSirGlobal pMac,tpSirMsgQ pMsgQ,tpPESession peSession); |
| 397 | void limProcessAddStaRsp(tpAniSirGlobal pMac,tpSirMsgQ pMsgQ); |
| 398 | |
| 399 | void limUpdateBeacon(tpAniSirGlobal pMac); |
| 400 | |
| 401 | void limProcessBtAmpApMlmAddStaRsp(tpAniSirGlobal pMac,tpSirMsgQ limMsgQ, tpPESession psessionEntry); |
| 402 | void limProcessBtAmpApMlmDelBssRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ,tpPESession psessionEntry); |
| 403 | |
| 404 | void limProcessBtAmpApMlmDelStaRsp(tpAniSirGlobal pMac,tpSirMsgQ limMsgQ,tpPESession psessionEntry); |
| 405 | tpPESession limIsIBSSSessionActive(tpAniSirGlobal pMac); |
| 406 | tpPESession limIsApSessionActive(tpAniSirGlobal pMac); |
| 407 | void limHandleHeartBeatFailureTimeout(tpAniSirGlobal pMac); |
| 408 | |
| 409 | void limProcessDelStaSelfRsp(tpAniSirGlobal pMac,tpSirMsgQ limMsgQ); |
| 410 | void limProcessAddStaSelfRsp(tpAniSirGlobal pMac,tpSirMsgQ limMsgQ); |
| 411 | v_U8_t* limGetIEPtr(tpAniSirGlobal pMac, v_U8_t *pIes, int length, v_U8_t eid,eSizeOfLenField size_of_len_field); |
| 412 | |
| 413 | tANI_U8 limUnmapChannel(tANI_U8 mapChannel); |
| 414 | |
| 415 | #define limGetWscIEPtr(pMac, ie, ie_len) \ |
| 416 | limGetVendorIEOuiPtr(pMac, SIR_MAC_WSC_OUI, SIR_MAC_WSC_OUI_SIZE, ie, ie_len) |
| 417 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 418 | #define limGetP2pIEPtr(pMac, ie, ie_len) \ |
| 419 | limGetVendorIEOuiPtr(pMac, SIR_MAC_P2P_OUI, SIR_MAC_P2P_OUI_SIZE, ie, ie_len) |
| 420 | |
| 421 | v_U8_t limGetNoaAttrStreamInMultP2pIes(tpAniSirGlobal pMac,v_U8_t* noaStream,v_U8_t noaLen,v_U8_t overFlowLen); |
| 422 | v_U8_t limGetNoaAttrStream(tpAniSirGlobal pMac, v_U8_t*pNoaStream,tpPESession psessionEntry); |
| 423 | |
| 424 | v_U8_t limBuildP2pIe(tpAniSirGlobal pMac, tANI_U8 *ie, tANI_U8 *data, tANI_U8 ie_len); |
Viral Modi | d86bde2 | 2012-12-10 13:09:21 -0800 | [diff] [blame] | 425 | tANI_BOOLEAN limIsNOAInsertReqd(tpAniSirGlobal pMac); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 426 | v_U8_t* limGetVendorIEOuiPtr(tpAniSirGlobal pMac, tANI_U8 *oui, tANI_U8 oui_size, tANI_U8 *ie, tANI_U16 ie_len); |
| 427 | tANI_BOOLEAN limIsconnectedOnDFSChannel(tANI_U8 currentChannel); |
| 428 | tANI_U8 limGetCurrentOperatingChannel(tpAniSirGlobal pMac); |
Yeshwanth Sriram Guntuka | 8d9b29c | 2017-12-12 15:44:57 +0530 | [diff] [blame] | 429 | void limStaDelBASession(tpAniSirGlobal pMac); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 430 | |
Mohit Khanna | 4a70d26 | 2012-09-11 16:30:12 -0700 | [diff] [blame] | 431 | #ifdef WLAN_FEATURE_11AC |
Sandeep Puligilla | 6034276 | 2014-01-30 21:05:37 +0530 | [diff] [blame] | 432 | tANI_BOOLEAN limCheckVHTOpModeChange( tpAniSirGlobal pMac, |
Madan Mohan Koyyalamudi | 1bed598 | 2012-10-22 14:38:06 -0700 | [diff] [blame] | 433 | tpPESession psessionEntry, tANI_U8 chanWidth, tANI_U8 staId); |
Mohit Khanna | 4a70d26 | 2012-09-11 16:30:12 -0700 | [diff] [blame] | 434 | #endif |
Sandeep Puligilla | 6034276 | 2014-01-30 21:05:37 +0530 | [diff] [blame] | 435 | tANI_BOOLEAN limCheckHTChanBondModeChange(tpAniSirGlobal pMac, |
| 436 | tpPESession psessionEntry, |
| 437 | tANI_U8 beaconSecChanWidth, |
| 438 | tANI_U8 currentSecChanWidth, |
| 439 | tANI_U8 staId); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 440 | #ifdef FEATURE_WLAN_DIAG_SUPPORT |
| 441 | |
| 442 | typedef enum |
| 443 | { |
| 444 | WLAN_PE_DIAG_SCAN_REQ_EVENT = 0, |
| 445 | WLAN_PE_DIAG_SCAN_ABORT_IND_EVENT, |
| 446 | WLAN_PE_DIAG_SCAN_RSP_EVENT, |
| 447 | WLAN_PE_DIAG_JOIN_REQ_EVENT, |
| 448 | WLAN_PE_DIAG_JOIN_RSP_EVENT, |
| 449 | WLAN_PE_DIAG_SETCONTEXT_REQ_EVENT, |
| 450 | WLAN_PE_DIAG_SETCONTEXT_RSP_EVENT, |
| 451 | WLAN_PE_DIAG_REASSOC_REQ_EVENT, |
| 452 | WLAN_PE_DIAG_REASSOC_RSP_EVENT, |
| 453 | WLAN_PE_DIAG_AUTH_REQ_EVENT, |
Deepthi Gowri | 639d504 | 2015-11-16 20:23:39 +0530 | [diff] [blame] | 454 | WLAN_PE_DIAG_AUTH_RSP_EVENT = 10, |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 455 | WLAN_PE_DIAG_DISASSOC_REQ_EVENT, |
| 456 | WLAN_PE_DIAG_DISASSOC_RSP_EVENT, |
| 457 | WLAN_PE_DIAG_DISASSOC_IND_EVENT, |
| 458 | WLAN_PE_DIAG_DISASSOC_CNF_EVENT, |
| 459 | WLAN_PE_DIAG_DEAUTH_REQ_EVENT, |
| 460 | WLAN_PE_DIAG_DEAUTH_RSP_EVENT, |
| 461 | WLAN_PE_DIAG_DEAUTH_IND_EVENT, |
| 462 | WLAN_PE_DIAG_START_BSS_REQ_EVENT, |
| 463 | WLAN_PE_DIAG_START_BSS_RSP_EVENT, |
Deepthi Gowri | 639d504 | 2015-11-16 20:23:39 +0530 | [diff] [blame] | 464 | WLAN_PE_DIAG_AUTH_IND_EVENT = 20, |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 465 | WLAN_PE_DIAG_ASSOC_IND_EVENT, |
| 466 | WLAN_PE_DIAG_ASSOC_CNF_EVENT, |
| 467 | WLAN_PE_DIAG_REASSOC_IND_EVENT, |
| 468 | WLAN_PE_DIAG_SWITCH_CHL_REQ_EVENT, |
| 469 | WLAN_PE_DIAG_SWITCH_CHL_RSP_EVENT, |
| 470 | WLAN_PE_DIAG_STOP_BSS_REQ_EVENT, |
| 471 | WLAN_PE_DIAG_STOP_BSS_RSP_EVENT, |
| 472 | WLAN_PE_DIAG_DEAUTH_CNF_EVENT, |
| 473 | WLAN_PE_DIAG_ADDTS_REQ_EVENT, |
Deepthi Gowri | 639d504 | 2015-11-16 20:23:39 +0530 | [diff] [blame] | 474 | WLAN_PE_DIAG_ADDTS_RSP_EVENT = 30, |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 475 | WLAN_PE_DIAG_DELTS_REQ_EVENT, |
| 476 | WLAN_PE_DIAG_DELTS_RSP_EVENT, |
| 477 | WLAN_PE_DIAG_DELTS_IND_EVENT, |
| 478 | WLAN_PE_DIAG_ENTER_BMPS_REQ_EVENT, |
| 479 | WLAN_PE_DIAG_ENTER_BMPS_RSP_EVENT, |
| 480 | WLAN_PE_DIAG_EXIT_BMPS_REQ_EVENT, |
| 481 | WLAN_PE_DIAG_EXIT_BMPS_RSP_EVENT, |
| 482 | WLAN_PE_DIAG_EXIT_BMPS_IND_EVENT, |
| 483 | WLAN_PE_DIAG_ENTER_IMPS_REQ_EVENT, |
Deepthi Gowri | 639d504 | 2015-11-16 20:23:39 +0530 | [diff] [blame] | 484 | WLAN_PE_DIAG_ENTER_IMPS_RSP_EVENT = 40, |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 485 | WLAN_PE_DIAG_EXIT_IMPS_REQ_EVENT, |
| 486 | WLAN_PE_DIAG_EXIT_IMPS_RSP_EVENT, |
| 487 | WLAN_PE_DIAG_ENTER_UAPSD_REQ_EVENT, |
| 488 | WLAN_PE_DIAG_ENTER_UAPSD_RSP_EVENT, |
| 489 | WLAN_PE_DIAG_EXIT_UAPSD_REQ_EVENT, |
| 490 | WLAN_PE_DIAG_EXIT_UAPSD_RSP_EVENT, |
| 491 | WLAN_PE_DIAG_WOWL_ADD_BCAST_PTRN_EVENT, |
| 492 | WLAN_PE_DIAG_WOWL_DEL_BCAST_PTRN_EVENT, |
| 493 | WLAN_PE_DIAG_ENTER_WOWL_REQ_EVENT, |
Deepthi Gowri | 639d504 | 2015-11-16 20:23:39 +0530 | [diff] [blame] | 494 | WLAN_PE_DIAG_ENTER_WOWL_RSP_EVENT = 50, |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 495 | WLAN_PE_DIAG_EXIT_WOWL_REQ_EVENT, |
| 496 | WLAN_PE_DIAG_EXIT_WOWL_RSP_EVENT, |
| 497 | WLAN_PE_DIAG_HAL_ADDBA_REQ_EVENT, |
| 498 | WLAN_PE_DIAG_HAL_ADDBA_RSP_EVENT, |
| 499 | WLAN_PE_DIAG_HAL_DELBA_IND_EVENT, |
Leela Venkata Kiran Kumar Reddy Chirala | 2365ee6 | 2013-05-09 17:30:12 -0700 | [diff] [blame] | 500 | WLAN_PE_DIAG_HB_FAILURE_TIMEOUT, |
| 501 | WLAN_PE_DIAG_PRE_AUTH_REQ_EVENT, |
| 502 | WLAN_PE_DIAG_PRE_AUTH_RSP_EVENT, |
| 503 | WLAN_PE_DIAG_PREAUTH_DONE, |
Deepthi Gowri | 639d504 | 2015-11-16 20:23:39 +0530 | [diff] [blame] | 504 | WLAN_PE_DIAG_REASSOCIATING = 60, |
Leela Venkata Kiran Kumar Reddy Chirala | 2365ee6 | 2013-05-09 17:30:12 -0700 | [diff] [blame] | 505 | WLAN_PE_DIAG_CONNECTED, |
Sushant Kaushik | b97a008 | 2015-08-31 12:36:45 +0530 | [diff] [blame] | 506 | WLAN_PE_DIAG_ASSOC_REQ_EVENT, |
| 507 | WLAN_PE_DIAG_AUTH_COMP_EVENT, |
| 508 | WLAN_PE_DIAG_ASSOC_COMP_EVENT, |
Deepthi Gowri | 639d504 | 2015-11-16 20:23:39 +0530 | [diff] [blame] | 509 | WLAN_PE_DIAG_AUTH_START_EVENT, |
| 510 | WLAN_PE_DIAG_ASSOC_START_EVENT, |
| 511 | WLAN_PE_DIAG_REASSOC_START_EVENT, |
| 512 | WLAN_PE_DIAG_ROAM_AUTH_START_EVENT, |
| 513 | WLAN_PE_DIAG_ROAM_AUTH_COMP_EVENT, |
| 514 | WLAN_PE_DIAG_ROAM_ASSOC_START_EVENT = 70, |
| 515 | WLAN_PE_DIAG_ROAM_ASSOC_COMP_EVENT, |
| 516 | WLAN_PE_DIAG_SCAN_COMP_EVENT, |
| 517 | WLAN_PE_DIAG_SCAN_RES_FOUND_EVENT, |
Sushant Kaushik | b97a008 | 2015-08-31 12:36:45 +0530 | [diff] [blame] | 518 | WLAN_PE_DIAG_ROAM_REQUESTED, |
| 519 | WLAN_PE_DIAG_CHANNEL_SWITCH_ANOUNCEMENT, |
Sushant Kaushik | b97a008 | 2015-08-31 12:36:45 +0530 | [diff] [blame] | 520 | WLAN_PE_DIAG_ROAM_CANDIDATE_FOUND, |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 521 | }WLAN_PE_DIAG_EVENT_TYPE; |
| 522 | |
| 523 | void limDiagEventReport(tpAniSirGlobal pMac, tANI_U16 eventType, tpPESession pSessionEntry, tANI_U16 status, tANI_U16 reasonCode); |
| 524 | #endif /* FEATURE_WLAN_DIAG_SUPPORT */ |
| 525 | |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 526 | void peSetResumeChannel(tpAniSirGlobal pMac, tANI_U16 channel, ePhyChanBondState cbState); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 527 | /*-------------------------------------------------------------------------- |
| 528 | |
| 529 | \brief peGetResumeChannel() - Returns the channel number for scanning, from a valid session. |
| 530 | |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 531 | This function returns the channel to resume to during link resume. channel id of 0 means HAL will |
| 532 | resume to previous channel before link suspend |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 533 | |
| 534 | \param pMac - pointer to global adapter context |
| 535 | \return - channel to scan from valid session else zero. |
| 536 | |
| 537 | \sa |
| 538 | |
| 539 | --------------------------------------------------------------------------*/ |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 540 | void peGetResumeChannel(tpAniSirGlobal pMac, tANI_U8* resumeChannel, ePhyChanBondState* resumePhyCbState); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 541 | |
krunal soni | 45b9eb6 | 2014-03-26 12:54:25 -0700 | [diff] [blame] | 542 | void limGetShortSlotFromPhyMode(tpAniSirGlobal pMac, tpPESession psessionEntry, tANI_U32 phyMode, |
| 543 | tANI_U8 *pShortSlotEnable); |
Madan Mohan Koyyalamudi | 6db7ad1 | 2012-10-29 16:14:41 -0700 | [diff] [blame] | 544 | |
Madan Mohan Koyyalamudi | a67d433 | 2012-11-29 11:35:23 -0800 | [diff] [blame] | 545 | void limCleanUpDisassocDeauthReq(tpAniSirGlobal pMac, tANI_U8 *staMac, tANI_BOOLEAN cleanRxPath); |
| 546 | |
Madan Mohan Koyyalamudi | 25b6f8b | 2012-12-04 16:17:31 -0800 | [diff] [blame] | 547 | tANI_BOOLEAN limCheckDisassocDeauthAckPending(tpAniSirGlobal pMac, tANI_U8 *staMac); |
Kalikinkar dhara | 205da78 | 2014-03-21 15:49:32 -0700 | [diff] [blame] | 548 | |
| 549 | |
| 550 | void limUtilsframeshtons(tpAniSirGlobal pCtx, |
| 551 | tANI_U8 *pOut, |
| 552 | tANI_U16 pIn, |
| 553 | tANI_U8 fMsb); |
| 554 | |
| 555 | void limUtilsframeshtonl(tpAniSirGlobal pCtx, |
| 556 | tANI_U8 *pOut, |
| 557 | tANI_U32 pIn, |
| 558 | tANI_U8 fMsb); |
| 559 | |
Sandeep Puligilla | 11d49a6 | 2014-01-30 12:05:16 +0530 | [diff] [blame] | 560 | void limUpdateOBSSScanParams(tpPESession psessionEntry , |
| 561 | tDot11fIEOBSSScanParameters *pOBSSScanParameters); |
Chet Lanctot | 8cecea2 | 2014-02-11 19:09:36 -0800 | [diff] [blame] | 562 | |
| 563 | #ifdef WLAN_FEATURE_11W |
| 564 | void limPmfSaQueryTimerHandler(void *pMacGlobal, tANI_U32 param); |
Chet Lanctot | 8cecea2 | 2014-02-11 19:09:36 -0800 | [diff] [blame] | 565 | |
Abhishek Singh | 0ebac9c | 2014-06-25 13:34:12 +0530 | [diff] [blame] | 566 | void limSetProtectedBit(tpAniSirGlobal pMac, |
| 567 | tpPESession psessionEntry, |
| 568 | tSirMacAddr peer, |
| 569 | tpSirMacMgmtHdr pMacHdr); |
| 570 | #endif |
Atul Mittal | b849d5a | 2014-07-29 12:08:39 +0530 | [diff] [blame] | 571 | void limInitOperatingClasses(tHalHandle hHal); |
| 572 | tANI_U8 limGetOPClassFromChannel(tANI_U8 *country, |
| 573 | tANI_U8 channel, |
| 574 | tANI_U8 offset); |
Abhishek Singh | 0f09f38 | 2018-12-04 14:06:07 +0530 | [diff] [blame] | 575 | |
| 576 | /** |
| 577 | * lim_get_channel_width_from_opclass() - get the channel offset for the opclass |
| 578 | * @country: current country code |
| 579 | * @channel: channel for which width is required |
| 580 | * @peer_vht_capable: if peer is VHT capable |
| 581 | * @op_class: Opclass provided |
| 582 | * |
| 583 | * Return: channel offset for the opclass |
| 584 | */ |
| 585 | offset_t lim_get_channel_width_from_opclass(tANI_U8 *country, tANI_U8 channel, |
| 586 | tANI_U8 peer_vht_capable, |
| 587 | tANI_U8 op_class); |
Abhishek Singh | 39ae47e | 2017-10-30 17:39:50 +0530 | [diff] [blame] | 588 | |
Sushant Kaushik | 02c866d | 2015-01-16 15:24:25 +0530 | [diff] [blame] | 589 | void limParseBeaconForTim(tpAniSirGlobal pMac, tANI_U8* pRxPacketInfo, |
| 590 | tpPESession psessionEntry); |
| 591 | |
Girish Gowli | a95daca | 2015-02-04 20:31:31 +0530 | [diff] [blame] | 592 | void limUpdateMaxRateFlag(tpAniSirGlobal pMac, |
| 593 | tANI_U8 smeSessionId, |
| 594 | tANI_U32 maxRateFlag); |
| 595 | |
| 596 | extern tANI_U32 limGetMaxRateFlags(tpDphHashNode pStaDs, |
| 597 | tpPESession psessionEntry); |
Abhishek Singh | 5d76571 | 2015-03-12 14:04:16 +0530 | [diff] [blame] | 598 | |
| 599 | void limDecrementPendingMgmtCount (tpAniSirGlobal pMac); |
Ganesh Kondabattini | ffc00b1 | 2015-03-18 13:11:33 +0530 | [diff] [blame] | 600 | |
| 601 | eHalStatus limTxBdComplete(tpAniSirGlobal pMac, void *pData); |
Kapil Gupta | 956c0c4 | 2017-06-16 19:24:31 +0530 | [diff] [blame] | 602 | eHalStatus limAssocRspTxCompleteCnf(tpAniSirGlobal pMac, void *pData); |
Abhishek Singh | 09d4e4a | 2016-01-12 11:20:22 +0530 | [diff] [blame] | 603 | bool lim_is_robust_mgmt_action_frame(uint8 action_catagory); |
Hu Wang | c12631c | 2016-08-11 09:57:03 +0800 | [diff] [blame] | 604 | tANI_U8 lim_compute_ext_cap_ie_length (tDot11fIEExtCap *ext_cap); |
Selvaraj, Sridhar | 5f14919 | 2016-04-15 12:53:28 +0530 | [diff] [blame] | 605 | void lim_update_caps_info_for_bss(tpAniSirGlobal mac_ctx, |
| 606 | uint16_t *caps, uint16_t bss_caps); |
Agrawal Ashish | a8e8a72 | 2016-10-18 19:07:45 +0530 | [diff] [blame] | 607 | #ifdef SAP_AUTH_OFFLOAD |
| 608 | void lim_sap_offload_add_sta(tpAniSirGlobal pmac, |
| 609 | tSapOfldAddStaIndMsg *lim_msgq); |
| 610 | void lim_sap_offload_del_sta(tpAniSirGlobal pmac, |
| 611 | tSapOfldDelStaIndMsg *lim_msgq); |
| 612 | #endif |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 613 | #endif /* __LIM_UTILS_H */ |