Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1 | /* |
Gopichand Nakkala | 92f07d8 | 2013-01-08 21:16:34 -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. |
| 20 | */ |
| 21 | /* |
Jeff Johnson | 32d95a3 | 2012-09-10 13:15:23 -0700 | [diff] [blame] | 22 | * Copyright (c) 2012, The Linux Foundation. All rights reserved. |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 23 | * |
| 24 | * Previously licensed under the ISC license by Qualcomm Atheros, Inc. |
| 25 | * |
| 26 | * |
| 27 | * Permission to use, copy, modify, and/or distribute this software for |
| 28 | * any purpose with or without fee is hereby granted, provided that the |
| 29 | * above copyright notice and this permission notice appear in all |
| 30 | * copies. |
| 31 | * |
| 32 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL |
| 33 | * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED |
| 34 | * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE |
| 35 | * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL |
| 36 | * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR |
| 37 | * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER |
| 38 | * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR |
| 39 | * PERFORMANCE OF THIS SOFTWARE. |
| 40 | */ |
| 41 | |
| 42 | |
| 43 | #if!defined( __LIM_SESSION_UTILS_H ) |
| 44 | #define __LIM_SESSION_UTILS_H |
| 45 | |
Srinivas Girigowda | de69741 | 2013-02-14 16:31:48 -0800 | [diff] [blame^] | 46 | /* |
| 47 | * Copyright (c) 2012-2013 Qualcomm Atheros, Inc. |
| 48 | * All Rights Reserved. |
| 49 | * Qualcomm Atheros Confidential and Proprietary. |
| 50 | */ |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 51 | |
| 52 | /**========================================================================= |
| 53 | |
| 54 | \file limSessionUtils.h |
| 55 | |
| 56 | \brief prototype for lim Session Utility related APIs |
| 57 | |
| 58 | \author Sunit Bhatia |
| 59 | |
| 60 | Copyright 2008 (c) Qualcomm, Incorporated. All Rights Reserved. |
| 61 | |
| 62 | Qualcomm Confidential and Proprietary. |
| 63 | |
| 64 | ========================================================================*/ |
| 65 | |
| 66 | |
| 67 | /*-------------------------------------------------------------------------- |
| 68 | Include Files |
| 69 | ------------------------------------------------------------------------*/ |
| 70 | |
| 71 | |
| 72 | |
| 73 | /*-------------------------------------------------------------------------- |
| 74 | Preprocessor definitions and constants |
| 75 | ------------------------------------------------------------------------*/ |
| 76 | |
| 77 | |
| 78 | /*-------------------------------------------------------------------------- |
| 79 | Type declarations |
| 80 | ------------------------------------------------------------------------*/ |
| 81 | |
| 82 | |
| 83 | /*------------------------------------------------------------------------- |
| 84 | Function declarations and documenation |
| 85 | ------------------------------------------------------------------------*/ |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 86 | /*-------------------------------------------------------------------------- |
| 87 | |
Madan Mohan Koyyalamudi | 1bed598 | 2012-10-22 14:38:06 -0700 | [diff] [blame] | 88 | \brief peGetVhtCapable() - Returns the Vht capable from a valid session. |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 89 | |
Madan Mohan Koyyalamudi | 1bed598 | 2012-10-22 14:38:06 -0700 | [diff] [blame] | 90 | This function iterates the session Table and returns the VHT capable from first valid session |
| 91 | if no sessions are valid/present it returns FALSE |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 92 | |
Madan Mohan Koyyalamudi | 1bed598 | 2012-10-22 14:38:06 -0700 | [diff] [blame] | 93 | \param pMac - pointer to global adapter context |
| 94 | \return - channel to scan from valid session else zero. |
| 95 | |
| 96 | \sa |
| 97 | |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 98 | --------------------------------------------------------------------------*/ |
Madan Mohan Koyyalamudi | 1bed598 | 2012-10-22 14:38:06 -0700 | [diff] [blame] | 99 | tANI_U8 peGetVhtCapable(tpAniSirGlobal pMac); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 100 | |
| 101 | |
| 102 | /*-------------------------------------------------------------------------- |
| 103 | \brief peValidateJoinReq() - validates the Join request . |
| 104 | |
| 105 | This function is called to validate the Join Request for a BT-AMP station. If start BSS session is present |
| 106 | this function returns TRUE else returns FALSE. |
Madan Mohan Koyyalamudi | 1bed598 | 2012-10-22 14:38:06 -0700 | [diff] [blame] | 107 | |
| 108 | \param pMac - pointer to global adapter context |
| 109 | \return - return TRUE if start BSS session is present else return FALSE. |
| 110 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 111 | \sa |
| 112 | --------------------------------------------------------------------------*/ |
| 113 | tANI_U8 peValidateBtJoinRequest(tpAniSirGlobal pMac); |
| 114 | |
| 115 | /* --------------------------------------------------------------------------*/ |
| 116 | |
| 117 | |
| 118 | /*-------------------------------------------------------------------------- |
| 119 | \brief peGetValidPowerSaveSession() - Fetches the valid session for powersave . |
| 120 | |
| 121 | This function is called to check the valid session for power save, if more than one session is active , this function |
| 122 | it returns NULL. |
| 123 | if there is only one valid "infrastructure" session present in "linkestablished" state this function returns sessionentry. |
| 124 | For all other cases it returns NULL. |
| 125 | |
| 126 | \param pMac - pointer to global adapter context |
| 127 | \return - return session is address if valid session is present else return NULL. |
| 128 | |
| 129 | \sa |
| 130 | --------------------------------------------------------------------------*/ |
| 131 | |
| 132 | |
| 133 | tpPESession peGetValidPowerSaveSession(tpAniSirGlobal pMac); |
| 134 | |
| 135 | /* --------------------------------------------------------------------------*/ |
| 136 | |
| 137 | |
| 138 | /*-------------------------------------------------------------------------- |
| 139 | \brief peIsAnySessionActive() - checks for the active session presence . |
| 140 | |
| 141 | This function returns TRUE if atleast one valid session is present else it returns FALSE |
| 142 | |
| 143 | \param pMac - pointer to global adapter context |
| 144 | \return - return TRUE if atleast one session is active else return FALSE. |
| 145 | |
| 146 | \sa |
| 147 | --------------------------------------------------------------------------*/ |
| 148 | |
| 149 | tANI_U8 peIsAnySessionActive(tpAniSirGlobal pMac); |
| 150 | /* --------------------------------------------------------------------------*/ |
| 151 | |
| 152 | |
| 153 | |
| 154 | /*-------------------------------------------------------------------------- |
| 155 | \brief isLimSessionOffChannel() - Determines if the session is |
| 156 | off channel. |
| 157 | |
| 158 | This function returns TRUE if the session Id passed needs to be on a different |
| 159 | channel than atleast one session already active. |
| 160 | |
| 161 | \param pMac - pointer to global adapter context |
| 162 | \param sessionId - session ID of the session to be verified. |
| 163 | |
| 164 | \return tANI_U8 - Boolean value for off-channel operation. |
| 165 | |
| 166 | \sa |
| 167 | --------------------------------------------------------------------------*/ |
| 168 | tANI_U8 |
| 169 | isLimSessionOffChannel(tpAniSirGlobal pMac, tANI_U8 sessionId); |
| 170 | /* --------------------------------------------------------------------------*/ |
| 171 | |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 172 | /*-------------------------------------------------------------------------- |
| 173 | \brief peGetActiveSessionChannel() - Gets the first valid sessions primary and secondary |
| 174 | channel. If not found returns invalid channel ID (=0) |
| 175 | \param pMac - pointer to global adapter context |
| 176 | \param resumeChannel - Primary channel of the first valid session. This is an output argument. |
| 177 | \return resumePhyCbState - Secondary channel of the first valid session. This is an output argument. |
| 178 | --------------------------------------------------------------------------*/ |
| 179 | void |
| 180 | peGetActiveSessionChannel(tpAniSirGlobal pMac, tANI_U8* resumeChannel, ePhyChanBondState* resumePhyCbState); |
| 181 | |
| 182 | /*-------------------------------------------------------------------------- |
| 183 | \brief limIsChanSwitchRunning() - Check if channel switch is running on any |
| 184 | valid session. |
| 185 | |
| 186 | \param pMac - pointer to global adapter context |
| 187 | |
| 188 | \return tANI_U8 - 1 - if chann switching running. |
| 189 | 0 - if chann switching is not running. |
| 190 | |
| 191 | \sa |
| 192 | --------------------------------------------------------------------------*/ |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 193 | tANI_U8 |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 194 | limIsChanSwitchRunning (tpAniSirGlobal pMac); |
| 195 | |
| 196 | /*-------------------------------------------------------------------------- |
| 197 | \brief limIsInQuietDuration() - Check if channel quieting is running on any |
| 198 | valid session. |
| 199 | |
| 200 | \param pMac - pointer to global adapter context |
| 201 | |
| 202 | \return tANI_U8 - 1 - if chann quiet running. |
| 203 | 0 - if chann quiet is not running. |
| 204 | |
| 205 | \sa |
| 206 | --------------------------------------------------------------------------*/ |
| 207 | tANI_U8 |
| 208 | limIsInQuietDuration (tpAniSirGlobal pMac); |
| 209 | |
| 210 | /*-------------------------------------------------------------------------- |
| 211 | \brief limIsQuietBegin() - Check if channel quieting is begining on any |
| 212 | valid session. |
| 213 | |
| 214 | \param pMac - pointer to global adapter context |
| 215 | |
| 216 | \return tANI_U8 - 1 - if chann quiet running. |
| 217 | 0 - if chann quiet is not running. |
| 218 | |
| 219 | \sa |
| 220 | --------------------------------------------------------------------------*/ |
| 221 | tANI_U8 |
| 222 | limIsQuietBegin (tpAniSirGlobal pMac); |
| 223 | /*-------------------------------------------------------------------------- |
| 224 | \brief limIsInMCC() - Check if Device is in MCC. |
| 225 | |
| 226 | \param pMac - pointer to global adapter context |
| 227 | |
| 228 | \return tANI_U8 - TRUE - if in MCC. |
| 229 | FALSE - NOT in MCC. |
| 230 | |
| 231 | \sa |
| 232 | --------------------------------------------------------------------------*/ |
| 233 | tANI_U8 |
| 234 | limIsInMCC (tpAniSirGlobal pMac); |
Gopichand Nakkala | 777e603 | 2012-12-31 16:39:21 -0800 | [diff] [blame] | 235 | /*-------------------------------------------------------------------------- |
| 236 | \brief peGetCurrentSTAsCount() - Returns total stations associated on |
| 237 | all session. |
| 238 | |
| 239 | \param pMac - pointer to global adapter context |
| 240 | \return - Number of station active on all sessions. |
| 241 | |
| 242 | \sa |
| 243 | --------------------------------------------------------------------------*/ |
| 244 | tANI_U8 |
| 245 | peGetCurrentSTAsCount(tpAniSirGlobal pMac); |
Srinivas Girigowda | de69741 | 2013-02-14 16:31:48 -0800 | [diff] [blame^] | 246 | |
| 247 | #ifdef FEATURE_WLAN_LFR |
| 248 | /*-------------------------------------------------------------------------- |
| 249 | \brief limIsFastRoamEnabled() - To check Fast roaming is enabled or not |
| 250 | |
| 251 | \param pMac - pointer to global adapter context |
| 252 | \param sessionId - session id |
| 253 | \return - TRUE or FALSE |
| 254 | |
| 255 | \sa |
| 256 | --------------------------------------------------------------------------*/ |
| 257 | tANI_U8 |
| 258 | limIsFastRoamEnabled(tpAniSirGlobal pMac, tANI_U8 sessionId); |
| 259 | #endif |
| 260 | |
| 261 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 262 | #endif //#if !defined( __LIM_SESSION_UTILS_H ) |
| 263 | |