OLD | NEW |
1 //------------------------------------------------------------------------------ | 1 //------------------------------------------------------------------------------ |
2 // <copyright file="htc_internal.h" company="Atheros"> | 2 // <copyright file="htc_internal.h" company="Atheros"> |
3 // Copyright (c) 2007-2008 Atheros Corporation. All rights reserved. | 3 // Copyright (c) 2007-2010 Atheros Corporation. All rights reserved. |
4 // | 4 // |
5 // This program is free software; you can redistribute it and/or modify | |
6 // it under the terms of the GNU General Public License version 2 as | |
7 // published by the Free Software Foundation; | |
8 // | 5 // |
9 // Software distributed under the License is distributed on an "AS | 6 // Permission to use, copy, modify, and/or distribute this software for any |
10 // IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or | 7 // purpose with or without fee is hereby granted, provided that the above |
11 // implied. See the License for the specific language governing | 8 // copyright notice and this permission notice appear in all copies. |
12 // rights and limitations under the License. | 9 // |
| 10 // THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES |
| 11 // WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF |
| 12 // MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR |
| 13 // ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES |
| 14 // WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN |
| 15 // ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
| 16 // OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
13 // | 17 // |
14 // | 18 // |
15 //------------------------------------------------------------------------------ | 19 //------------------------------------------------------------------------------ |
16 //============================================================================== | 20 //============================================================================== |
17 // Author(s): ="Atheros" | 21 // Author(s): ="Atheros" |
18 //============================================================================== | 22 //============================================================================== |
19 #ifndef _HTC_INTERNAL_H_ | 23 #ifndef _HTC_INTERNAL_H_ |
20 #define _HTC_INTERNAL_H_ | 24 #define _HTC_INTERNAL_H_ |
21 | 25 |
22 /* for debugging, uncomment this to capture the last frame header, on frame head
er | 26 /* for debugging, uncomment this to capture the last frame header, on frame head
er |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 A_STATUS HTCWaitforControlMessage(HTC_TARGET *target, HTC_PACKET **ppControlP
acket); | 167 A_STATUS HTCWaitforControlMessage(HTC_TARGET *target, HTC_PACKET **ppControlP
acket); |
164 HTC_PACKET *HTCAllocControlBuffer(HTC_TARGET *target, HTC_PACKET_QUEUE *pList); | 168 HTC_PACKET *HTCAllocControlBuffer(HTC_TARGET *target, HTC_PACKET_QUEUE *pList); |
165 void HTCFreeControlBuffer(HTC_TARGET *target, HTC_PACKET *pPacket, HTC_PA
CKET_QUEUE *pList); | 169 void HTCFreeControlBuffer(HTC_TARGET *target, HTC_PACKET *pPacket, HTC_PA
CKET_QUEUE *pList); |
166 A_STATUS HTCIssueSend(HTC_TARGET *target, HTC_PACKET *pPacket); | 170 A_STATUS HTCIssueSend(HTC_TARGET *target, HTC_PACKET *pPacket); |
167 void HTCRecvCompleteHandler(void *Context, HTC_PACKET *pPacket); | 171 void HTCRecvCompleteHandler(void *Context, HTC_PACKET *pPacket); |
168 A_STATUS HTCRecvMessagePendingHandler(void *Context, A_UINT32 MsgLookAheads[]
, int NumLookAheads, A_BOOL *pAsyncProc, int *pNumPktsFetched); | 172 A_STATUS HTCRecvMessagePendingHandler(void *Context, A_UINT32 MsgLookAheads[]
, int NumLookAheads, A_BOOL *pAsyncProc, int *pNumPktsFetched); |
169 void HTCProcessCreditRpt(HTC_TARGET *target, HTC_CREDIT_REPORT *pRpt, int
NumEntries, HTC_ENDPOINT_ID FromEndpoint); | 173 void HTCProcessCreditRpt(HTC_TARGET *target, HTC_CREDIT_REPORT *pRpt, int
NumEntries, HTC_ENDPOINT_ID FromEndpoint); |
170 A_STATUS HTCSendSetupComplete(HTC_TARGET *target); | 174 A_STATUS HTCSendSetupComplete(HTC_TARGET *target); |
171 void HTCFlushRecvBuffers(HTC_TARGET *target); | 175 void HTCFlushRecvBuffers(HTC_TARGET *target); |
172 void HTCFlushSendPkts(HTC_TARGET *target); | 176 void HTCFlushSendPkts(HTC_TARGET *target); |
| 177 |
| 178 #ifdef ATH_DEBUG_MODULE |
173 void DumpCreditDist(HTC_ENDPOINT_CREDIT_DIST *pEPDist); | 179 void DumpCreditDist(HTC_ENDPOINT_CREDIT_DIST *pEPDist); |
174 void DumpCreditDistStates(HTC_TARGET *target); | 180 void DumpCreditDistStates(HTC_TARGET *target); |
175 void DebugDumpBytes(A_UCHAR *buffer, A_UINT16 length, char *pDescript
ion); | 181 void DebugDumpBytes(A_UCHAR *buffer, A_UINT16 length, char *pDescript
ion); |
| 182 #endif |
176 | 183 |
177 static INLINE HTC_PACKET *HTC_ALLOC_CONTROL_TX(HTC_TARGET *target) { | 184 static INLINE HTC_PACKET *HTC_ALLOC_CONTROL_TX(HTC_TARGET *target) { |
178 HTC_PACKET *pPacket = HTCAllocControlBuffer(target,&target->ControlBufferTXF
reeList); | 185 HTC_PACKET *pPacket = HTCAllocControlBuffer(target,&target->ControlBufferTXF
reeList); |
179 if (pPacket != NULL) { | 186 if (pPacket != NULL) { |
180 /* set payload pointer area with some headroom */ | 187 /* set payload pointer area with some headroom */ |
181 pPacket->pBuffer = pPacket->pBufferStart + HTC_HDR_LENGTH; | 188 pPacket->pBuffer = pPacket->pBufferStart + HTC_HDR_LENGTH; |
182 } | 189 } |
183 return pPacket; | 190 return pPacket; |
184 } | 191 } |
185 | 192 |
(...skipping 18 matching lines...) Expand all Loading... |
204 } | 211 } |
205 | 212 |
206 #define HTC_UNPREPARE_SEND_PKT(pP) \ | 213 #define HTC_UNPREPARE_SEND_PKT(pP) \ |
207 (pP)->pBuffer += HTC_HDR_LENGTH; \ | 214 (pP)->pBuffer += HTC_HDR_LENGTH; \ |
208 | 215 |
209 #ifdef __cplusplus | 216 #ifdef __cplusplus |
210 } | 217 } |
211 #endif | 218 #endif |
212 | 219 |
213 #endif /* _HTC_INTERNAL_H_ */ | 220 #endif /* _HTC_INTERNAL_H_ */ |
OLD | NEW |