1/** \file SoftGeminiApi.h
2 *  \brief BlueTooth-Wlan coexistence module interface header file
3 *
4 *  \see SoftGemini.c & SoftGemini.h
5 */
6/****************************************************************************
7**+-----------------------------------------------------------------------+**
8**|                                                                       |**
9**| Copyright(c) 1998 - 2008 Texas Instruments. All rights reserved.      |**
10**| All rights reserved.                                                  |**
11**|                                                                       |**
12**| Redistribution and use in source and binary forms, with or without    |**
13**| modification, are permitted provided that the following conditions    |**
14**| are met:                                                              |**
15**|                                                                       |**
16**|  * Redistributions of source code must retain the above copyright     |**
17**|    notice, this list of conditions and the following disclaimer.      |**
18**|  * Redistributions in binary form must reproduce the above copyright  |**
19**|    notice, this list of conditions and the following disclaimer in    |**
20**|    the documentation and/or other materials provided with the         |**
21**|    distribution.                                                      |**
22**|  * Neither the name Texas Instruments nor the names of its            |**
23**|    contributors may be used to endorse or promote products derived    |**
24**|    from this software without specific prior written permission.      |**
25**|                                                                       |**
26**| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   |**
27**| "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     |**
28**| LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |**
29**| A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  |**
30**| OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |**
31**| SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      |**
32**| LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |**
33**| DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |**
34**| THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   |**
35**| (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |**
36**| OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  |**
37**|                                                                       |**
38**+-----------------------------------------------------------------------+**
39****************************************************************************/
40
41/***************************************************************************/
42/*																			*/
43/*	  MODULE:	SoftGeminiApi.h												*/
44/*    PURPOSE:	BlueTooth-Wlan coexistence module interface header file		*/
45/*																			*/
46/***************************************************************************/
47#ifndef __SOFT_GEMINI_API_H__
48#define __SOFT_GEMINI_API_H__
49
50#include "paramOut.h"
51
52
53/************************************************************************
54 *                        SoftGemini_create									*
55 ************************************************************************
56DESCRIPTION: SoftGemini module creation function, called by the config mgr in creation phase
57				performs the following:
58				-	Allocate the SoftGemini handle
59
60INPUT:      hOs -			Handle to OS
61
62
63OUTPUT:
64
65RETURN:     Handle to the SoftGemini module on success, NULL otherwise
66
67************************************************************************/
68TI_HANDLE SoftGemini_create(TI_HANDLE hOs);
69
70
71/************************************************************************
72 *                        SoftGemini_config						*
73 ************************************************************************
74DESCRIPTION: SoftGemini module configuration function, called by the config mgr in configuration phase
75				performs the following:
76				-	Reset & initializes local variables
77				-	Init the handles to be used by the module
78
79INPUT:      hSoftGemini	-	SoftGemini handle
80			List of handles to be used by the module
81			pSoftGeminiInitParams	-	Init table of the module.
82
83
84OUTPUT:
85
86RETURN:     OK on success, NOK otherwise
87
88************************************************************************/
89TI_STATUS SoftGemini_config(TI_HANDLE 	hSoftGemini,
90								TI_HANDLE		hCtrlData,
91					  			TI_HANDLE		hHalCtrl,
92								TI_HANDLE		hReport,
93								TI_HANDLE		hSCR,
94								TI_HANDLE		hPowerMgr,
95								TI_HANDLE		hConfigMgr,
96								TI_HANDLE		hScanCncn,
97								TI_HANDLE		hCurrBss,
98								TI_HANDLE		hEvHandler,
99								SoftGeminiInitParams_t *pSoftGeminiInitParams);
100
101
102/************************************************************************
103 *                        SoftGemini_destroy							*
104 ************************************************************************
105DESCRIPTION: SoftGemini module destroy function, called by the config mgr in the destroy phase
106				performs the following:
107				-	Free all memory aloocated by the module
108
109INPUT:      hSoftGemini	-	SoftGemini handle.
110
111
112OUTPUT:
113
114RETURN:     OK on success, NOK otherwise
115
116************************************************************************/
117TI_STATUS SoftGemini_destroy(TI_HANDLE hSoftGemini);
118
119
120/***********************************************************************
121 *                        SoftGemini_setParam
122 ***********************************************************************
123DESCRIPTION: SoftGemini set param function, called by the following:
124			-	config mgr in order to set a parameter receiving from the OS abstraction layer.
125			-	From inside the driver
126
127INPUT:      hSoftGemini	-	SoftGemini handle.
128			pParam	-	Pointer to the parameter
129
130OUTPUT:
131
132RETURN:     OK on success, NOK otherwise
133
134************************************************************************/
135TI_STATUS SoftGemini_setParam(TI_HANDLE		hSoftGemini,
136											paramInfo_t	*pParam);
137
138/***********************************************************************
139 *                        SoftGemini_getParam
140 ***********************************************************************
141DESCRIPTION: SoftGemini get param function, called by the following:
142			-	config mgr in order to get a parameter from the OS abstraction layer.
143			-	From inside the dirver
144
145INPUT:      hSoftGemini	-	SoftGemini handle.
146
147
148OUTPUT:		pParam	-	Pointer to the parameter
149
150RETURN:     OK on success, NOK otherwise
151
152************************************************************************/
153TI_STATUS SoftGemini_getParam(TI_HANDLE		hSoftGemini,
154											paramInfo_t	*pParam);
155
156/***********************************************************************
157 *                        SoftGemini_printParams
158 ***********************************************************************
159DESCRIPTION: prints soft gemini params
160
161INPUT:      hSoftGemini	-	SoftGemini handle.
162
163
164OUTPUT:
165
166RETURN:
167************************************************************************/
168
169void SoftGemini_printParams(TI_HANDLE hSoftGemini);
170
171/***********************************************************************
172 *                        SoftGeminiReconnect
173 ***********************************************************************
174DESCRIPTION: causes driver to disconnect and reconnect to current AP
175
176INPUT:      hSoftGemini	-	SoftGemini handle.
177
178
179OUTPUT:
180
181RETURN:
182************************************************************************/
183
184
185
186/***************************************************************************
187*					SoftGemini_SenseIndicationCB  		    	       *
188****************************************************************************
189* DESCRIPTION:	This is the the function which is called for sense mode indicaton from FW
190*				(i.e. we are in SENSE mode and FW detects BT activity
191*				SenseModeEnable_Bit - Indicates that FW detected BT activity
192*				SenseModeDisable_Bit - Indicates that FW doesn't detect BT activity for a period of time
193*
194* INPUTS:		pSoftGemini - the object
195* NOTE			This function is located in the API for debug purposes
196***************************************************************************/
197void SoftGemini_SenseIndicationCB( TI_HANDLE hSoftGemini, char* str, UINT32 strLen );
198
199
200/***************************************************************************
201*					SoftGemini_ProtectiveIndicationCB  		    	       *
202****************************************************************************
203* DESCRIPTION:	This is the the function which is called when FW starts Protective mode (i.e BT voice)
204*
205*				ProtectiveModeOn_Bit - FW is activated on protective mode (BT voice is running)
206*				ProtectiveModeOff_Bit - FW is not activated on protective mode
207*
208* INPUTS:		pSoftGemini - the object
209* NOTE			This function is located in the API for debug purposes
210***************************************************************************/
211
212void SoftGemini_ProtectiveIndicationCB( TI_HANDLE hSoftGemini, char* str, UINT32 strLen );
213
214
215/***************************************************************************
216*					SoftGemini_AvalancheIndicationCB  		    	       *
217****************************************************************************
218* DESCRIPTION:	This is the the function which is called when
219*				FW detect that our current connection quality is reducing
220*				(AP decrease his rates with his rate adaptation mechanism because
221*				of BT activity) the solution is reconnect to the same AP
222*
223* INPUTS:		pSoftGemini - the object
224* NOTE			This function is located in the API for debug purposes
225***************************************************************************/
226
227void SoftGemini_AvalancheIndicationCB( TI_HANDLE hSoftGemini, char* str, UINT32 strLen );
228
229
230/***************************************************************************
231*					SoftGemini_getSGMode  		    	       *
232****************************************************************************
233* DESCRIPTION:	This is the the function which is called when
234*				Recovery was issued -to read the last soft gemini mode
235*
236* INPUTS:		pSoftGemini - the object
237*
238***************************************************************************/
239SoftGeminiEnableModes_e SoftGemini_getSGMode(TI_HANDLE hSoftGemini);
240
241TI_STATUS SoftGemini_handleRecovery(TI_HANDLE hSoftGemini);
242
243void SoftGemini_startPsPollFailure(TI_HANDLE hSoftGemini);
244
245void SoftGemini_endPsPollFailure(TI_HANDLE hSoftGemini);
246
247void SoftGemini_SetPSmode(TI_HANDLE hSoftGemini);
248
249void SoftGemini_unSetPSmode(TI_HANDLE hSoftGemini);
250
251
252#endif /* __SOFT_GEMINI_API_H__ */
253