1 /**************************************************************************** 2 **+-----------------------------------------------------------------------+** 3 **| |** 4 **| Copyright(c) 1998 - 2008 Texas Instruments. All rights reserved. |** 5 **| All rights reserved. |** 6 **| |** 7 **| Redistribution and use in source and binary forms, with or without |** 8 **| modification, are permitted provided that the following conditions |** 9 **| are met: |** 10 **| |** 11 **| * Redistributions of source code must retain the above copyright |** 12 **| notice, this list of conditions and the following disclaimer. |** 13 **| * Redistributions in binary form must reproduce the above copyright |** 14 **| notice, this list of conditions and the following disclaimer in |** 15 **| the documentation and/or other materials provided with the |** 16 **| distribution. |** 17 **| * Neither the name Texas Instruments nor the names of its |** 18 **| contributors may be used to endorse or promote products derived |** 19 **| from this software without specific prior written permission. |** 20 **| |** 21 **| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |** 22 **| "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |** 23 **| LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |** 24 **| A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |** 25 **| OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |** 26 **| SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |** 27 **| LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |** 28 **| DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |** 29 **| THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |** 30 **| (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |** 31 **| OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |** 32 **| |** 33 **+-----------------------------------------------------------------------+** 34 ****************************************************************************/ 35 36 /**************************************************************************/ 37 /* */ 38 /* MODULE: srcApi.h */ 39 /* PURPOSE: Header file of config Manager module */ 40 /* */ 41 /**************************************************************************/ 42 43 #ifndef __SRC_API_H__ 44 #define __SRC_API_H__ 45 46 #include "osTIType.h" 47 #include "paramOut.h" 48 #include "memMngrEx.h" 49 50 #define DRIVER_SHUTDOWN_SME_STOPPED 0x1 51 #define DRIVER_SHUTDOWN_COMPLETE (DRIVER_SHUTDOWN_SME_STOPPED) 52 53 TI_HANDLE configMgr_create(TI_HANDLE hOs,void *pWLAN_Images, 54 initTable_t *pInitTable, 55 macAddress_t *pMac); 56 57 TI_HANDLE configMgr_init (TI_HANDLE hOs,TI_HANDLE hConfigManager,void *pWLAN_Images, 58 initTable_t *pInitTable, 59 macAddress_t *pMac); 60 61 62 /* Unload for windows */ 63 TI_STATUS configMgr_unLoad(TI_HANDLE hConfigMgr); 64 65 /* Start unload process (stop SME) */ 66 TI_STATUS configMgr_InitiateUnload(TI_HANDLE hConfigMgr); 67 68 /* Unload all modules (free memory etc) */ 69 TI_STATUS configMgr_UnloadModules (TI_HANDLE hConfigMgr); 70 71 /* Return internal shutdown status */ 72 UINT8 configMgr_DriverShutdownStatus(TI_HANDLE hConfigMgr); 73 74 TI_STATUS configMgr_start(TI_HANDLE hConfigMgr); 75 76 TI_STATUS configMgr_stop(TI_HANDLE hConfigMgr); 77 78 TI_STATUS configMgr_setParam(TI_HANDLE hConfigMgr, 79 paramInfo_t *pParam); 80 81 TI_STATUS configMgr_getParam(TI_HANDLE hConfigMgr, 82 paramInfo_t *pParam); 83 84 TI_STATUS configMgr_sendMsdu(TI_HANDLE hConfigMgr, 85 mem_MSDU_T *pMsdu, 86 UINT8 packet_DTag); 87 88 TI_STATUS configMgr_PollApPackets(TI_HANDLE hConfigMgr); 89 90 91 TI_STATUS configMgr_checkTxQueueSize(TI_HANDLE hConfigMgr,UINT8 qIndex); 92 93 /* Event Handler wrapper */ 94 UINT32 configMgr_RegisterEvent(TI_HANDLE hConfigMgr, PUCHAR pData, ULONG Length); 95 96 UINT32 configMgr_UnRegisterEvent(TI_HANDLE hConfigMgr, TI_HANDLE uEventID); 97 98 UINT32 configMgr_MaskEvent(TI_HANDLE hConfigMgr, UINT32 uEventID); 99 100 UINT32 configMgr_UnMaskEvent(TI_HANDLE hConfigMgr, UINT32 uEventID); 101 102 /* Initiated from User Space to fetch event data*/ 103 UINT32 configMgr_GetEventData (TI_HANDLE hConfigMgr, PUCHAR pData, ULONG* pLength); 104 105 /* Memory manager wrapper */ 106 TI_STATUS configMgr_allocBDs(TI_HANDLE hConfigMgr, 107 UINT32 bdNumber, 108 mem_BD_T** bdPtr); 109 110 TI_STATUS configMgr_allocMSDU(TI_HANDLE hConfigMgr, 111 mem_MSDU_T** MSDUPtr, 112 UINT32 len, 113 allocatingModule_e module); 114 115 TI_STATUS configMgr_allocMSDUBufferOnly(TI_HANDLE hConfigMgr, 116 mem_MSDU_T** MSDUPtr, 117 allocatingModule_e module); 118 119 TI_STATUS configMgr_memMngrFreeMSDU(TI_HANDLE hConfigMgr, 120 UINT32 handle); 121 122 /* HAL wrapper */ 123 TI_STATUS configMgr_HandleBusTxn_Complete(TI_HANDLE hConfigMgr); 124 125 TI_STATUS configMgr_handleInterrupts(TI_HANDLE hConfigMgr); 126 127 TI_STATUS configMgr_enableInterrupts(TI_HANDLE hConfigMgr); 128 129 TI_STATUS configMgr_disableInterrupts(TI_HANDLE hConfigMgr); 130 131 UINT32 configMgr_checkInterrupts(TI_HANDLE hConfigMgr); 132 133 BOOL configMgr_isCardExist(TI_HANDLE hConfigMgr); 134 135 BOOL configMgr_areInputsFromOsDisabled(TI_HANDLE hConfigMgr); 136 137 UINT32 configMgr_ReadMacRegister(TI_HANDLE hConfigMgr, UINT32 addr); 138 void configMgr_WriteMacRegister(TI_HANDLE hConfigMgr, UINT32 addr, UINT32 val); 139 UINT32 configMgr_ReadPhyRegister(TI_HANDLE hConfigMgr, UINT32 addr); 140 void configMgr_WritePhyRegister(TI_HANDLE hConfigMgr, UINT32 addr, UINT32 val); 141 142 UINT32 configMgr_getPacketHeaderLength(TI_HANDLE hConfigMgr, void *pData, UINT32 txFlags); 143 144 void configMgr_SlaveAckMaskNotification(TI_HANDLE hConfigMgr); 145 146 void configMgr_GetInitParams (TI_HANDLE hConfigMgr, UINT8* ioBuffer, UINT16 *outBufLen); 147 148 #endif /* __SRC_API_H__ */ 149 150