blob: 4127827012b6edd5d4406284fc40f289630e5847 [file] [log] [blame]
Jeff Johnson295189b2012-06-20 16:38:30 -07001/*
2 * Copyright (c) 2012, Code Aurora Forum. 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
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 ------------------------------------------------------------------------*/
61
62
63/*--------------------------------------------------------------------------
64 \brief peValidateJoinReq() - validates the Join request .
65
66 This function is called to validate the Join Request for a BT-AMP station. If start BSS session is present
67 this function returns TRUE else returns FALSE.
68
69 \param pMac - pointer to global adapter context
70 \return - return TRUE if start BSS session is present else return FALSE.
71
72 \sa
73 --------------------------------------------------------------------------*/
74tANI_U8 peValidateBtJoinRequest(tpAniSirGlobal pMac);
75
76/* --------------------------------------------------------------------------*/
77
78
79/*--------------------------------------------------------------------------
80 \brief peGetValidPowerSaveSession() - Fetches the valid session for powersave .
81
82 This function is called to check the valid session for power save, if more than one session is active , this function
83 it returns NULL.
84 if there is only one valid "infrastructure" session present in "linkestablished" state this function returns sessionentry.
85 For all other cases it returns NULL.
86
87 \param pMac - pointer to global adapter context
88 \return - return session is address if valid session is present else return NULL.
89
90 \sa
91 --------------------------------------------------------------------------*/
92
93
94tpPESession peGetValidPowerSaveSession(tpAniSirGlobal pMac);
95
96/* --------------------------------------------------------------------------*/
97
98
99/*--------------------------------------------------------------------------
100 \brief peIsAnySessionActive() - checks for the active session presence .
101
102 This function returns TRUE if atleast one valid session is present else it returns FALSE
103
104 \param pMac - pointer to global adapter context
105 \return - return TRUE if atleast one session is active else return FALSE.
106
107 \sa
108 --------------------------------------------------------------------------*/
109
110tANI_U8 peIsAnySessionActive(tpAniSirGlobal pMac);
111/* --------------------------------------------------------------------------*/
112
113
114
115/*--------------------------------------------------------------------------
116 \brief isLimSessionOffChannel() - Determines if the session is
117 off channel.
118
119 This function returns TRUE if the session Id passed needs to be on a different
120 channel than atleast one session already active.
121
122 \param pMac - pointer to global adapter context
123 \param sessionId - session ID of the session to be verified.
124
125 \return tANI_U8 - Boolean value for off-channel operation.
126
127 \sa
128 --------------------------------------------------------------------------*/
129tANI_U8
130isLimSessionOffChannel(tpAniSirGlobal pMac, tANI_U8 sessionId);
131/* --------------------------------------------------------------------------*/
132
133tANI_U8
134peGetActiveSessionChannel( tpAniSirGlobal pMac );
135#endif //#if !defined( __LIM_SESSION_UTILS_H )
136