static void DevCleanupVirtualScatterSupport(struct ar6k_device *pDev);
-void AR6KFreeIOPacket(struct ar6k_device *pDev, HTC_PACKET *pPacket)
+void AR6KFreeIOPacket(struct ar6k_device *pDev, struct htc_packet *pPacket)
{
LOCK_AR6K(pDev);
HTC_PACKET_ENQUEUE(&pDev->RegisterIOList,pPacket);
UNLOCK_AR6K(pDev);
}
-HTC_PACKET *AR6KAllocIOPacket(struct ar6k_device *pDev)
+struct htc_packet *AR6KAllocIOPacket(struct ar6k_device *pDev)
{
- HTC_PACKET *pPacket;
+ struct htc_packet *pPacket;
LOCK_AR6K(pDev);
pPacket = HTC_PACKET_DEQUEUE(&pDev->RegisterIOList);
/* carve up register I/O packets (these are for ASYNC register I/O ) */
for (i = 0; i < AR6K_MAX_REG_IO_BUFFERS; i++) {
- HTC_PACKET *pIOPacket;
+ struct htc_packet *pIOPacket;
pIOPacket = &pDev->RegIOBuffers[i].HtcPacket;
SET_HTC_PACKET_INFO_RX_REFILL(pIOPacket,
pDev,
}
/* callback when our fetch to enable/disable completes */
-static void DevDoEnableDisableRecvAsyncHandler(void *Context, HTC_PACKET *pPacket)
+static void DevDoEnableDisableRecvAsyncHandler(void *Context, struct htc_packet *pPacket)
{
struct ar6k_device *pDev = (struct ar6k_device *)Context;
static int DevDoEnableDisableRecvOverride(struct ar6k_device *pDev, bool EnableRecv, bool AsyncMode)
{
int status = 0;
- HTC_PACKET *pIOPacket = NULL;
+ struct htc_packet *pIOPacket = NULL;
AR_DEBUG_PRINTF(ATH_DEBUG_TRC,("DevDoEnableDisableRecvOverride: Enable:%d Mode:%d\n",
EnableRecv,AsyncMode));
static int DevDoEnableDisableRecvNormal(struct ar6k_device *pDev, bool EnableRecv, bool AsyncMode)
{
int status = 0;
- HTC_PACKET *pIOPacket = NULL;
+ struct htc_packet *pIOPacket = NULL;
struct ar6k_irq_enable_registers regs;
/* take the lock to protect interrupt enable shadows */
return 0;
}
-static void DevReadWriteScatterAsyncHandler(void *Context, HTC_PACKET *pPacket)
+static void DevReadWriteScatterAsyncHandler(void *Context, struct htc_packet *pPacket)
{
struct ar6k_device *pDev = (struct ar6k_device *)Context;
struct hif_scatter_req *pReq = (struct hif_scatter_req *)pPacket->pPktContext;
{
struct ar6k_device *pDev = (struct ar6k_device *)Context;
int status = 0;
- HTC_PACKET *pIOPacket = NULL;
+ struct htc_packet *pIOPacket = NULL;
u32 request = pReq->Request;
do {
/* buffers for ASYNC I/O */
struct ar6k_async_reg_io_buffer {
- HTC_PACKET HtcPacket; /* we use an HTC packet as a wrapper for our async register-based I/O */
+ struct htc_packet HtcPacket; /* we use an HTC packet as a wrapper for our async register-based I/O */
u8 _Pad1[A_CACHE_LINE_PAD];
u8 Buffer[AR6K_REG_IO_BUFFER_SIZE]; /* cache-line safe with pads around */
u8 _Pad2[A_CACHE_LINE_PAD];
#define DEV_CALC_SEND_PADDED_LEN(pDev, length) DEV_CALC_RECV_PADDED_LEN(pDev,length)
#define DEV_IS_LEN_BLOCK_ALIGNED(pDev, length) (((length) % (pDev)->BlockSize) == 0)
-static INLINE int DevSendPacket(struct ar6k_device *pDev, HTC_PACKET *pPacket, u32 SendLength) {
+static INLINE int DevSendPacket(struct ar6k_device *pDev, struct htc_packet *pPacket, u32 SendLength) {
u32 paddedLength;
bool sync = (pPacket->Completion == NULL) ? true : false;
int status;
return status;
}
-static INLINE int DevRecvPacket(struct ar6k_device *pDev, HTC_PACKET *pPacket, u32 RecvLength) {
+static INLINE int DevRecvPacket(struct ar6k_device *pDev, struct htc_packet *pPacket, u32 RecvLength) {
u32 paddedLength;
int status;
bool sync = (pPacket->Completion == NULL) ? true : false;
#define DEV_GMBOX_GET_PROTOCOL(pDev) (pDev)->GMboxInfo.pProtocolContext
-int DevGMboxWrite(struct ar6k_device *pDev, HTC_PACKET *pPacket, u32 WriteLength);
-int DevGMboxRead(struct ar6k_device *pDev, HTC_PACKET *pPacket, u32 ReadLength);
+int DevGMboxWrite(struct ar6k_device *pDev, struct htc_packet *pPacket, u32 WriteLength);
+int DevGMboxRead(struct ar6k_device *pDev, struct htc_packet *pPacket, u32 ReadLength);
#define PROC_IO_ASYNC true
#define PROC_IO_SYNC false
#include "htc_packet.h"
#include "ar6k.h"
-extern void AR6KFreeIOPacket(struct ar6k_device *pDev, HTC_PACKET *pPacket);
-extern HTC_PACKET *AR6KAllocIOPacket(struct ar6k_device *pDev);
+extern void AR6KFreeIOPacket(struct ar6k_device *pDev, struct htc_packet *pPacket);
+extern struct htc_packet *AR6KAllocIOPacket(struct ar6k_device *pDev);
static int DevServiceDebugInterrupt(struct ar6k_device *pDev);
/* completion routine for ALL HIF layer async I/O */
int DevRWCompletionHandler(void *context, int status)
{
- HTC_PACKET *pPacket = (HTC_PACKET *)context;
+ struct htc_packet *pPacket = (struct htc_packet *)context;
AR_DEBUG_PRINTF(ATH_DEBUG_RECV,
("+DevRWCompletionHandler (Pkt:0x%lX) , Status: %d \n",
}
/* callback when our fetch to get interrupt status registers completes */
-static void DevGetEventAsyncHandler(void *Context, HTC_PACKET *pPacket)
+static void DevGetEventAsyncHandler(void *Context, struct htc_packet *pPacket)
{
struct ar6k_device *pDev = (struct ar6k_device *)Context;
u32 lookAhead = 0;
{
struct ar6k_device *pDev = (struct ar6k_device *)context;
int status = 0;
- HTC_PACKET *pIOPacket;
+ struct htc_packet *pIOPacket;
/* this is called in an ASYNC only context, we may NOT block, sleep or call any apis that can
* cause us to switch contexts */
/* external APIs for allocating and freeing internal I/O packets to handle ASYNC I/O */
-extern void AR6KFreeIOPacket(struct ar6k_device *pDev, HTC_PACKET *pPacket);
-extern HTC_PACKET *AR6KAllocIOPacket(struct ar6k_device *pDev);
+extern void AR6KFreeIOPacket(struct ar6k_device *pDev, struct htc_packet *pPacket);
+extern struct htc_packet *AR6KAllocIOPacket(struct ar6k_device *pDev);
/* callback when our fetch to enable/disable completes */
-static void DevGMboxIRQActionAsyncHandler(void *Context, HTC_PACKET *pPacket)
+static void DevGMboxIRQActionAsyncHandler(void *Context, struct htc_packet *pPacket)
{
struct ar6k_device *pDev = (struct ar6k_device *)Context;
{
int status = 0;
struct ar6k_irq_enable_registers regs;
- HTC_PACKET *pIOPacket = NULL;
+ struct htc_packet *pIOPacket = NULL;
LOCK_AR6K(pDev);
int DevGMboxIRQAction(struct ar6k_device *pDev, GMBOX_IRQ_ACTION_TYPE IrqAction, bool AsyncMode)
{
int status = 0;
- HTC_PACKET *pIOPacket = NULL;
+ struct htc_packet *pIOPacket = NULL;
u8 GMboxIntControl[4];
if (GMBOX_CREDIT_IRQ_ENABLE == IrqAction) {
}
-int DevGMboxWrite(struct ar6k_device *pDev, HTC_PACKET *pPacket, u32 WriteLength)
+int DevGMboxWrite(struct ar6k_device *pDev, struct htc_packet *pPacket, u32 WriteLength)
{
u32 paddedLength;
bool sync = (pPacket->Completion == NULL) ? true : false;
return status;
}
-int DevGMboxRead(struct ar6k_device *pDev, HTC_PACKET *pPacket, u32 ReadLength)
+int DevGMboxRead(struct ar6k_device *pDev, struct htc_packet *pPacket, u32 ReadLength)
{
u32 paddedLength;
/* callback when our fetch to enable/disable completes */
-static void DevGMboxReadCreditsAsyncHandler(void *Context, HTC_PACKET *pPacket)
+static void DevGMboxReadCreditsAsyncHandler(void *Context, struct htc_packet *pPacket)
{
struct ar6k_device *pDev = (struct ar6k_device *)Context;
int DevGMboxReadCreditCounter(struct ar6k_device *pDev, bool AsyncMode, int *pCredits)
{
int status = 0;
- HTC_PACKET *pIOPacket = NULL;
+ struct htc_packet *pIOPacket = NULL;
AR_DEBUG_PRINTF(ATH_DEBUG_SEND,("+DevGMboxReadCreditCounter (%s) \n", AsyncMode ? "ASYNC" : "SYNC"));
(p)->HCIConfig.pHCISendComplete((p)->HCIConfig.pContext, (pt)); \
}
-static int HCITrySend(struct gmbox_proto_hci_uart *pProt, HTC_PACKET *pPacket, bool Synchronous);
+static int HCITrySend(struct gmbox_proto_hci_uart *pProt, struct htc_packet *pPacket, bool Synchronous);
static void HCIUartCleanup(struct gmbox_proto_hci_uart *pProtocol)
{
HCI_TRANSPORT_PACKET_TYPE pktType = HCI_PACKET_INVALID;
bool recvRefillCalled = false;
bool blockRecv = false;
- HTC_PACKET *pPacket = NULL;
+ struct htc_packet *pPacket = NULL;
/** caller guarantees that this is a fully block-able context (synch I/O is allowed) */
return status;
}
-static void HCISendPacketCompletion(void *Context, HTC_PACKET *pPacket)
+static void HCISendPacketCompletion(void *Context, struct htc_packet *pPacket)
{
struct gmbox_proto_hci_uart *pProt = (struct gmbox_proto_hci_uart *)Context;
AR_DEBUG_PRINTF(ATH_DEBUG_SEND,("+HCISendPacketCompletion (pPacket:0x%lX) \n",(unsigned long)pPacket));
return status;
}
-static int HCITrySend(struct gmbox_proto_hci_uart *pProt, HTC_PACKET *pPacket, bool Synchronous)
+static int HCITrySend(struct gmbox_proto_hci_uart *pProt, struct htc_packet *pPacket, bool Synchronous)
{
int status = 0;
int transferLength;
static void FlushSendQueue(struct gmbox_proto_hci_uart *pProt)
{
- HTC_PACKET *pPacket;
+ struct htc_packet *pPacket;
HTC_PACKET_QUEUE discardQueue;
INIT_HTC_PACKET_QUEUE(&discardQueue);
static void FlushRecvBuffers(struct gmbox_proto_hci_uart *pProt)
{
HTC_PACKET_QUEUE discardQueue;
- HTC_PACKET *pPacket;
+ struct htc_packet *pPacket;
INIT_HTC_PACKET_QUEUE(&discardQueue);
struct gmbox_proto_hci_uart *pProt = (struct gmbox_proto_hci_uart *)HciTrans;
int status = 0;
bool unblockRecv = false;
- HTC_PACKET *pPacket;
+ struct htc_packet *pPacket;
AR_DEBUG_PRINTF(ATH_DEBUG_RECV,("+HCI_TransportAddReceivePkt \n"));
return 0;
}
-int HCI_TransportSendPkt(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET *pPacket, bool Synchronous)
+int HCI_TransportSendPkt(HCI_TRANSPORT_HANDLE HciTrans, struct htc_packet *pPacket, bool Synchronous)
{
struct gmbox_proto_hci_uart *pProt = (struct gmbox_proto_hci_uart *)HciTrans;
}
int HCI_TransportRecvHCIEventSync(HCI_TRANSPORT_HANDLE HciTrans,
- HTC_PACKET *pPacket,
+ struct htc_packet *pPacket,
int MaxPollMS)
{
struct gmbox_proto_hci_uart *pProt = (struct gmbox_proto_hci_uart *)HciTrans;
static void HTCReportFailure(void *Context);
static void ResetEndpointStates(HTC_TARGET *target);
-void HTCFreeControlBuffer(HTC_TARGET *target, HTC_PACKET *pPacket, HTC_PACKET_QUEUE *pList)
+void HTCFreeControlBuffer(HTC_TARGET *target, struct htc_packet *pPacket, HTC_PACKET_QUEUE *pList)
{
LOCK_HTC(target);
HTC_PACKET_ENQUEUE(pList,pPacket);
UNLOCK_HTC(target);
}
-HTC_PACKET *HTCAllocControlBuffer(HTC_TARGET *target, HTC_PACKET_QUEUE *pList)
+struct htc_packet *HTCAllocControlBuffer(HTC_TARGET *target, HTC_PACKET_QUEUE *pList)
{
- HTC_PACKET *pPacket;
+ struct htc_packet *pPacket;
LOCK_HTC(target);
pPacket = HTC_PACKET_DEQUEUE(pList);
/* carve up buffers/packets for control messages */
for (i = 0; i < NUM_CONTROL_RX_BUFFERS; i++) {
- HTC_PACKET *pControlPacket;
+ struct htc_packet *pControlPacket;
pControlPacket = &target->HTCControlBuffers[i].HtcPacket;
SET_HTC_PACKET_INFO_RX_REFILL(pControlPacket,
target,
}
for (;i < NUM_CONTROL_BUFFERS;i++) {
- HTC_PACKET *pControlPacket;
+ struct htc_packet *pControlPacket;
pControlPacket = &target->HTCControlBuffers[i].HtcPacket;
INIT_HTC_PACKET_INFO(pControlPacket,
target->HTCControlBuffers[i].Buffer,
{
HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
int status;
- HTC_PACKET *pPacket = NULL;
+ struct htc_packet *pPacket = NULL;
HTC_READY_EX_MSG *pRdyMsg;
HTC_SERVICE_CONNECT_REQ connect;
int HTCStart(HTC_HANDLE HTCHandle)
{
HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
- HTC_PACKET *pPacket;
+ struct htc_packet *pPacket;
int status;
AR_DEBUG_PRINTF(ATH_DEBUG_TRC, ("HTCStart Enter\n"));
#define NUM_CONTROL_RX_BUFFERS (NUM_CONTROL_BUFFERS - NUM_CONTROL_TX_BUFFERS)
struct htc_control_buffer {
- HTC_PACKET HtcPacket;
+ struct htc_packet HtcPacket;
u8 *Buffer;
};
}
/* internal HTC functions */
-void HTCControlTxComplete(void *Context, HTC_PACKET *pPacket);
-void HTCControlRecv(void *Context, HTC_PACKET *pPacket);
-int HTCWaitforControlMessage(HTC_TARGET *target, HTC_PACKET **ppControlPacket);
-HTC_PACKET *HTCAllocControlBuffer(HTC_TARGET *target, HTC_PACKET_QUEUE *pList);
-void HTCFreeControlBuffer(HTC_TARGET *target, HTC_PACKET *pPacket, HTC_PACKET_QUEUE *pList);
-int HTCIssueSend(HTC_TARGET *target, HTC_PACKET *pPacket);
-void HTCRecvCompleteHandler(void *Context, HTC_PACKET *pPacket);
+void HTCControlTxComplete(void *Context, struct htc_packet *pPacket);
+void HTCControlRecv(void *Context, struct htc_packet *pPacket);
+int HTCWaitforControlMessage(HTC_TARGET *target, struct htc_packet **ppControlPacket);
+struct htc_packet *HTCAllocControlBuffer(HTC_TARGET *target, HTC_PACKET_QUEUE *pList);
+void HTCFreeControlBuffer(HTC_TARGET *target, struct htc_packet *pPacket, HTC_PACKET_QUEUE *pList);
+int HTCIssueSend(HTC_TARGET *target, struct htc_packet *pPacket);
+void HTCRecvCompleteHandler(void *Context, struct htc_packet *pPacket);
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);
int HTCSendSetupComplete(HTC_TARGET *target);
void DebugDumpBytes(u8 *buffer, u16 length, char *pDescription);
#endif
-static INLINE HTC_PACKET *HTC_ALLOC_CONTROL_TX(HTC_TARGET *target) {
- HTC_PACKET *pPacket = HTCAllocControlBuffer(target,&target->ControlBufferTXFreeList);
+static INLINE struct htc_packet *HTC_ALLOC_CONTROL_TX(HTC_TARGET *target) {
+ struct htc_packet *pPacket = HTCAllocControlBuffer(target,&target->ControlBufferTXFreeList);
if (pPacket != NULL) {
/* set payload pointer area with some headroom */
pPacket->pBuffer = pPacket->pBufferStart + HTC_HDR_LENGTH;
pQueueToIndicate);
INIT_HTC_PACKET_QUEUE(pQueueToIndicate);
} else {
- HTC_PACKET *pPacket;
+ struct htc_packet *pPacket;
/* using legacy EpRecv */
do {
pPacket = HTC_PACKET_DEQUEUE(pQueueToIndicate);
/* process a received message (i.e. strip off header, process any trailer data)
* note : locks must be released when this function is called */
static int HTCProcessRecvHeader(HTC_TARGET *target,
- HTC_PACKET *pPacket,
+ struct htc_packet *pPacket,
u32 *pNextLookAheads,
int *pNumLookAheads)
{
/* note: this function can be called with the RX lock held */
static INLINE void SetRxPacketIndicationFlags(u32 LookAhead,
struct htc_endpoint *pEndpoint,
- HTC_PACKET *pPacket)
+ struct htc_packet *pPacket)
{
struct htc_frame_hdr *pHdr = (struct htc_frame_hdr *)&LookAhead;
/* check to see if the "next" packet is from the same endpoint of the
/* asynchronous completion handler for recv packet fetching, when the device layer
* completes a read request, it will call this completion handler */
-void HTCRecvCompleteHandler(void *Context, HTC_PACKET *pPacket)
+void HTCRecvCompleteHandler(void *Context, struct htc_packet *pPacket)
{
HTC_TARGET *target = (HTC_TARGET *)Context;
struct htc_endpoint *pEndpoint;
/* synchronously wait for a control message from the target,
* This function is used at initialization time ONLY. At init messages
* on ENDPOINT 0 are expected. */
-int HTCWaitforControlMessage(HTC_TARGET *target, HTC_PACKET **ppControlPacket)
+int HTCWaitforControlMessage(HTC_TARGET *target, struct htc_packet **ppControlPacket)
{
int status;
u32 lookAhead;
- HTC_PACKET *pPacket = NULL;
+ struct htc_packet *pPacket = NULL;
struct htc_frame_hdr *pHdr;
AR_DEBUG_PRINTF(ATH_DEBUG_RECV,("+HTCWaitforControlMessage \n"));
HTC_PACKET_QUEUE *pQueue)
{
int status = 0;
- HTC_PACKET *pPacket;
+ struct htc_packet *pPacket;
struct htc_frame_hdr *pHdr;
int i,j;
int numMessages;
static void HTCAsyncRecvScatterCompletion(struct hif_scatter_req *pScatterReq)
{
int i;
- HTC_PACKET *pPacket;
+ struct htc_packet *pPacket;
struct htc_endpoint *pEndpoint;
u32 lookAheads[HTC_HOST_MAX_MSG_PER_BUNDLE];
int numLookAheads = 0;
INIT_HTC_PACKET_QUEUE(&localRecvQueue);
- pPacket = (HTC_PACKET *)pScatterReq->ScatterList[0].pCallerContexts[0];
+ pPacket = (struct htc_packet *)pScatterReq->ScatterList[0].pCallerContexts[0];
/* note: all packets in a scatter req are for the same endpoint ! */
pEndpoint = &target->EndPoint[pPacket->Endpoint];
/* **** NOTE: DO NOT HOLD ANY LOCKS here, HTCProcessRecvHeader can take the TX lock
* as it processes credit reports */
for (i = 0; i < pScatterReq->ValidScatterEntries; i++) {
- pPacket = (HTC_PACKET *)pScatterReq->ScatterList[i].pCallerContexts[0];
+ pPacket = (struct htc_packet *)pScatterReq->ScatterList[i].pCallerContexts[0];
A_ASSERT(pPacket != NULL);
/* reset count, we are only interested in the look ahead in the last packet when we
* break out of this loop */
struct hif_scatter_req *pScatterReq;
int i, totalLength;
int pktsToScatter;
- HTC_PACKET *pPacket;
+ struct htc_packet *pPacket;
bool asyncMode = (pSyncCompletionQueue == NULL) ? true : false;
int scatterSpaceRemaining = DEV_GET_MAX_BUNDLE_RECV_LENGTH(&target->Device);
{
HTC_TARGET *target = (HTC_TARGET *)Context;
int status = 0;
- HTC_PACKET *pPacket;
+ struct htc_packet *pPacket;
struct htc_endpoint *pEndpoint;
bool asyncProc = false;
u32 lookAheads[HTC_HOST_MAX_MSG_PER_BUNDLE];
struct htc_endpoint *pEndpoint;
bool unblockRecv = false;
int status = 0;
- HTC_PACKET *pFirstPacket;
+ struct htc_packet *pFirstPacket;
pFirstPacket = HTC_GET_PKT_AT_HEAD(pPktQueue);
LOCK_HTC_RX(target);
if (HTC_STOPPING(target)) {
- HTC_PACKET *pPacket;
+ struct htc_packet *pPacket;
UNLOCK_HTC_RX(target);
}
/* Makes a buffer available to the HTC module */
-int HTCAddReceivePkt(HTC_HANDLE HTCHandle, HTC_PACKET *pPacket)
+int HTCAddReceivePkt(HTC_HANDLE HTCHandle, struct htc_packet *pPacket)
{
HTC_PACKET_QUEUE queue;
INIT_HTC_PACKET_QUEUE_AND_ADD(&queue,pPacket);
static void HTCFlushRxQueue(HTC_TARGET *target, struct htc_endpoint *pEndpoint, HTC_PACKET_QUEUE *pQueue)
{
- HTC_PACKET *pPacket;
+ struct htc_packet *pPacket;
HTC_PACKET_QUEUE container;
LOCK_HTC_RX(target);
/* all packets are now owned by the callback, reset queue to be safe */
INIT_HTC_PACKET_QUEUE(pQueueToIndicate);
} else {
- HTC_PACKET *pPacket;
+ struct htc_packet *pPacket;
/* using legacy EpTxComplete */
do {
pPacket = HTC_PACKET_DEQUEUE(pQueueToIndicate);
}
/* do final completion on sent packet */
-static INLINE void CompleteSentPacket(HTC_TARGET *target, struct htc_endpoint *pEndpoint, HTC_PACKET *pPacket)
+static INLINE void CompleteSentPacket(HTC_TARGET *target, struct htc_endpoint *pEndpoint, struct htc_packet *pPacket)
{
pPacket->Completion = NULL;
/* our internal send packet completion handler when packets are submited to the AR6K device
* layer */
-static void HTCSendPktCompletionHandler(void *Context, HTC_PACKET *pPacket)
+static void HTCSendPktCompletionHandler(void *Context, struct htc_packet *pPacket)
{
HTC_TARGET *target = (HTC_TARGET *)Context;
struct htc_endpoint *pEndpoint = &target->EndPoint[pPacket->Endpoint];
DO_EP_TX_COMPLETION(pEndpoint,&container);
}
-int HTCIssueSend(HTC_TARGET *target, HTC_PACKET *pPacket)
+int HTCIssueSend(HTC_TARGET *target, struct htc_packet *pPacket)
{
int status;
bool sync = false;
int creditsRequired;
int remainder;
u8 sendFlags;
- HTC_PACKET *pPacket;
+ struct htc_packet *pPacket;
unsigned int transferLength;
/****** NOTE : the TX lock is held when this function is called *****************/
static void HTCAsyncSendScatterCompletion(struct hif_scatter_req *pScatterReq)
{
int i;
- HTC_PACKET *pPacket;
+ struct htc_packet *pPacket;
struct htc_endpoint *pEndpoint = (struct htc_endpoint *)pScatterReq->Context;
HTC_TARGET *target = (HTC_TARGET *)pEndpoint->target;
int status = 0;
/* walk through the scatter list and process */
for (i = 0; i < pScatterReq->ValidScatterEntries; i++) {
- pPacket = (HTC_PACKET *)(pScatterReq->ScatterList[i].pCallerContexts[0]);
+ pPacket = (struct htc_packet *)(pScatterReq->ScatterList[i].pCallerContexts[0]);
A_ASSERT(pPacket != NULL);
pPacket->Status = status;
CompleteSentPacket(target,pEndpoint,pPacket);
struct hif_scatter_req *pScatterReq = NULL;
int i, packetsInScatterReq;
unsigned int transferLength;
- HTC_PACKET *pPacket;
+ struct htc_packet *pPacket;
bool done = false;
int bundlesSent = 0;
int totalPktsInBundle = 0;
if (packetsInScatterReq > 0) {
/* work backwards to requeue requests */
for (i = (packetsInScatterReq - 1); i >= 0; i--) {
- pPacket = (HTC_PACKET *)(pScatterReq->ScatterList[i].pCallerContexts[0]);
+ pPacket = (struct htc_packet *)(pScatterReq->ScatterList[i].pCallerContexts[0]);
if (pPacket != NULL) {
/* undo any prep */
HTC_UNPREPARE_SEND_PKT(pPacket);
HTC_PACKET_QUEUE *pCallersSendQueue)
{
HTC_PACKET_QUEUE sendQueue; /* temp queue to hold packets at various stages */
- HTC_PACKET *pPacket;
+ struct htc_packet *pPacket;
int bundlesSent;
int pktsInBundles;
int overflow;
/* the caller's queue has all the packets that won't fit*/
/* walk through the caller's queue and indicate each one to the send full handler */
- ITERATE_OVER_LIST_ALLOW_REMOVE(&pCallersSendQueue->QueueHead, pPacket, HTC_PACKET, ListLink) {
+ ITERATE_OVER_LIST_ALLOW_REMOVE(&pCallersSendQueue->QueueHead, pPacket, struct htc_packet, ListLink) {
AR_DEBUG_PRINTF(ATH_DEBUG_SEND, (" Indicating overflowed TX packet: 0x%lX \n",
(unsigned long)pPacket));
{
HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
struct htc_endpoint *pEndpoint;
- HTC_PACKET *pPacket;
+ struct htc_packet *pPacket;
AR_DEBUG_PRINTF(ATH_DEBUG_SEND, ("+HTCSendPktsMultiple: Queue: 0x%lX, Pkts %d \n",
(unsigned long)pPktQueue, HTC_PACKET_QUEUE_DEPTH(pPktQueue)));
}
/* HTC API - HTCSendPkt */
-int HTCSendPkt(HTC_HANDLE HTCHandle, HTC_PACKET *pPacket)
+int HTCSendPkt(HTC_HANDLE HTCHandle, struct htc_packet *pPacket)
{
HTC_PACKET_QUEUE queue;
/* flush endpoint TX queue */
static void HTCFlushEndpointTX(HTC_TARGET *target, struct htc_endpoint *pEndpoint, HTC_TX_TAG Tag)
{
- HTC_PACKET *pPacket;
+ struct htc_packet *pPacket;
HTC_PACKET_QUEUE discardQueue;
HTC_PACKET_QUEUE container;
LOCK_HTC_TX(target);
/* interate from the front of the TX queue and flush out packets */
- ITERATE_OVER_LIST_ALLOW_REMOVE(&pEndpoint->TxQueue.QueueHead, pPacket, HTC_PACKET, ListLink) {
+ ITERATE_OVER_LIST_ALLOW_REMOVE(&pEndpoint->TxQueue.QueueHead, pPacket, struct htc_packet, ListLink) {
/* check for removal */
if ((HTC_TX_PACKET_TAG_ALL == Tag) || (Tag == pPacket->PktInfo.AsTx.Tag)) {
//==============================================================================
#include "htc_internal.h"
-void HTCControlTxComplete(void *Context, HTC_PACKET *pPacket)
+void HTCControlTxComplete(void *Context, struct htc_packet *pPacket)
{
/* not implemented
* we do not send control TX frames during normal runtime, only during setup */
}
/* callback when a control message arrives on this endpoint */
-void HTCControlRecv(void *Context, HTC_PACKET *pPacket)
+void HTCControlRecv(void *Context, struct htc_packet *pPacket)
{
AR_DEBUG_ASSERT(pPacket->Endpoint == ENDPOINT_0);
int HTCSendSetupComplete(HTC_TARGET *target)
{
- HTC_PACKET *pSendPacket = NULL;
+ struct htc_packet *pSendPacket = NULL;
int status;
do {
{
HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
int status = 0;
- HTC_PACKET *pRecvPacket = NULL;
- HTC_PACKET *pSendPacket = NULL;
+ struct htc_packet *pRecvPacket = NULL;
+ struct htc_packet *pSendPacket = NULL;
HTC_CONNECT_SERVICE_RESPONSE_MSG *pResponseMsg;
HTC_CONNECT_SERVICE_MSG *pConnectMsg;
HTC_ENDPOINT_ID assignedEndpoint = ENDPOINT_MAX;
#define HCI_SET_PACKET_TYPE(pP,s) (pP)->Endpoint = (s)
/* callback when an HCI packet was completely sent */
-typedef void (*HCI_TRANSPORT_SEND_PKT_COMPLETE)(void *, HTC_PACKET *);
+typedef void (*HCI_TRANSPORT_SEND_PKT_COMPLETE)(void *, struct htc_packet *);
/* callback when an HCI packet is received */
-typedef void (*HCI_TRANSPORT_RECV_PKT)(void *, HTC_PACKET *);
+typedef void (*HCI_TRANSPORT_RECV_PKT)(void *, struct htc_packet *);
/* Optional receive buffer re-fill callback,
* On some OSes (like Linux) packets are allocated from a global pool and indicated up
* to the network stack. The driver never gets the packets back from the OS. For these OSes
* NOTE*** This callback is mutually exclusive with the the refill callback above.
*
* */
-typedef HTC_PACKET *(*HCI_TRANSPORT_RECV_ALLOC)(void *, HCI_TRANSPORT_PACKET_TYPE Type, int Length);
+typedef struct htc_packet *(*HCI_TRANSPORT_RECV_ALLOC)(void *, HCI_TRANSPORT_PACKET_TYPE Type, int Length);
typedef enum _HCI_SEND_FULL_ACTION {
HCI_SEND_FULL_KEEP = 0, /* packet that overflowed should be kept in the queue */
/* callback when an HCI send queue exceeds the caller's MaxSendQueueDepth threshold,
* the callback must return the send full action to take (either DROP or KEEP) */
-typedef HCI_SEND_FULL_ACTION (*HCI_TRANSPORT_SEND_FULL)(void *, HTC_PACKET *);
+typedef HCI_SEND_FULL_ACTION (*HCI_TRANSPORT_SEND_FULL)(void *, struct htc_packet *);
struct hci_transport_properties {
int HeadRoom; /* number of bytes in front of HCI packet for header space */
@example:
@see also:
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-int HCI_TransportSendPkt(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET *pPacket, bool Synchronous);
+int HCI_TransportSendPkt(HCI_TRANSPORT_HANDLE HciTrans, struct htc_packet *pPacket, bool Synchronous);
/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@see also: HCI_TransportEnableDisableAsyncRecv
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
int HCI_TransportRecvHCIEventSync(HCI_TRANSPORT_HANDLE HciTrans,
- HTC_PACKET *pPacket,
+ struct htc_packet *pPacket,
int MaxPollMS);
/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
};
/* per service connection send completion */
-typedef void (*HTC_EP_SEND_PKT_COMPLETE)(void *,HTC_PACKET *);
+typedef void (*HTC_EP_SEND_PKT_COMPLETE)(void *,struct htc_packet *);
/* per service connection callback when a plurality of packets have been sent
* The HTC_PACKET_QUEUE is a temporary queue object (e.g. freed on return from the callback)
* to hold a list of completed send packets.
* HTC_PACKET_ENQUEUE() */
typedef void (*HTC_EP_SEND_PKT_COMP_MULTIPLE)(void *,HTC_PACKET_QUEUE *);
/* per service connection pkt received */
-typedef void (*HTC_EP_RECV_PKT)(void *,HTC_PACKET *);
+typedef void (*HTC_EP_RECV_PKT)(void *,struct htc_packet *);
/* per service connection callback when a plurality of packets are received
* The HTC_PACKET_QUEUE is a temporary queue object (e.g. freed on return from the callback)
* to hold a list of recv packets.
* amount of "committed" memory used to receive packets.
*
* */
-typedef HTC_PACKET *(*HTC_EP_RECV_ALLOC)(void *, HTC_ENDPOINT_ID Endpoint, int Length);
+typedef struct htc_packet *(*HTC_EP_RECV_ALLOC)(void *, HTC_ENDPOINT_ID Endpoint, int Length);
typedef enum _HTC_SEND_FULL_ACTION {
HTC_SEND_FULL_KEEP = 0, /* packet that overflowed should be kept in the queue */
* closed loop mechanism will prevent the network stack from overunning the NIC
* The packet to keep or drop is passed for inspection to the registered handler the handler
* must ONLY inspect the packet, it may not free or reclaim the packet. */
-typedef HTC_SEND_FULL_ACTION (*HTC_EP_SEND_QUEUE_FULL)(void *, HTC_PACKET *pPacket);
+typedef HTC_SEND_FULL_ACTION (*HTC_EP_SEND_QUEUE_FULL)(void *, struct htc_packet *pPacket);
struct htc_ep_callbacks {
void *pContext; /* context for each callback */
@example:
@see also:
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-int HTCAddReceivePkt(HTC_HANDLE HTCHandle, HTC_PACKET *pPacket);
+int HTCAddReceivePkt(HTC_HANDLE HTCHandle, struct htc_packet *pPacket);
/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@desc: Connect to an HTC service
@function name: HTCConnectService
@example:
@see also: HTCFlushEndpoint
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-int HTCSendPkt(HTC_HANDLE HTCHandle, HTC_PACKET *pPacket);
+int HTCSendPkt(HTC_HANDLE HTCHandle, struct htc_packet *pPacket);
/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@desc: Stop HTC service communications
@function name: HTCStop
ENDPOINT_MAX,
} HTC_ENDPOINT_ID;
-struct _HTC_PACKET;
+struct htc_packet;
-typedef void (* HTC_PACKET_COMPLETION)(void *,struct _HTC_PACKET *);
+typedef void (* HTC_PACKET_COMPLETION)(void *,struct htc_packet *);
typedef u16 HTC_TX_TAG;
#define HTC_RX_FLAGS_INDICATE_MORE_PKTS (1 << 0) /* more packets on this endpoint are being fetched */
/* wrapper around endpoint-specific packets */
-typedef struct _HTC_PACKET {
+struct htc_packet {
struct dl_list ListLink; /* double link */
void *pPktContext; /* caller's per packet specific context */
/* the following fields are for internal HTC use */
HTC_PACKET_COMPLETION Completion; /* completion */
void *pContext; /* HTC private completion context */
-} HTC_PACKET;
+};
/* test if a queue is empty */
#define HTC_QUEUE_EMPTY(pQ) ((pQ)->Depth == 0)
/* get packet at head without removing it */
-static INLINE HTC_PACKET *HTC_GET_PKT_AT_HEAD(HTC_PACKET_QUEUE *queue) {
+static INLINE struct htc_packet *HTC_GET_PKT_AT_HEAD(HTC_PACKET_QUEUE *queue) {
if (queue->Depth == 0) {
return NULL;
}
- return A_CONTAINING_STRUCT((DL_LIST_GET_ITEM_AT_HEAD(&queue->QueueHead)),HTC_PACKET,ListLink);
+ return A_CONTAINING_STRUCT((DL_LIST_GET_ITEM_AT_HEAD(&queue->QueueHead)),struct htc_packet,ListLink);
}
/* remove a packet from a queue, where-ever it is in the queue */
#define HTC_PACKET_REMOVE(pQ,p) \
}
/* dequeue an HTC packet from the head of the queue */
-static INLINE HTC_PACKET *HTC_PACKET_DEQUEUE(HTC_PACKET_QUEUE *queue) {
+static INLINE struct htc_packet *HTC_PACKET_DEQUEUE(HTC_PACKET_QUEUE *queue) {
struct dl_list *pItem = DL_ListRemoveItemFromHead(&queue->QueueHead);
if (pItem != NULL) {
queue->Depth--;
- return A_CONTAINING_STRUCT(pItem, HTC_PACKET, ListLink);
+ return A_CONTAINING_STRUCT(pItem, struct htc_packet, ListLink);
}
return NULL;
}
/* dequeue an HTC packet from the tail of the queue */
-static INLINE HTC_PACKET *HTC_PACKET_DEQUEUE_TAIL(HTC_PACKET_QUEUE *queue) {
+static INLINE struct htc_packet *HTC_PACKET_DEQUEUE_TAIL(HTC_PACKET_QUEUE *queue) {
struct dl_list *pItem = DL_ListRemoveItemFromTail(&queue->QueueHead);
if (pItem != NULL) {
queue->Depth--;
- return A_CONTAINING_STRUCT(pItem, HTC_PACKET, ListLink);
+ return A_CONTAINING_STRUCT(pItem, struct htc_packet, ListLink);
}
return NULL;
}
}
#define HTC_PACKET_QUEUE_ITERATE_ALLOW_REMOVE(pQ, pPTemp) \
- ITERATE_OVER_LIST_ALLOW_REMOVE(&(pQ)->QueueHead,(pPTemp), HTC_PACKET, ListLink)
+ ITERATE_OVER_LIST_ALLOW_REMOVE(&(pQ)->QueueHead,(pPTemp), struct htc_packet, ListLink)
#define HTC_PACKET_QUEUE_ITERATE_END ITERATE_END
u8 *pBuffer,
int Length)
{
- HTC_PACKET *pPacket = NULL;
+ struct htc_packet *pPacket = NULL;
int status = 0;
do {
- pPacket = (HTC_PACKET *)A_MALLOC(sizeof(HTC_PACKET));
+ pPacket = (struct htc_packet *)A_MALLOC(sizeof(struct htc_packet));
if (NULL == pPacket) {
status = A_NO_MEMORY;
break;
}
- A_MEMZERO(pPacket,sizeof(HTC_PACKET));
+ A_MEMZERO(pPacket,sizeof(struct htc_packet));
SET_HTC_PACKET_INFO_TX(pPacket,
NULL,
pBuffer,
int *pLength)
{
int status = 0;
- HTC_PACKET *pRecvPacket = NULL;
+ struct htc_packet *pRecvPacket = NULL;
do {
- pRecvPacket = (HTC_PACKET *)A_MALLOC(sizeof(HTC_PACKET));
+ pRecvPacket = (struct htc_packet *)A_MALLOC(sizeof(struct htc_packet));
if (NULL == pRecvPacket) {
status = A_NO_MEMORY;
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("Failed to alloc HTC struct \n"));
break;
}
- A_MEMZERO(pRecvPacket,sizeof(HTC_PACKET));
+ A_MEMZERO(pRecvPacket,sizeof(struct htc_packet));
SET_HTC_PACKET_INFO_RX_REFILL(pRecvPacket,NULL,pBuffer,*pLength,HCI_EVENT_TYPE);
static void ar6000_target_failure(void *Instance, int Status);
-static void ar6000_rx(void *Context, HTC_PACKET *pPacket);
+static void ar6000_rx(void *Context, struct htc_packet *pPacket);
static void ar6000_rx_refill(void *Context,HTC_ENDPOINT_ID Endpoint);
static void ar6000_tx_complete(void *Context, HTC_PACKET_QUEUE *pPackets);
-static HTC_SEND_FULL_ACTION ar6000_tx_queue_full(void *Context, HTC_PACKET *pPacket);
+static HTC_SEND_FULL_ACTION ar6000_tx_queue_full(void *Context, struct htc_packet *pPacket);
#ifdef ATH_AR6K_11N_SUPPORT
static void ar6000_alloc_netbufs(A_NETBUF_QUEUE_T *q, u16 num);
static void ar6000_deliver_frames_to_nw_stack(void * dev, void *osbuf);
//static void ar6000_deliver_frames_to_bt_stack(void * dev, void *osbuf);
-static HTC_PACKET *ar6000_alloc_amsdu_rxbuf(void *Context, HTC_ENDPOINT_ID Endpoint, int Length);
+static struct htc_packet *ar6000_alloc_amsdu_rxbuf(void *Context, HTC_ENDPOINT_ID Endpoint, int Length);
static void ar6000_refill_amsdu_rxbufs(AR_SOFTC_T *ar, int Count);
}
#endif /* ADAPTIVE_POWER_THROUGHPUT_CONTROL */
-static HTC_SEND_FULL_ACTION ar6000_tx_queue_full(void *Context, HTC_PACKET *pPacket)
+static HTC_SEND_FULL_ACTION ar6000_tx_queue_full(void *Context, struct htc_packet *pPacket)
{
AR_SOFTC_T *ar = (AR_SOFTC_T *)Context;
HTC_SEND_FULL_ACTION action = HTC_SEND_FULL_KEEP;
HTC_ENDPOINT_ID eid;
bool wakeEvent = false;
struct sk_buff_head skb_queue;
- HTC_PACKET *pPacket;
+ struct htc_packet *pPacket;
struct sk_buff *pktSkb;
bool flushing = false;
*/
int pktcount;
static void
-ar6000_rx(void *Context, HTC_PACKET *pPacket)
+ar6000_rx(void *Context, struct htc_packet *pPacket)
{
AR_SOFTC_T *ar = (AR_SOFTC_T *)Context;
struct sk_buff *skb = (struct sk_buff *)pPacket->pPktContext;
void *osBuf;
int RxBuffers;
int buffersToRefill;
- HTC_PACKET *pPacket;
+ struct htc_packet *pPacket;
HTC_PACKET_QUEUE queue;
buffersToRefill = (int)AR6000_MAX_RX_BUFFERS -
}
/* the HTC packet wrapper is at the head of the reserved area
* in the skb */
- pPacket = (HTC_PACKET *)(A_NETBUF_HEAD(osBuf));
+ pPacket = (struct htc_packet *)(A_NETBUF_HEAD(osBuf));
/* set re-fill info */
SET_HTC_PACKET_INFO_RX_REFILL(pPacket,osBuf,A_NETBUF_DATA(osBuf),AR6000_BUFFER_SIZE,Endpoint);
/* add to queue */
/* clean up our amsdu buffer list */
static void ar6000_cleanup_amsdu_rxbufs(AR_SOFTC_T *ar)
{
- HTC_PACKET *pPacket;
+ struct htc_packet *pPacket;
void *osBuf;
/* empty AMSDU buffer queue and free OS bufs */
/* refill the amsdu buffer list */
static void ar6000_refill_amsdu_rxbufs(AR_SOFTC_T *ar, int Count)
{
- HTC_PACKET *pPacket;
+ struct htc_packet *pPacket;
void *osBuf;
while (Count > 0) {
}
/* the HTC packet wrapper is at the head of the reserved area
* in the skb */
- pPacket = (HTC_PACKET *)(A_NETBUF_HEAD(osBuf));
+ pPacket = (struct htc_packet *)(A_NETBUF_HEAD(osBuf));
/* set re-fill info */
SET_HTC_PACKET_INFO_RX_REFILL(pPacket,osBuf,A_NETBUF_DATA(osBuf),AR6000_AMSDU_BUFFER_SIZE,0);
* keep the allocation size the same to optimize cached-slab allocations.
*
* */
-static HTC_PACKET *ar6000_alloc_amsdu_rxbuf(void *Context, HTC_ENDPOINT_ID Endpoint, int Length)
+static struct htc_packet *ar6000_alloc_amsdu_rxbuf(void *Context, HTC_ENDPOINT_ID Endpoint, int Length)
{
- HTC_PACKET *pPacket = NULL;
+ struct htc_packet *pPacket = NULL;
AR_SOFTC_T *ar = (AR_SOFTC_T *)Context;
int refillCount = 0;
#ifdef HTC_RAW_INTERFACE
static void
-ar6000_htc_raw_read_cb(void *Context, HTC_PACKET *pPacket)
+ar6000_htc_raw_read_cb(void *Context, struct htc_packet *pPacket)
{
AR_SOFTC_T *ar = (AR_SOFTC_T *)Context;
raw_htc_buffer *busy;
}
static void
-ar6000_htc_raw_write_cb(void *Context, HTC_PACKET *pPacket)
+ar6000_htc_raw_write_cb(void *Context, struct htc_packet *pPacket)
{
AR_SOFTC_T *ar = (AR_SOFTC_T *)Context;
raw_htc_buffer *free;
HCI_TRANSPORT_HANDLE (*_HCI_TransportAttach)(void *HTCHandle, struct hci_transport_config_info *pInfo);
void (*_HCI_TransportDetach)(HCI_TRANSPORT_HANDLE HciTrans);
int (*_HCI_TransportAddReceivePkts)(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET_QUEUE *pQueue);
-int (*_HCI_TransportSendPkt)(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET *pPacket, bool Synchronous);
+int (*_HCI_TransportSendPkt)(HCI_TRANSPORT_HANDLE HciTrans, struct htc_packet *pPacket, bool Synchronous);
void (*_HCI_TransportStop)(HCI_TRANSPORT_HANDLE HciTrans);
int (*_HCI_TransportStart)(HCI_TRANSPORT_HANDLE HciTrans);
int (*_HCI_TransportEnableDisableAsyncRecv)(HCI_TRANSPORT_HANDLE HciTrans, bool Enable);
int (*_HCI_TransportRecvHCIEventSync)(HCI_TRANSPORT_HANDLE HciTrans,
- HTC_PACKET *pPacket,
+ struct htc_packet *pPacket,
int MaxPollMS);
int (*_HCI_TransportSetBaudRate)(HCI_TRANSPORT_HANDLE HciTrans, u32 Baud);
int (*_HCI_TransportEnablePowerMgmt)(HCI_TRANSPORT_HANDLE HciTrans, bool Enable);
}
}
-static void FreeHTCStruct(struct ar6k_hci_bridge_info *pHcidevInfo, HTC_PACKET *pPacket)
+static void FreeHTCStruct(struct ar6k_hci_bridge_info *pHcidevInfo, struct htc_packet *pPacket)
{
LOCK_BRIDGE(pHcidevInfo);
HTC_PACKET_ENQUEUE(&pHcidevInfo->HTCPacketStructHead,pPacket);
UNLOCK_BRIDGE(pHcidevInfo);
}
-static HTC_PACKET * AllocHTCStruct(struct ar6k_hci_bridge_info *pHcidevInfo)
+static struct htc_packet * AllocHTCStruct(struct ar6k_hci_bridge_info *pHcidevInfo)
{
- HTC_PACKET *pPacket = NULL;
+ struct htc_packet *pPacket = NULL;
LOCK_BRIDGE(pHcidevInfo);
pPacket = HTC_PACKET_DEQUEUE(&pHcidevInfo->HTCPacketStructHead);
UNLOCK_BRIDGE(pHcidevInfo);
int length, i;
void *osBuf = NULL;
HTC_PACKET_QUEUE queue;
- HTC_PACKET *pPacket;
+ struct htc_packet *pPacket;
INIT_HTC_PACKET_QUEUE(&queue);
pHcidevInfo->pHCIDev = NULL;
}
-static void ar6000_hci_send_complete(void *pContext, HTC_PACKET *pPacket)
+static void ar6000_hci_send_complete(void *pContext, struct htc_packet *pPacket)
{
struct ar6k_hci_bridge_info *pHcidevInfo = (struct ar6k_hci_bridge_info *)pContext;
void *osbuf = pPacket->pPktContext;
}
-static void ar6000_hci_pkt_recv(void *pContext, HTC_PACKET *pPacket)
+static void ar6000_hci_pkt_recv(void *pContext, struct htc_packet *pPacket)
{
struct ar6k_hci_bridge_info *pHcidevInfo = (struct ar6k_hci_bridge_info *)pContext;
struct sk_buff *skb;
}
-static HCI_SEND_FULL_ACTION ar6000_hci_pkt_send_full(void *pContext, HTC_PACKET *pPacket)
+static HCI_SEND_FULL_ACTION ar6000_hci_pkt_send_full(void *pContext, struct htc_packet *pPacket)
{
struct ar6k_hci_bridge_info *pHcidevInfo = (struct ar6k_hci_bridge_info *)pContext;
HCI_SEND_FULL_ACTION action = HCI_SEND_FULL_KEEP;
struct hci_transport_config_info config;
int status = 0;
int i;
- HTC_PACKET *pPacket;
+ struct htc_packet *pPacket;
struct ar6k_hci_bridge_info *pHcidevInfo;
AR_DEBUG_PRINTF(ATH_DEBUG_HCI_BRIDGE, ("HCI Bridge: running in test mode... \n"));
}
- pHcidevInfo->pHTCStructAlloc = (u8 *)A_MALLOC((sizeof(HTC_PACKET)) * NUM_HTC_PACKET_STRUCTS);
+ pHcidevInfo->pHTCStructAlloc = (u8 *)A_MALLOC((sizeof(struct htc_packet)) * NUM_HTC_PACKET_STRUCTS);
if (NULL == pHcidevInfo->pHTCStructAlloc) {
status = A_NO_MEMORY;
break;
}
- pPacket = (HTC_PACKET *)pHcidevInfo->pHTCStructAlloc;
+ pPacket = (struct htc_packet *)pHcidevInfo->pHTCStructAlloc;
for (i = 0; i < NUM_HTC_PACKET_STRUCTS; i++,pPacket++) {
FreeHTCStruct(pHcidevInfo,pPacket);
}
int status = 0;
int length;
EPPING_HEADER *pHeader;
- HTC_PACKET *pPacket;
+ struct htc_packet *pPacket;
HTC_TX_TAG htc_tag = AR6K_DATA_PKT_TAG;
#ifdef EXPORT_HCI_BRIDGE_INTERFACE
struct ar6k_hci_bridge_info *pHcidevInfo = g_pHcidevInfo;
struct hci_dev *hdev = (struct hci_dev *)skb->dev;
HCI_TRANSPORT_PACKET_TYPE type;
struct ar6k_hci_bridge_info *pHcidevInfo;
- HTC_PACKET *pPacket;
+ struct htc_packet *pPacket;
int status = 0;
struct sk_buff *txSkb = NULL;
int currPtr;
int length;
unsigned char data[HTC_RAW_BUFFER_SIZE];
- HTC_PACKET HTCPacket;
+ struct htc_packet HTCPacket;
} raw_htc_buffer;
#ifdef CONFIG_HOST_TCMD_SUPPORT
struct ar_cookie {
unsigned long arc_bp[2]; /* Must be first field */
- HTC_PACKET HtcPkt; /* HTC packet wrapper */
+ struct htc_packet HtcPkt; /* HTC packet wrapper */
struct ar_cookie *arc_list_next;
};
extern HCI_TRANSPORT_HANDLE (*_HCI_TransportAttach)(void *HTCHandle, struct hci_transport_config_info *pInfo);
extern void (*_HCI_TransportDetach)(HCI_TRANSPORT_HANDLE HciTrans);
extern int (*_HCI_TransportAddReceivePkts)(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET_QUEUE *pQueue);
-extern int (*_HCI_TransportSendPkt)(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET *pPacket, bool Synchronous);
+extern int (*_HCI_TransportSendPkt)(HCI_TRANSPORT_HANDLE HciTrans, struct htc_packet *pPacket, bool Synchronous);
extern void (*_HCI_TransportStop)(HCI_TRANSPORT_HANDLE HciTrans);
extern int (*_HCI_TransportStart)(HCI_TRANSPORT_HANDLE HciTrans);
extern int (*_HCI_TransportEnableDisableAsyncRecv)(HCI_TRANSPORT_HANDLE HciTrans, bool Enable);
extern int (*_HCI_TransportRecvHCIEventSync)(HCI_TRANSPORT_HANDLE HciTrans,
- HTC_PACKET *pPacket,
+ struct htc_packet *pPacket,
int MaxPollMS);
extern int (*_HCI_TransportSetBaudRate)(HCI_TRANSPORT_HANDLE HciTrans, u32 Baud);
extern int (*_HCI_TransportEnablePowerMgmt)(HCI_TRANSPORT_HANDLE HciTrans, bool Enable);
{
struct sk_buff *skb;
size += 2 * (A_GET_CACHE_LINE_BYTES()); /* add some cacheline space at front and back of buffer */
- skb = dev_alloc_skb(AR6000_DATA_OFFSET + sizeof(HTC_PACKET) + size);
- skb_reserve(skb, AR6000_DATA_OFFSET + sizeof(HTC_PACKET) + A_GET_CACHE_LINE_BYTES());
+ skb = dev_alloc_skb(AR6000_DATA_OFFSET + sizeof(struct htc_packet) + size);
+ skb_reserve(skb, AR6000_DATA_OFFSET + sizeof(struct htc_packet) + A_GET_CACHE_LINE_BYTES());
return ((void *)skb);
}