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 | |
| 46 | |
| 47 | /**========================================================================= |
| 48 | |
| 49 | \file limSessionUtils.h |
| 50 | |
| 51 | \brief prototype for lim Session Utility related APIs |
| 52 | |
| 53 | \author Sunit Bhatia |
| 54 | |
| 55 | Copyright 2008 (c) Qualcomm, Incorporated. All Rights Reserved. |
| 56 | |
| 57 | Qualcomm Confidential and Proprietary. |
| 58 | |
| 59 | ========================================================================*/ |
| 60 | |
| 61 | |
| 62 | /*-------------------------------------------------------------------------- |
| 63 | Include Files |
| 64 | ------------------------------------------------------------------------*/ |
| 65 | |
| 66 | |
| 67 | |
| 68 | /*-------------------------------------------------------------------------- |
| 69 | Preprocessor definitions and constants |
| 70 | ------------------------------------------------------------------------*/ |
| 71 | |
| 72 | |
| 73 | /*-------------------------------------------------------------------------- |
| 74 | Type declarations |
| 75 | ------------------------------------------------------------------------*/ |
| 76 | |
| 77 | |
| 78 | /*------------------------------------------------------------------------- |
| 79 | Function declarations and documenation |
| 80 | ------------------------------------------------------------------------*/ |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 81 | /*-------------------------------------------------------------------------- |
| 82 | |
Madan Mohan Koyyalamudi | 1bed598 | 2012-10-22 14:38:06 -0700 | [diff] [blame] | 83 | \brief peGetVhtCapable() - Returns the Vht capable from a valid session. |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 84 | |
Madan Mohan Koyyalamudi | 1bed598 | 2012-10-22 14:38:06 -0700 | [diff] [blame] | 85 | This function iterates the session Table and returns the VHT capable from first valid session |
| 86 | if no sessions are valid/present it returns FALSE |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 87 | |
Madan Mohan Koyyalamudi | 1bed598 | 2012-10-22 14:38:06 -0700 | [diff] [blame] | 88 | \param pMac - pointer to global adapter context |
| 89 | \return - channel to scan from valid session else zero. |
| 90 | |
| 91 | \sa |
| 92 | |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 93 | --------------------------------------------------------------------------*/ |
Madan Mohan Koyyalamudi | 1bed598 | 2012-10-22 14:38:06 -0700 | [diff] [blame] | 94 | tANI_U8 peGetVhtCapable(tpAniSirGlobal pMac); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 95 | |
| 96 | |
| 97 | /*-------------------------------------------------------------------------- |
| 98 | \brief peValidateJoinReq() - validates the Join request . |
| 99 | |
| 100 | This function is called to validate the Join Request for a BT-AMP station. If start BSS session is present |
| 101 | this function returns TRUE else returns FALSE. |
Madan Mohan Koyyalamudi | 1bed598 | 2012-10-22 14:38:06 -0700 | [diff] [blame] | 102 | |
| 103 | \param pMac - pointer to global adapter context |
| 104 | \return - return TRUE if start BSS session is present else return FALSE. |
| 105 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 106 | \sa |
| 107 | --------------------------------------------------------------------------*/ |
| 108 | tANI_U8 peValidateBtJoinRequest(tpAniSirGlobal pMac); |
| 109 | |
| 110 | /* --------------------------------------------------------------------------*/ |
| 111 | |
| 112 | |
| 113 | /*-------------------------------------------------------------------------- |
| 114 | \brief peGetValidPowerSaveSession() - Fetches the valid session for powersave . |
| 115 | |
| 116 | This function is called to check the valid session for power save, if more than one session is active , this function |
| 117 | it returns NULL. |
| 118 | if there is only one valid "infrastructure" session present in "linkestablished" state this function returns sessionentry. |
| 119 | For all other cases it returns NULL. |
| 120 | |
| 121 | \param pMac - pointer to global adapter context |
| 122 | \return - return session is address if valid session is present else return NULL. |
| 123 | |
| 124 | \sa |
| 125 | --------------------------------------------------------------------------*/ |
| 126 | |
| 127 | |
| 128 | tpPESession peGetValidPowerSaveSession(tpAniSirGlobal pMac); |
| 129 | |
| 130 | /* --------------------------------------------------------------------------*/ |
| 131 | |
| 132 | |
| 133 | /*-------------------------------------------------------------------------- |
| 134 | \brief peIsAnySessionActive() - checks for the active session presence . |
| 135 | |
| 136 | This function returns TRUE if atleast one valid session is present else it returns FALSE |
| 137 | |
| 138 | \param pMac - pointer to global adapter context |
| 139 | \return - return TRUE if atleast one session is active else return FALSE. |
| 140 | |
| 141 | \sa |
| 142 | --------------------------------------------------------------------------*/ |
| 143 | |
| 144 | tANI_U8 peIsAnySessionActive(tpAniSirGlobal pMac); |
| 145 | /* --------------------------------------------------------------------------*/ |
| 146 | |
| 147 | |
| 148 | |
| 149 | /*-------------------------------------------------------------------------- |
| 150 | \brief isLimSessionOffChannel() - Determines if the session is |
| 151 | off channel. |
| 152 | |
| 153 | This function returns TRUE if the session Id passed needs to be on a different |
| 154 | channel than atleast one session already active. |
| 155 | |
| 156 | \param pMac - pointer to global adapter context |
| 157 | \param sessionId - session ID of the session to be verified. |
| 158 | |
| 159 | \return tANI_U8 - Boolean value for off-channel operation. |
| 160 | |
| 161 | \sa |
| 162 | --------------------------------------------------------------------------*/ |
| 163 | tANI_U8 |
| 164 | isLimSessionOffChannel(tpAniSirGlobal pMac, tANI_U8 sessionId); |
| 165 | /* --------------------------------------------------------------------------*/ |
| 166 | |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 167 | /*-------------------------------------------------------------------------- |
| 168 | \brief peGetActiveSessionChannel() - Gets the first valid sessions primary and secondary |
| 169 | channel. If not found returns invalid channel ID (=0) |
| 170 | \param pMac - pointer to global adapter context |
| 171 | \param resumeChannel - Primary channel of the first valid session. This is an output argument. |
| 172 | \return resumePhyCbState - Secondary channel of the first valid session. This is an output argument. |
| 173 | --------------------------------------------------------------------------*/ |
| 174 | void |
| 175 | peGetActiveSessionChannel(tpAniSirGlobal pMac, tANI_U8* resumeChannel, ePhyChanBondState* resumePhyCbState); |
| 176 | |
| 177 | /*-------------------------------------------------------------------------- |
| 178 | \brief limIsChanSwitchRunning() - Check if channel switch is running on any |
| 179 | valid session. |
| 180 | |
| 181 | \param pMac - pointer to global adapter context |
| 182 | |
| 183 | \return tANI_U8 - 1 - if chann switching running. |
| 184 | 0 - if chann switching is not running. |
| 185 | |
| 186 | \sa |
| 187 | --------------------------------------------------------------------------*/ |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 188 | tANI_U8 |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 189 | limIsChanSwitchRunning (tpAniSirGlobal pMac); |
| 190 | |
| 191 | /*-------------------------------------------------------------------------- |
| 192 | \brief limIsInQuietDuration() - Check if channel quieting is running on any |
| 193 | valid session. |
| 194 | |
| 195 | \param pMac - pointer to global adapter context |
| 196 | |
| 197 | \return tANI_U8 - 1 - if chann quiet running. |
| 198 | 0 - if chann quiet is not running. |
| 199 | |
| 200 | \sa |
| 201 | --------------------------------------------------------------------------*/ |
| 202 | tANI_U8 |
| 203 | limIsInQuietDuration (tpAniSirGlobal pMac); |
| 204 | |
| 205 | /*-------------------------------------------------------------------------- |
| 206 | \brief limIsQuietBegin() - Check if channel quieting is begining on any |
| 207 | valid session. |
| 208 | |
| 209 | \param pMac - pointer to global adapter context |
| 210 | |
| 211 | \return tANI_U8 - 1 - if chann quiet running. |
| 212 | 0 - if chann quiet is not running. |
| 213 | |
| 214 | \sa |
| 215 | --------------------------------------------------------------------------*/ |
| 216 | tANI_U8 |
| 217 | limIsQuietBegin (tpAniSirGlobal pMac); |
| 218 | /*-------------------------------------------------------------------------- |
| 219 | \brief limIsInMCC() - Check if Device is in MCC. |
| 220 | |
| 221 | \param pMac - pointer to global adapter context |
| 222 | |
| 223 | \return tANI_U8 - TRUE - if in MCC. |
| 224 | FALSE - NOT in MCC. |
| 225 | |
| 226 | \sa |
| 227 | --------------------------------------------------------------------------*/ |
| 228 | tANI_U8 |
| 229 | limIsInMCC (tpAniSirGlobal pMac); |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 230 | #endif //#if !defined( __LIM_SESSION_UTILS_H ) |
| 231 | |