blob: e4cd01c7be423b17472de64bc83b77ce6cedae41 [file] [log] [blame]
Jeff Johnson295189b2012-06-20 16:38:30 -07001/*
Gopichand Nakkala92f07d82013-01-08 21:16:34 -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.
20 */
21/*
Jeff Johnson32d95a32012-09-10 13:15:23 -070022 * Copyright (c) 2012, The Linux Foundation. All rights reserved.
Jeff Johnson295189b2012-06-20 16:38:30 -070023 *
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
Srinivas Girigowdade697412013-02-14 16:31:48 -080046/*
47* Copyright (c) 2012-2013 Qualcomm Atheros, Inc.
48* All Rights Reserved.
49* Qualcomm Atheros Confidential and Proprietary.
50*/
Jeff Johnson295189b2012-06-20 16:38:30 -070051
52/**=========================================================================
53
54 \file limSessionUtils.h
55
56 \brief prototype for lim Session Utility related APIs
57
58 \author Sunit Bhatia
59
60 Copyright 2008 (c) Qualcomm, Incorporated. All Rights Reserved.
61
62 Qualcomm Confidential and Proprietary.
63
64 ========================================================================*/
65
66
67/*--------------------------------------------------------------------------
68 Include Files
69 ------------------------------------------------------------------------*/
70
71
72
73/*--------------------------------------------------------------------------
74 Preprocessor definitions and constants
75 ------------------------------------------------------------------------*/
76
77
78/*--------------------------------------------------------------------------
79 Type declarations
80 ------------------------------------------------------------------------*/
81
82
83/*-------------------------------------------------------------------------
84 Function declarations and documenation
85 ------------------------------------------------------------------------*/
Jeff Johnsone7245742012-09-05 17:12:55 -070086/*--------------------------------------------------------------------------
87
Madan Mohan Koyyalamudi1bed5982012-10-22 14:38:06 -070088 \brief peGetVhtCapable() - Returns the Vht capable from a valid session.
Jeff Johnsone7245742012-09-05 17:12:55 -070089
Madan Mohan Koyyalamudi1bed5982012-10-22 14:38:06 -070090 This function iterates the session Table and returns the VHT capable from first valid session
91 if no sessions are valid/present it returns FALSE
Jeff Johnsone7245742012-09-05 17:12:55 -070092
Madan Mohan Koyyalamudi1bed5982012-10-22 14:38:06 -070093 \param pMac - pointer to global adapter context
94 \return - channel to scan from valid session else zero.
95
96 \sa
97
Jeff Johnsone7245742012-09-05 17:12:55 -070098 --------------------------------------------------------------------------*/
Madan Mohan Koyyalamudi1bed5982012-10-22 14:38:06 -070099tANI_U8 peGetVhtCapable(tpAniSirGlobal pMac);
Jeff Johnson295189b2012-06-20 16:38:30 -0700100
101
102/*--------------------------------------------------------------------------
103 \brief peValidateJoinReq() - validates the Join request .
104
105 This function is called to validate the Join Request for a BT-AMP station. If start BSS session is present
106 this function returns TRUE else returns FALSE.
Madan Mohan Koyyalamudi1bed5982012-10-22 14:38:06 -0700107
108 \param pMac - pointer to global adapter context
109 \return - return TRUE if start BSS session is present else return FALSE.
110
Jeff Johnson295189b2012-06-20 16:38:30 -0700111 \sa
112 --------------------------------------------------------------------------*/
113tANI_U8 peValidateBtJoinRequest(tpAniSirGlobal pMac);
114
115/* --------------------------------------------------------------------------*/
116
117
118/*--------------------------------------------------------------------------
119 \brief peGetValidPowerSaveSession() - Fetches the valid session for powersave .
120
121 This function is called to check the valid session for power save, if more than one session is active , this function
122 it returns NULL.
123 if there is only one valid "infrastructure" session present in "linkestablished" state this function returns sessionentry.
124 For all other cases it returns NULL.
125
126 \param pMac - pointer to global adapter context
127 \return - return session is address if valid session is present else return NULL.
128
129 \sa
130 --------------------------------------------------------------------------*/
131
132
133tpPESession peGetValidPowerSaveSession(tpAniSirGlobal pMac);
134
135/* --------------------------------------------------------------------------*/
136
137
138/*--------------------------------------------------------------------------
139 \brief peIsAnySessionActive() - checks for the active session presence .
140
141 This function returns TRUE if atleast one valid session is present else it returns FALSE
142
143 \param pMac - pointer to global adapter context
144 \return - return TRUE if atleast one session is active else return FALSE.
145
146 \sa
147 --------------------------------------------------------------------------*/
148
149tANI_U8 peIsAnySessionActive(tpAniSirGlobal pMac);
150/* --------------------------------------------------------------------------*/
151
152
153
154/*--------------------------------------------------------------------------
155 \brief isLimSessionOffChannel() - Determines if the session is
156 off channel.
157
158 This function returns TRUE if the session Id passed needs to be on a different
159 channel than atleast one session already active.
160
161 \param pMac - pointer to global adapter context
162 \param sessionId - session ID of the session to be verified.
163
164 \return tANI_U8 - Boolean value for off-channel operation.
165
166 \sa
167 --------------------------------------------------------------------------*/
168tANI_U8
169isLimSessionOffChannel(tpAniSirGlobal pMac, tANI_U8 sessionId);
170/* --------------------------------------------------------------------------*/
171
Jeff Johnsone7245742012-09-05 17:12:55 -0700172/*--------------------------------------------------------------------------
173 \brief peGetActiveSessionChannel() - Gets the first valid sessions primary and secondary
174 channel. If not found returns invalid channel ID (=0)
175 \param pMac - pointer to global adapter context
176 \param resumeChannel - Primary channel of the first valid session. This is an output argument.
177 \return resumePhyCbState - Secondary channel of the first valid session. This is an output argument.
178--------------------------------------------------------------------------*/
179void
180peGetActiveSessionChannel(tpAniSirGlobal pMac, tANI_U8* resumeChannel, ePhyChanBondState* resumePhyCbState);
181
182/*--------------------------------------------------------------------------
183 \brief limIsChanSwitchRunning() - Check if channel switch is running on any
184 valid session.
185
186 \param pMac - pointer to global adapter context
187
188 \return tANI_U8 - 1 - if chann switching running.
189 0 - if chann switching is not running.
190
191 \sa
192 --------------------------------------------------------------------------*/
Jeff Johnson295189b2012-06-20 16:38:30 -0700193tANI_U8
Jeff Johnsone7245742012-09-05 17:12:55 -0700194limIsChanSwitchRunning (tpAniSirGlobal pMac);
195
196/*--------------------------------------------------------------------------
197 \brief limIsInQuietDuration() - Check if channel quieting is running on any
198 valid session.
199
200 \param pMac - pointer to global adapter context
201
202 \return tANI_U8 - 1 - if chann quiet running.
203 0 - if chann quiet is not running.
204
205 \sa
206 --------------------------------------------------------------------------*/
207tANI_U8
208limIsInQuietDuration (tpAniSirGlobal pMac);
209
210/*--------------------------------------------------------------------------
211 \brief limIsQuietBegin() - Check if channel quieting is begining on any
212 valid session.
213
214 \param pMac - pointer to global adapter context
215
216 \return tANI_U8 - 1 - if chann quiet running.
217 0 - if chann quiet is not running.
218
219 \sa
220 --------------------------------------------------------------------------*/
221tANI_U8
222limIsQuietBegin (tpAniSirGlobal pMac);
223/*--------------------------------------------------------------------------
224 \brief limIsInMCC() - Check if Device is in MCC.
225
226 \param pMac - pointer to global adapter context
227
228 \return tANI_U8 - TRUE - if in MCC.
229 FALSE - NOT in MCC.
230
231 \sa
232 --------------------------------------------------------------------------*/
233tANI_U8
234limIsInMCC (tpAniSirGlobal pMac);
Gopichand Nakkala777e6032012-12-31 16:39:21 -0800235/*--------------------------------------------------------------------------
236 \brief peGetCurrentSTAsCount() - Returns total stations associated on
237 all session.
238
239 \param pMac - pointer to global adapter context
240 \return - Number of station active on all sessions.
241
242 \sa
243 --------------------------------------------------------------------------*/
244tANI_U8
245peGetCurrentSTAsCount(tpAniSirGlobal pMac);
Srinivas Girigowdade697412013-02-14 16:31:48 -0800246
247#ifdef FEATURE_WLAN_LFR
248/*--------------------------------------------------------------------------
249 \brief limIsFastRoamEnabled() - To check Fast roaming is enabled or not
250
251 \param pMac - pointer to global adapter context
252 \param sessionId - session id
253 \return - TRUE or FALSE
254
255 \sa
256 --------------------------------------------------------------------------*/
257tANI_U8
258limIsFastRoamEnabled(tpAniSirGlobal pMac, tANI_U8 sessionId);
259#endif
260
261
Jeff Johnson295189b2012-06-20 16:38:30 -0700262#endif //#if !defined( __LIM_SESSION_UTILS_H )
263