Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1 | /* |
Kiet Lam | 842dad0 | 2014-02-18 18:44:02 -0800 | [diff] [blame] | 2 | * Copyright (c) 2012-2013 The Linux Foundation. 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. |
Gopichand Nakkala | 92f07d8 | 2013-01-08 21:16:34 -0800 | [diff] [blame] | 20 | */ |
Kiet Lam | 842dad0 | 2014-02-18 18:44:02 -0800 | [diff] [blame] | 21 | |
| 22 | /* |
| 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 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 28 | #if!defined( __LIM_SESSION_UTILS_H ) |
| 29 | #define __LIM_SESSION_UTILS_H |
| 30 | |
Kiet Lam | aa8e15a | 2014-02-11 23:30:06 -0800 | [diff] [blame] | 31 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 32 | |
| 33 | /**========================================================================= |
| 34 | |
| 35 | \file limSessionUtils.h |
| 36 | |
| 37 | \brief prototype for lim Session Utility related APIs |
| 38 | |
| 39 | \author Sunit Bhatia |
| 40 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 41 | |
| 42 | ========================================================================*/ |
| 43 | |
| 44 | |
| 45 | /*-------------------------------------------------------------------------- |
| 46 | Include Files |
| 47 | ------------------------------------------------------------------------*/ |
| 48 | |
| 49 | |
| 50 | |
| 51 | /*-------------------------------------------------------------------------- |
| 52 | Preprocessor definitions and constants |
| 53 | ------------------------------------------------------------------------*/ |
| 54 | |
| 55 | |
| 56 | /*-------------------------------------------------------------------------- |
| 57 | Type declarations |
| 58 | ------------------------------------------------------------------------*/ |
| 59 | |
| 60 | |
| 61 | /*------------------------------------------------------------------------- |
| 62 | Function declarations and documenation |
| 63 | ------------------------------------------------------------------------*/ |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 64 | /*-------------------------------------------------------------------------- |
| 65 | |
Madan Mohan Koyyalamudi | 1bed598 | 2012-10-22 14:38:06 -0700 | [diff] [blame] | 66 | \brief peGetVhtCapable() - Returns the Vht capable from a valid session. |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 67 | |
Madan Mohan Koyyalamudi | 1bed598 | 2012-10-22 14:38:06 -0700 | [diff] [blame] | 68 | This function iterates the session Table and returns the VHT capable from first valid session |
| 69 | if no sessions are valid/present it returns FALSE |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 70 | |
Madan Mohan Koyyalamudi | 1bed598 | 2012-10-22 14:38:06 -0700 | [diff] [blame] | 71 | \param pMac - pointer to global adapter context |
| 72 | \return - channel to scan from valid session else zero. |
| 73 | |
| 74 | \sa |
| 75 | |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 76 | --------------------------------------------------------------------------*/ |
Madan Mohan Koyyalamudi | 1bed598 | 2012-10-22 14:38:06 -0700 | [diff] [blame] | 77 | tANI_U8 peGetVhtCapable(tpAniSirGlobal pMac); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 78 | |
| 79 | |
| 80 | /*-------------------------------------------------------------------------- |
| 81 | \brief peValidateJoinReq() - validates the Join request . |
| 82 | |
| 83 | This function is called to validate the Join Request for a BT-AMP station. If start BSS session is present |
| 84 | this function returns TRUE else returns FALSE. |
Madan Mohan Koyyalamudi | 1bed598 | 2012-10-22 14:38:06 -0700 | [diff] [blame] | 85 | |
| 86 | \param pMac - pointer to global adapter context |
| 87 | \return - return TRUE if start BSS session is present else return FALSE. |
| 88 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 89 | \sa |
| 90 | --------------------------------------------------------------------------*/ |
| 91 | tANI_U8 peValidateBtJoinRequest(tpAniSirGlobal pMac); |
| 92 | |
| 93 | /* --------------------------------------------------------------------------*/ |
| 94 | |
| 95 | |
| 96 | /*-------------------------------------------------------------------------- |
| 97 | \brief peGetValidPowerSaveSession() - Fetches the valid session for powersave . |
| 98 | |
| 99 | This function is called to check the valid session for power save, if more than one session is active , this function |
| 100 | it returns NULL. |
| 101 | if there is only one valid "infrastructure" session present in "linkestablished" state this function returns sessionentry. |
| 102 | For all other cases it returns NULL. |
| 103 | |
| 104 | \param pMac - pointer to global adapter context |
| 105 | \return - return session is address if valid session is present else return NULL. |
| 106 | |
| 107 | \sa |
| 108 | --------------------------------------------------------------------------*/ |
| 109 | |
| 110 | |
| 111 | tpPESession peGetValidPowerSaveSession(tpAniSirGlobal pMac); |
| 112 | |
| 113 | /* --------------------------------------------------------------------------*/ |
| 114 | |
| 115 | |
| 116 | /*-------------------------------------------------------------------------- |
| 117 | \brief peIsAnySessionActive() - checks for the active session presence . |
| 118 | |
| 119 | This function returns TRUE if atleast one valid session is present else it returns FALSE |
| 120 | |
| 121 | \param pMac - pointer to global adapter context |
| 122 | \return - return TRUE if atleast one session is active else return FALSE. |
| 123 | |
| 124 | \sa |
| 125 | --------------------------------------------------------------------------*/ |
| 126 | |
| 127 | tANI_U8 peIsAnySessionActive(tpAniSirGlobal pMac); |
Abhishek Singh | 9c1262f | 2014-02-26 14:48:36 +0530 | [diff] [blame] | 128 | |
| 129 | /* --------------------------------------------------------------------------*/ |
| 130 | |
| 131 | |
| 132 | /*-------------------------------------------------------------------------- |
| 133 | \brief pePrintActiveSession() - print all the active pesession present . |
| 134 | |
| 135 | This function print all the active pesession present |
| 136 | |
| 137 | \param pMac - pointer to global adapter context |
| 138 | |
| 139 | \sa |
| 140 | --------------------------------------------------------------------------*/ |
| 141 | |
| 142 | void pePrintActiveSession(tpAniSirGlobal pMac); |
| 143 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 144 | /* --------------------------------------------------------------------------*/ |
| 145 | |
| 146 | |
| 147 | |
| 148 | /*-------------------------------------------------------------------------- |
| 149 | \brief isLimSessionOffChannel() - Determines if the session is |
| 150 | off channel. |
| 151 | |
| 152 | This function returns TRUE if the session Id passed needs to be on a different |
| 153 | channel than atleast one session already active. |
| 154 | |
| 155 | \param pMac - pointer to global adapter context |
| 156 | \param sessionId - session ID of the session to be verified. |
| 157 | |
| 158 | \return tANI_U8 - Boolean value for off-channel operation. |
| 159 | |
| 160 | \sa |
| 161 | --------------------------------------------------------------------------*/ |
| 162 | tANI_U8 |
| 163 | isLimSessionOffChannel(tpAniSirGlobal pMac, tANI_U8 sessionId); |
| 164 | /* --------------------------------------------------------------------------*/ |
| 165 | |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 166 | /*-------------------------------------------------------------------------- |
| 167 | \brief peGetActiveSessionChannel() - Gets the first valid sessions primary and secondary |
| 168 | channel. If not found returns invalid channel ID (=0) |
| 169 | \param pMac - pointer to global adapter context |
| 170 | \param resumeChannel - Primary channel of the first valid session. This is an output argument. |
| 171 | \return resumePhyCbState - Secondary channel of the first valid session. This is an output argument. |
| 172 | --------------------------------------------------------------------------*/ |
| 173 | void |
| 174 | peGetActiveSessionChannel(tpAniSirGlobal pMac, tANI_U8* resumeChannel, ePhyChanBondState* resumePhyCbState); |
| 175 | |
| 176 | /*-------------------------------------------------------------------------- |
| 177 | \brief limIsChanSwitchRunning() - Check if channel switch is running on any |
| 178 | valid session. |
| 179 | |
| 180 | \param pMac - pointer to global adapter context |
| 181 | |
| 182 | \return tANI_U8 - 1 - if chann switching running. |
| 183 | 0 - if chann switching is not running. |
| 184 | |
| 185 | \sa |
| 186 | --------------------------------------------------------------------------*/ |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 187 | tANI_U8 |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 188 | limIsChanSwitchRunning (tpAniSirGlobal pMac); |
| 189 | |
| 190 | /*-------------------------------------------------------------------------- |
| 191 | \brief limIsInQuietDuration() - Check if channel quieting is running on any |
| 192 | valid session. |
| 193 | |
| 194 | \param pMac - pointer to global adapter context |
| 195 | |
| 196 | \return tANI_U8 - 1 - if chann quiet running. |
| 197 | 0 - if chann quiet is not running. |
| 198 | |
| 199 | \sa |
| 200 | --------------------------------------------------------------------------*/ |
| 201 | tANI_U8 |
| 202 | limIsInQuietDuration (tpAniSirGlobal pMac); |
| 203 | |
| 204 | /*-------------------------------------------------------------------------- |
| 205 | \brief limIsQuietBegin() - Check if channel quieting is begining on any |
| 206 | valid session. |
| 207 | |
| 208 | \param pMac - pointer to global adapter context |
| 209 | |
| 210 | \return tANI_U8 - 1 - if chann quiet running. |
| 211 | 0 - if chann quiet is not running. |
| 212 | |
| 213 | \sa |
| 214 | --------------------------------------------------------------------------*/ |
| 215 | tANI_U8 |
| 216 | limIsQuietBegin (tpAniSirGlobal pMac); |
| 217 | /*-------------------------------------------------------------------------- |
| 218 | \brief limIsInMCC() - Check if Device is in MCC. |
| 219 | |
| 220 | \param pMac - pointer to global adapter context |
| 221 | |
| 222 | \return tANI_U8 - TRUE - if in MCC. |
| 223 | FALSE - NOT in MCC. |
| 224 | |
| 225 | \sa |
| 226 | --------------------------------------------------------------------------*/ |
| 227 | tANI_U8 |
| 228 | limIsInMCC (tpAniSirGlobal pMac); |
Gopichand Nakkala | 777e603 | 2012-12-31 16:39:21 -0800 | [diff] [blame] | 229 | /*-------------------------------------------------------------------------- |
| 230 | \brief peGetCurrentSTAsCount() - Returns total stations associated on |
| 231 | all session. |
| 232 | |
| 233 | \param pMac - pointer to global adapter context |
| 234 | \return - Number of station active on all sessions. |
| 235 | |
| 236 | \sa |
| 237 | --------------------------------------------------------------------------*/ |
| 238 | tANI_U8 |
| 239 | peGetCurrentSTAsCount(tpAniSirGlobal pMac); |
Srinivas Girigowda | de69741 | 2013-02-14 16:31:48 -0800 | [diff] [blame] | 240 | |
| 241 | #ifdef FEATURE_WLAN_LFR |
| 242 | /*-------------------------------------------------------------------------- |
| 243 | \brief limIsFastRoamEnabled() - To check Fast roaming is enabled or not |
| 244 | |
| 245 | \param pMac - pointer to global adapter context |
| 246 | \param sessionId - session id |
| 247 | \return - TRUE or FALSE |
| 248 | |
| 249 | \sa |
| 250 | --------------------------------------------------------------------------*/ |
| 251 | tANI_U8 |
| 252 | limIsFastRoamEnabled(tpAniSirGlobal pMac, tANI_U8 sessionId); |
| 253 | #endif |
| 254 | |
| 255 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 256 | #endif //#if !defined( __LIM_SESSION_UTILS_H ) |
| 257 | |