• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 /*                                                                          */
39 /*    MODULE:   TNETW-Driver                                                */
40 /*                                                                          */
41 /*    PURPOSE:  Driver API functions prototypes.                            */
42 /*                                                                          */
43 /***************************************************************************/
44 
45 #ifndef TNETW_DRIVER_API_H
46 #define TNETW_DRIVER_API_H
47 
48 
49 #include "commonTypes.h"
50 #include "TNETW_Driver_types.h"
51 #include "802_11Defs.h"
52 
53 /************************************************************************
54                 TNETW-Driver  Common  API  Functions
55 ************************************************************************/
56 
57 /* Functions that handle common procedures for multiple driver modules (mainly initialization). */
58 TI_HANDLE   TnetwDrv_Create              (TI_HANDLE hOs);
59 TI_STATUS   TnetwDrv_Init                (TI_HANDLE hTnetwDrv, TI_HANDLE hReport, TI_HANDLE hMemMgr, TI_HANDLE hUser, UINT32 *pFWImage, TnetwDrv_InitParams_t* pInitParams, TnetDrv_callback_t fUserConf);
60 TI_STATUS   TnetwDrv_Configure           (TI_HANDLE hTnetwDrv, TnetwDrv_InitParams_t* pInitParams);
61 void        TnetwDrv_Destroy             (TI_HANDLE hTnetwDrv);
62 void        TnetwDrv_Register_CB         (TI_HANDLE hTnetwDrv,tiUINT32 EventID,void *CBFunc, void *pData);
63 void        TnetwDrv_GetInitParams       (TI_HANDLE hTnetwDrv, UINT8 *pcommand, UINT16 *OutBufLen);
64 void        TnetwDrv_PrintInfo           (TI_HANDLE hTnetwDrv, TnetwDrv_PrintInfoType_e printInfo);
65 TI_STATUS   TnetwDrv_FinalizeDownload    (TI_HANDLE hTnetwDrv);
66 TI_STATUS   TnetwDrv_FinalizeOnFailure   (TI_HANDLE hTnetwDrv);
67 
68 
69 /*  TEMPORARY!! - untill the new TNETW-Driver architecture is completed!!  */
70 void        TnetwDrv_TEMP_GetHandles     (TI_HANDLE hTnetwDrv, TI_HANDLE *pHalCtrl, TI_HANDLE *pMacServices);
71 
72 #ifdef GWSI_SPI_TEST
73 TI_HANDLE TnetwDrv_GetTnetwifHandle (TI_HANDLE hTnetwDrv);
74 #endif /* GWSI_SPI_TEST */
75 
76 /************************************************************************
77                 TNETW-Driver  Tx  API  Functions
78 ************************************************************************/
79 
80 txCtrlBlkEntry_t   *TnetwDrv_txCtrlBlk_alloc         (TI_HANDLE hTnetwDrv);
81 void                TnetwDrv_txCtrlBlk_free          (TI_HANDLE hTnetwDrv, txCtrlBlkEntry_t *pCurrentEntry);
82 txCtrlBlkEntry_t   *TnetwDrv_txCtrlBlk_GetPointer    (TI_HANDLE hTnetwDrv, UINT8 descId);
83 TI_STATUS           TnetwDrv_txHwQueue_alloc         (TI_HANDLE hTnetwDrv, txCtrlBlkEntry_t *pPktCtrlBlk);
84 TI_STATUS           TnetwDrv_txHwQueue_free          (TI_HANDLE hTnetwDrv, txCtrlBlkEntry_t *pPktCtrlBlk);
85 UINT8               TnetwDrv_txHwQueue_GetUsedHwBlks (TI_HANDLE hTnetwDrv, int TxQid);
86 UINT8               TnetwDrv_txGetAckPolicy          (TI_HANDLE hTnetwDrv, int TxQid, BOOL bIsMultiCastAndIBSS);
87 void                TnetwDrv_printInfo               (TI_HANDLE hTnetwDrv);
88 
89 systemStatus_e      TnetwDrv_txXfer_sendPacket       (TI_HANDLE hTnetwDrv,
90                 const void  *aFrame,        /* Pointer to the packet content. points to */
91                                             /* the place that the actual packet begins. */
92                                             /* a size of TX_TOTAL_OFFSET_BEFORE_DATA    */
93                                             /* must be saved before that pointer        */
94                 UINT16      aLength,        /* MSDU length from first byte of MAC       */
95                                             /*   header to last byteof frame body.      */
96                 UINT8       aQueueId,       /* Tx queue as defined in ConfigureQueue.   */
97                 UINT8       aTxRateClassId, /* Tx rate class ID defined in txRatePolicy.*/
98                 UINT16      aMaxTransmitRate,/* A bit mask that specifies the initial   */
99                                             /*     (highest) rate to use.               */
100                 BOOL        aMore,          /* Tells if there is another packet coming  */
101                                             /*   shortly after this one.                */
102                 UINT32      aPacketId,      /* Packet identifier used as a context by   */
103                                             /*   the host driver.                   */
104                 UINT8       aPowerLevel,    /* Transmission power level.                */
105                 UINT32      aExpiryTime,    /* Time left for this MSDU to live.         */
106                 void        *aReserved);    /* Optional parameters pointer.             */
107 
108 #if !defined(GWSI_DRIVER) && !defined(GWSI_LIB)
109 void TnetwDrv_StartRecovery(TI_HANDLE hTnetwDrv, void *endOfRecoveryCB, TI_HANDLE hRecoveryMgr);
110 TI_STATUS TnetwDrv_InitHw_FinalizeDownload(TI_HANDLE hTnetwDrv);
111 #endif
112 
113 #endif  /* TNETW_DRIVER_TYPES_H */
114 
115