blob: 9e211dd73598b38c35bab6bf2c73edb607499845 [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
41 Copyright 2008 (c) Qualcomm, Incorporated. All Rights Reserved.
42
43 Qualcomm Confidential and Proprietary.
44
45 ========================================================================*/
46
47
48/*--------------------------------------------------------------------------
49 Include Files
50 ------------------------------------------------------------------------*/
51
52
53
54/*--------------------------------------------------------------------------
55 Preprocessor definitions and constants
56 ------------------------------------------------------------------------*/
57
58
59/*--------------------------------------------------------------------------
60 Type declarations
61 ------------------------------------------------------------------------*/
62
63
64/*-------------------------------------------------------------------------
65 Function declarations and documenation
66 ------------------------------------------------------------------------*/
Jeff Johnsone7245742012-09-05 17:12:55 -070067/*--------------------------------------------------------------------------
68
Madan Mohan Koyyalamudi1bed5982012-10-22 14:38:06 -070069 \brief peGetVhtCapable() - Returns the Vht capable from a valid session.
Jeff Johnsone7245742012-09-05 17:12:55 -070070
Madan Mohan Koyyalamudi1bed5982012-10-22 14:38:06 -070071 This function iterates the session Table and returns the VHT capable from first valid session
72 if no sessions are valid/present it returns FALSE
Jeff Johnsone7245742012-09-05 17:12:55 -070073
Madan Mohan Koyyalamudi1bed5982012-10-22 14:38:06 -070074 \param pMac - pointer to global adapter context
75 \return - channel to scan from valid session else zero.
76
77 \sa
78
Jeff Johnsone7245742012-09-05 17:12:55 -070079 --------------------------------------------------------------------------*/
Madan Mohan Koyyalamudi1bed5982012-10-22 14:38:06 -070080tANI_U8 peGetVhtCapable(tpAniSirGlobal pMac);
Jeff Johnson295189b2012-06-20 16:38:30 -070081
82
83/*--------------------------------------------------------------------------
84 \brief peValidateJoinReq() - validates the Join request .
85
86 This function is called to validate the Join Request for a BT-AMP station. If start BSS session is present
87 this function returns TRUE else returns FALSE.
Madan Mohan Koyyalamudi1bed5982012-10-22 14:38:06 -070088
89 \param pMac - pointer to global adapter context
90 \return - return TRUE if start BSS session is present else return FALSE.
91
Jeff Johnson295189b2012-06-20 16:38:30 -070092 \sa
93 --------------------------------------------------------------------------*/
94tANI_U8 peValidateBtJoinRequest(tpAniSirGlobal pMac);
95
96/* --------------------------------------------------------------------------*/
97
98
99/*--------------------------------------------------------------------------
100 \brief peGetValidPowerSaveSession() - Fetches the valid session for powersave .
101
102 This function is called to check the valid session for power save, if more than one session is active , this function
103 it returns NULL.
104 if there is only one valid "infrastructure" session present in "linkestablished" state this function returns sessionentry.
105 For all other cases it returns NULL.
106
107 \param pMac - pointer to global adapter context
108 \return - return session is address if valid session is present else return NULL.
109
110 \sa
111 --------------------------------------------------------------------------*/
112
113
114tpPESession peGetValidPowerSaveSession(tpAniSirGlobal pMac);
115
116/* --------------------------------------------------------------------------*/
117
118
119/*--------------------------------------------------------------------------
120 \brief peIsAnySessionActive() - checks for the active session presence .
121
122 This function returns TRUE if atleast one valid session is present else it returns FALSE
123
124 \param pMac - pointer to global adapter context
125 \return - return TRUE if atleast one session is active else return FALSE.
126
127 \sa
128 --------------------------------------------------------------------------*/
129
130tANI_U8 peIsAnySessionActive(tpAniSirGlobal pMac);
Abhishek Singh9c1262f2014-02-26 14:48:36 +0530131
132/* --------------------------------------------------------------------------*/
133
134
135/*--------------------------------------------------------------------------
136 \brief pePrintActiveSession() - print all the active pesession present .
137
138 This function print all the active pesession present
139
140 \param pMac - pointer to global adapter context
141
142 \sa
143 --------------------------------------------------------------------------*/
144
145void pePrintActiveSession(tpAniSirGlobal pMac);
146
Jeff Johnson295189b2012-06-20 16:38:30 -0700147/* --------------------------------------------------------------------------*/
148
149
150
151/*--------------------------------------------------------------------------
152 \brief isLimSessionOffChannel() - Determines if the session is
153 off channel.
154
155 This function returns TRUE if the session Id passed needs to be on a different
156 channel than atleast one session already active.
157
158 \param pMac - pointer to global adapter context
159 \param sessionId - session ID of the session to be verified.
160
161 \return tANI_U8 - Boolean value for off-channel operation.
162
163 \sa
164 --------------------------------------------------------------------------*/
165tANI_U8
166isLimSessionOffChannel(tpAniSirGlobal pMac, tANI_U8 sessionId);
167/* --------------------------------------------------------------------------*/
168
Jeff Johnsone7245742012-09-05 17:12:55 -0700169/*--------------------------------------------------------------------------
170 \brief peGetActiveSessionChannel() - Gets the first valid sessions primary and secondary
171 channel. If not found returns invalid channel ID (=0)
172 \param pMac - pointer to global adapter context
173 \param resumeChannel - Primary channel of the first valid session. This is an output argument.
174 \return resumePhyCbState - Secondary channel of the first valid session. This is an output argument.
175--------------------------------------------------------------------------*/
176void
177peGetActiveSessionChannel(tpAniSirGlobal pMac, tANI_U8* resumeChannel, ePhyChanBondState* resumePhyCbState);
178
179/*--------------------------------------------------------------------------
180 \brief limIsChanSwitchRunning() - Check if channel switch is running on any
181 valid session.
182
183 \param pMac - pointer to global adapter context
184
185 \return tANI_U8 - 1 - if chann switching running.
186 0 - if chann switching is not running.
187
188 \sa
189 --------------------------------------------------------------------------*/
Jeff Johnson295189b2012-06-20 16:38:30 -0700190tANI_U8
Jeff Johnsone7245742012-09-05 17:12:55 -0700191limIsChanSwitchRunning (tpAniSirGlobal pMac);
192
193/*--------------------------------------------------------------------------
194 \brief limIsInQuietDuration() - Check if channel quieting is running on any
195 valid session.
196
197 \param pMac - pointer to global adapter context
198
199 \return tANI_U8 - 1 - if chann quiet running.
200 0 - if chann quiet is not running.
201
202 \sa
203 --------------------------------------------------------------------------*/
204tANI_U8
205limIsInQuietDuration (tpAniSirGlobal pMac);
206
207/*--------------------------------------------------------------------------
208 \brief limIsQuietBegin() - Check if channel quieting is begining on any
209 valid session.
210
211 \param pMac - pointer to global adapter context
212
213 \return tANI_U8 - 1 - if chann quiet running.
214 0 - if chann quiet is not running.
215
216 \sa
217 --------------------------------------------------------------------------*/
218tANI_U8
219limIsQuietBegin (tpAniSirGlobal pMac);
220/*--------------------------------------------------------------------------
221 \brief limIsInMCC() - Check if Device is in MCC.
222
223 \param pMac - pointer to global adapter context
224
225 \return tANI_U8 - TRUE - if in MCC.
226 FALSE - NOT in MCC.
227
228 \sa
229 --------------------------------------------------------------------------*/
230tANI_U8
231limIsInMCC (tpAniSirGlobal pMac);
Gopichand Nakkala777e6032012-12-31 16:39:21 -0800232/*--------------------------------------------------------------------------
233 \brief peGetCurrentSTAsCount() - Returns total stations associated on
234 all session.
235
236 \param pMac - pointer to global adapter context
237 \return - Number of station active on all sessions.
238
239 \sa
240 --------------------------------------------------------------------------*/
241tANI_U8
242peGetCurrentSTAsCount(tpAniSirGlobal pMac);
Srinivas Girigowdade697412013-02-14 16:31:48 -0800243
244#ifdef FEATURE_WLAN_LFR
245/*--------------------------------------------------------------------------
246 \brief limIsFastRoamEnabled() - To check Fast roaming is enabled or not
247
248 \param pMac - pointer to global adapter context
249 \param sessionId - session id
250 \return - TRUE or FALSE
251
252 \sa
253 --------------------------------------------------------------------------*/
254tANI_U8
255limIsFastRoamEnabled(tpAniSirGlobal pMac, tANI_U8 sessionId);
256#endif
257
258
Jeff Johnson295189b2012-06-20 16:38:30 -0700259#endif //#if !defined( __LIM_SESSION_UTILS_H )
260