#define HTC_RX_STAT_PROFILE(t,ep,lookAhead)
#endif
-static void DoRecvCompletion(HTC_ENDPOINT *pEndpoint,
+static void DoRecvCompletion(struct htc_endpoint *pEndpoint,
HTC_PACKET_QUEUE *pQueueToIndicate)
{
}
/* unload the recv completion queue */
-static INLINE void DrainRecvIndicationQueue(HTC_TARGET *target, HTC_ENDPOINT *pEndpoint)
+static INLINE void DrainRecvIndicationQueue(HTC_TARGET *target, struct htc_endpoint *pEndpoint)
{
HTC_PACKET_QUEUE recvCompletions;
/* note: this function can be called with the RX lock held */
static INLINE void SetRxPacketIndicationFlags(u32 LookAhead,
- HTC_ENDPOINT *pEndpoint,
+ struct htc_endpoint *pEndpoint,
HTC_PACKET *pPacket)
{
HTC_FRAME_HDR *pHdr = (HTC_FRAME_HDR *)&LookAhead;
void HTCRecvCompleteHandler(void *Context, HTC_PACKET *pPacket)
{
HTC_TARGET *target = (HTC_TARGET *)Context;
- HTC_ENDPOINT *pEndpoint;
+ struct htc_endpoint *pEndpoint;
u32 nextLookAheads[HTC_HOST_MAX_MSG_PER_BUNDLE];
int numLookAheads = 0;
int status;
static int AllocAndPrepareRxPackets(HTC_TARGET *target,
u32 LookAheads[],
int Messages,
- HTC_ENDPOINT *pEndpoint,
+ struct htc_endpoint *pEndpoint,
HTC_PACKET_QUEUE *pQueue)
{
int status = 0;
{
int i;
HTC_PACKET *pPacket;
- HTC_ENDPOINT *pEndpoint;
+ struct htc_endpoint *pEndpoint;
u32 lookAheads[HTC_HOST_MAX_MSG_PER_BUNDLE];
int numLookAheads = 0;
HTC_TARGET *target = (HTC_TARGET *)pScatterReq->Context;
return status;
}
-static INLINE void CheckRecvWaterMark(HTC_ENDPOINT *pEndpoint)
+static INLINE void CheckRecvWaterMark(struct htc_endpoint *pEndpoint)
{
/* see if endpoint is using a refill watermark
* ** no need to use a lock here, since we are only inspecting...
HTC_TARGET *target = (HTC_TARGET *)Context;
int status = 0;
HTC_PACKET *pPacket;
- HTC_ENDPOINT *pEndpoint;
+ struct htc_endpoint *pEndpoint;
bool asyncProc = false;
u32 lookAheads[HTC_HOST_MAX_MSG_PER_BUNDLE];
int pktsFetched;
int HTCAddReceivePktMultiple(HTC_HANDLE HTCHandle, HTC_PACKET_QUEUE *pPktQueue)
{
HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
- HTC_ENDPOINT *pEndpoint;
+ struct htc_endpoint *pEndpoint;
bool unblockRecv = false;
int status = 0;
HTC_PACKET *pFirstPacket;
}
}
-static void HTCFlushRxQueue(HTC_TARGET *target, HTC_ENDPOINT *pEndpoint, HTC_PACKET_QUEUE *pQueue)
+static void HTCFlushRxQueue(HTC_TARGET *target, struct htc_endpoint *pEndpoint, HTC_PACKET_QUEUE *pQueue)
{
HTC_PACKET *pPacket;
HTC_PACKET_QUEUE container;
UNLOCK_HTC_RX(target);
}
-static void HTCFlushEndpointRX(HTC_TARGET *target, HTC_ENDPOINT *pEndpoint)
+static void HTCFlushEndpointRX(HTC_TARGET *target, struct htc_endpoint *pEndpoint)
{
/* flush any recv indications not already made */
HTCFlushRxQueue(target,pEndpoint,&pEndpoint->RecvIndicationQueue);
void HTCFlushRecvBuffers(HTC_TARGET *target)
{
- HTC_ENDPOINT *pEndpoint;
+ struct htc_endpoint *pEndpoint;
int i;
for (i = ENDPOINT_0; i < ENDPOINT_MAX; i++) {
(reason)); \
}
-static void DoSendCompletion(HTC_ENDPOINT *pEndpoint,
+static void DoSendCompletion(struct htc_endpoint *pEndpoint,
HTC_PACKET_QUEUE *pQueueToIndicate)
{
do {
}
/* do final completion on sent packet */
-static INLINE void CompleteSentPacket(HTC_TARGET *target, HTC_ENDPOINT *pEndpoint, HTC_PACKET *pPacket)
+static INLINE void CompleteSentPacket(HTC_TARGET *target, struct htc_endpoint *pEndpoint, HTC_PACKET *pPacket)
{
pPacket->Completion = NULL;
static void HTCSendPktCompletionHandler(void *Context, HTC_PACKET *pPacket)
{
HTC_TARGET *target = (HTC_TARGET *)Context;
- HTC_ENDPOINT *pEndpoint = &target->EndPoint[pPacket->Endpoint];
+ struct htc_endpoint *pEndpoint = &target->EndPoint[pPacket->Endpoint];
HTC_PACKET_QUEUE container;
CompleteSentPacket(target,pEndpoint,pPacket);
/* get HTC send packets from the TX queue on an endpoint */
static INLINE void GetHTCSendPackets(HTC_TARGET *target,
- HTC_ENDPOINT *pEndpoint,
+ struct htc_endpoint *pEndpoint,
HTC_PACKET_QUEUE *pQueue)
{
int creditsRequired;
{
int i;
HTC_PACKET *pPacket;
- HTC_ENDPOINT *pEndpoint = (HTC_ENDPOINT *)pScatterReq->Context;
+ struct htc_endpoint *pEndpoint = (struct htc_endpoint *)pScatterReq->Context;
HTC_TARGET *target = (HTC_TARGET *)pEndpoint->target;
int status = 0;
HTC_PACKET_QUEUE sendCompletes;
* - a message that will consume a partial credit will stop the bundling process early
* - we drop below the minimum number of messages for a bundle
* */
-static void HTCIssueSendBundle(HTC_ENDPOINT *pEndpoint,
+static void HTCIssueSendBundle(struct htc_endpoint *pEndpoint,
HTC_PACKET_QUEUE *pQueue,
int *pBundlesSent,
int *pTotalBundlesPkts)
* if there are no credits, the packet(s) remains in the queue.
* this function returns the result of the attempt to send a queue of HTC packets */
static HTC_SEND_QUEUE_RESULT HTCTrySend(HTC_TARGET *target,
- HTC_ENDPOINT *pEndpoint,
+ struct htc_endpoint *pEndpoint,
HTC_PACKET_QUEUE *pCallersSendQueue)
{
HTC_PACKET_QUEUE sendQueue; /* temp queue to hold packets at various stages */
int HTCSendPktsMultiple(HTC_HANDLE HTCHandle, HTC_PACKET_QUEUE *pPktQueue)
{
HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
- HTC_ENDPOINT *pEndpoint;
+ struct htc_endpoint *pEndpoint;
HTC_PACKET *pPacket;
AR_DEBUG_PRINTF(ATH_DEBUG_SEND, ("+HTCSendPktsMultiple: Queue: 0x%lX, Pkts %d \n",
/* check TX queues to drain because of credit distribution update */
static INLINE void HTCCheckEndpointTxQueues(HTC_TARGET *target)
{
- HTC_ENDPOINT *pEndpoint;
+ struct htc_endpoint *pEndpoint;
HTC_ENDPOINT_CREDIT_DIST *pDistItem;
AR_DEBUG_PRINTF(ATH_DEBUG_SEND, ("+HTCCheckEndpointTxQueues \n"));
* NOTE: no locks need to be taken since the distribution list
* is not dynamic (cannot be re-ordered) and we are not modifying any state */
while (pDistItem != NULL) {
- pEndpoint = (HTC_ENDPOINT *)pDistItem->pHTCReserved;
+ pEndpoint = (struct htc_endpoint *)pDistItem->pHTCReserved;
if (HTC_PACKET_QUEUE_DEPTH(&pEndpoint->TxQueue) > 0) {
AR_DEBUG_PRINTF(ATH_DEBUG_SEND, (" Ep %d has %d credits and %d Packets in TX Queue \n",
void HTCProcessCreditRpt(HTC_TARGET *target, HTC_CREDIT_REPORT *pRpt, int NumEntries, HTC_ENDPOINT_ID FromEndpoint)
{
int i;
- HTC_ENDPOINT *pEndpoint;
+ struct htc_endpoint *pEndpoint;
int totalCredits = 0;
bool doDist = false;
}
/* flush endpoint TX queue */
-static void HTCFlushEndpointTX(HTC_TARGET *target, HTC_ENDPOINT *pEndpoint, HTC_TX_TAG Tag)
+static void HTCFlushEndpointTX(HTC_TARGET *target, struct htc_endpoint *pEndpoint, HTC_TX_TAG Tag)
{
HTC_PACKET *pPacket;
HTC_PACKET_QUEUE discardQueue;
AR_DEBUG_PRINTF(ATH_DEBUG_ANY, (" TxCreditsPerMaxMsg : %d \n", pEPDist->TxCreditsPerMaxMsg));
AR_DEBUG_PRINTF(ATH_DEBUG_ANY, (" TxCreditsToDist : %d \n", pEPDist->TxCreditsToDist));
AR_DEBUG_PRINTF(ATH_DEBUG_ANY, (" TxQueueDepth : %d \n",
- HTC_PACKET_QUEUE_DEPTH(&((HTC_ENDPOINT *)pEPDist->pHTCReserved)->TxQueue)));
+ HTC_PACKET_QUEUE_DEPTH(&((struct htc_endpoint *)pEPDist->pHTCReserved)->TxQueue)));
AR_DEBUG_PRINTF(ATH_DEBUG_ANY, ("----------------------------------------------------\n"));
}
/* flush all send packets from all endpoint queues */
void HTCFlushSendPkts(HTC_TARGET *target)
{
- HTC_ENDPOINT *pEndpoint;
+ struct htc_endpoint *pEndpoint;
int i;
if (AR_DEBUG_LVL_CHECK(ATH_DEBUG_TRC)) {
void HTCFlushEndpoint(HTC_HANDLE HTCHandle, HTC_ENDPOINT_ID Endpoint, HTC_TX_TAG Tag)
{
HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
- HTC_ENDPOINT *pEndpoint = &target->EndPoint[Endpoint];
+ struct htc_endpoint *pEndpoint = &target->EndPoint[Endpoint];
if (pEndpoint->ServiceID == 0) {
AR_DEBUG_ASSERT(false);
bool Active)
{
HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
- HTC_ENDPOINT *pEndpoint = &target->EndPoint[Endpoint];
+ struct htc_endpoint *pEndpoint = &target->EndPoint[Endpoint];
bool doDist = false;
if (pEndpoint->ServiceID == 0) {
HTC_ENDPOINT_ID Endpoint)
{
HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
- HTC_ENDPOINT *pEndpoint = &target->EndPoint[Endpoint];
+ struct htc_endpoint *pEndpoint = &target->EndPoint[Endpoint];
if (pEndpoint->ServiceID == 0) {
return false;