blob: 72106ff40b010908ee5c5cdb9ed6a19fa135aa93 [file] [log] [blame]
Jeff Johnson295189b2012-06-20 16:38:30 -07001/*
Jeff Johnson32d95a32012-09-10 13:15:23 -07002 * Copyright (c) 2012, The Linux Foundation. All rights reserved.
Jeff Johnson295189b2012-06-20 16:38:30 -07003 *
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 Johnsone7245742012-09-05 17:12:55 -070061/*--------------------------------------------------------------------------
62
Madan Mohan Koyyalamudi1bed5982012-10-22 14:38:06 -070063 \brief peGetVhtCapable() - Returns the Vht capable from a valid session.
Jeff Johnsone7245742012-09-05 17:12:55 -070064
Madan Mohan Koyyalamudi1bed5982012-10-22 14:38:06 -070065 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 Johnsone7245742012-09-05 17:12:55 -070067
Madan Mohan Koyyalamudi1bed5982012-10-22 14:38:06 -070068 \param pMac - pointer to global adapter context
69 \return - channel to scan from valid session else zero.
70
71 \sa
72
Jeff Johnsone7245742012-09-05 17:12:55 -070073 --------------------------------------------------------------------------*/
Madan Mohan Koyyalamudi1bed5982012-10-22 14:38:06 -070074tANI_U8 peGetVhtCapable(tpAniSirGlobal pMac);
Jeff Johnson295189b2012-06-20 16:38:30 -070075
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 Koyyalamudi1bed5982012-10-22 14:38:06 -070082
83 \param pMac - pointer to global adapter context
84 \return - return TRUE if start BSS session is present else return FALSE.
85
Jeff Johnson295189b2012-06-20 16:38:30 -070086 \sa
87 --------------------------------------------------------------------------*/
88tANI_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
108tpPESession 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
124tANI_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 --------------------------------------------------------------------------*/
143tANI_U8
144isLimSessionOffChannel(tpAniSirGlobal pMac, tANI_U8 sessionId);
145/* --------------------------------------------------------------------------*/
146
Jeff Johnsone7245742012-09-05 17:12:55 -0700147/*--------------------------------------------------------------------------
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--------------------------------------------------------------------------*/
154void
155peGetActiveSessionChannel(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 Johnson295189b2012-06-20 16:38:30 -0700168tANI_U8
Jeff Johnsone7245742012-09-05 17:12:55 -0700169limIsChanSwitchRunning (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 --------------------------------------------------------------------------*/
182tANI_U8
183limIsInQuietDuration (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 --------------------------------------------------------------------------*/
196tANI_U8
197limIsQuietBegin (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 --------------------------------------------------------------------------*/
208tANI_U8
209limIsInMCC (tpAniSirGlobal pMac);
Jeff Johnson295189b2012-06-20 16:38:30 -0700210#endif //#if !defined( __LIM_SESSION_UTILS_H )
211