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