blob: 7e169f6607d6bac129a3e3420f63fc0110d0a7aa [file] [log] [blame]
Jeff Johnson295189b2012-06-20 16:38:30 -07001/*
Kiet Lam842dad02014-02-18 18:44:02 -08002 * 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 Nakkala92f07d82013-01-08 21:16:34 -080020 */
Kiet Lam842dad02014-02-18 18:44:02 -080021
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 Johnson295189b2012-06-20 16:38:30 -070028#if!defined( __LIM_SESSION_UTILS_H )
29#define __LIM_SESSION_UTILS_H
30
Kiet Lamaa8e15a2014-02-11 23:30:06 -080031
Jeff Johnson295189b2012-06-20 16:38:30 -070032
33/**=========================================================================
34
35 \file limSessionUtils.h
36
37 \brief prototype for lim Session Utility related APIs
38
39 \author Sunit Bhatia
40
Jeff Johnson295189b2012-06-20 16:38:30 -070041
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 Johnsone7245742012-09-05 17:12:55 -070064/*--------------------------------------------------------------------------
65
Madan Mohan Koyyalamudi1bed5982012-10-22 14:38:06 -070066 \brief peGetVhtCapable() - Returns the Vht capable from a valid session.
Jeff Johnsone7245742012-09-05 17:12:55 -070067
Madan Mohan Koyyalamudi1bed5982012-10-22 14:38:06 -070068 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 Johnsone7245742012-09-05 17:12:55 -070070
Madan Mohan Koyyalamudi1bed5982012-10-22 14:38:06 -070071 \param pMac - pointer to global adapter context
72 \return - channel to scan from valid session else zero.
73
74 \sa
75
Jeff Johnsone7245742012-09-05 17:12:55 -070076 --------------------------------------------------------------------------*/
Madan Mohan Koyyalamudi1bed5982012-10-22 14:38:06 -070077tANI_U8 peGetVhtCapable(tpAniSirGlobal pMac);
Jeff Johnson295189b2012-06-20 16:38:30 -070078
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 Koyyalamudi1bed5982012-10-22 14:38:06 -070085
86 \param pMac - pointer to global adapter context
87 \return - return TRUE if start BSS session is present else return FALSE.
88
Jeff Johnson295189b2012-06-20 16:38:30 -070089 \sa
90 --------------------------------------------------------------------------*/
91tANI_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
111tpPESession 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
127tANI_U8 peIsAnySessionActive(tpAniSirGlobal pMac);
Abhishek Singh9c1262f2014-02-26 14:48:36 +0530128
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
142void pePrintActiveSession(tpAniSirGlobal pMac);
143
Jeff Johnson295189b2012-06-20 16:38:30 -0700144/* --------------------------------------------------------------------------*/
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 --------------------------------------------------------------------------*/
162tANI_U8
163isLimSessionOffChannel(tpAniSirGlobal pMac, tANI_U8 sessionId);
164/* --------------------------------------------------------------------------*/
165
Jeff Johnsone7245742012-09-05 17:12:55 -0700166/*--------------------------------------------------------------------------
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--------------------------------------------------------------------------*/
173void
174peGetActiveSessionChannel(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 Johnson295189b2012-06-20 16:38:30 -0700187tANI_U8
Jeff Johnsone7245742012-09-05 17:12:55 -0700188limIsChanSwitchRunning (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 --------------------------------------------------------------------------*/
201tANI_U8
202limIsInQuietDuration (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 --------------------------------------------------------------------------*/
215tANI_U8
216limIsQuietBegin (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 --------------------------------------------------------------------------*/
227tANI_U8
228limIsInMCC (tpAniSirGlobal pMac);
Gopichand Nakkala777e6032012-12-31 16:39:21 -0800229/*--------------------------------------------------------------------------
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 --------------------------------------------------------------------------*/
238tANI_U8
239peGetCurrentSTAsCount(tpAniSirGlobal pMac);
Srinivas Girigowdade697412013-02-14 16:31:48 -0800240
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 --------------------------------------------------------------------------*/
251tANI_U8
252limIsFastRoamEnabled(tpAniSirGlobal pMac, tANI_U8 sessionId);
253#endif
254
255
Jeff Johnson295189b2012-06-20 16:38:30 -0700256#endif //#if !defined( __LIM_SESSION_UTILS_H )
257