164064216a8433360745f69edddce19a606659163The Android Open Source Project/****************************************************************************
264064216a8433360745f69edddce19a606659163The Android Open Source Project**+-----------------------------------------------------------------------+**
364064216a8433360745f69edddce19a606659163The Android Open Source Project**|                                                                       |**
464064216a8433360745f69edddce19a606659163The Android Open Source Project**| Copyright(c) 1998 - 2008 Texas Instruments. All rights reserved.      |**
564064216a8433360745f69edddce19a606659163The Android Open Source Project**| All rights reserved.                                                  |**
664064216a8433360745f69edddce19a606659163The Android Open Source Project**|                                                                       |**
764064216a8433360745f69edddce19a606659163The Android Open Source Project**| Redistribution and use in source and binary forms, with or without    |**
864064216a8433360745f69edddce19a606659163The Android Open Source Project**| modification, are permitted provided that the following conditions    |**
964064216a8433360745f69edddce19a606659163The Android Open Source Project**| are met:                                                              |**
1064064216a8433360745f69edddce19a606659163The Android Open Source Project**|                                                                       |**
1164064216a8433360745f69edddce19a606659163The Android Open Source Project**|  * Redistributions of source code must retain the above copyright     |**
1264064216a8433360745f69edddce19a606659163The Android Open Source Project**|    notice, this list of conditions and the following disclaimer.      |**
1364064216a8433360745f69edddce19a606659163The Android Open Source Project**|  * Redistributions in binary form must reproduce the above copyright  |**
1464064216a8433360745f69edddce19a606659163The Android Open Source Project**|    notice, this list of conditions and the following disclaimer in    |**
1564064216a8433360745f69edddce19a606659163The Android Open Source Project**|    the documentation and/or other materials provided with the         |**
1664064216a8433360745f69edddce19a606659163The Android Open Source Project**|    distribution.                                                      |**
1764064216a8433360745f69edddce19a606659163The Android Open Source Project**|  * Neither the name Texas Instruments nor the names of its            |**
1864064216a8433360745f69edddce19a606659163The Android Open Source Project**|    contributors may be used to endorse or promote products derived    |**
1964064216a8433360745f69edddce19a606659163The Android Open Source Project**|    from this software without specific prior written permission.      |**
2064064216a8433360745f69edddce19a606659163The Android Open Source Project**|                                                                       |**
2164064216a8433360745f69edddce19a606659163The Android Open Source Project**| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   |**
2264064216a8433360745f69edddce19a606659163The Android Open Source Project**| "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     |**
2364064216a8433360745f69edddce19a606659163The Android Open Source Project**| LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |**
2464064216a8433360745f69edddce19a606659163The Android Open Source Project**| A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  |**
2564064216a8433360745f69edddce19a606659163The Android Open Source Project**| OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |**
2664064216a8433360745f69edddce19a606659163The Android Open Source Project**| SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      |**
2764064216a8433360745f69edddce19a606659163The Android Open Source Project**| LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |**
2864064216a8433360745f69edddce19a606659163The Android Open Source Project**| DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |**
2964064216a8433360745f69edddce19a606659163The Android Open Source Project**| THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   |**
3064064216a8433360745f69edddce19a606659163The Android Open Source Project**| (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |**
3164064216a8433360745f69edddce19a606659163The Android Open Source Project**| OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  |**
3264064216a8433360745f69edddce19a606659163The Android Open Source Project**|                                                                       |**
3364064216a8433360745f69edddce19a606659163The Android Open Source Project**+-----------------------------------------------------------------------+**
3464064216a8433360745f69edddce19a606659163The Android Open Source Project****************************************************************************/
3564064216a8433360745f69edddce19a606659163The Android Open Source Project
3664064216a8433360745f69edddce19a606659163The Android Open Source Project/**************************************************************************/
3764064216a8433360745f69edddce19a606659163The Android Open Source Project/*                                                                        */
3864064216a8433360745f69edddce19a606659163The Android Open Source Project/* MODULE:  srcApi.h							  */
3964064216a8433360745f69edddce19a606659163The Android Open Source Project/* PURPOSE: Header file of config Manager module			  */
4064064216a8433360745f69edddce19a606659163The Android Open Source Project/*                                                                        */
4164064216a8433360745f69edddce19a606659163The Android Open Source Project/**************************************************************************/
4264064216a8433360745f69edddce19a606659163The Android Open Source Project
4364064216a8433360745f69edddce19a606659163The Android Open Source Project#ifndef __SRC_API_H__
4464064216a8433360745f69edddce19a606659163The Android Open Source Project#define __SRC_API_H__
4564064216a8433360745f69edddce19a606659163The Android Open Source Project
4664064216a8433360745f69edddce19a606659163The Android Open Source Project#include "osTIType.h"
4764064216a8433360745f69edddce19a606659163The Android Open Source Project#include "paramOut.h"
4864064216a8433360745f69edddce19a606659163The Android Open Source Project#include "memMngrEx.h"
4964064216a8433360745f69edddce19a606659163The Android Open Source Project
5064064216a8433360745f69edddce19a606659163The Android Open Source Project#define DRIVER_SHUTDOWN_SME_STOPPED       0x1
5164064216a8433360745f69edddce19a606659163The Android Open Source Project#define DRIVER_SHUTDOWN_COMPLETE          (DRIVER_SHUTDOWN_SME_STOPPED)
5264064216a8433360745f69edddce19a606659163The Android Open Source Project
5364064216a8433360745f69edddce19a606659163The Android Open Source ProjectTI_HANDLE configMgr_create(TI_HANDLE        hOs,void *pWLAN_Images,
5464064216a8433360745f69edddce19a606659163The Android Open Source Project                           initTable_t      *pInitTable,
5564064216a8433360745f69edddce19a606659163The Android Open Source Project                           macAddress_t     *pMac);
5664064216a8433360745f69edddce19a606659163The Android Open Source Project
5764064216a8433360745f69edddce19a606659163The Android Open Source ProjectTI_HANDLE configMgr_init  (TI_HANDLE        hOs,TI_HANDLE  hConfigManager,void *pWLAN_Images,
5864064216a8433360745f69edddce19a606659163The Android Open Source Project                           initTable_t      *pInitTable,
5964064216a8433360745f69edddce19a606659163The Android Open Source Project                           macAddress_t     *pMac);
6064064216a8433360745f69edddce19a606659163The Android Open Source Project
6164064216a8433360745f69edddce19a606659163The Android Open Source Project
6264064216a8433360745f69edddce19a606659163The Android Open Source Project/* Unload for windows */
6364064216a8433360745f69edddce19a606659163The Android Open Source ProjectTI_STATUS configMgr_unLoad(TI_HANDLE hConfigMgr);
6464064216a8433360745f69edddce19a606659163The Android Open Source Project
6564064216a8433360745f69edddce19a606659163The Android Open Source Project/* Start unload process (stop SME) */
6664064216a8433360745f69edddce19a606659163The Android Open Source ProjectTI_STATUS configMgr_InitiateUnload(TI_HANDLE hConfigMgr);
6764064216a8433360745f69edddce19a606659163The Android Open Source Project
6864064216a8433360745f69edddce19a606659163The Android Open Source Project/* Unload all modules (free memory etc) */
6964064216a8433360745f69edddce19a606659163The Android Open Source ProjectTI_STATUS configMgr_UnloadModules (TI_HANDLE hConfigMgr);
7064064216a8433360745f69edddce19a606659163The Android Open Source Project
7164064216a8433360745f69edddce19a606659163The Android Open Source Project/* Return internal shutdown status */
7264064216a8433360745f69edddce19a606659163The Android Open Source ProjectUINT8 configMgr_DriverShutdownStatus(TI_HANDLE hConfigMgr);
7364064216a8433360745f69edddce19a606659163The Android Open Source Project
7464064216a8433360745f69edddce19a606659163The Android Open Source ProjectTI_STATUS configMgr_start(TI_HANDLE hConfigMgr);
7564064216a8433360745f69edddce19a606659163The Android Open Source Project
7664064216a8433360745f69edddce19a606659163The Android Open Source ProjectTI_STATUS configMgr_stop(TI_HANDLE hConfigMgr);
7764064216a8433360745f69edddce19a606659163The Android Open Source Project
7864064216a8433360745f69edddce19a606659163The Android Open Source ProjectTI_STATUS configMgr_setParam(TI_HANDLE		hConfigMgr,
7964064216a8433360745f69edddce19a606659163The Android Open Source Project						  paramInfo_t	*pParam);
8064064216a8433360745f69edddce19a606659163The Android Open Source Project
8164064216a8433360745f69edddce19a606659163The Android Open Source ProjectTI_STATUS configMgr_getParam(TI_HANDLE		hConfigMgr,
8264064216a8433360745f69edddce19a606659163The Android Open Source Project						  paramInfo_t	*pParam);
8364064216a8433360745f69edddce19a606659163The Android Open Source Project
8464064216a8433360745f69edddce19a606659163The Android Open Source ProjectTI_STATUS configMgr_sendMsdu(TI_HANDLE		hConfigMgr,
8564064216a8433360745f69edddce19a606659163The Android Open Source Project						mem_MSDU_T	*pMsdu,
8664064216a8433360745f69edddce19a606659163The Android Open Source Project						UINT8 packet_DTag);
8764064216a8433360745f69edddce19a606659163The Android Open Source Project
8864064216a8433360745f69edddce19a606659163The Android Open Source ProjectTI_STATUS configMgr_PollApPackets(TI_HANDLE		hConfigMgr);
8964064216a8433360745f69edddce19a606659163The Android Open Source Project
9064064216a8433360745f69edddce19a606659163The Android Open Source Project
9164064216a8433360745f69edddce19a606659163The Android Open Source ProjectTI_STATUS configMgr_checkTxQueueSize(TI_HANDLE hConfigMgr,UINT8 qIndex);
9264064216a8433360745f69edddce19a606659163The Android Open Source Project
9364064216a8433360745f69edddce19a606659163The Android Open Source Project/* Event Handler wrapper */
9464064216a8433360745f69edddce19a606659163The Android Open Source ProjectUINT32 configMgr_RegisterEvent(TI_HANDLE		hConfigMgr, PUCHAR pData, ULONG Length);
9564064216a8433360745f69edddce19a606659163The Android Open Source Project
9664064216a8433360745f69edddce19a606659163The Android Open Source ProjectUINT32 configMgr_UnRegisterEvent(TI_HANDLE		hConfigMgr, TI_HANDLE uEventID);
9764064216a8433360745f69edddce19a606659163The Android Open Source Project
9864064216a8433360745f69edddce19a606659163The Android Open Source ProjectUINT32 configMgr_MaskEvent(TI_HANDLE		hConfigMgr, UINT32 uEventID);
9964064216a8433360745f69edddce19a606659163The Android Open Source Project
10064064216a8433360745f69edddce19a606659163The Android Open Source ProjectUINT32 configMgr_UnMaskEvent(TI_HANDLE		hConfigMgr, UINT32 uEventID);
10164064216a8433360745f69edddce19a606659163The Android Open Source Project
10264064216a8433360745f69edddce19a606659163The Android Open Source Project/* Initiated from User Space to fetch event data*/
10364064216a8433360745f69edddce19a606659163The Android Open Source ProjectUINT32 configMgr_GetEventData                  (TI_HANDLE		hConfigMgr, PUCHAR pData,   ULONG* pLength);
10464064216a8433360745f69edddce19a606659163The Android Open Source Project
10564064216a8433360745f69edddce19a606659163The Android Open Source Project/* Memory manager wrapper */
10664064216a8433360745f69edddce19a606659163The Android Open Source ProjectTI_STATUS configMgr_allocBDs(TI_HANDLE hConfigMgr,
10764064216a8433360745f69edddce19a606659163The Android Open Source Project						  UINT32 bdNumber,
10864064216a8433360745f69edddce19a606659163The Android Open Source Project						  mem_BD_T** bdPtr);
10964064216a8433360745f69edddce19a606659163The Android Open Source Project
11064064216a8433360745f69edddce19a606659163The Android Open Source ProjectTI_STATUS configMgr_allocMSDU(TI_HANDLE hConfigMgr,
11164064216a8433360745f69edddce19a606659163The Android Open Source Project						  mem_MSDU_T** MSDUPtr,
11264064216a8433360745f69edddce19a606659163The Android Open Source Project						  UINT32 len,
11364064216a8433360745f69edddce19a606659163The Android Open Source Project						  allocatingModule_e module);
11464064216a8433360745f69edddce19a606659163The Android Open Source Project
11564064216a8433360745f69edddce19a606659163The Android Open Source ProjectTI_STATUS configMgr_allocMSDUBufferOnly(TI_HANDLE hConfigMgr,
11664064216a8433360745f69edddce19a606659163The Android Open Source Project									mem_MSDU_T** MSDUPtr,
11764064216a8433360745f69edddce19a606659163The Android Open Source Project									allocatingModule_e module);
11864064216a8433360745f69edddce19a606659163The Android Open Source Project
11964064216a8433360745f69edddce19a606659163The Android Open Source ProjectTI_STATUS configMgr_memMngrFreeMSDU(TI_HANDLE hConfigMgr,
12064064216a8433360745f69edddce19a606659163The Android Open Source Project								 UINT32 handle);
12164064216a8433360745f69edddce19a606659163The Android Open Source Project
12264064216a8433360745f69edddce19a606659163The Android Open Source Project/* HAL	wrapper */
12364064216a8433360745f69edddce19a606659163The Android Open Source ProjectTI_STATUS configMgr_HandleBusTxn_Complete(TI_HANDLE hConfigMgr);
12464064216a8433360745f69edddce19a606659163The Android Open Source Project
12564064216a8433360745f69edddce19a606659163The Android Open Source ProjectTI_STATUS configMgr_handleInterrupts(TI_HANDLE hConfigMgr);
12664064216a8433360745f69edddce19a606659163The Android Open Source Project
12764064216a8433360745f69edddce19a606659163The Android Open Source ProjectTI_STATUS configMgr_enableInterrupts(TI_HANDLE hConfigMgr);
12864064216a8433360745f69edddce19a606659163The Android Open Source Project
12964064216a8433360745f69edddce19a606659163The Android Open Source ProjectTI_STATUS configMgr_disableInterrupts(TI_HANDLE hConfigMgr);
13064064216a8433360745f69edddce19a606659163The Android Open Source Project
13164064216a8433360745f69edddce19a606659163The Android Open Source ProjectUINT32  configMgr_checkInterrupts(TI_HANDLE hConfigMgr);
13264064216a8433360745f69edddce19a606659163The Android Open Source Project
13364064216a8433360745f69edddce19a606659163The Android Open Source ProjectBOOL configMgr_isCardExist(TI_HANDLE hConfigMgr);
13464064216a8433360745f69edddce19a606659163The Android Open Source Project
13564064216a8433360745f69edddce19a606659163The Android Open Source ProjectBOOL configMgr_areInputsFromOsDisabled(TI_HANDLE hConfigMgr);
13664064216a8433360745f69edddce19a606659163The Android Open Source Project
13764064216a8433360745f69edddce19a606659163The Android Open Source ProjectUINT32 configMgr_ReadMacRegister(TI_HANDLE hConfigMgr, UINT32	addr);
13864064216a8433360745f69edddce19a606659163The Android Open Source Projectvoid  configMgr_WriteMacRegister(TI_HANDLE hConfigMgr, UINT32	addr, UINT32	val);
13964064216a8433360745f69edddce19a606659163The Android Open Source ProjectUINT32 configMgr_ReadPhyRegister(TI_HANDLE hConfigMgr, UINT32	addr);
14064064216a8433360745f69edddce19a606659163The Android Open Source Projectvoid configMgr_WritePhyRegister(TI_HANDLE hConfigMgr, UINT32	addr, UINT32	val);
14164064216a8433360745f69edddce19a606659163The Android Open Source Project
14264064216a8433360745f69edddce19a606659163The Android Open Source ProjectUINT32 configMgr_getPacketHeaderLength(TI_HANDLE hConfigMgr, void *pData, UINT32 txFlags);
14364064216a8433360745f69edddce19a606659163The Android Open Source Project
14464064216a8433360745f69edddce19a606659163The Android Open Source Projectvoid configMgr_SlaveAckMaskNotification(TI_HANDLE hConfigMgr);
14564064216a8433360745f69edddce19a606659163The Android Open Source Project
14664064216a8433360745f69edddce19a606659163The Android Open Source Projectvoid configMgr_GetInitParams (TI_HANDLE hConfigMgr, UINT8* ioBuffer, UINT16 *outBufLen);
14764064216a8433360745f69edddce19a606659163The Android Open Source Project
14864064216a8433360745f69edddce19a606659163The Android Open Source Project#endif /* __SRC_API_H__ */
14964064216a8433360745f69edddce19a606659163The Android Open Source Project
150