Home | History | Annotate | Download | only in Export_Inc
      1 /** \file Core_AdaptTx.h
      2  *  \brief CORE Adaptation Ctrl include file
      3  *
      4  *  \see Core_AdaptTx.c
      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:	Core_AdaptTx.h					           */
     44 /*    PURPOSE:	CORE Adaptation TX include file                            */
     45 /*                                                                         */
     46 /***************************************************************************/
     47 #ifndef __CORE_ADAPT_TX_H__
     48 #define __CORE_ADAPT_TX_H__
     49 
     50 
     51 #include "paramOut.h"
     52 #include "whalBus_Defs.h"
     53 #include "MsduList.h"
     54 #include "DataCtrl_Api.h"
     55 
     56 extern TI_HANDLE		CORE_AdaptTx_handle;
     57 
     58 /* Callback for tx sendPacketTranfer */
     59 typedef void (* CoreAdapt_SendPacketTranferCB_t)(TI_HANDLE        hTxData,
     60 												 UINT32           pPacketIdAttr);
     61 
     62 /* Callback for tx compleate */
     63 typedef void (*CoreAdapt_TxCompleteStatusCB_t)( TI_HANDLE        hCtrlData,
     64 												txCompleteAttr_t *pTxCompleteAttr);
     65 
     66 
     67 typedef void (*CoreAdapt_QueueFreeEventCB_t)(TI_HANDLE hTxData,UINT32 *pTxDataHwFreeBuffersPerQ);
     68 
     69 
     70 
     71 typedef struct
     72 {
     73 	TI_HANDLE hReport;
     74 	TI_HANDLE hMemMgr;
     75 	TI_HANDLE hTxData;
     76 	TI_HANDLE hTnetwDrv;
     77 	TI_HANDLE hCtrlData;
     78 
     79 
     80 } Core_AdaptTx_config_t;
     81 
     82 
     83 /* Typedefs */
     84 typedef struct
     85 {
     86 	/* handles handled */
     87 	TI_HANDLE hOs;
     88 	TI_HANDLE hReport;
     89 	TI_HANDLE hMemMgr;
     90 	TI_HANDLE hTnetwDrv;
     91 	TI_HANDLE hTxData;
     92 	TI_HANDLE hCtrlData;
     93 } CORE_AdaptTx_t;
     94 
     95 
     96 
     97 
     98 
     99 /* External data definitions */
    100 
    101 /* External functions definitions */
    102 
    103 /* Function prototypes */
    104 TI_HANDLE CORE_AdaptTx_Create(TI_HANDLE hOs);
    105 int CORE_AdaptTx_Config(TI_HANDLE CORE_AdaptTx_handle, Core_AdaptTx_config_t *pCore_AdaptTx_config,txDataInitParams_t *txDataInitParams);
    106 int CORE_AdaptTx_Destroy(TI_HANDLE hCore_AdaptTx);
    107 TI_STATUS CORE_AdaptTx_SendPacket(TI_HANDLE hCore_AdaptTx,
    108 							 UINT8 TxQid,
    109 							 mem_MSDU_T* pMsdu,
    110 							 txData_attr_t* pTxAttr,
    111                              UINT32 packetId,
    112 							 UINT32 msduTimeToExpiry );
    113 
    114 /*  callbacks */
    115 void SendPacketComplete (TI_HANDLE hUser,
    116                          systemStatus_e aStatus,
    117                         UINT32 aPacketId,
    118                         UINT32 aRate,
    119                         UINT8 aAckFailures,
    120                         UINT32 actualDurationInAir,
    121                         UINT32 fwHandlingTime,
    122 						UINT32 mediumDelay);
    123 
    124 void SendPacketTransfer (TI_HANDLE hUser, UINT32 aPacketId);
    125 void SendPacketDebug    (TI_HANDLE hUser, UINT32 aPacketId, UINT32 uDebugInfo);
    126 
    127 
    128 #endif /* __CORE_ADAPT_TX_H__*/
    129