Commit c6528e2f authored by Luis R. Rodriguez's avatar Luis R. Rodriguez Committed by Greg Kroah-Hartman

ath6kl: remove-typedef HTC_PACKET

This required two passes:

remove-typedef -s HTC_PACKET \
	"struct htc_packet" drivers/staging/ath6kl/

remove-typedef -s _HTC_PACKET \
	"struct htc_packet" drivers/staging/ath6kl/
Tested-by: default avatarNaveen Singh <nsingh@atheros.com>
Signed-off-by: default avatarLuis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 4f0cce96
...@@ -40,16 +40,16 @@ int DevDisableInterrupts(struct ar6k_device *pDev); ...@@ -40,16 +40,16 @@ int DevDisableInterrupts(struct ar6k_device *pDev);
static void DevCleanupVirtualScatterSupport(struct ar6k_device *pDev); 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); LOCK_AR6K(pDev);
HTC_PACKET_ENQUEUE(&pDev->RegisterIOList,pPacket); HTC_PACKET_ENQUEUE(&pDev->RegisterIOList,pPacket);
UNLOCK_AR6K(pDev); 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); LOCK_AR6K(pDev);
pPacket = HTC_PACKET_DEQUEUE(&pDev->RegisterIOList); pPacket = HTC_PACKET_DEQUEUE(&pDev->RegisterIOList);
...@@ -113,7 +113,7 @@ int DevSetup(struct ar6k_device *pDev) ...@@ -113,7 +113,7 @@ int DevSetup(struct ar6k_device *pDev)
/* carve up register I/O packets (these are for ASYNC register I/O ) */ /* carve up register I/O packets (these are for ASYNC register I/O ) */
for (i = 0; i < AR6K_MAX_REG_IO_BUFFERS; i++) { for (i = 0; i < AR6K_MAX_REG_IO_BUFFERS; i++) {
HTC_PACKET *pIOPacket; struct htc_packet *pIOPacket;
pIOPacket = &pDev->RegIOBuffers[i].HtcPacket; pIOPacket = &pDev->RegIOBuffers[i].HtcPacket;
SET_HTC_PACKET_INFO_RX_REFILL(pIOPacket, SET_HTC_PACKET_INFO_RX_REFILL(pIOPacket,
pDev, pDev,
...@@ -337,7 +337,7 @@ int DevMaskInterrupts(struct ar6k_device *pDev) ...@@ -337,7 +337,7 @@ int DevMaskInterrupts(struct ar6k_device *pDev)
} }
/* callback when our fetch to enable/disable completes */ /* 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; struct ar6k_device *pDev = (struct ar6k_device *)Context;
...@@ -358,7 +358,7 @@ static void DevDoEnableDisableRecvAsyncHandler(void *Context, HTC_PACKET *pPacke ...@@ -358,7 +358,7 @@ static void DevDoEnableDisableRecvAsyncHandler(void *Context, HTC_PACKET *pPacke
static int DevDoEnableDisableRecvOverride(struct ar6k_device *pDev, bool EnableRecv, bool AsyncMode) static int DevDoEnableDisableRecvOverride(struct ar6k_device *pDev, bool EnableRecv, bool AsyncMode)
{ {
int status = 0; int status = 0;
HTC_PACKET *pIOPacket = NULL; struct htc_packet *pIOPacket = NULL;
AR_DEBUG_PRINTF(ATH_DEBUG_TRC,("DevDoEnableDisableRecvOverride: Enable:%d Mode:%d\n", AR_DEBUG_PRINTF(ATH_DEBUG_TRC,("DevDoEnableDisableRecvOverride: Enable:%d Mode:%d\n",
EnableRecv,AsyncMode)); EnableRecv,AsyncMode));
...@@ -406,7 +406,7 @@ static int DevDoEnableDisableRecvOverride(struct ar6k_device *pDev, bool EnableR ...@@ -406,7 +406,7 @@ static int DevDoEnableDisableRecvOverride(struct ar6k_device *pDev, bool EnableR
static int DevDoEnableDisableRecvNormal(struct ar6k_device *pDev, bool EnableRecv, bool AsyncMode) static int DevDoEnableDisableRecvNormal(struct ar6k_device *pDev, bool EnableRecv, bool AsyncMode)
{ {
int status = 0; int status = 0;
HTC_PACKET *pIOPacket = NULL; struct htc_packet *pIOPacket = NULL;
struct ar6k_irq_enable_registers regs; struct ar6k_irq_enable_registers regs;
/* take the lock to protect interrupt enable shadows */ /* take the lock to protect interrupt enable shadows */
...@@ -648,7 +648,7 @@ int DevCopyScatterListToFromDMABuffer(struct hif_scatter_req *pReq, bool FromDMA ...@@ -648,7 +648,7 @@ int DevCopyScatterListToFromDMABuffer(struct hif_scatter_req *pReq, bool FromDMA
return 0; 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 ar6k_device *pDev = (struct ar6k_device *)Context;
struct hif_scatter_req *pReq = (struct hif_scatter_req *)pPacket->pPktContext; struct hif_scatter_req *pReq = (struct hif_scatter_req *)pPacket->pPktContext;
...@@ -668,7 +668,7 @@ static int DevReadWriteScatter(HIF_DEVICE *Context, struct hif_scatter_req *pReq ...@@ -668,7 +668,7 @@ static int DevReadWriteScatter(HIF_DEVICE *Context, struct hif_scatter_req *pReq
{ {
struct ar6k_device *pDev = (struct ar6k_device *)Context; struct ar6k_device *pDev = (struct ar6k_device *)Context;
int status = 0; int status = 0;
HTC_PACKET *pIOPacket = NULL; struct htc_packet *pIOPacket = NULL;
u32 request = pReq->Request; u32 request = pReq->Request;
do { do {
......
...@@ -90,7 +90,7 @@ PREPACK struct ar6k_gmbox_ctrl_registers { ...@@ -90,7 +90,7 @@ PREPACK struct ar6k_gmbox_ctrl_registers {
/* buffers for ASYNC I/O */ /* buffers for ASYNC I/O */
struct ar6k_async_reg_io_buffer { 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 _Pad1[A_CACHE_LINE_PAD];
u8 Buffer[AR6K_REG_IO_BUFFER_SIZE]; /* cache-line safe with pads around */ u8 Buffer[AR6K_REG_IO_BUFFER_SIZE]; /* cache-line safe with pads around */
u8 _Pad2[A_CACHE_LINE_PAD]; u8 _Pad2[A_CACHE_LINE_PAD];
...@@ -176,7 +176,7 @@ int DevWaitForPendingRecv(struct ar6k_device *pDev,u32 TimeoutInMs,bool *pbIsRec ...@@ -176,7 +176,7 @@ int DevWaitForPendingRecv(struct ar6k_device *pDev,u32 TimeoutInMs,bool *pbIsRec
#define DEV_CALC_SEND_PADDED_LEN(pDev, length) DEV_CALC_RECV_PADDED_LEN(pDev,length) #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) #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; u32 paddedLength;
bool sync = (pPacket->Completion == NULL) ? true : false; bool sync = (pPacket->Completion == NULL) ? true : false;
int status; int status;
...@@ -219,7 +219,7 @@ static INLINE int DevSendPacket(struct ar6k_device *pDev, HTC_PACKET *pPacket, u ...@@ -219,7 +219,7 @@ static INLINE int DevSendPacket(struct ar6k_device *pDev, HTC_PACKET *pPacket, u
return 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; u32 paddedLength;
int status; int status;
bool sync = (pPacket->Completion == NULL) ? true : false; bool sync = (pPacket->Completion == NULL) ? true : false;
...@@ -378,8 +378,8 @@ struct ar6k_device *HTCGetAR6KDevice(void *HTCHandle); ...@@ -378,8 +378,8 @@ struct ar6k_device *HTCGetAR6KDevice(void *HTCHandle);
#define DEV_GMBOX_GET_PROTOCOL(pDev) (pDev)->GMboxInfo.pProtocolContext #define DEV_GMBOX_GET_PROTOCOL(pDev) (pDev)->GMboxInfo.pProtocolContext
int DevGMboxWrite(struct ar6k_device *pDev, HTC_PACKET *pPacket, u32 WriteLength); int DevGMboxWrite(struct ar6k_device *pDev, struct htc_packet *pPacket, u32 WriteLength);
int DevGMboxRead(struct ar6k_device *pDev, HTC_PACKET *pPacket, u32 ReadLength); int DevGMboxRead(struct ar6k_device *pDev, struct htc_packet *pPacket, u32 ReadLength);
#define PROC_IO_ASYNC true #define PROC_IO_ASYNC true
#define PROC_IO_SYNC false #define PROC_IO_SYNC false
......
...@@ -33,8 +33,8 @@ ...@@ -33,8 +33,8 @@
#include "htc_packet.h" #include "htc_packet.h"
#include "ar6k.h" #include "ar6k.h"
extern void AR6KFreeIOPacket(struct ar6k_device *pDev, HTC_PACKET *pPacket); extern void AR6KFreeIOPacket(struct ar6k_device *pDev, struct htc_packet *pPacket);
extern HTC_PACKET *AR6KAllocIOPacket(struct ar6k_device *pDev); extern struct htc_packet *AR6KAllocIOPacket(struct ar6k_device *pDev);
static int DevServiceDebugInterrupt(struct ar6k_device *pDev); static int DevServiceDebugInterrupt(struct ar6k_device *pDev);
...@@ -43,7 +43,7 @@ static int DevServiceDebugInterrupt(struct ar6k_device *pDev); ...@@ -43,7 +43,7 @@ static int DevServiceDebugInterrupt(struct ar6k_device *pDev);
/* completion routine for ALL HIF layer async I/O */ /* completion routine for ALL HIF layer async I/O */
int DevRWCompletionHandler(void *context, int status) 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, AR_DEBUG_PRINTF(ATH_DEBUG_RECV,
("+DevRWCompletionHandler (Pkt:0x%lX) , Status: %d \n", ("+DevRWCompletionHandler (Pkt:0x%lX) , Status: %d \n",
...@@ -300,7 +300,7 @@ static int DevServiceCounterInterrupt(struct ar6k_device *pDev) ...@@ -300,7 +300,7 @@ static int DevServiceCounterInterrupt(struct ar6k_device *pDev)
} }
/* callback when our fetch to get interrupt status registers completes */ /* 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; struct ar6k_device *pDev = (struct ar6k_device *)Context;
u32 lookAhead = 0; u32 lookAhead = 0;
...@@ -392,7 +392,7 @@ int DevCheckPendingRecvMsgsAsync(void *context) ...@@ -392,7 +392,7 @@ int DevCheckPendingRecvMsgsAsync(void *context)
{ {
struct ar6k_device *pDev = (struct ar6k_device *)context; struct ar6k_device *pDev = (struct ar6k_device *)context;
int status = 0; 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 /* this is called in an ASYNC only context, we may NOT block, sleep or call any apis that can
* cause us to switch contexts */ * cause us to switch contexts */
......
...@@ -54,12 +54,12 @@ ...@@ -54,12 +54,12 @@
/* external APIs for allocating and freeing internal I/O packets to handle ASYNC I/O */ /* 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 void AR6KFreeIOPacket(struct ar6k_device *pDev, struct htc_packet *pPacket);
extern HTC_PACKET *AR6KAllocIOPacket(struct ar6k_device *pDev); extern struct htc_packet *AR6KAllocIOPacket(struct ar6k_device *pDev);
/* callback when our fetch to enable/disable completes */ /* 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; struct ar6k_device *pDev = (struct ar6k_device *)Context;
...@@ -78,7 +78,7 @@ static int DevGMboxCounterEnableDisable(struct ar6k_device *pDev, GMBOX_IRQ_ACTI ...@@ -78,7 +78,7 @@ static int DevGMboxCounterEnableDisable(struct ar6k_device *pDev, GMBOX_IRQ_ACTI
{ {
int status = 0; int status = 0;
struct ar6k_irq_enable_registers regs; struct ar6k_irq_enable_registers regs;
HTC_PACKET *pIOPacket = NULL; struct htc_packet *pIOPacket = NULL;
LOCK_AR6K(pDev); LOCK_AR6K(pDev);
...@@ -158,7 +158,7 @@ static int DevGMboxCounterEnableDisable(struct ar6k_device *pDev, GMBOX_IRQ_ACTI ...@@ -158,7 +158,7 @@ static int DevGMboxCounterEnableDisable(struct ar6k_device *pDev, GMBOX_IRQ_ACTI
int DevGMboxIRQAction(struct ar6k_device *pDev, GMBOX_IRQ_ACTION_TYPE IrqAction, bool AsyncMode) int DevGMboxIRQAction(struct ar6k_device *pDev, GMBOX_IRQ_ACTION_TYPE IrqAction, bool AsyncMode)
{ {
int status = 0; int status = 0;
HTC_PACKET *pIOPacket = NULL; struct htc_packet *pIOPacket = NULL;
u8 GMboxIntControl[4]; u8 GMboxIntControl[4];
if (GMBOX_CREDIT_IRQ_ENABLE == IrqAction) { if (GMBOX_CREDIT_IRQ_ENABLE == IrqAction) {
...@@ -396,7 +396,7 @@ int DevCheckGMboxInterrupts(struct ar6k_device *pDev) ...@@ -396,7 +396,7 @@ int DevCheckGMboxInterrupts(struct ar6k_device *pDev)
} }
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; u32 paddedLength;
bool sync = (pPacket->Completion == NULL) ? true : false; bool sync = (pPacket->Completion == NULL) ? true : false;
...@@ -433,7 +433,7 @@ int DevGMboxWrite(struct ar6k_device *pDev, HTC_PACKET *pPacket, u32 WriteLength ...@@ -433,7 +433,7 @@ int DevGMboxWrite(struct ar6k_device *pDev, HTC_PACKET *pPacket, u32 WriteLength
return status; 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; u32 paddedLength;
...@@ -516,7 +516,7 @@ static int ProcessCreditCounterReadBuffer(u8 *pBuffer, int Length) ...@@ -516,7 +516,7 @@ static int ProcessCreditCounterReadBuffer(u8 *pBuffer, int Length)
/* callback when our fetch to enable/disable completes */ /* 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; struct ar6k_device *pDev = (struct ar6k_device *)Context;
...@@ -542,7 +542,7 @@ static void DevGMboxReadCreditsAsyncHandler(void *Context, HTC_PACKET *pPacket) ...@@ -542,7 +542,7 @@ static void DevGMboxReadCreditsAsyncHandler(void *Context, HTC_PACKET *pPacket)
int DevGMboxReadCreditCounter(struct ar6k_device *pDev, bool AsyncMode, int *pCredits) int DevGMboxReadCreditCounter(struct ar6k_device *pDev, bool AsyncMode, int *pCredits)
{ {
int status = 0; int status = 0;
HTC_PACKET *pIOPacket = NULL; struct htc_packet *pIOPacket = NULL;
AR_DEBUG_PRINTF(ATH_DEBUG_SEND,("+DevGMboxReadCreditCounter (%s) \n", AsyncMode ? "ASYNC" : "SYNC")); AR_DEBUG_PRINTF(ATH_DEBUG_SEND,("+DevGMboxReadCreditCounter (%s) \n", AsyncMode ? "ASYNC" : "SYNC"));
......
...@@ -99,7 +99,7 @@ do { \ ...@@ -99,7 +99,7 @@ do { \
(p)->HCIConfig.pHCISendComplete((p)->HCIConfig.pContext, (pt)); \ (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) static void HCIUartCleanup(struct gmbox_proto_hci_uart *pProtocol)
{ {
...@@ -312,7 +312,7 @@ static int HCIUartMessagePending(void *pContext, u8 LookAheadBytes[], int ValidB ...@@ -312,7 +312,7 @@ static int HCIUartMessagePending(void *pContext, u8 LookAheadBytes[], int ValidB
HCI_TRANSPORT_PACKET_TYPE pktType = HCI_PACKET_INVALID; HCI_TRANSPORT_PACKET_TYPE pktType = HCI_PACKET_INVALID;
bool recvRefillCalled = false; bool recvRefillCalled = false;
bool blockRecv = 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) */ /** caller guarantees that this is a fully block-able context (synch I/O is allowed) */
...@@ -532,7 +532,7 @@ static int HCIUartMessagePending(void *pContext, u8 LookAheadBytes[], int ValidB ...@@ -532,7 +532,7 @@ static int HCIUartMessagePending(void *pContext, u8 LookAheadBytes[], int ValidB
return status; 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; 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)); AR_DEBUG_PRINTF(ATH_DEBUG_SEND,("+HCISendPacketCompletion (pPacket:0x%lX) \n",(unsigned long)pPacket));
...@@ -579,7 +579,7 @@ static int SeekCreditsSynch(struct gmbox_proto_hci_uart *pProt) ...@@ -579,7 +579,7 @@ static int SeekCreditsSynch(struct gmbox_proto_hci_uart *pProt)
return status; 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 status = 0;
int transferLength; int transferLength;
...@@ -796,7 +796,7 @@ static int HCITrySend(struct gmbox_proto_hci_uart *pProt, HTC_PACKET *pPacket, b ...@@ -796,7 +796,7 @@ static int HCITrySend(struct gmbox_proto_hci_uart *pProt, HTC_PACKET *pPacket, b
static void FlushSendQueue(struct gmbox_proto_hci_uart *pProt) static void FlushSendQueue(struct gmbox_proto_hci_uart *pProt)
{ {
HTC_PACKET *pPacket; struct htc_packet *pPacket;
HTC_PACKET_QUEUE discardQueue; HTC_PACKET_QUEUE discardQueue;
INIT_HTC_PACKET_QUEUE(&discardQueue); INIT_HTC_PACKET_QUEUE(&discardQueue);
...@@ -821,7 +821,7 @@ static void FlushSendQueue(struct gmbox_proto_hci_uart *pProt) ...@@ -821,7 +821,7 @@ static void FlushSendQueue(struct gmbox_proto_hci_uart *pProt)
static void FlushRecvBuffers(struct gmbox_proto_hci_uart *pProt) static void FlushRecvBuffers(struct gmbox_proto_hci_uart *pProt)
{ {
HTC_PACKET_QUEUE discardQueue; HTC_PACKET_QUEUE discardQueue;
HTC_PACKET *pPacket; struct htc_packet *pPacket;
INIT_HTC_PACKET_QUEUE(&discardQueue); INIT_HTC_PACKET_QUEUE(&discardQueue);
...@@ -1006,7 +1006,7 @@ int HCI_TransportAddReceivePkts(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET_QUEUE ...@@ -1006,7 +1006,7 @@ int HCI_TransportAddReceivePkts(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET_QUEUE
struct gmbox_proto_hci_uart *pProt = (struct gmbox_proto_hci_uart *)HciTrans; struct gmbox_proto_hci_uart *pProt = (struct gmbox_proto_hci_uart *)HciTrans;
int status = 0; int status = 0;
bool unblockRecv = false; bool unblockRecv = false;
HTC_PACKET *pPacket; struct htc_packet *pPacket;
AR_DEBUG_PRINTF(ATH_DEBUG_RECV,("+HCI_TransportAddReceivePkt \n")); AR_DEBUG_PRINTF(ATH_DEBUG_RECV,("+HCI_TransportAddReceivePkt \n"));
...@@ -1069,7 +1069,7 @@ int HCI_TransportAddReceivePkts(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET_QUEUE ...@@ -1069,7 +1069,7 @@ int HCI_TransportAddReceivePkts(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET_QUEUE
return 0; 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; struct gmbox_proto_hci_uart *pProt = (struct gmbox_proto_hci_uart *)HciTrans;
...@@ -1159,7 +1159,7 @@ int HCI_TransportEnableDisableAsyncRecv(HCI_TRANSPORT_HANDLE HciTrans, bool Enab ...@@ -1159,7 +1159,7 @@ int HCI_TransportEnableDisableAsyncRecv(HCI_TRANSPORT_HANDLE HciTrans, bool Enab
} }
int HCI_TransportRecvHCIEventSync(HCI_TRANSPORT_HANDLE HciTrans, int HCI_TransportRecvHCIEventSync(HCI_TRANSPORT_HANDLE HciTrans,
HTC_PACKET *pPacket, struct htc_packet *pPacket,
int MaxPollMS) int MaxPollMS)
{ {
struct gmbox_proto_hci_uart *pProt = (struct gmbox_proto_hci_uart *)HciTrans; struct gmbox_proto_hci_uart *pProt = (struct gmbox_proto_hci_uart *)HciTrans;
......
...@@ -43,16 +43,16 @@ ATH_DEBUG_INSTANTIATE_MODULE_VAR(htc, ...@@ -43,16 +43,16 @@ ATH_DEBUG_INSTANTIATE_MODULE_VAR(htc,
static void HTCReportFailure(void *Context); static void HTCReportFailure(void *Context);
static void ResetEndpointStates(HTC_TARGET *target); 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); LOCK_HTC(target);
HTC_PACKET_ENQUEUE(pList,pPacket); HTC_PACKET_ENQUEUE(pList,pPacket);
UNLOCK_HTC(target); 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); LOCK_HTC(target);
pPacket = HTC_PACKET_DEQUEUE(pList); pPacket = HTC_PACKET_DEQUEUE(pList);
...@@ -171,7 +171,7 @@ HTC_HANDLE HTCCreate(void *hif_handle, struct htc_init_info *pInfo) ...@@ -171,7 +171,7 @@ HTC_HANDLE HTCCreate(void *hif_handle, struct htc_init_info *pInfo)
/* carve up buffers/packets for control messages */ /* carve up buffers/packets for control messages */
for (i = 0; i < NUM_CONTROL_RX_BUFFERS; i++) { for (i = 0; i < NUM_CONTROL_RX_BUFFERS; i++) {
HTC_PACKET *pControlPacket; struct htc_packet *pControlPacket;
pControlPacket = &target->HTCControlBuffers[i].HtcPacket; pControlPacket = &target->HTCControlBuffers[i].HtcPacket;
SET_HTC_PACKET_INFO_RX_REFILL(pControlPacket, SET_HTC_PACKET_INFO_RX_REFILL(pControlPacket,
target, target,
...@@ -182,7 +182,7 @@ HTC_HANDLE HTCCreate(void *hif_handle, struct htc_init_info *pInfo) ...@@ -182,7 +182,7 @@ HTC_HANDLE HTCCreate(void *hif_handle, struct htc_init_info *pInfo)
} }
for (;i < NUM_CONTROL_BUFFERS;i++) { for (;i < NUM_CONTROL_BUFFERS;i++) {
HTC_PACKET *pControlPacket; struct htc_packet *pControlPacket;
pControlPacket = &target->HTCControlBuffers[i].HtcPacket; pControlPacket = &target->HTCControlBuffers[i].HtcPacket;
INIT_HTC_PACKET_INFO(pControlPacket, INIT_HTC_PACKET_INFO(pControlPacket,
target->HTCControlBuffers[i].Buffer, target->HTCControlBuffers[i].Buffer,
...@@ -226,7 +226,7 @@ int HTCWaitTarget(HTC_HANDLE HTCHandle) ...@@ -226,7 +226,7 @@ int HTCWaitTarget(HTC_HANDLE HTCHandle)
{ {
HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle); HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
int status; int status;
HTC_PACKET *pPacket = NULL; struct htc_packet *pPacket = NULL;
HTC_READY_EX_MSG *pRdyMsg; HTC_READY_EX_MSG *pRdyMsg;
HTC_SERVICE_CONNECT_REQ connect; HTC_SERVICE_CONNECT_REQ connect;
...@@ -372,7 +372,7 @@ int HTCWaitTarget(HTC_HANDLE HTCHandle) ...@@ -372,7 +372,7 @@ int HTCWaitTarget(HTC_HANDLE HTCHandle)
int HTCStart(HTC_HANDLE HTCHandle) int HTCStart(HTC_HANDLE HTCHandle)
{ {
HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle); HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
HTC_PACKET *pPacket; struct htc_packet *pPacket;
int status; int status;
AR_DEBUG_PRINTF(ATH_DEBUG_TRC, ("HTCStart Enter\n")); AR_DEBUG_PRINTF(ATH_DEBUG_TRC, ("HTCStart Enter\n"));
......
...@@ -100,7 +100,7 @@ struct htc_endpoint { ...@@ -100,7 +100,7 @@ struct htc_endpoint {
#define NUM_CONTROL_RX_BUFFERS (NUM_CONTROL_BUFFERS - NUM_CONTROL_TX_BUFFERS) #define NUM_CONTROL_RX_BUFFERS (NUM_CONTROL_BUFFERS - NUM_CONTROL_TX_BUFFERS)
struct htc_control_buffer { struct htc_control_buffer {
HTC_PACKET HtcPacket; struct htc_packet HtcPacket;
u8 *Buffer; u8 *Buffer;
}; };
...@@ -162,13 +162,13 @@ typedef struct _HTC_TARGET { ...@@ -162,13 +162,13 @@ typedef struct _HTC_TARGET {
} }
/* internal HTC functions */ /* internal HTC functions */
void HTCControlTxComplete(void *Context, HTC_PACKET *pPacket); void HTCControlTxComplete(void *Context, struct htc_packet *pPacket);
void HTCControlRecv(void *Context, HTC_PACKET *pPacket); void HTCControlRecv(void *Context, struct htc_packet *pPacket);
int HTCWaitforControlMessage(HTC_TARGET *target, HTC_PACKET **ppControlPacket); int HTCWaitforControlMessage(HTC_TARGET *target, struct htc_packet **ppControlPacket);
HTC_PACKET *HTCAllocControlBuffer(HTC_TARGET *target, HTC_PACKET_QUEUE *pList); struct htc_packet *HTCAllocControlBuffer(HTC_TARGET *target, HTC_PACKET_QUEUE *pList);
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);
int HTCIssueSend(HTC_TARGET *target, HTC_PACKET *pPacket); int HTCIssueSend(HTC_TARGET *target, struct htc_packet *pPacket);
void HTCRecvCompleteHandler(void *Context, 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(HTC_TARGET *target, HTC_CREDIT_REPORT *pRpt, int NumEntries, HTC_ENDPOINT_ID FromEndpoint);
int HTCSendSetupComplete(HTC_TARGET *target); int HTCSendSetupComplete(HTC_TARGET *target);
...@@ -181,8 +181,8 @@ void DumpCreditDistStates(HTC_TARGET *target); ...@@ -181,8 +181,8 @@ void DumpCreditDistStates(HTC_TARGET *target);
void DebugDumpBytes(u8 *buffer, u16 length, char *pDescription); void DebugDumpBytes(u8 *buffer, u16 length, char *pDescription);
#endif #endif
static INLINE HTC_PACKET *HTC_ALLOC_CONTROL_TX(HTC_TARGET *target) { static INLINE struct htc_packet *HTC_ALLOC_CONTROL_TX(HTC_TARGET *target) {
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 */
pPacket->pBuffer = pPacket->pBufferStart + HTC_HDR_LENGTH; pPacket->pBuffer = pPacket->pBufferStart + HTC_HDR_LENGTH;
......
...@@ -69,7 +69,7 @@ static void DoRecvCompletion(struct htc_endpoint *pEndpoint, ...@@ -69,7 +69,7 @@ static void DoRecvCompletion(struct htc_endpoint *pEndpoint,
pQueueToIndicate); pQueueToIndicate);
INIT_HTC_PACKET_QUEUE(pQueueToIndicate); INIT_HTC_PACKET_QUEUE(pQueueToIndicate);
} else { } else {
HTC_PACKET *pPacket; struct htc_packet *pPacket;
/* using legacy EpRecv */ /* using legacy EpRecv */
do { do {
pPacket = HTC_PACKET_DEQUEUE(pQueueToIndicate); pPacket = HTC_PACKET_DEQUEUE(pQueueToIndicate);
...@@ -227,7 +227,7 @@ static INLINE int HTCProcessTrailer(HTC_TARGET *target, ...@@ -227,7 +227,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(HTC_TARGET *target,
HTC_PACKET *pPacket, struct htc_packet *pPacket,
u32 *pNextLookAheads, u32 *pNextLookAheads,
int *pNumLookAheads) int *pNumLookAheads)
{ {
...@@ -498,7 +498,7 @@ static INLINE void DrainRecvIndicationQueue(HTC_TARGET *target, struct htc_endpo ...@@ -498,7 +498,7 @@ static INLINE void DrainRecvIndicationQueue(HTC_TARGET *target, struct htc_endpo
/* note: this function can be called with the RX lock held */ /* note: this function can be called with the RX lock held */
static INLINE void SetRxPacketIndicationFlags(u32 LookAhead, static INLINE void SetRxPacketIndicationFlags(u32 LookAhead,
struct htc_endpoint *pEndpoint, struct htc_endpoint *pEndpoint,
HTC_PACKET *pPacket) struct htc_packet *pPacket)
{ {
struct htc_frame_hdr *pHdr = (struct htc_frame_hdr *)&LookAhead; struct htc_frame_hdr *pHdr = (struct htc_frame_hdr *)&LookAhead;
/* check to see if the "next" packet is from the same endpoint of the /* check to see if the "next" packet is from the same endpoint of the
...@@ -515,7 +515,7 @@ static INLINE void SetRxPacketIndicationFlags(u32 LookAhead, ...@@ -515,7 +515,7 @@ static INLINE void SetRxPacketIndicationFlags(u32 LookAhead,
/* asynchronous completion handler for recv packet fetching, when the device layer /* asynchronous completion handler for recv packet fetching, when the device layer
* completes a read request, it will call this completion handler */ * 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; HTC_TARGET *target = (HTC_TARGET *)Context;
struct htc_endpoint *pEndpoint; struct htc_endpoint *pEndpoint;
...@@ -587,11 +587,11 @@ void HTCRecvCompleteHandler(void *Context, HTC_PACKET *pPacket) ...@@ -587,11 +587,11 @@ void HTCRecvCompleteHandler(void *Context, 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, HTC_PACKET **ppControlPacket) int HTCWaitforControlMessage(HTC_TARGET *target, struct htc_packet **ppControlPacket)
{ {
int status; int status;
u32 lookAhead; u32 lookAhead;
HTC_PACKET *pPacket = NULL; struct htc_packet *pPacket = NULL;
struct htc_frame_hdr *pHdr; struct htc_frame_hdr *pHdr;
AR_DEBUG_PRINTF(ATH_DEBUG_RECV,("+HTCWaitforControlMessage \n")); AR_DEBUG_PRINTF(ATH_DEBUG_RECV,("+HTCWaitforControlMessage \n"));
...@@ -693,7 +693,7 @@ static int AllocAndPrepareRxPackets(HTC_TARGET *target, ...@@ -693,7 +693,7 @@ static int AllocAndPrepareRxPackets(HTC_TARGET *target,
HTC_PACKET_QUEUE *pQueue) HTC_PACKET_QUEUE *pQueue)
{ {
int status = 0; int status = 0;
HTC_PACKET *pPacket; struct htc_packet *pPacket;
struct htc_frame_hdr *pHdr; struct htc_frame_hdr *pHdr;
int i,j; int i,j;
int numMessages; int numMessages;
...@@ -882,7 +882,7 @@ static int AllocAndPrepareRxPackets(HTC_TARGET *target, ...@@ -882,7 +882,7 @@ static int AllocAndPrepareRxPackets(HTC_TARGET *target,
static void HTCAsyncRecvScatterCompletion(struct hif_scatter_req *pScatterReq) static void HTCAsyncRecvScatterCompletion(struct hif_scatter_req *pScatterReq)
{ {
int i; int i;
HTC_PACKET *pPacket; struct htc_packet *pPacket;
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;
...@@ -909,7 +909,7 @@ static void HTCAsyncRecvScatterCompletion(struct hif_scatter_req *pScatterReq) ...@@ -909,7 +909,7 @@ static void HTCAsyncRecvScatterCompletion(struct hif_scatter_req *pScatterReq)
INIT_HTC_PACKET_QUEUE(&localRecvQueue); 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 ! */ /* note: all packets in a scatter req are for the same endpoint ! */
pEndpoint = &target->EndPoint[pPacket->Endpoint]; pEndpoint = &target->EndPoint[pPacket->Endpoint];
...@@ -917,7 +917,7 @@ static void HTCAsyncRecvScatterCompletion(struct hif_scatter_req *pScatterReq) ...@@ -917,7 +917,7 @@ static void HTCAsyncRecvScatterCompletion(struct hif_scatter_req *pScatterReq)
/* **** NOTE: DO NOT HOLD ANY LOCKS here, HTCProcessRecvHeader can take the TX lock /* **** NOTE: DO NOT HOLD ANY LOCKS here, HTCProcessRecvHeader can take the TX lock
* as it processes credit reports */ * as it processes credit reports */
for (i = 0; i < pScatterReq->ValidScatterEntries; i++) { 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); A_ASSERT(pPacket != NULL);
/* reset count, we are only interested in the look ahead in the last packet when we /* reset count, we are only interested in the look ahead in the last packet when we
* break out of this loop */ * break out of this loop */
...@@ -994,7 +994,7 @@ static int HTCIssueRecvPacketBundle(HTC_TARGET *target, ...@@ -994,7 +994,7 @@ static int HTCIssueRecvPacketBundle(HTC_TARGET *target,
struct hif_scatter_req *pScatterReq; struct hif_scatter_req *pScatterReq;
int i, totalLength; int i, totalLength;
int pktsToScatter; int pktsToScatter;
HTC_PACKET *pPacket; struct htc_packet *pPacket;
bool asyncMode = (pSyncCompletionQueue == NULL) ? true : false; bool asyncMode = (pSyncCompletionQueue == NULL) ? true : false;
int scatterSpaceRemaining = DEV_GET_MAX_BUNDLE_RECV_LENGTH(&target->Device); int scatterSpaceRemaining = DEV_GET_MAX_BUNDLE_RECV_LENGTH(&target->Device);
...@@ -1121,7 +1121,7 @@ int HTCRecvMessagePendingHandler(void *Context, u32 MsgLookAheads[], int NumLook ...@@ -1121,7 +1121,7 @@ int HTCRecvMessagePendingHandler(void *Context, u32 MsgLookAheads[], int NumLook
{ {
HTC_TARGET *target = (HTC_TARGET *)Context; HTC_TARGET *target = (HTC_TARGET *)Context;
int status = 0; int status = 0;
HTC_PACKET *pPacket; struct htc_packet *pPacket;
struct htc_endpoint *pEndpoint; struct htc_endpoint *pEndpoint;
bool asyncProc = false; bool asyncProc = false;
u32 lookAheads[HTC_HOST_MAX_MSG_PER_BUNDLE]; u32 lookAheads[HTC_HOST_MAX_MSG_PER_BUNDLE];
...@@ -1391,7 +1391,7 @@ int HTCAddReceivePktMultiple(HTC_HANDLE HTCHandle, HTC_PACKET_QUEUE *pPktQueue) ...@@ -1391,7 +1391,7 @@ int HTCAddReceivePktMultiple(HTC_HANDLE HTCHandle, HTC_PACKET_QUEUE *pPktQueue)
struct htc_endpoint *pEndpoint; struct htc_endpoint *pEndpoint;
bool unblockRecv = false; bool unblockRecv = false;
int status = 0; int status = 0;
HTC_PACKET *pFirstPacket; struct htc_packet *pFirstPacket;
pFirstPacket = HTC_GET_PKT_AT_HEAD(pPktQueue); pFirstPacket = HTC_GET_PKT_AT_HEAD(pPktQueue);
...@@ -1415,7 +1415,7 @@ int HTCAddReceivePktMultiple(HTC_HANDLE HTCHandle, HTC_PACKET_QUEUE *pPktQueue) ...@@ -1415,7 +1415,7 @@ int HTCAddReceivePktMultiple(HTC_HANDLE HTCHandle, HTC_PACKET_QUEUE *pPktQueue)
LOCK_HTC_RX(target); LOCK_HTC_RX(target);
if (HTC_STOPPING(target)) { if (HTC_STOPPING(target)) {
HTC_PACKET *pPacket; struct htc_packet *pPacket;
UNLOCK_HTC_RX(target); UNLOCK_HTC_RX(target);
...@@ -1455,7 +1455,7 @@ int HTCAddReceivePktMultiple(HTC_HANDLE HTCHandle, HTC_PACKET_QUEUE *pPktQueue) ...@@ -1455,7 +1455,7 @@ int HTCAddReceivePktMultiple(HTC_HANDLE HTCHandle, HTC_PACKET_QUEUE *pPktQueue)
} }
/* Makes a buffer available to the HTC module */ /* 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; HTC_PACKET_QUEUE queue;
INIT_HTC_PACKET_QUEUE_AND_ADD(&queue,pPacket); INIT_HTC_PACKET_QUEUE_AND_ADD(&queue,pPacket);
...@@ -1488,7 +1488,7 @@ void HTCUnblockRecv(HTC_HANDLE HTCHandle) ...@@ -1488,7 +1488,7 @@ void HTCUnblockRecv(HTC_HANDLE HTCHandle)
static void HTCFlushRxQueue(HTC_TARGET *target, struct htc_endpoint *pEndpoint, HTC_PACKET_QUEUE *pQueue) 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; HTC_PACKET_QUEUE container;
LOCK_HTC_RX(target); LOCK_HTC_RX(target);
......
...@@ -62,7 +62,7 @@ static void DoSendCompletion(struct htc_endpoint *pEndpoint, ...@@ -62,7 +62,7 @@ static void DoSendCompletion(struct htc_endpoint *pEndpoint,
/* all packets are now owned by the callback, reset queue to be safe */ /* all packets are now owned by the callback, reset queue to be safe */
INIT_HTC_PACKET_QUEUE(pQueueToIndicate); INIT_HTC_PACKET_QUEUE(pQueueToIndicate);
} else { } else {
HTC_PACKET *pPacket; struct htc_packet *pPacket;
/* using legacy EpTxComplete */ /* using legacy EpTxComplete */
do { do {
pPacket = HTC_PACKET_DEQUEUE(pQueueToIndicate); pPacket = HTC_PACKET_DEQUEUE(pQueueToIndicate);
...@@ -77,7 +77,7 @@ static void DoSendCompletion(struct htc_endpoint *pEndpoint, ...@@ -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, HTC_PACKET *pPacket) static INLINE void CompleteSentPacket(HTC_TARGET *target, struct htc_endpoint *pEndpoint, struct htc_packet *pPacket)
{ {
pPacket->Completion = NULL; pPacket->Completion = NULL;
...@@ -101,7 +101,7 @@ static INLINE void CompleteSentPacket(HTC_TARGET *target, struct htc_endpoint *p ...@@ -101,7 +101,7 @@ static INLINE void CompleteSentPacket(HTC_TARGET *target, struct htc_endpoint *p
/* our internal send packet completion handler when packets are submited to the AR6K device /* our internal send packet completion handler when packets are submited to the AR6K device
* layer */ * layer */
static void HTCSendPktCompletionHandler(void *Context, HTC_PACKET *pPacket) static void HTCSendPktCompletionHandler(void *Context, struct htc_packet *pPacket)
{ {
HTC_TARGET *target = (HTC_TARGET *)Context; HTC_TARGET *target = (HTC_TARGET *)Context;
struct htc_endpoint *pEndpoint = &target->EndPoint[pPacket->Endpoint]; struct htc_endpoint *pEndpoint = &target->EndPoint[pPacket->Endpoint];
...@@ -113,7 +113,7 @@ static void HTCSendPktCompletionHandler(void *Context, HTC_PACKET *pPacket) ...@@ -113,7 +113,7 @@ static void HTCSendPktCompletionHandler(void *Context, HTC_PACKET *pPacket)
DO_EP_TX_COMPLETION(pEndpoint,&container); 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; int status;
bool sync = false; bool sync = false;
...@@ -153,7 +153,7 @@ static INLINE void GetHTCSendPackets(HTC_TARGET *target, ...@@ -153,7 +153,7 @@ static INLINE void GetHTCSendPackets(HTC_TARGET *target,
int creditsRequired; int creditsRequired;
int remainder; int remainder;
u8 sendFlags; u8 sendFlags;
HTC_PACKET *pPacket; struct htc_packet *pPacket;
unsigned int transferLength; unsigned int transferLength;
/****** NOTE : the TX lock is held when this function is called *****************/ /****** NOTE : the TX lock is held when this function is called *****************/
...@@ -267,7 +267,7 @@ static INLINE void GetHTCSendPackets(HTC_TARGET *target, ...@@ -267,7 +267,7 @@ static INLINE void GetHTCSendPackets(HTC_TARGET *target,
static void HTCAsyncSendScatterCompletion(struct hif_scatter_req *pScatterReq) static void HTCAsyncSendScatterCompletion(struct hif_scatter_req *pScatterReq)
{ {
int i; int i;
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; HTC_TARGET *target = (HTC_TARGET *)pEndpoint->target;
int status = 0; int status = 0;
...@@ -287,7 +287,7 @@ static void HTCAsyncSendScatterCompletion(struct hif_scatter_req *pScatterReq) ...@@ -287,7 +287,7 @@ static void HTCAsyncSendScatterCompletion(struct hif_scatter_req *pScatterReq)
/* walk through the scatter list and process */ /* walk through the scatter list and process */
for (i = 0; i < pScatterReq->ValidScatterEntries; i++) { 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); A_ASSERT(pPacket != NULL);
pPacket->Status = status; pPacket->Status = status;
CompleteSentPacket(target,pEndpoint,pPacket); CompleteSentPacket(target,pEndpoint,pPacket);
...@@ -319,7 +319,7 @@ static void HTCIssueSendBundle(struct htc_endpoint *pEndpoint, ...@@ -319,7 +319,7 @@ static void HTCIssueSendBundle(struct htc_endpoint *pEndpoint,
struct hif_scatter_req *pScatterReq = NULL; struct hif_scatter_req *pScatterReq = NULL;
int i, packetsInScatterReq; int i, packetsInScatterReq;
unsigned int transferLength; unsigned int transferLength;
HTC_PACKET *pPacket; struct htc_packet *pPacket;
bool done = false; bool done = false;
int bundlesSent = 0; int bundlesSent = 0;
int totalPktsInBundle = 0; int totalPktsInBundle = 0;
...@@ -450,7 +450,7 @@ static void HTCIssueSendBundle(struct htc_endpoint *pEndpoint, ...@@ -450,7 +450,7 @@ static void HTCIssueSendBundle(struct htc_endpoint *pEndpoint,
if (packetsInScatterReq > 0) { if (packetsInScatterReq > 0) {
/* work backwards to requeue requests */ /* work backwards to requeue requests */
for (i = (packetsInScatterReq - 1); i >= 0; i--) { 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) { if (pPacket != NULL) {
/* undo any prep */ /* undo any prep */
HTC_UNPREPARE_SEND_PKT(pPacket); HTC_UNPREPARE_SEND_PKT(pPacket);
...@@ -482,7 +482,7 @@ static HTC_SEND_QUEUE_RESULT HTCTrySend(HTC_TARGET *target, ...@@ -482,7 +482,7 @@ static HTC_SEND_QUEUE_RESULT HTCTrySend(HTC_TARGET *target,
HTC_PACKET_QUEUE *pCallersSendQueue) HTC_PACKET_QUEUE *pCallersSendQueue)
{ {
HTC_PACKET_QUEUE sendQueue; /* temp queue to hold packets at various stages */ HTC_PACKET_QUEUE sendQueue; /* temp queue to hold packets at various stages */
HTC_PACKET *pPacket; struct htc_packet *pPacket;
int bundlesSent; int bundlesSent;
int pktsInBundles; int pktsInBundles;
int overflow; int overflow;
...@@ -546,7 +546,7 @@ static HTC_SEND_QUEUE_RESULT HTCTrySend(HTC_TARGET *target, ...@@ -546,7 +546,7 @@ static HTC_SEND_QUEUE_RESULT HTCTrySend(HTC_TARGET *target,
/* the caller's queue has all the packets that won't fit*/ /* 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 */ /* 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", AR_DEBUG_PRINTF(ATH_DEBUG_SEND, (" Indicating overflowed TX packet: 0x%lX \n",
(unsigned long)pPacket)); (unsigned long)pPacket));
...@@ -672,7 +672,7 @@ int HTCSendPktsMultiple(HTC_HANDLE HTCHandle, HTC_PACKET_QUEUE *pPktQueue) ...@@ -672,7 +672,7 @@ int HTCSendPktsMultiple(HTC_HANDLE HTCHandle, HTC_PACKET_QUEUE *pPktQueue)
{ {
HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle); HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
struct htc_endpoint *pEndpoint; struct htc_endpoint *pEndpoint;
HTC_PACKET *pPacket; struct htc_packet *pPacket;
AR_DEBUG_PRINTF(ATH_DEBUG_SEND, ("+HTCSendPktsMultiple: Queue: 0x%lX, Pkts %d \n", AR_DEBUG_PRINTF(ATH_DEBUG_SEND, ("+HTCSendPktsMultiple: Queue: 0x%lX, Pkts %d \n",
(unsigned long)pPktQueue, HTC_PACKET_QUEUE_DEPTH(pPktQueue))); (unsigned long)pPktQueue, HTC_PACKET_QUEUE_DEPTH(pPktQueue)));
...@@ -709,7 +709,7 @@ int HTCSendPktsMultiple(HTC_HANDLE HTCHandle, HTC_PACKET_QUEUE *pPktQueue) ...@@ -709,7 +709,7 @@ int HTCSendPktsMultiple(HTC_HANDLE HTCHandle, HTC_PACKET_QUEUE *pPktQueue)
} }
/* HTC API - HTCSendPkt */ /* HTC API - HTCSendPkt */
int HTCSendPkt(HTC_HANDLE HTCHandle, HTC_PACKET *pPacket) int HTCSendPkt(HTC_HANDLE HTCHandle, struct htc_packet *pPacket)
{ {
HTC_PACKET_QUEUE queue; HTC_PACKET_QUEUE queue;
...@@ -840,7 +840,7 @@ void HTCProcessCreditRpt(HTC_TARGET *target, HTC_CREDIT_REPORT *pRpt, int NumEnt ...@@ -840,7 +840,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(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 discardQueue;
HTC_PACKET_QUEUE container; HTC_PACKET_QUEUE container;
...@@ -850,7 +850,7 @@ static void HTCFlushEndpointTX(HTC_TARGET *target, struct htc_endpoint *pEndpoin ...@@ -850,7 +850,7 @@ static void HTCFlushEndpointTX(HTC_TARGET *target, struct htc_endpoint *pEndpoin
LOCK_HTC_TX(target); LOCK_HTC_TX(target);
/* interate from the front of the TX queue and flush out packets */ /* 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 */ /* check for removal */
if ((HTC_TX_PACKET_TAG_ALL == Tag) || (Tag == pPacket->PktInfo.AsTx.Tag)) { if ((HTC_TX_PACKET_TAG_ALL == Tag) || (Tag == pPacket->PktInfo.AsTx.Tag)) {
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
//============================================================================== //==============================================================================
#include "htc_internal.h" #include "htc_internal.h"
void HTCControlTxComplete(void *Context, HTC_PACKET *pPacket) void HTCControlTxComplete(void *Context, struct htc_packet *pPacket)
{ {
/* not implemented /* not implemented
* we do not send control TX frames during normal runtime, only during setup */ * we do not send control TX frames during normal runtime, only during setup */
...@@ -30,7 +30,7 @@ void HTCControlTxComplete(void *Context, HTC_PACKET *pPacket) ...@@ -30,7 +30,7 @@ void HTCControlTxComplete(void *Context, HTC_PACKET *pPacket)
} }
/* callback when a control message arrives on this endpoint */ /* 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); AR_DEBUG_ASSERT(pPacket->Endpoint == ENDPOINT_0);
...@@ -59,7 +59,7 @@ void HTCControlRecv(void *Context, HTC_PACKET *pPacket) ...@@ -59,7 +59,7 @@ void HTCControlRecv(void *Context, HTC_PACKET *pPacket)
int HTCSendSetupComplete(HTC_TARGET *target) int HTCSendSetupComplete(HTC_TARGET *target)
{ {
HTC_PACKET *pSendPacket = NULL; struct htc_packet *pSendPacket = NULL;
int status; int status;
do { do {
...@@ -127,8 +127,8 @@ int HTCConnectService(HTC_HANDLE HTCHandle, ...@@ -127,8 +127,8 @@ int HTCConnectService(HTC_HANDLE HTCHandle,
{ {
HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle); HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
int status = 0; int status = 0;
HTC_PACKET *pRecvPacket = NULL; struct htc_packet *pRecvPacket = NULL;
HTC_PACKET *pSendPacket = NULL; struct htc_packet *pSendPacket = NULL;
HTC_CONNECT_SERVICE_RESPONSE_MSG *pResponseMsg; HTC_CONNECT_SERVICE_RESPONSE_MSG *pResponseMsg;
HTC_CONNECT_SERVICE_MSG *pConnectMsg; HTC_CONNECT_SERVICE_MSG *pConnectMsg;
HTC_ENDPOINT_ID assignedEndpoint = ENDPOINT_MAX; HTC_ENDPOINT_ID assignedEndpoint = ENDPOINT_MAX;
......
...@@ -43,9 +43,9 @@ typedef HTC_ENDPOINT_ID HCI_TRANSPORT_PACKET_TYPE; ...@@ -43,9 +43,9 @@ typedef HTC_ENDPOINT_ID HCI_TRANSPORT_PACKET_TYPE;
#define HCI_SET_PACKET_TYPE(pP,s) (pP)->Endpoint = (s) #define HCI_SET_PACKET_TYPE(pP,s) (pP)->Endpoint = (s)
/* callback when an HCI packet was completely sent */ /* 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 */ /* 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, /* Optional receive buffer re-fill callback,
* On some OSes (like Linux) packets are allocated from a global pool and indicated up * 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 * to the network stack. The driver never gets the packets back from the OS. For these OSes
...@@ -68,7 +68,7 @@ typedef void (*HCI_TRANSPORT_RECV_REFILL)(void *, HCI_TRANSPORT_PACKET_TYPE Ty ...@@ -68,7 +68,7 @@ typedef void (*HCI_TRANSPORT_RECV_REFILL)(void *, HCI_TRANSPORT_PACKET_TYPE Ty
* NOTE*** This callback is mutually exclusive with the the refill callback above. * 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 { typedef enum _HCI_SEND_FULL_ACTION {
HCI_SEND_FULL_KEEP = 0, /* packet that overflowed should be kept in the queue */ HCI_SEND_FULL_KEEP = 0, /* packet that overflowed should be kept in the queue */
...@@ -77,7 +77,7 @@ typedef enum _HCI_SEND_FULL_ACTION { ...@@ -77,7 +77,7 @@ typedef enum _HCI_SEND_FULL_ACTION {
/* callback when an HCI send queue exceeds the caller's MaxSendQueueDepth threshold, /* 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) */ * 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 { struct hci_transport_properties {
int HeadRoom; /* number of bytes in front of HCI packet for header space */ int HeadRoom; /* number of bytes in front of HCI packet for header space */
...@@ -166,7 +166,7 @@ int HCI_TransportAddReceivePkts(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET_QUE ...@@ -166,7 +166,7 @@ int HCI_TransportAddReceivePkts(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET_QUE
@example: @example:
@see also: @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);
/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
...@@ -223,7 +223,7 @@ int HCI_TransportEnableDisableAsyncRecv(HCI_TRANSPORT_HANDLE HciTrans, bool E ...@@ -223,7 +223,7 @@ int HCI_TransportEnableDisableAsyncRecv(HCI_TRANSPORT_HANDLE HciTrans, bool E
@see also: HCI_TransportEnableDisableAsyncRecv @see also: HCI_TransportEnableDisableAsyncRecv
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
int HCI_TransportRecvHCIEventSync(HCI_TRANSPORT_HANDLE HciTrans, int HCI_TransportRecvHCIEventSync(HCI_TRANSPORT_HANDLE HciTrans,
HTC_PACKET *pPacket, struct htc_packet *pPacket,
int MaxPollMS); int MaxPollMS);
/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
......
...@@ -49,7 +49,7 @@ struct htc_init_info { ...@@ -49,7 +49,7 @@ struct htc_init_info {
}; };
/* per service connection send completion */ /* 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 /* 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) * 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. * to hold a list of completed send packets.
...@@ -58,7 +58,7 @@ typedef void (*HTC_EP_SEND_PKT_COMPLETE)(void *,HTC_PACKET *); ...@@ -58,7 +58,7 @@ typedef void (*HTC_EP_SEND_PKT_COMPLETE)(void *,HTC_PACKET *);
* HTC_PACKET_ENQUEUE() */ * HTC_PACKET_ENQUEUE() */
typedef void (*HTC_EP_SEND_PKT_COMP_MULTIPLE)(void *,HTC_PACKET_QUEUE *); typedef void (*HTC_EP_SEND_PKT_COMP_MULTIPLE)(void *,HTC_PACKET_QUEUE *);
/* per service connection pkt received */ /* 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 /* 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) * The HTC_PACKET_QUEUE is a temporary queue object (e.g. freed on return from the callback)
* to hold a list of recv packets. * to hold a list of recv packets.
...@@ -94,7 +94,7 @@ typedef void (*HTC_EP_RECV_REFILL)(void *, HTC_ENDPOINT_ID Endpoint); ...@@ -94,7 +94,7 @@ typedef void (*HTC_EP_RECV_REFILL)(void *, HTC_ENDPOINT_ID Endpoint);
* amount of "committed" memory used to receive 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 { typedef enum _HTC_SEND_FULL_ACTION {
HTC_SEND_FULL_KEEP = 0, /* packet that overflowed should be kept in the queue */ HTC_SEND_FULL_KEEP = 0, /* packet that overflowed should be kept in the queue */
...@@ -114,7 +114,7 @@ typedef enum _HTC_SEND_FULL_ACTION { ...@@ -114,7 +114,7 @@ typedef enum _HTC_SEND_FULL_ACTION {
* closed loop mechanism will prevent the network stack from overunning the NIC * 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 * 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. */ * 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 { struct htc_ep_callbacks {
void *pContext; /* context for each callback */ void *pContext; /* context for each callback */
...@@ -348,7 +348,7 @@ int HTCStart(HTC_HANDLE HTCHandle); ...@@ -348,7 +348,7 @@ int HTCStart(HTC_HANDLE HTCHandle);
@example: @example:
@see also: @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 @desc: Connect to an HTC service
@function name: HTCConnectService @function name: HTCConnectService
...@@ -377,7 +377,7 @@ int HTCConnectService(HTC_HANDLE HTCHandle, ...@@ -377,7 +377,7 @@ int HTCConnectService(HTC_HANDLE HTCHandle,
@example: @example:
@see also: HTCFlushEndpoint @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 @desc: Stop HTC service communications
@function name: HTCStop @function name: HTCStop
......
...@@ -42,9 +42,9 @@ typedef enum ...@@ -42,9 +42,9 @@ typedef enum
ENDPOINT_MAX, ENDPOINT_MAX,
} HTC_ENDPOINT_ID; } 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; typedef u16 HTC_TX_TAG;
...@@ -68,7 +68,7 @@ typedef struct _HTC_RX_PACKET_INFO { ...@@ -68,7 +68,7 @@ typedef struct _HTC_RX_PACKET_INFO {
#define HTC_RX_FLAGS_INDICATE_MORE_PKTS (1 << 0) /* more packets on this endpoint are being fetched */ #define HTC_RX_FLAGS_INDICATE_MORE_PKTS (1 << 0) /* more packets on this endpoint are being fetched */
/* wrapper around endpoint-specific packets */ /* wrapper around endpoint-specific packets */
typedef struct _HTC_PACKET { struct htc_packet {
struct dl_list ListLink; /* double link */ struct dl_list ListLink; /* double link */
void *pPktContext; /* caller's per packet specific context */ void *pPktContext; /* caller's per packet specific context */
...@@ -98,7 +98,7 @@ typedef struct _HTC_PACKET { ...@@ -98,7 +98,7 @@ typedef struct _HTC_PACKET {
/* the following fields are for internal HTC use */ /* the following fields are for internal HTC use */
HTC_PACKET_COMPLETION Completion; /* completion */ HTC_PACKET_COMPLETION Completion; /* completion */
void *pContext; /* HTC private completion context */ void *pContext; /* HTC private completion context */
} HTC_PACKET; };
...@@ -165,11 +165,11 @@ typedef struct _HTC_PACKET_QUEUE { ...@@ -165,11 +165,11 @@ typedef struct _HTC_PACKET_QUEUE {
/* test if a queue is empty */ /* test if a queue is empty */
#define HTC_QUEUE_EMPTY(pQ) ((pQ)->Depth == 0) #define HTC_QUEUE_EMPTY(pQ) ((pQ)->Depth == 0)
/* get packet at head without removing it */ /* 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) { if (queue->Depth == 0) {
return NULL; 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 */ /* remove a packet from a queue, where-ever it is in the queue */
#define HTC_PACKET_REMOVE(pQ,p) \ #define HTC_PACKET_REMOVE(pQ,p) \
...@@ -179,21 +179,21 @@ static INLINE HTC_PACKET *HTC_GET_PKT_AT_HEAD(HTC_PACKET_QUEUE *queue) { ...@@ -179,21 +179,21 @@ static INLINE HTC_PACKET *HTC_GET_PKT_AT_HEAD(HTC_PACKET_QUEUE *queue) {
} }
/* dequeue an HTC packet from the head of the queue */ /* 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); struct dl_list *pItem = DL_ListRemoveItemFromHead(&queue->QueueHead);
if (pItem != NULL) { if (pItem != NULL) {
queue->Depth--; queue->Depth--;
return A_CONTAINING_STRUCT(pItem, HTC_PACKET, ListLink); return A_CONTAINING_STRUCT(pItem, struct htc_packet, ListLink);
} }
return NULL; return NULL;
} }
/* dequeue an HTC packet from the tail of the queue */ /* 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); struct dl_list *pItem = DL_ListRemoveItemFromTail(&queue->QueueHead);
if (pItem != NULL) { if (pItem != NULL) {
queue->Depth--; queue->Depth--;
return A_CONTAINING_STRUCT(pItem, HTC_PACKET, ListLink); return A_CONTAINING_STRUCT(pItem, struct htc_packet, ListLink);
} }
return NULL; return NULL;
} }
...@@ -220,7 +220,7 @@ static INLINE HTC_PACKET *HTC_PACKET_DEQUEUE_TAIL(HTC_PACKET_QUEUE *queue) { ...@@ -220,7 +220,7 @@ static INLINE HTC_PACKET *HTC_PACKET_DEQUEUE_TAIL(HTC_PACKET_QUEUE *queue) {
} }
#define HTC_PACKET_QUEUE_ITERATE_ALLOW_REMOVE(pQ, pPTemp) \ #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 #define HTC_PACKET_QUEUE_ITERATE_END ITERATE_END
......
...@@ -53,18 +53,18 @@ static int SendHCICommand(struct ar3k_config_info *pConfig, ...@@ -53,18 +53,18 @@ static int SendHCICommand(struct ar3k_config_info *pConfig,
u8 *pBuffer, u8 *pBuffer,
int Length) int Length)
{ {
HTC_PACKET *pPacket = NULL; struct htc_packet *pPacket = NULL;
int status = 0; int status = 0;
do { do {
pPacket = (HTC_PACKET *)A_MALLOC(sizeof(HTC_PACKET)); pPacket = (struct htc_packet *)A_MALLOC(sizeof(struct htc_packet));
if (NULL == pPacket) { if (NULL == pPacket) {
status = A_NO_MEMORY; status = A_NO_MEMORY;
break; break;
} }
A_MEMZERO(pPacket,sizeof(HTC_PACKET)); A_MEMZERO(pPacket,sizeof(struct htc_packet));
SET_HTC_PACKET_INFO_TX(pPacket, SET_HTC_PACKET_INFO_TX(pPacket,
NULL, NULL,
pBuffer, pBuffer,
...@@ -89,18 +89,18 @@ static int RecvHCIEvent(struct ar3k_config_info *pConfig, ...@@ -89,18 +89,18 @@ static int RecvHCIEvent(struct ar3k_config_info *pConfig,
int *pLength) int *pLength)
{ {
int status = 0; int status = 0;
HTC_PACKET *pRecvPacket = NULL; struct htc_packet *pRecvPacket = NULL;
do { do {
pRecvPacket = (HTC_PACKET *)A_MALLOC(sizeof(HTC_PACKET)); pRecvPacket = (struct htc_packet *)A_MALLOC(sizeof(struct htc_packet));
if (NULL == pRecvPacket) { if (NULL == pRecvPacket) {
status = A_NO_MEMORY; status = A_NO_MEMORY;
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("Failed to alloc HTC struct \n")); AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("Failed to alloc HTC struct \n"));
break; 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); SET_HTC_PACKET_INFO_RX_REFILL(pRecvPacket,NULL,pBuffer,*pLength,HCI_EVENT_TYPE);
......
...@@ -313,13 +313,13 @@ int ar6000_configure_target(AR_SOFTC_T *ar); ...@@ -313,13 +313,13 @@ int ar6000_configure_target(AR_SOFTC_T *ar);
static void ar6000_target_failure(void *Instance, int Status); 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_rx_refill(void *Context,HTC_ENDPOINT_ID Endpoint);
static void ar6000_tx_complete(void *Context, HTC_PACKET_QUEUE *pPackets); 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 #ifdef ATH_AR6K_11N_SUPPORT
static void ar6000_alloc_netbufs(A_NETBUF_QUEUE_T *q, u16 num); static void ar6000_alloc_netbufs(A_NETBUF_QUEUE_T *q, u16 num);
...@@ -327,7 +327,7 @@ static void ar6000_alloc_netbufs(A_NETBUF_QUEUE_T *q, u16 num); ...@@ -327,7 +327,7 @@ 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_nw_stack(void * dev, void *osbuf);
//static void ar6000_deliver_frames_to_bt_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); static void ar6000_refill_amsdu_rxbufs(AR_SOFTC_T *ar, int Count);
...@@ -3376,7 +3376,7 @@ applyAPTCHeuristics(AR_SOFTC_T *ar) ...@@ -3376,7 +3376,7 @@ applyAPTCHeuristics(AR_SOFTC_T *ar)
} }
#endif /* ADAPTIVE_POWER_THROUGHPUT_CONTROL */ #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; AR_SOFTC_T *ar = (AR_SOFTC_T *)Context;
HTC_SEND_FULL_ACTION action = HTC_SEND_FULL_KEEP; HTC_SEND_FULL_ACTION action = HTC_SEND_FULL_KEEP;
...@@ -3470,7 +3470,7 @@ ar6000_tx_complete(void *Context, HTC_PACKET_QUEUE *pPacketQueue) ...@@ -3470,7 +3470,7 @@ ar6000_tx_complete(void *Context, HTC_PACKET_QUEUE *pPacketQueue)
HTC_ENDPOINT_ID eid; HTC_ENDPOINT_ID eid;
bool wakeEvent = false; bool wakeEvent = false;
struct sk_buff_head skb_queue; struct sk_buff_head skb_queue;
HTC_PACKET *pPacket; struct htc_packet *pPacket;
struct sk_buff *pktSkb; struct sk_buff *pktSkb;
bool flushing = false; bool flushing = false;
...@@ -3642,7 +3642,7 @@ sta_t *ieee80211_find_conn_for_aid(AR_SOFTC_T *ar, u8 aid) ...@@ -3642,7 +3642,7 @@ sta_t *ieee80211_find_conn_for_aid(AR_SOFTC_T *ar, u8 aid)
*/ */
int pktcount; int pktcount;
static void 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; AR_SOFTC_T *ar = (AR_SOFTC_T *)Context;
struct sk_buff *skb = (struct sk_buff *)pPacket->pPktContext; struct sk_buff *skb = (struct sk_buff *)pPacket->pPktContext;
...@@ -3991,7 +3991,7 @@ ar6000_rx_refill(void *Context, HTC_ENDPOINT_ID Endpoint) ...@@ -3991,7 +3991,7 @@ ar6000_rx_refill(void *Context, HTC_ENDPOINT_ID Endpoint)
void *osBuf; void *osBuf;
int RxBuffers; int RxBuffers;
int buffersToRefill; int buffersToRefill;
HTC_PACKET *pPacket; struct htc_packet *pPacket;
HTC_PACKET_QUEUE queue; HTC_PACKET_QUEUE queue;
buffersToRefill = (int)AR6000_MAX_RX_BUFFERS - buffersToRefill = (int)AR6000_MAX_RX_BUFFERS -
...@@ -4014,7 +4014,7 @@ ar6000_rx_refill(void *Context, HTC_ENDPOINT_ID Endpoint) ...@@ -4014,7 +4014,7 @@ ar6000_rx_refill(void *Context, HTC_ENDPOINT_ID Endpoint)
} }
/* the HTC packet wrapper is at the head of the reserved area /* the HTC packet wrapper is at the head of the reserved area
* in the skb */ * in the skb */
pPacket = (HTC_PACKET *)(A_NETBUF_HEAD(osBuf)); pPacket = (struct htc_packet *)(A_NETBUF_HEAD(osBuf));
/* set re-fill info */ /* set re-fill info */
SET_HTC_PACKET_INFO_RX_REFILL(pPacket,osBuf,A_NETBUF_DATA(osBuf),AR6000_BUFFER_SIZE,Endpoint); SET_HTC_PACKET_INFO_RX_REFILL(pPacket,osBuf,A_NETBUF_DATA(osBuf),AR6000_BUFFER_SIZE,Endpoint);
/* add to queue */ /* add to queue */
...@@ -4031,7 +4031,7 @@ ar6000_rx_refill(void *Context, HTC_ENDPOINT_ID Endpoint) ...@@ -4031,7 +4031,7 @@ ar6000_rx_refill(void *Context, HTC_ENDPOINT_ID Endpoint)
/* clean up our amsdu buffer list */ /* clean up our amsdu buffer list */
static void ar6000_cleanup_amsdu_rxbufs(AR_SOFTC_T *ar) static void ar6000_cleanup_amsdu_rxbufs(AR_SOFTC_T *ar)
{ {
HTC_PACKET *pPacket; struct htc_packet *pPacket;
void *osBuf; void *osBuf;
/* empty AMSDU buffer queue and free OS bufs */ /* empty AMSDU buffer queue and free OS bufs */
...@@ -4060,7 +4060,7 @@ static void ar6000_cleanup_amsdu_rxbufs(AR_SOFTC_T *ar) ...@@ -4060,7 +4060,7 @@ static void ar6000_cleanup_amsdu_rxbufs(AR_SOFTC_T *ar)
/* refill the amsdu buffer list */ /* refill the amsdu buffer list */
static void ar6000_refill_amsdu_rxbufs(AR_SOFTC_T *ar, int Count) static void ar6000_refill_amsdu_rxbufs(AR_SOFTC_T *ar, int Count)
{ {
HTC_PACKET *pPacket; struct htc_packet *pPacket;
void *osBuf; void *osBuf;
while (Count > 0) { while (Count > 0) {
...@@ -4070,7 +4070,7 @@ static void ar6000_refill_amsdu_rxbufs(AR_SOFTC_T *ar, int Count) ...@@ -4070,7 +4070,7 @@ static void ar6000_refill_amsdu_rxbufs(AR_SOFTC_T *ar, int Count)
} }
/* the HTC packet wrapper is at the head of the reserved area /* the HTC packet wrapper is at the head of the reserved area
* in the skb */ * in the skb */
pPacket = (HTC_PACKET *)(A_NETBUF_HEAD(osBuf)); pPacket = (struct htc_packet *)(A_NETBUF_HEAD(osBuf));
/* set re-fill info */ /* set re-fill info */
SET_HTC_PACKET_INFO_RX_REFILL(pPacket,osBuf,A_NETBUF_DATA(osBuf),AR6000_AMSDU_BUFFER_SIZE,0); SET_HTC_PACKET_INFO_RX_REFILL(pPacket,osBuf,A_NETBUF_DATA(osBuf),AR6000_AMSDU_BUFFER_SIZE,0);
...@@ -4090,9 +4090,9 @@ static void ar6000_refill_amsdu_rxbufs(AR_SOFTC_T *ar, int Count) ...@@ -4090,9 +4090,9 @@ static void ar6000_refill_amsdu_rxbufs(AR_SOFTC_T *ar, int Count)
* keep the allocation size the same to optimize cached-slab allocations. * 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; AR_SOFTC_T *ar = (AR_SOFTC_T *)Context;
int refillCount = 0; int refillCount = 0;
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
#ifdef HTC_RAW_INTERFACE #ifdef HTC_RAW_INTERFACE
static void 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; AR_SOFTC_T *ar = (AR_SOFTC_T *)Context;
raw_htc_buffer *busy; raw_htc_buffer *busy;
...@@ -70,7 +70,7 @@ ar6000_htc_raw_read_cb(void *Context, HTC_PACKET *pPacket) ...@@ -70,7 +70,7 @@ ar6000_htc_raw_read_cb(void *Context, HTC_PACKET *pPacket)
} }
static void 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; AR_SOFTC_T *ar = (AR_SOFTC_T *)Context;
raw_htc_buffer *free; raw_htc_buffer *free;
......
...@@ -39,12 +39,12 @@ ...@@ -39,12 +39,12 @@
HCI_TRANSPORT_HANDLE (*_HCI_TransportAttach)(void *HTCHandle, struct hci_transport_config_info *pInfo); HCI_TRANSPORT_HANDLE (*_HCI_TransportAttach)(void *HTCHandle, struct hci_transport_config_info *pInfo);
void (*_HCI_TransportDetach)(HCI_TRANSPORT_HANDLE HciTrans); void (*_HCI_TransportDetach)(HCI_TRANSPORT_HANDLE HciTrans);
int (*_HCI_TransportAddReceivePkts)(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET_QUEUE *pQueue); 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); void (*_HCI_TransportStop)(HCI_TRANSPORT_HANDLE HciTrans);
int (*_HCI_TransportStart)(HCI_TRANSPORT_HANDLE HciTrans); int (*_HCI_TransportStart)(HCI_TRANSPORT_HANDLE HciTrans);
int (*_HCI_TransportEnableDisableAsyncRecv)(HCI_TRANSPORT_HANDLE HciTrans, bool Enable); int (*_HCI_TransportEnableDisableAsyncRecv)(HCI_TRANSPORT_HANDLE HciTrans, bool Enable);
int (*_HCI_TransportRecvHCIEventSync)(HCI_TRANSPORT_HANDLE HciTrans, int (*_HCI_TransportRecvHCIEventSync)(HCI_TRANSPORT_HANDLE HciTrans,
HTC_PACKET *pPacket, struct htc_packet *pPacket,
int MaxPollMS); int MaxPollMS);
int (*_HCI_TransportSetBaudRate)(HCI_TRANSPORT_HANDLE HciTrans, u32 Baud); int (*_HCI_TransportSetBaudRate)(HCI_TRANSPORT_HANDLE HciTrans, u32 Baud);
int (*_HCI_TransportEnablePowerMgmt)(HCI_TRANSPORT_HANDLE HciTrans, bool Enable); int (*_HCI_TransportEnablePowerMgmt)(HCI_TRANSPORT_HANDLE HciTrans, bool Enable);
......
...@@ -139,16 +139,16 @@ static inline void FreeBtOsBuf(struct ar6k_hci_bridge_info *pHcidevInfo, void *o ...@@ -139,16 +139,16 @@ static inline void FreeBtOsBuf(struct ar6k_hci_bridge_info *pHcidevInfo, void *o
} }
} }
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); LOCK_BRIDGE(pHcidevInfo);
HTC_PACKET_ENQUEUE(&pHcidevInfo->HTCPacketStructHead,pPacket); HTC_PACKET_ENQUEUE(&pHcidevInfo->HTCPacketStructHead,pPacket);
UNLOCK_BRIDGE(pHcidevInfo); 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); LOCK_BRIDGE(pHcidevInfo);
pPacket = HTC_PACKET_DEQUEUE(&pHcidevInfo->HTCPacketStructHead); pPacket = HTC_PACKET_DEQUEUE(&pHcidevInfo->HTCPacketStructHead);
UNLOCK_BRIDGE(pHcidevInfo); UNLOCK_BRIDGE(pHcidevInfo);
...@@ -164,7 +164,7 @@ static void RefillRecvBuffers(struct ar6k_hci_bridge_info *pHcidevInfo, ...@@ -164,7 +164,7 @@ static void RefillRecvBuffers(struct ar6k_hci_bridge_info *pHcidevInfo,
int length, i; int length, i;
void *osBuf = NULL; void *osBuf = NULL;
HTC_PACKET_QUEUE queue; HTC_PACKET_QUEUE queue;
HTC_PACKET *pPacket; struct htc_packet *pPacket;
INIT_HTC_PACKET_QUEUE(&queue); INIT_HTC_PACKET_QUEUE(&queue);
...@@ -347,7 +347,7 @@ static void ar6000_hci_transport_removed(void *pContext) ...@@ -347,7 +347,7 @@ static void ar6000_hci_transport_removed(void *pContext)
pHcidevInfo->pHCIDev = NULL; 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; struct ar6k_hci_bridge_info *pHcidevInfo = (struct ar6k_hci_bridge_info *)pContext;
void *osbuf = pPacket->pPktContext; void *osbuf = pPacket->pPktContext;
...@@ -365,7 +365,7 @@ static void ar6000_hci_send_complete(void *pContext, HTC_PACKET *pPacket) ...@@ -365,7 +365,7 @@ static void ar6000_hci_send_complete(void *pContext, HTC_PACKET *pPacket)
} }
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 ar6k_hci_bridge_info *pHcidevInfo = (struct ar6k_hci_bridge_info *)pContext;
struct sk_buff *skb; struct sk_buff *skb;
...@@ -447,7 +447,7 @@ static void ar6000_hci_pkt_refill(void *pContext, HCI_TRANSPORT_PACKET_TYPE Typ ...@@ -447,7 +447,7 @@ static void ar6000_hci_pkt_refill(void *pContext, HCI_TRANSPORT_PACKET_TYPE Typ
} }
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; struct ar6k_hci_bridge_info *pHcidevInfo = (struct ar6k_hci_bridge_info *)pContext;
HCI_SEND_FULL_ACTION action = HCI_SEND_FULL_KEEP; HCI_SEND_FULL_ACTION action = HCI_SEND_FULL_KEEP;
...@@ -472,7 +472,7 @@ int ar6000_setup_hci(AR_SOFTC_T *ar) ...@@ -472,7 +472,7 @@ int ar6000_setup_hci(AR_SOFTC_T *ar)
struct hci_transport_config_info config; struct hci_transport_config_info config;
int status = 0; int status = 0;
int i; int i;
HTC_PACKET *pPacket; struct htc_packet *pPacket;
struct ar6k_hci_bridge_info *pHcidevInfo; struct ar6k_hci_bridge_info *pHcidevInfo;
...@@ -509,14 +509,14 @@ int ar6000_setup_hci(AR_SOFTC_T *ar) ...@@ -509,14 +509,14 @@ int ar6000_setup_hci(AR_SOFTC_T *ar)
AR_DEBUG_PRINTF(ATH_DEBUG_HCI_BRIDGE, ("HCI Bridge: running in test mode... \n")); 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) { if (NULL == pHcidevInfo->pHTCStructAlloc) {
status = A_NO_MEMORY; status = A_NO_MEMORY;
break; break;
} }
pPacket = (HTC_PACKET *)pHcidevInfo->pHTCStructAlloc; pPacket = (struct htc_packet *)pHcidevInfo->pHTCStructAlloc;
for (i = 0; i < NUM_HTC_PACKET_STRUCTS; i++,pPacket++) { for (i = 0; i < NUM_HTC_PACKET_STRUCTS; i++,pPacket++) {
FreeHTCStruct(pHcidevInfo,pPacket); FreeHTCStruct(pHcidevInfo,pPacket);
} }
...@@ -604,7 +604,7 @@ int hci_test_send(AR_SOFTC_T *ar, struct sk_buff *skb) ...@@ -604,7 +604,7 @@ int hci_test_send(AR_SOFTC_T *ar, struct sk_buff *skb)
int status = 0; int status = 0;
int length; int length;
EPPING_HEADER *pHeader; EPPING_HEADER *pHeader;
HTC_PACKET *pPacket; struct htc_packet *pPacket;
HTC_TX_TAG htc_tag = AR6K_DATA_PKT_TAG; HTC_TX_TAG htc_tag = AR6K_DATA_PKT_TAG;
#ifdef EXPORT_HCI_BRIDGE_INTERFACE #ifdef EXPORT_HCI_BRIDGE_INTERFACE
struct ar6k_hci_bridge_info *pHcidevInfo = g_pHcidevInfo; struct ar6k_hci_bridge_info *pHcidevInfo = g_pHcidevInfo;
...@@ -711,7 +711,7 @@ static int bt_send_frame(struct sk_buff *skb) ...@@ -711,7 +711,7 @@ static int bt_send_frame(struct sk_buff *skb)
struct hci_dev *hdev = (struct hci_dev *)skb->dev; struct hci_dev *hdev = (struct hci_dev *)skb->dev;
HCI_TRANSPORT_PACKET_TYPE type; HCI_TRANSPORT_PACKET_TYPE type;
struct ar6k_hci_bridge_info *pHcidevInfo; struct ar6k_hci_bridge_info *pHcidevInfo;
HTC_PACKET *pPacket; struct htc_packet *pPacket;
int status = 0; int status = 0;
struct sk_buff *txSkb = NULL; struct sk_buff *txSkb = NULL;
......
...@@ -362,7 +362,7 @@ typedef struct { ...@@ -362,7 +362,7 @@ typedef struct {
int currPtr; int currPtr;
int length; int length;
unsigned char data[HTC_RAW_BUFFER_SIZE]; unsigned char data[HTC_RAW_BUFFER_SIZE];
HTC_PACKET HTCPacket; struct htc_packet HTCPacket;
} raw_htc_buffer; } raw_htc_buffer;
#ifdef CONFIG_HOST_TCMD_SUPPORT #ifdef CONFIG_HOST_TCMD_SUPPORT
...@@ -410,7 +410,7 @@ struct ar_node_mapping { ...@@ -410,7 +410,7 @@ struct ar_node_mapping {
struct ar_cookie { struct ar_cookie {
unsigned long arc_bp[2]; /* Must be first field */ 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; struct ar_cookie *arc_list_next;
}; };
......
...@@ -28,12 +28,12 @@ ...@@ -28,12 +28,12 @@
extern HCI_TRANSPORT_HANDLE (*_HCI_TransportAttach)(void *HTCHandle, struct hci_transport_config_info *pInfo); extern HCI_TRANSPORT_HANDLE (*_HCI_TransportAttach)(void *HTCHandle, struct hci_transport_config_info *pInfo);
extern void (*_HCI_TransportDetach)(HCI_TRANSPORT_HANDLE HciTrans); extern void (*_HCI_TransportDetach)(HCI_TRANSPORT_HANDLE HciTrans);
extern int (*_HCI_TransportAddReceivePkts)(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET_QUEUE *pQueue); 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 void (*_HCI_TransportStop)(HCI_TRANSPORT_HANDLE HciTrans);
extern int (*_HCI_TransportStart)(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_TransportEnableDisableAsyncRecv)(HCI_TRANSPORT_HANDLE HciTrans, bool Enable);
extern int (*_HCI_TransportRecvHCIEventSync)(HCI_TRANSPORT_HANDLE HciTrans, extern int (*_HCI_TransportRecvHCIEventSync)(HCI_TRANSPORT_HANDLE HciTrans,
HTC_PACKET *pPacket, struct htc_packet *pPacket,
int MaxPollMS); int MaxPollMS);
extern int (*_HCI_TransportSetBaudRate)(HCI_TRANSPORT_HANDLE HciTrans, u32 Baud); extern int (*_HCI_TransportSetBaudRate)(HCI_TRANSPORT_HANDLE HciTrans, u32 Baud);
extern int (*_HCI_TransportEnablePowerMgmt)(HCI_TRANSPORT_HANDLE HciTrans, bool Enable); extern int (*_HCI_TransportEnablePowerMgmt)(HCI_TRANSPORT_HANDLE HciTrans, bool Enable);
......
...@@ -63,8 +63,8 @@ a_netbuf_alloc(int size) ...@@ -63,8 +63,8 @@ a_netbuf_alloc(int size)
{ {
struct sk_buff *skb; struct sk_buff *skb;
size += 2 * (A_GET_CACHE_LINE_BYTES()); /* add some cacheline space at front and back of buffer */ 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 = dev_alloc_skb(AR6000_DATA_OFFSET + sizeof(struct htc_packet) + size);
skb_reserve(skb, AR6000_DATA_OFFSET + sizeof(HTC_PACKET) + A_GET_CACHE_LINE_BYTES()); skb_reserve(skb, AR6000_DATA_OFFSET + sizeof(struct htc_packet) + A_GET_CACHE_LINE_BYTES());
return ((void *)skb); return ((void *)skb);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment