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