ath6kl: remove-typedef HTC_TARGET
This required two passes: remove-typedef -s _HTC_TARGET \ "struct htc_target" drivers/staging/ath6kl/ remove-typedef -s HTC_TARGET \ "struct htc_target" drivers/staging/ath6kl/ Tested-by: Naveen Singh <nsingh@atheros.com> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
cb3ea094c9
commit
c1ebe36136
5 changed files with 72 additions and 72 deletions
|
@ -41,16 +41,16 @@ ATH_DEBUG_INSTANTIATE_MODULE_VAR(htc,
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static void HTCReportFailure(void *Context);
|
static void HTCReportFailure(void *Context);
|
||||||
static void ResetEndpointStates(HTC_TARGET *target);
|
static void ResetEndpointStates(struct htc_target *target);
|
||||||
|
|
||||||
void HTCFreeControlBuffer(HTC_TARGET *target, struct htc_packet *pPacket, struct htc_packet_queue *pList)
|
void HTCFreeControlBuffer(struct htc_target *target, struct htc_packet *pPacket, struct htc_packet_queue *pList)
|
||||||
{
|
{
|
||||||
LOCK_HTC(target);
|
LOCK_HTC(target);
|
||||||
HTC_PACKET_ENQUEUE(pList,pPacket);
|
HTC_PACKET_ENQUEUE(pList,pPacket);
|
||||||
UNLOCK_HTC(target);
|
UNLOCK_HTC(target);
|
||||||
}
|
}
|
||||||
|
|
||||||
struct htc_packet *HTCAllocControlBuffer(HTC_TARGET *target, struct htc_packet_queue *pList)
|
struct htc_packet *HTCAllocControlBuffer(struct htc_target *target, struct htc_packet_queue *pList)
|
||||||
{
|
{
|
||||||
struct htc_packet *pPacket;
|
struct htc_packet *pPacket;
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@ struct htc_packet *HTCAllocControlBuffer(HTC_TARGET *target, struct htc_packet_
|
||||||
}
|
}
|
||||||
|
|
||||||
/* cleanup the HTC instance */
|
/* cleanup the HTC instance */
|
||||||
static void HTCCleanup(HTC_TARGET *target)
|
static void HTCCleanup(struct htc_target *target)
|
||||||
{
|
{
|
||||||
s32 i;
|
s32 i;
|
||||||
|
|
||||||
|
@ -92,7 +92,7 @@ static void HTCCleanup(HTC_TARGET *target)
|
||||||
/* registered target arrival callback from the HIF layer */
|
/* registered target arrival callback from the HIF layer */
|
||||||
HTC_HANDLE HTCCreate(void *hif_handle, struct htc_init_info *pInfo)
|
HTC_HANDLE HTCCreate(void *hif_handle, struct htc_init_info *pInfo)
|
||||||
{
|
{
|
||||||
HTC_TARGET *target = NULL;
|
struct htc_target *target = NULL;
|
||||||
int status = 0;
|
int status = 0;
|
||||||
int i;
|
int i;
|
||||||
u32 ctrl_bufsz;
|
u32 ctrl_bufsz;
|
||||||
|
@ -105,13 +105,13 @@ HTC_HANDLE HTCCreate(void *hif_handle, struct htc_init_info *pInfo)
|
||||||
do {
|
do {
|
||||||
|
|
||||||
/* allocate target memory */
|
/* allocate target memory */
|
||||||
if ((target = (HTC_TARGET *)A_MALLOC(sizeof(HTC_TARGET))) == NULL) {
|
if ((target = (struct htc_target *)A_MALLOC(sizeof(struct htc_target))) == NULL) {
|
||||||
AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("Unable to allocate memory\n"));
|
AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("Unable to allocate memory\n"));
|
||||||
status = A_ERROR;
|
status = A_ERROR;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
A_MEMZERO(target, sizeof(HTC_TARGET));
|
A_MEMZERO(target, sizeof(struct htc_target));
|
||||||
A_MUTEX_INIT(&target->HTCLock);
|
A_MUTEX_INIT(&target->HTCLock);
|
||||||
A_MUTEX_INIT(&target->HTCRxLock);
|
A_MUTEX_INIT(&target->HTCRxLock);
|
||||||
A_MUTEX_INIT(&target->HTCTxLock);
|
A_MUTEX_INIT(&target->HTCTxLock);
|
||||||
|
@ -206,7 +206,7 @@ HTC_HANDLE HTCCreate(void *hif_handle, struct htc_init_info *pInfo)
|
||||||
|
|
||||||
void HTCDestroy(HTC_HANDLE HTCHandle)
|
void HTCDestroy(HTC_HANDLE HTCHandle)
|
||||||
{
|
{
|
||||||
HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
|
struct htc_target *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
|
||||||
AR_DEBUG_PRINTF(ATH_DEBUG_TRC, ("+HTCDestroy .. Destroying :0x%lX \n",(unsigned long)target));
|
AR_DEBUG_PRINTF(ATH_DEBUG_TRC, ("+HTCDestroy .. Destroying :0x%lX \n",(unsigned long)target));
|
||||||
HTCCleanup(target);
|
HTCCleanup(target);
|
||||||
AR_DEBUG_PRINTF(ATH_DEBUG_TRC, ("-HTCDestroy \n"));
|
AR_DEBUG_PRINTF(ATH_DEBUG_TRC, ("-HTCDestroy \n"));
|
||||||
|
@ -216,7 +216,7 @@ void HTCDestroy(HTC_HANDLE HTCHandle)
|
||||||
* HIF requests */
|
* HIF requests */
|
||||||
void *HTCGetHifDevice(HTC_HANDLE HTCHandle)
|
void *HTCGetHifDevice(HTC_HANDLE HTCHandle)
|
||||||
{
|
{
|
||||||
HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
|
struct htc_target *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
|
||||||
return target->Device.HIFDevice;
|
return target->Device.HIFDevice;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -224,7 +224,7 @@ void *HTCGetHifDevice(HTC_HANDLE HTCHandle)
|
||||||
* this operation is fully synchronous and the message is polled for */
|
* this operation is fully synchronous and the message is polled for */
|
||||||
int HTCWaitTarget(HTC_HANDLE HTCHandle)
|
int HTCWaitTarget(HTC_HANDLE HTCHandle)
|
||||||
{
|
{
|
||||||
HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
|
struct htc_target *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
|
||||||
int status;
|
int status;
|
||||||
struct htc_packet *pPacket = NULL;
|
struct htc_packet *pPacket = NULL;
|
||||||
HTC_READY_EX_MSG *pRdyMsg;
|
HTC_READY_EX_MSG *pRdyMsg;
|
||||||
|
@ -371,7 +371,7 @@ int HTCWaitTarget(HTC_HANDLE HTCHandle)
|
||||||
/* Start HTC, enable interrupts and let the target know host has finished setup */
|
/* Start HTC, enable interrupts and let the target know host has finished setup */
|
||||||
int HTCStart(HTC_HANDLE HTCHandle)
|
int HTCStart(HTC_HANDLE HTCHandle)
|
||||||
{
|
{
|
||||||
HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
|
struct htc_target *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
|
||||||
struct htc_packet *pPacket;
|
struct htc_packet *pPacket;
|
||||||
int status;
|
int status;
|
||||||
|
|
||||||
|
@ -436,7 +436,7 @@ int HTCStart(HTC_HANDLE HTCHandle)
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ResetEndpointStates(HTC_TARGET *target)
|
static void ResetEndpointStates(struct htc_target *target)
|
||||||
{
|
{
|
||||||
struct htc_endpoint *pEndpoint;
|
struct htc_endpoint *pEndpoint;
|
||||||
int i;
|
int i;
|
||||||
|
@ -463,7 +463,7 @@ static void ResetEndpointStates(HTC_TARGET *target)
|
||||||
/* stop HTC communications, i.e. stop interrupt reception, and flush all queued buffers */
|
/* stop HTC communications, i.e. stop interrupt reception, and flush all queued buffers */
|
||||||
void HTCStop(HTC_HANDLE HTCHandle)
|
void HTCStop(HTC_HANDLE HTCHandle)
|
||||||
{
|
{
|
||||||
HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
|
struct htc_target *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
|
||||||
AR_DEBUG_PRINTF(ATH_DEBUG_TRC, ("+HTCStop \n"));
|
AR_DEBUG_PRINTF(ATH_DEBUG_TRC, ("+HTCStop \n"));
|
||||||
|
|
||||||
LOCK_HTC(target);
|
LOCK_HTC(target);
|
||||||
|
@ -496,7 +496,7 @@ void HTCStop(HTC_HANDLE HTCHandle)
|
||||||
#ifdef ATH_DEBUG_MODULE
|
#ifdef ATH_DEBUG_MODULE
|
||||||
void HTCDumpCreditStates(HTC_HANDLE HTCHandle)
|
void HTCDumpCreditStates(HTC_HANDLE HTCHandle)
|
||||||
{
|
{
|
||||||
HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
|
struct htc_target *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
|
||||||
|
|
||||||
LOCK_HTC_TX(target);
|
LOCK_HTC_TX(target);
|
||||||
|
|
||||||
|
@ -511,7 +511,7 @@ void HTCDumpCreditStates(HTC_HANDLE HTCHandle)
|
||||||
* which uses a mechanism to report errors from the target (i.e. special interrupts) */
|
* which uses a mechanism to report errors from the target (i.e. special interrupts) */
|
||||||
static void HTCReportFailure(void *Context)
|
static void HTCReportFailure(void *Context)
|
||||||
{
|
{
|
||||||
HTC_TARGET *target = (HTC_TARGET *)Context;
|
struct htc_target *target = (struct htc_target *)Context;
|
||||||
|
|
||||||
target->TargetFailure = true;
|
target->TargetFailure = true;
|
||||||
|
|
||||||
|
@ -528,7 +528,7 @@ bool HTCGetEndpointStatistics(HTC_HANDLE HTCHandle,
|
||||||
{
|
{
|
||||||
|
|
||||||
#ifdef HTC_EP_STAT_PROFILING
|
#ifdef HTC_EP_STAT_PROFILING
|
||||||
HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
|
struct htc_target *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
|
||||||
bool clearStats = false;
|
bool clearStats = false;
|
||||||
bool sample = false;
|
bool sample = false;
|
||||||
|
|
||||||
|
@ -575,7 +575,7 @@ bool HTCGetEndpointStatistics(HTC_HANDLE HTCHandle,
|
||||||
|
|
||||||
struct ar6k_device *HTCGetAR6KDevice(void *HTCHandle)
|
struct ar6k_device *HTCGetAR6KDevice(void *HTCHandle)
|
||||||
{
|
{
|
||||||
HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
|
struct htc_target *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
|
||||||
return &target->Device;
|
return &target->Device;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -79,7 +79,7 @@ struct htc_endpoint {
|
||||||
int TxProcessCount; /* reference count to continue tx processing */
|
int TxProcessCount; /* reference count to continue tx processing */
|
||||||
struct htc_packet_queue RecvIndicationQueue; /* recv packets ready to be indicated */
|
struct htc_packet_queue RecvIndicationQueue; /* recv packets ready to be indicated */
|
||||||
int RxProcessCount; /* reference count to allow single processing context */
|
int RxProcessCount; /* reference count to allow single processing context */
|
||||||
struct _HTC_TARGET *target; /* back pointer to target */
|
struct htc_target *target; /* back pointer to target */
|
||||||
u8 SeqNo; /* TX seq no (helpful) for debugging */
|
u8 SeqNo; /* TX seq no (helpful) for debugging */
|
||||||
u32 LocalConnectionFlags; /* local connection flags */
|
u32 LocalConnectionFlags; /* local connection flags */
|
||||||
#ifdef HTC_EP_STAT_PROFILING
|
#ifdef HTC_EP_STAT_PROFILING
|
||||||
|
@ -108,7 +108,7 @@ struct htc_control_buffer {
|
||||||
#define HTC_OP_STATE_STOPPING (1 << 0)
|
#define HTC_OP_STATE_STOPPING (1 << 0)
|
||||||
|
|
||||||
/* our HTC target state */
|
/* our HTC target state */
|
||||||
typedef struct _HTC_TARGET {
|
struct htc_target {
|
||||||
struct htc_endpoint EndPoint[ENDPOINT_MAX];
|
struct htc_endpoint EndPoint[ENDPOINT_MAX];
|
||||||
struct htc_control_buffer HTCControlBuffers[NUM_CONTROL_BUFFERS];
|
struct htc_control_buffer HTCControlBuffers[NUM_CONTROL_BUFFERS];
|
||||||
struct htc_endpoint_credit_dist *EpCreditDistributionListHead;
|
struct htc_endpoint_credit_dist *EpCreditDistributionListHead;
|
||||||
|
@ -137,7 +137,7 @@ typedef struct _HTC_TARGET {
|
||||||
int MaxMsgPerBundle; /* max messages per bundle for HTC */
|
int MaxMsgPerBundle; /* max messages per bundle for HTC */
|
||||||
bool SendBundlingEnabled; /* run time enable for send bundling (dynamic) */
|
bool SendBundlingEnabled; /* run time enable for send bundling (dynamic) */
|
||||||
int RecvBundlingEnabled; /* run time enable for recv bundling (dynamic) */
|
int RecvBundlingEnabled; /* run time enable for recv bundling (dynamic) */
|
||||||
} HTC_TARGET;
|
};
|
||||||
|
|
||||||
#define HTC_STOPPING(t) ((t)->OpStateFlags & HTC_OP_STATE_STOPPING)
|
#define HTC_STOPPING(t) ((t)->OpStateFlags & HTC_OP_STATE_STOPPING)
|
||||||
#define LOCK_HTC(t) A_MUTEX_LOCK(&(t)->HTCLock);
|
#define LOCK_HTC(t) A_MUTEX_LOCK(&(t)->HTCLock);
|
||||||
|
@ -147,7 +147,7 @@ typedef struct _HTC_TARGET {
|
||||||
#define LOCK_HTC_TX(t) A_MUTEX_LOCK(&(t)->HTCTxLock);
|
#define LOCK_HTC_TX(t) A_MUTEX_LOCK(&(t)->HTCTxLock);
|
||||||
#define UNLOCK_HTC_TX(t) A_MUTEX_UNLOCK(&(t)->HTCTxLock);
|
#define UNLOCK_HTC_TX(t) A_MUTEX_UNLOCK(&(t)->HTCTxLock);
|
||||||
|
|
||||||
#define GET_HTC_TARGET_FROM_HANDLE(hnd) ((HTC_TARGET *)(hnd))
|
#define GET_HTC_TARGET_FROM_HANDLE(hnd) ((struct htc_target *)(hnd))
|
||||||
#define HTC_RECYCLE_RX_PKT(target,p,e) \
|
#define HTC_RECYCLE_RX_PKT(target,p,e) \
|
||||||
{ \
|
{ \
|
||||||
if ((p)->PktInfo.AsRx.HTCRxFlags & HTC_RX_PKT_NO_RECYCLE) { \
|
if ((p)->PktInfo.AsRx.HTCRxFlags & HTC_RX_PKT_NO_RECYCLE) { \
|
||||||
|
@ -164,24 +164,24 @@ typedef struct _HTC_TARGET {
|
||||||
/* internal HTC functions */
|
/* internal HTC functions */
|
||||||
void HTCControlTxComplete(void *Context, struct htc_packet *pPacket);
|
void HTCControlTxComplete(void *Context, struct htc_packet *pPacket);
|
||||||
void HTCControlRecv(void *Context, struct htc_packet *pPacket);
|
void HTCControlRecv(void *Context, struct htc_packet *pPacket);
|
||||||
int HTCWaitforControlMessage(HTC_TARGET *target, struct htc_packet **ppControlPacket);
|
int HTCWaitforControlMessage(struct htc_target *target, struct htc_packet **ppControlPacket);
|
||||||
struct htc_packet *HTCAllocControlBuffer(HTC_TARGET *target, struct htc_packet_queue *pList);
|
struct htc_packet *HTCAllocControlBuffer(struct htc_target *target, struct htc_packet_queue *pList);
|
||||||
void HTCFreeControlBuffer(HTC_TARGET *target, struct htc_packet *pPacket, struct htc_packet_queue *pList);
|
void HTCFreeControlBuffer(struct htc_target *target, struct htc_packet *pPacket, struct htc_packet_queue *pList);
|
||||||
int HTCIssueSend(HTC_TARGET *target, struct htc_packet *pPacket);
|
int HTCIssueSend(struct htc_target *target, struct htc_packet *pPacket);
|
||||||
void HTCRecvCompleteHandler(void *Context, struct htc_packet *pPacket);
|
void HTCRecvCompleteHandler(void *Context, struct htc_packet *pPacket);
|
||||||
int HTCRecvMessagePendingHandler(void *Context, u32 MsgLookAheads[], int NumLookAheads, bool *pAsyncProc, int *pNumPktsFetched);
|
int HTCRecvMessagePendingHandler(void *Context, u32 MsgLookAheads[], int NumLookAheads, bool *pAsyncProc, int *pNumPktsFetched);
|
||||||
void HTCProcessCreditRpt(HTC_TARGET *target, HTC_CREDIT_REPORT *pRpt, int NumEntries, HTC_ENDPOINT_ID FromEndpoint);
|
void HTCProcessCreditRpt(struct htc_target *target, HTC_CREDIT_REPORT *pRpt, int NumEntries, HTC_ENDPOINT_ID FromEndpoint);
|
||||||
int HTCSendSetupComplete(HTC_TARGET *target);
|
int HTCSendSetupComplete(struct htc_target *target);
|
||||||
void HTCFlushRecvBuffers(HTC_TARGET *target);
|
void HTCFlushRecvBuffers(struct htc_target *target);
|
||||||
void HTCFlushSendPkts(HTC_TARGET *target);
|
void HTCFlushSendPkts(struct htc_target *target);
|
||||||
|
|
||||||
#ifdef ATH_DEBUG_MODULE
|
#ifdef ATH_DEBUG_MODULE
|
||||||
void DumpCreditDist(struct htc_endpoint_credit_dist *pEPDist);
|
void DumpCreditDist(struct htc_endpoint_credit_dist *pEPDist);
|
||||||
void DumpCreditDistStates(HTC_TARGET *target);
|
void DumpCreditDistStates(struct htc_target *target);
|
||||||
void DebugDumpBytes(u8 *buffer, u16 length, char *pDescription);
|
void DebugDumpBytes(u8 *buffer, u16 length, char *pDescription);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static INLINE struct htc_packet *HTC_ALLOC_CONTROL_TX(HTC_TARGET *target) {
|
static INLINE struct htc_packet *HTC_ALLOC_CONTROL_TX(struct htc_target *target) {
|
||||||
struct htc_packet *pPacket = HTCAllocControlBuffer(target,&target->ControlBufferTXFreeList);
|
struct htc_packet *pPacket = HTCAllocControlBuffer(target,&target->ControlBufferTXFreeList);
|
||||||
if (pPacket != NULL) {
|
if (pPacket != NULL) {
|
||||||
/* set payload pointer area with some headroom */
|
/* set payload pointer area with some headroom */
|
||||||
|
|
|
@ -83,7 +83,7 @@ static void DoRecvCompletion(struct htc_endpoint *pEndpoint,
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static INLINE int HTCProcessTrailer(HTC_TARGET *target,
|
static INLINE int HTCProcessTrailer(struct htc_target *target,
|
||||||
u8 *pBuffer,
|
u8 *pBuffer,
|
||||||
int Length,
|
int Length,
|
||||||
u32 *pNextLookAheads,
|
u32 *pNextLookAheads,
|
||||||
|
@ -226,7 +226,7 @@ static INLINE int HTCProcessTrailer(HTC_TARGET *target,
|
||||||
|
|
||||||
/* process a received message (i.e. strip off header, process any trailer data)
|
/* process a received message (i.e. strip off header, process any trailer data)
|
||||||
* note : locks must be released when this function is called */
|
* note : locks must be released when this function is called */
|
||||||
static int HTCProcessRecvHeader(HTC_TARGET *target,
|
static int HTCProcessRecvHeader(struct htc_target *target,
|
||||||
struct htc_packet *pPacket,
|
struct htc_packet *pPacket,
|
||||||
u32 *pNextLookAheads,
|
u32 *pNextLookAheads,
|
||||||
int *pNumLookAheads)
|
int *pNumLookAheads)
|
||||||
|
@ -385,7 +385,7 @@ static int HTCProcessRecvHeader(HTC_TARGET *target,
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
static INLINE void HTCAsyncRecvCheckMorePackets(HTC_TARGET *target,
|
static INLINE void HTCAsyncRecvCheckMorePackets(struct htc_target *target,
|
||||||
u32 NextLookAheads[],
|
u32 NextLookAheads[],
|
||||||
int NumLookAheads,
|
int NumLookAheads,
|
||||||
bool CheckMoreMsgs)
|
bool CheckMoreMsgs)
|
||||||
|
@ -432,7 +432,7 @@ static INLINE void HTCAsyncRecvCheckMorePackets(HTC_TARGET *target,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* unload the recv completion queue */
|
/* unload the recv completion queue */
|
||||||
static INLINE void DrainRecvIndicationQueue(HTC_TARGET *target, struct htc_endpoint *pEndpoint)
|
static INLINE void DrainRecvIndicationQueue(struct htc_target *target, struct htc_endpoint *pEndpoint)
|
||||||
{
|
{
|
||||||
struct htc_packet_queue recvCompletions;
|
struct htc_packet_queue recvCompletions;
|
||||||
|
|
||||||
|
@ -517,7 +517,7 @@ static INLINE void SetRxPacketIndicationFlags(u32 LookAhead,
|
||||||
* completes a read request, it will call this completion handler */
|
* completes a read request, it will call this completion handler */
|
||||||
void HTCRecvCompleteHandler(void *Context, struct htc_packet *pPacket)
|
void HTCRecvCompleteHandler(void *Context, struct htc_packet *pPacket)
|
||||||
{
|
{
|
||||||
HTC_TARGET *target = (HTC_TARGET *)Context;
|
struct htc_target *target = (struct htc_target *)Context;
|
||||||
struct htc_endpoint *pEndpoint;
|
struct htc_endpoint *pEndpoint;
|
||||||
u32 nextLookAheads[HTC_HOST_MAX_MSG_PER_BUNDLE];
|
u32 nextLookAheads[HTC_HOST_MAX_MSG_PER_BUNDLE];
|
||||||
int numLookAheads = 0;
|
int numLookAheads = 0;
|
||||||
|
@ -587,7 +587,7 @@ void HTCRecvCompleteHandler(void *Context, struct htc_packet *pPacket)
|
||||||
/* synchronously wait for a control message from the target,
|
/* synchronously wait for a control message from the target,
|
||||||
* This function is used at initialization time ONLY. At init messages
|
* This function is used at initialization time ONLY. At init messages
|
||||||
* on ENDPOINT 0 are expected. */
|
* on ENDPOINT 0 are expected. */
|
||||||
int HTCWaitforControlMessage(HTC_TARGET *target, struct htc_packet **ppControlPacket)
|
int HTCWaitforControlMessage(struct htc_target *target, struct htc_packet **ppControlPacket)
|
||||||
{
|
{
|
||||||
int status;
|
int status;
|
||||||
u32 lookAhead;
|
u32 lookAhead;
|
||||||
|
@ -686,7 +686,7 @@ int HTCWaitforControlMessage(HTC_TARGET *target, struct htc_packet **ppControlPa
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int AllocAndPrepareRxPackets(HTC_TARGET *target,
|
static int AllocAndPrepareRxPackets(struct htc_target *target,
|
||||||
u32 LookAheads[],
|
u32 LookAheads[],
|
||||||
int Messages,
|
int Messages,
|
||||||
struct htc_endpoint *pEndpoint,
|
struct htc_endpoint *pEndpoint,
|
||||||
|
@ -886,7 +886,7 @@ static void HTCAsyncRecvScatterCompletion(struct hif_scatter_req *pScatterReq)
|
||||||
struct htc_endpoint *pEndpoint;
|
struct htc_endpoint *pEndpoint;
|
||||||
u32 lookAheads[HTC_HOST_MAX_MSG_PER_BUNDLE];
|
u32 lookAheads[HTC_HOST_MAX_MSG_PER_BUNDLE];
|
||||||
int numLookAheads = 0;
|
int numLookAheads = 0;
|
||||||
HTC_TARGET *target = (HTC_TARGET *)pScatterReq->Context;
|
struct htc_target *target = (struct htc_target *)pScatterReq->Context;
|
||||||
int status;
|
int status;
|
||||||
bool partialBundle = false;
|
bool partialBundle = false;
|
||||||
struct htc_packet_queue localRecvQueue;
|
struct htc_packet_queue localRecvQueue;
|
||||||
|
@ -984,7 +984,7 @@ static void HTCAsyncRecvScatterCompletion(struct hif_scatter_req *pScatterReq)
|
||||||
AR_DEBUG_PRINTF(ATH_DEBUG_RECV,("-HTCAsyncRecvScatterCompletion \n"));
|
AR_DEBUG_PRINTF(ATH_DEBUG_RECV,("-HTCAsyncRecvScatterCompletion \n"));
|
||||||
}
|
}
|
||||||
|
|
||||||
static int HTCIssueRecvPacketBundle(HTC_TARGET *target,
|
static int HTCIssueRecvPacketBundle(struct htc_target *target,
|
||||||
struct htc_packet_queue *pRecvPktQueue,
|
struct htc_packet_queue *pRecvPktQueue,
|
||||||
struct htc_packet_queue *pSyncCompletionQueue,
|
struct htc_packet_queue *pSyncCompletionQueue,
|
||||||
int *pNumPacketsFetched,
|
int *pNumPacketsFetched,
|
||||||
|
@ -1119,7 +1119,7 @@ static INLINE void CheckRecvWaterMark(struct htc_endpoint *pEndpoint)
|
||||||
/* callback when device layer or lookahead report parsing detects a pending message */
|
/* callback when device layer or lookahead report parsing detects a pending message */
|
||||||
int HTCRecvMessagePendingHandler(void *Context, u32 MsgLookAheads[], int NumLookAheads, bool *pAsyncProc, int *pNumPktsFetched)
|
int HTCRecvMessagePendingHandler(void *Context, u32 MsgLookAheads[], int NumLookAheads, bool *pAsyncProc, int *pNumPktsFetched)
|
||||||
{
|
{
|
||||||
HTC_TARGET *target = (HTC_TARGET *)Context;
|
struct htc_target *target = (struct htc_target *)Context;
|
||||||
int status = 0;
|
int status = 0;
|
||||||
struct htc_packet *pPacket;
|
struct htc_packet *pPacket;
|
||||||
struct htc_endpoint *pEndpoint;
|
struct htc_endpoint *pEndpoint;
|
||||||
|
@ -1387,7 +1387,7 @@ int HTCRecvMessagePendingHandler(void *Context, u32 MsgLookAheads[], int NumLook
|
||||||
|
|
||||||
int HTCAddReceivePktMultiple(HTC_HANDLE HTCHandle, struct htc_packet_queue *pPktQueue)
|
int HTCAddReceivePktMultiple(HTC_HANDLE HTCHandle, struct htc_packet_queue *pPktQueue)
|
||||||
{
|
{
|
||||||
HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
|
struct htc_target *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
|
||||||
struct htc_endpoint *pEndpoint;
|
struct htc_endpoint *pEndpoint;
|
||||||
bool unblockRecv = false;
|
bool unblockRecv = false;
|
||||||
int status = 0;
|
int status = 0;
|
||||||
|
@ -1464,7 +1464,7 @@ int HTCAddReceivePkt(HTC_HANDLE HTCHandle, struct htc_packet *pPacket)
|
||||||
|
|
||||||
void HTCUnblockRecv(HTC_HANDLE HTCHandle)
|
void HTCUnblockRecv(HTC_HANDLE HTCHandle)
|
||||||
{
|
{
|
||||||
HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
|
struct htc_target *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
|
||||||
bool unblockRecv = false;
|
bool unblockRecv = false;
|
||||||
|
|
||||||
LOCK_HTC_RX(target);
|
LOCK_HTC_RX(target);
|
||||||
|
@ -1486,7 +1486,7 @@ void HTCUnblockRecv(HTC_HANDLE HTCHandle)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void HTCFlushRxQueue(HTC_TARGET *target, struct htc_endpoint *pEndpoint, struct htc_packet_queue *pQueue)
|
static void HTCFlushRxQueue(struct htc_target *target, struct htc_endpoint *pEndpoint, struct htc_packet_queue *pQueue)
|
||||||
{
|
{
|
||||||
struct htc_packet *pPacket;
|
struct htc_packet *pPacket;
|
||||||
struct htc_packet_queue container;
|
struct htc_packet_queue container;
|
||||||
|
@ -1512,7 +1512,7 @@ static void HTCFlushRxQueue(HTC_TARGET *target, struct htc_endpoint *pEndpoint,
|
||||||
UNLOCK_HTC_RX(target);
|
UNLOCK_HTC_RX(target);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void HTCFlushEndpointRX(HTC_TARGET *target, struct htc_endpoint *pEndpoint)
|
static void HTCFlushEndpointRX(struct htc_target *target, struct htc_endpoint *pEndpoint)
|
||||||
{
|
{
|
||||||
/* flush any recv indications not already made */
|
/* flush any recv indications not already made */
|
||||||
HTCFlushRxQueue(target,pEndpoint,&pEndpoint->RecvIndicationQueue);
|
HTCFlushRxQueue(target,pEndpoint,&pEndpoint->RecvIndicationQueue);
|
||||||
|
@ -1520,7 +1520,7 @@ static void HTCFlushEndpointRX(HTC_TARGET *target, struct htc_endpoint *pEndpoin
|
||||||
HTCFlushRxQueue(target,pEndpoint,&pEndpoint->RxBuffers);
|
HTCFlushRxQueue(target,pEndpoint,&pEndpoint->RxBuffers);
|
||||||
}
|
}
|
||||||
|
|
||||||
void HTCFlushRecvBuffers(HTC_TARGET *target)
|
void HTCFlushRecvBuffers(struct htc_target *target)
|
||||||
{
|
{
|
||||||
struct htc_endpoint *pEndpoint;
|
struct htc_endpoint *pEndpoint;
|
||||||
int i;
|
int i;
|
||||||
|
@ -1538,7 +1538,7 @@ void HTCFlushRecvBuffers(HTC_TARGET *target)
|
||||||
|
|
||||||
void HTCEnableRecv(HTC_HANDLE HTCHandle)
|
void HTCEnableRecv(HTC_HANDLE HTCHandle)
|
||||||
{
|
{
|
||||||
HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
|
struct htc_target *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
|
||||||
|
|
||||||
if (!HTC_STOPPING(target)) {
|
if (!HTC_STOPPING(target)) {
|
||||||
/* re-enable */
|
/* re-enable */
|
||||||
|
@ -1548,7 +1548,7 @@ void HTCEnableRecv(HTC_HANDLE HTCHandle)
|
||||||
|
|
||||||
void HTCDisableRecv(HTC_HANDLE HTCHandle)
|
void HTCDisableRecv(HTC_HANDLE HTCHandle)
|
||||||
{
|
{
|
||||||
HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
|
struct htc_target *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
|
||||||
|
|
||||||
if (!HTC_STOPPING(target)) {
|
if (!HTC_STOPPING(target)) {
|
||||||
/* disable */
|
/* disable */
|
||||||
|
@ -1559,7 +1559,7 @@ void HTCDisableRecv(HTC_HANDLE HTCHandle)
|
||||||
int HTCGetNumRecvBuffers(HTC_HANDLE HTCHandle,
|
int HTCGetNumRecvBuffers(HTC_HANDLE HTCHandle,
|
||||||
HTC_ENDPOINT_ID Endpoint)
|
HTC_ENDPOINT_ID Endpoint)
|
||||||
{
|
{
|
||||||
HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
|
struct htc_target *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
|
||||||
return HTC_PACKET_QUEUE_DEPTH(&(target->EndPoint[Endpoint].RxBuffers));
|
return HTC_PACKET_QUEUE_DEPTH(&(target->EndPoint[Endpoint].RxBuffers));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1568,7 +1568,7 @@ int HTCWaitForPendingRecv(HTC_HANDLE HTCHandle,
|
||||||
bool *pbIsRecvPending)
|
bool *pbIsRecvPending)
|
||||||
{
|
{
|
||||||
int status = 0;
|
int status = 0;
|
||||||
HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
|
struct htc_target *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
|
||||||
|
|
||||||
status = DevWaitForPendingRecv(&target->Device,
|
status = DevWaitForPendingRecv(&target->Device,
|
||||||
TimeoutInMs,
|
TimeoutInMs,
|
||||||
|
|
|
@ -77,7 +77,7 @@ static void DoSendCompletion(struct htc_endpoint *pEndpoint,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* do final completion on sent packet */
|
/* do final completion on sent packet */
|
||||||
static INLINE void CompleteSentPacket(HTC_TARGET *target, struct htc_endpoint *pEndpoint, struct htc_packet *pPacket)
|
static INLINE void CompleteSentPacket(struct htc_target *target, struct htc_endpoint *pEndpoint, struct htc_packet *pPacket)
|
||||||
{
|
{
|
||||||
pPacket->Completion = NULL;
|
pPacket->Completion = NULL;
|
||||||
|
|
||||||
|
@ -103,7 +103,7 @@ static INLINE void CompleteSentPacket(HTC_TARGET *target, struct htc_endpoint *p
|
||||||
* layer */
|
* layer */
|
||||||
static void HTCSendPktCompletionHandler(void *Context, struct htc_packet *pPacket)
|
static void HTCSendPktCompletionHandler(void *Context, struct htc_packet *pPacket)
|
||||||
{
|
{
|
||||||
HTC_TARGET *target = (HTC_TARGET *)Context;
|
struct htc_target *target = (struct htc_target *)Context;
|
||||||
struct htc_endpoint *pEndpoint = &target->EndPoint[pPacket->Endpoint];
|
struct htc_endpoint *pEndpoint = &target->EndPoint[pPacket->Endpoint];
|
||||||
struct htc_packet_queue container;
|
struct htc_packet_queue container;
|
||||||
|
|
||||||
|
@ -113,7 +113,7 @@ static void HTCSendPktCompletionHandler(void *Context, struct htc_packet *pPacke
|
||||||
DO_EP_TX_COMPLETION(pEndpoint,&container);
|
DO_EP_TX_COMPLETION(pEndpoint,&container);
|
||||||
}
|
}
|
||||||
|
|
||||||
int HTCIssueSend(HTC_TARGET *target, struct htc_packet *pPacket)
|
int HTCIssueSend(struct htc_target *target, struct htc_packet *pPacket)
|
||||||
{
|
{
|
||||||
int status;
|
int status;
|
||||||
bool sync = false;
|
bool sync = false;
|
||||||
|
@ -146,7 +146,7 @@ int HTCIssueSend(HTC_TARGET *target, struct htc_packet *pPacket)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* get HTC send packets from the TX queue on an endpoint */
|
/* get HTC send packets from the TX queue on an endpoint */
|
||||||
static INLINE void GetHTCSendPackets(HTC_TARGET *target,
|
static INLINE void GetHTCSendPackets(struct htc_target *target,
|
||||||
struct htc_endpoint *pEndpoint,
|
struct htc_endpoint *pEndpoint,
|
||||||
struct htc_packet_queue *pQueue)
|
struct htc_packet_queue *pQueue)
|
||||||
{
|
{
|
||||||
|
@ -269,7 +269,7 @@ static void HTCAsyncSendScatterCompletion(struct hif_scatter_req *pScatterReq)
|
||||||
int i;
|
int i;
|
||||||
struct htc_packet *pPacket;
|
struct htc_packet *pPacket;
|
||||||
struct htc_endpoint *pEndpoint = (struct htc_endpoint *)pScatterReq->Context;
|
struct htc_endpoint *pEndpoint = (struct htc_endpoint *)pScatterReq->Context;
|
||||||
HTC_TARGET *target = (HTC_TARGET *)pEndpoint->target;
|
struct htc_target *target = (struct htc_target *)pEndpoint->target;
|
||||||
int status = 0;
|
int status = 0;
|
||||||
struct htc_packet_queue sendCompletes;
|
struct htc_packet_queue sendCompletes;
|
||||||
|
|
||||||
|
@ -323,7 +323,7 @@ static void HTCIssueSendBundle(struct htc_endpoint *pEndpoint,
|
||||||
bool done = false;
|
bool done = false;
|
||||||
int bundlesSent = 0;
|
int bundlesSent = 0;
|
||||||
int totalPktsInBundle = 0;
|
int totalPktsInBundle = 0;
|
||||||
HTC_TARGET *target = pEndpoint->target;
|
struct htc_target *target = pEndpoint->target;
|
||||||
int creditRemainder = 0;
|
int creditRemainder = 0;
|
||||||
int creditPad;
|
int creditPad;
|
||||||
|
|
||||||
|
@ -477,7 +477,7 @@ static void HTCIssueSendBundle(struct htc_endpoint *pEndpoint,
|
||||||
/*
|
/*
|
||||||
* if there are no credits, the packet(s) remains in the queue.
|
* 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 */
|
* this function returns the result of the attempt to send a queue of HTC packets */
|
||||||
static HTC_SEND_QUEUE_RESULT HTCTrySend(HTC_TARGET *target,
|
static HTC_SEND_QUEUE_RESULT HTCTrySend(struct htc_target *target,
|
||||||
struct htc_endpoint *pEndpoint,
|
struct htc_endpoint *pEndpoint,
|
||||||
struct htc_packet_queue *pCallersSendQueue)
|
struct htc_packet_queue *pCallersSendQueue)
|
||||||
{
|
{
|
||||||
|
@ -670,7 +670,7 @@ static HTC_SEND_QUEUE_RESULT HTCTrySend(HTC_TARGET *target,
|
||||||
|
|
||||||
int HTCSendPktsMultiple(HTC_HANDLE HTCHandle, struct htc_packet_queue *pPktQueue)
|
int HTCSendPktsMultiple(HTC_HANDLE HTCHandle, struct htc_packet_queue *pPktQueue)
|
||||||
{
|
{
|
||||||
HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
|
struct htc_target *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
|
||||||
struct htc_endpoint *pEndpoint;
|
struct htc_endpoint *pEndpoint;
|
||||||
struct htc_packet *pPacket;
|
struct htc_packet *pPacket;
|
||||||
|
|
||||||
|
@ -721,7 +721,7 @@ int HTCSendPkt(HTC_HANDLE HTCHandle, struct htc_packet *pPacket)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* check TX queues to drain because of credit distribution update */
|
/* check TX queues to drain because of credit distribution update */
|
||||||
static INLINE void HTCCheckEndpointTxQueues(HTC_TARGET *target)
|
static INLINE void HTCCheckEndpointTxQueues(struct htc_target *target)
|
||||||
{
|
{
|
||||||
struct htc_endpoint *pEndpoint;
|
struct htc_endpoint *pEndpoint;
|
||||||
struct htc_endpoint_credit_dist *pDistItem;
|
struct htc_endpoint_credit_dist *pDistItem;
|
||||||
|
@ -753,7 +753,7 @@ static INLINE void HTCCheckEndpointTxQueues(HTC_TARGET *target)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* process credit reports and call distribution function */
|
/* process credit reports and call distribution function */
|
||||||
void HTCProcessCreditRpt(HTC_TARGET *target, HTC_CREDIT_REPORT *pRpt, int NumEntries, HTC_ENDPOINT_ID FromEndpoint)
|
void HTCProcessCreditRpt(struct htc_target *target, HTC_CREDIT_REPORT *pRpt, int NumEntries, HTC_ENDPOINT_ID FromEndpoint)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
struct htc_endpoint *pEndpoint;
|
struct htc_endpoint *pEndpoint;
|
||||||
|
@ -838,7 +838,7 @@ void HTCProcessCreditRpt(HTC_TARGET *target, HTC_CREDIT_REPORT *pRpt, int NumEnt
|
||||||
}
|
}
|
||||||
|
|
||||||
/* flush endpoint TX queue */
|
/* flush endpoint TX queue */
|
||||||
static void HTCFlushEndpointTX(HTC_TARGET *target, struct htc_endpoint *pEndpoint, HTC_TX_TAG Tag)
|
static void HTCFlushEndpointTX(struct htc_target *target, struct htc_endpoint *pEndpoint, HTC_TX_TAG Tag)
|
||||||
{
|
{
|
||||||
struct htc_packet *pPacket;
|
struct htc_packet *pPacket;
|
||||||
struct htc_packet_queue discardQueue;
|
struct htc_packet_queue discardQueue;
|
||||||
|
@ -899,7 +899,7 @@ void DumpCreditDist(struct htc_endpoint_credit_dist *pEPDist)
|
||||||
AR_DEBUG_PRINTF(ATH_DEBUG_ANY, ("----------------------------------------------------\n"));
|
AR_DEBUG_PRINTF(ATH_DEBUG_ANY, ("----------------------------------------------------\n"));
|
||||||
}
|
}
|
||||||
|
|
||||||
void DumpCreditDistStates(HTC_TARGET *target)
|
void DumpCreditDistStates(struct htc_target *target)
|
||||||
{
|
{
|
||||||
struct htc_endpoint_credit_dist *pEPList = target->EpCreditDistributionListHead;
|
struct htc_endpoint_credit_dist *pEPList = target->EpCreditDistributionListHead;
|
||||||
|
|
||||||
|
@ -917,7 +917,7 @@ void DumpCreditDistStates(HTC_TARGET *target)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* flush all send packets from all endpoint queues */
|
/* flush all send packets from all endpoint queues */
|
||||||
void HTCFlushSendPkts(HTC_TARGET *target)
|
void HTCFlushSendPkts(struct htc_target *target)
|
||||||
{
|
{
|
||||||
struct htc_endpoint *pEndpoint;
|
struct htc_endpoint *pEndpoint;
|
||||||
int i;
|
int i;
|
||||||
|
@ -941,7 +941,7 @@ void HTCFlushSendPkts(HTC_TARGET *target)
|
||||||
/* HTC API to flush an endpoint's TX queue*/
|
/* HTC API to flush an endpoint's TX queue*/
|
||||||
void HTCFlushEndpoint(HTC_HANDLE HTCHandle, HTC_ENDPOINT_ID Endpoint, HTC_TX_TAG Tag)
|
void HTCFlushEndpoint(HTC_HANDLE HTCHandle, HTC_ENDPOINT_ID Endpoint, HTC_TX_TAG Tag)
|
||||||
{
|
{
|
||||||
HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
|
struct htc_target *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
|
||||||
struct htc_endpoint *pEndpoint = &target->EndPoint[Endpoint];
|
struct htc_endpoint *pEndpoint = &target->EndPoint[Endpoint];
|
||||||
|
|
||||||
if (pEndpoint->ServiceID == 0) {
|
if (pEndpoint->ServiceID == 0) {
|
||||||
|
@ -958,7 +958,7 @@ void HTCIndicateActivityChange(HTC_HANDLE HTCHandle,
|
||||||
HTC_ENDPOINT_ID Endpoint,
|
HTC_ENDPOINT_ID Endpoint,
|
||||||
bool Active)
|
bool Active)
|
||||||
{
|
{
|
||||||
HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
|
struct htc_target *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
|
||||||
struct htc_endpoint *pEndpoint = &target->EndPoint[Endpoint];
|
struct htc_endpoint *pEndpoint = &target->EndPoint[Endpoint];
|
||||||
bool doDist = false;
|
bool doDist = false;
|
||||||
|
|
||||||
|
@ -1008,7 +1008,7 @@ void HTCIndicateActivityChange(HTC_HANDLE HTCHandle,
|
||||||
bool HTCIsEndpointActive(HTC_HANDLE HTCHandle,
|
bool HTCIsEndpointActive(HTC_HANDLE HTCHandle,
|
||||||
HTC_ENDPOINT_ID Endpoint)
|
HTC_ENDPOINT_ID Endpoint)
|
||||||
{
|
{
|
||||||
HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
|
struct htc_target *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
|
||||||
struct htc_endpoint *pEndpoint = &target->EndPoint[Endpoint];
|
struct htc_endpoint *pEndpoint = &target->EndPoint[Endpoint];
|
||||||
|
|
||||||
if (pEndpoint->ServiceID == 0) {
|
if (pEndpoint->ServiceID == 0) {
|
||||||
|
|
|
@ -36,7 +36,7 @@ void HTCControlRecv(void *Context, struct htc_packet *pPacket)
|
||||||
|
|
||||||
if (pPacket->Status == A_ECANCELED) {
|
if (pPacket->Status == A_ECANCELED) {
|
||||||
/* this is a flush operation, return the control packet back to the pool */
|
/* this is a flush operation, return the control packet back to the pool */
|
||||||
HTC_FREE_CONTROL_RX((HTC_TARGET*)Context,pPacket);
|
HTC_FREE_CONTROL_RX((struct htc_target*)Context,pPacket);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -54,10 +54,10 @@ void HTCControlRecv(void *Context, struct htc_packet *pPacket)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
HTC_RECYCLE_RX_PKT((HTC_TARGET*)Context,pPacket,&((HTC_TARGET*)Context)->EndPoint[0]);
|
HTC_RECYCLE_RX_PKT((struct htc_target*)Context,pPacket,&((struct htc_target*)Context)->EndPoint[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
int HTCSendSetupComplete(HTC_TARGET *target)
|
int HTCSendSetupComplete(struct htc_target *target)
|
||||||
{
|
{
|
||||||
struct htc_packet *pSendPacket = NULL;
|
struct htc_packet *pSendPacket = NULL;
|
||||||
int status;
|
int status;
|
||||||
|
@ -125,7 +125,7 @@ int HTCConnectService(HTC_HANDLE HTCHandle,
|
||||||
struct htc_service_connect_req *pConnectReq,
|
struct htc_service_connect_req *pConnectReq,
|
||||||
struct htc_service_connect_resp *pConnectResp)
|
struct htc_service_connect_resp *pConnectResp)
|
||||||
{
|
{
|
||||||
HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
|
struct htc_target *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
|
||||||
int status = 0;
|
int status = 0;
|
||||||
struct htc_packet *pRecvPacket = NULL;
|
struct htc_packet *pRecvPacket = NULL;
|
||||||
struct htc_packet *pSendPacket = NULL;
|
struct htc_packet *pSendPacket = NULL;
|
||||||
|
@ -307,7 +307,7 @@ int HTCConnectService(HTC_HANDLE HTCHandle,
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void AddToEndpointDistList(HTC_TARGET *target, struct htc_endpoint_credit_dist *pEpDist)
|
static void AddToEndpointDistList(struct htc_target *target, struct htc_endpoint_credit_dist *pEpDist)
|
||||||
{
|
{
|
||||||
struct htc_endpoint_credit_dist *pCurEntry,*pLastEntry;
|
struct htc_endpoint_credit_dist *pCurEntry,*pLastEntry;
|
||||||
|
|
||||||
|
@ -408,7 +408,7 @@ void HTCSetCreditDistribution(HTC_HANDLE HTCHandle,
|
||||||
HTC_SERVICE_ID ServicePriorityOrder[],
|
HTC_SERVICE_ID ServicePriorityOrder[],
|
||||||
int ListLength)
|
int ListLength)
|
||||||
{
|
{
|
||||||
HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
|
struct htc_target *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
|
||||||
int i;
|
int i;
|
||||||
int ep;
|
int ep;
|
||||||
|
|
||||||
|
|
Reference in a new issue