|
1 /* |
|
2 * TWDriverTx.c |
|
3 * |
|
4 * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved. |
|
5 * All rights reserved. |
|
6 * |
|
7 * This program and the accompanying materials are made available under the |
|
8 * terms of the Eclipse Public License v1.0 or BSD License which accompanies |
|
9 * this distribution. The Eclipse Public License is available at |
|
10 * http://www.eclipse.org/legal/epl-v10.html and the BSD License is as below. |
|
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 * MODULE: TNETW_Driver_Tx.c |
|
43 * |
|
44 * PURPOSE: TNETW_Driver Tx API functions needed externally to the driver. |
|
45 * |
|
46 ****************************************************************************/ |
|
47 |
|
48 #define __FILE_ID__ FILE_ID_120 |
|
49 #include "report.h" |
|
50 #include "TWDriver.h" |
|
51 #include "txCtrlBlk_api.h" |
|
52 #include "txHwQueue_api.h" |
|
53 #include "txXfer_api.h" |
|
54 #include "txResult_api.h" |
|
55 #include "CmdBld.h" |
|
56 |
|
57 /** \file TWDriverTx.c |
|
58 * \brief TI WLAN HW TX Access Driver |
|
59 * |
|
60 * \see TWDriver.h |
|
61 */ |
|
62 |
|
63 |
|
64 /**************************************************************************** |
|
65 * Tx Control Block API functions * |
|
66 ****************************************************************************/ |
|
67 |
|
68 TTxCtrlBlk *TWD_txCtrlBlk_Alloc (TI_HANDLE hTWD) |
|
69 { |
|
70 TTwd *pTWD = (TTwd *)hTWD; |
|
71 |
|
72 return txCtrlBlk_Alloc (pTWD->hTxCtrlBlk); |
|
73 } |
|
74 |
|
75 void TWD_txCtrlBlk_Free (TI_HANDLE hTWD, TTxCtrlBlk *pCurrentEntry) |
|
76 { |
|
77 TTwd *pTWD = (TTwd *)hTWD; |
|
78 |
|
79 txCtrlBlk_Free (pTWD->hTxCtrlBlk, pCurrentEntry); |
|
80 } |
|
81 |
|
82 TTxCtrlBlk *TWD_txCtrlBlk_GetPointer (TI_HANDLE hTWD, TI_UINT8 descId) |
|
83 { |
|
84 TTwd *pTWD = (TTwd *)hTWD; |
|
85 |
|
86 return txCtrlBlk_GetPointer (pTWD->hTxCtrlBlk, descId); |
|
87 } |
|
88 |
|
89 |
|
90 |
|
91 /**************************************************************************** |
|
92 * Tx HW Queue API functions * |
|
93 ****************************************************************************/ |
|
94 ETxHwQueStatus TWD_txHwQueue_AllocResources (TI_HANDLE hTWD, TTxCtrlBlk *pTxCtrlBlk) |
|
95 { |
|
96 TTwd *pTWD = (TTwd *)hTWD; |
|
97 |
|
98 return txHwQueue_AllocResources (pTWD->hTxHwQueue, pTxCtrlBlk); |
|
99 } |
|
100 |
|
101 /**************************************************************************** |
|
102 * Tx Xfer API functions * |
|
103 ****************************************************************************/ |
|
104 |
|
105 ETxnStatus TWD_txXfer_SendPacket (TI_HANDLE hTWD, TTxCtrlBlk *pPktCtrlBlk) |
|
106 { |
|
107 TTwd *pTWD = (TTwd *)hTWD; |
|
108 |
|
109 return txXfer_SendPacket (pTWD->hTxXfer, pPktCtrlBlk); |
|
110 } |
|
111 |
|
112 |
|
113 |
|
114 |