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

staging: ath6kl: remove-typedef AR6K_DEVICE

remove-typedef -s AR6K_DEVICE \
	"struct ar6k_device" drivers/staging/ath6kl/

Cc: Naveen Singh <naveen.singh@atheros.com>
Signed-off-by: default avatarLuis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 26da4b51
...@@ -35,19 +35,19 @@ ...@@ -35,19 +35,19 @@
#define MAILBOX_FOR_BLOCK_SIZE 1 #define MAILBOX_FOR_BLOCK_SIZE 1
int DevEnableInterrupts(AR6K_DEVICE *pDev); int DevEnableInterrupts(struct ar6k_device *pDev);
int DevDisableInterrupts(AR6K_DEVICE *pDev); int DevDisableInterrupts(struct ar6k_device *pDev);
static void DevCleanupVirtualScatterSupport(AR6K_DEVICE *pDev); static void DevCleanupVirtualScatterSupport(struct ar6k_device *pDev);
void AR6KFreeIOPacket(AR6K_DEVICE *pDev, HTC_PACKET *pPacket) void AR6KFreeIOPacket(struct ar6k_device *pDev, 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(AR6K_DEVICE *pDev) HTC_PACKET *AR6KAllocIOPacket(struct ar6k_device *pDev)
{ {
HTC_PACKET *pPacket; HTC_PACKET *pPacket;
...@@ -58,7 +58,7 @@ HTC_PACKET *AR6KAllocIOPacket(AR6K_DEVICE *pDev) ...@@ -58,7 +58,7 @@ HTC_PACKET *AR6KAllocIOPacket(AR6K_DEVICE *pDev)
return pPacket; return pPacket;
} }
void DevCleanup(AR6K_DEVICE *pDev) void DevCleanup(struct ar6k_device *pDev)
{ {
DevCleanupGMbox(pDev); DevCleanupGMbox(pDev);
...@@ -74,7 +74,7 @@ void DevCleanup(AR6K_DEVICE *pDev) ...@@ -74,7 +74,7 @@ void DevCleanup(AR6K_DEVICE *pDev)
} }
} }
int DevSetup(AR6K_DEVICE *pDev) int DevSetup(struct ar6k_device *pDev)
{ {
u32 blocksizes[AR6K_MAILBOXES]; u32 blocksizes[AR6K_MAILBOXES];
int status = 0; int status = 0;
...@@ -216,7 +216,7 @@ int DevSetup(AR6K_DEVICE *pDev) ...@@ -216,7 +216,7 @@ int DevSetup(AR6K_DEVICE *pDev)
} }
int DevEnableInterrupts(AR6K_DEVICE *pDev) int DevEnableInterrupts(struct ar6k_device *pDev)
{ {
int status; int status;
AR6K_IRQ_ENABLE_REGISTERS regs; AR6K_IRQ_ENABLE_REGISTERS regs;
...@@ -276,7 +276,7 @@ int DevEnableInterrupts(AR6K_DEVICE *pDev) ...@@ -276,7 +276,7 @@ int DevEnableInterrupts(AR6K_DEVICE *pDev)
return status; return status;
} }
int DevDisableInterrupts(AR6K_DEVICE *pDev) int DevDisableInterrupts(struct ar6k_device *pDev)
{ {
AR6K_IRQ_ENABLE_REGISTERS regs; AR6K_IRQ_ENABLE_REGISTERS regs;
...@@ -301,7 +301,7 @@ int DevDisableInterrupts(AR6K_DEVICE *pDev) ...@@ -301,7 +301,7 @@ int DevDisableInterrupts(AR6K_DEVICE *pDev)
} }
/* enable device interrupts */ /* enable device interrupts */
int DevUnmaskInterrupts(AR6K_DEVICE *pDev) int DevUnmaskInterrupts(struct ar6k_device *pDev)
{ {
/* for good measure, make sure interrupt are disabled before unmasking at the HIF /* for good measure, make sure interrupt are disabled before unmasking at the HIF
* layer. * layer.
...@@ -327,7 +327,7 @@ int DevUnmaskInterrupts(AR6K_DEVICE *pDev) ...@@ -327,7 +327,7 @@ int DevUnmaskInterrupts(AR6K_DEVICE *pDev)
} }
/* disable all device interrupts */ /* disable all device interrupts */
int DevMaskInterrupts(AR6K_DEVICE *pDev) int DevMaskInterrupts(struct ar6k_device *pDev)
{ {
/* mask the interrupt at the HIF layer, we don't want a stray interrupt taken while /* mask the interrupt at the HIF layer, we don't want a stray interrupt taken while
* we zero out our shadow registers in DevDisableInterrupts()*/ * we zero out our shadow registers in DevDisableInterrupts()*/
...@@ -339,7 +339,7 @@ int DevMaskInterrupts(AR6K_DEVICE *pDev) ...@@ -339,7 +339,7 @@ int DevMaskInterrupts(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, HTC_PACKET *pPacket)
{ {
AR6K_DEVICE *pDev = (AR6K_DEVICE *)Context; struct ar6k_device *pDev = (struct ar6k_device *)Context;
AR_DEBUG_PRINTF(ATH_DEBUG_IRQ,("+DevDoEnableDisableRecvAsyncHandler: (dev: 0x%lX)\n", (unsigned long)pDev)); AR_DEBUG_PRINTF(ATH_DEBUG_IRQ,("+DevDoEnableDisableRecvAsyncHandler: (dev: 0x%lX)\n", (unsigned long)pDev));
...@@ -355,7 +355,7 @@ static void DevDoEnableDisableRecvAsyncHandler(void *Context, HTC_PACKET *pPacke ...@@ -355,7 +355,7 @@ static void DevDoEnableDisableRecvAsyncHandler(void *Context, HTC_PACKET *pPacke
/* disable packet reception (used in case the host runs out of buffers) /* disable packet reception (used in case the host runs out of buffers)
* this is the "override" method when the HIF reports another methods to * this is the "override" method when the HIF reports another methods to
* disable recv events */ * disable recv events */
static int DevDoEnableDisableRecvOverride(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; HTC_PACKET *pIOPacket = NULL;
...@@ -403,7 +403,7 @@ static int DevDoEnableDisableRecvOverride(AR6K_DEVICE *pDev, bool EnableRecv, bo ...@@ -403,7 +403,7 @@ static int DevDoEnableDisableRecvOverride(AR6K_DEVICE *pDev, bool EnableRecv, bo
/* disable packet reception (used in case the host runs out of buffers) /* disable packet reception (used in case the host runs out of buffers)
* this is the "normal" method using the interrupt enable registers through * this is the "normal" method using the interrupt enable registers through
* the host I/F */ * the host I/F */
static int DevDoEnableDisableRecvNormal(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; HTC_PACKET *pIOPacket = NULL;
...@@ -470,7 +470,7 @@ static int DevDoEnableDisableRecvNormal(AR6K_DEVICE *pDev, bool EnableRecv, bool ...@@ -470,7 +470,7 @@ static int DevDoEnableDisableRecvNormal(AR6K_DEVICE *pDev, bool EnableRecv, bool
} }
int DevStopRecv(AR6K_DEVICE *pDev, bool AsyncMode) int DevStopRecv(struct ar6k_device *pDev, bool AsyncMode)
{ {
if (NULL == pDev->HifMaskUmaskRecvEvent) { if (NULL == pDev->HifMaskUmaskRecvEvent) {
return DevDoEnableDisableRecvNormal(pDev,false,AsyncMode); return DevDoEnableDisableRecvNormal(pDev,false,AsyncMode);
...@@ -479,7 +479,7 @@ int DevStopRecv(AR6K_DEVICE *pDev, bool AsyncMode) ...@@ -479,7 +479,7 @@ int DevStopRecv(AR6K_DEVICE *pDev, bool AsyncMode)
} }
} }
int DevEnableRecv(AR6K_DEVICE *pDev, bool AsyncMode) int DevEnableRecv(struct ar6k_device *pDev, bool AsyncMode)
{ {
if (NULL == pDev->HifMaskUmaskRecvEvent) { if (NULL == pDev->HifMaskUmaskRecvEvent) {
return DevDoEnableDisableRecvNormal(pDev,true,AsyncMode); return DevDoEnableDisableRecvNormal(pDev,true,AsyncMode);
...@@ -488,7 +488,7 @@ int DevEnableRecv(AR6K_DEVICE *pDev, bool AsyncMode) ...@@ -488,7 +488,7 @@ int DevEnableRecv(AR6K_DEVICE *pDev, bool AsyncMode)
} }
} }
int DevWaitForPendingRecv(AR6K_DEVICE *pDev,u32 TimeoutInMs,bool *pbIsRecvPending) int DevWaitForPendingRecv(struct ar6k_device *pDev,u32 TimeoutInMs,bool *pbIsRecvPending)
{ {
int status = 0; int status = 0;
u8 host_int_status = 0x0; u8 host_int_status = 0x0;
...@@ -536,7 +536,7 @@ int DevWaitForPendingRecv(AR6K_DEVICE *pDev,u32 TimeoutInMs,bool *pbIsRecvPendin ...@@ -536,7 +536,7 @@ int DevWaitForPendingRecv(AR6K_DEVICE *pDev,u32 TimeoutInMs,bool *pbIsRecvPendin
return status; return status;
} }
void DevDumpRegisters(AR6K_DEVICE *pDev, void DevDumpRegisters(struct ar6k_device *pDev,
AR6K_IRQ_PROC_REGISTERS *pIrqProcRegs, AR6K_IRQ_PROC_REGISTERS *pIrqProcRegs,
AR6K_IRQ_ENABLE_REGISTERS *pIrqEnableRegs) AR6K_IRQ_ENABLE_REGISTERS *pIrqEnableRegs)
{ {
...@@ -590,7 +590,7 @@ void DevDumpRegisters(AR6K_DEVICE *pDev, ...@@ -590,7 +590,7 @@ void DevDumpRegisters(AR6K_DEVICE *pDev,
static HIF_SCATTER_REQ *DevAllocScatterReq(HIF_DEVICE *Context) static HIF_SCATTER_REQ *DevAllocScatterReq(HIF_DEVICE *Context)
{ {
DL_LIST *pItem; DL_LIST *pItem;
AR6K_DEVICE *pDev = (AR6K_DEVICE *)Context; struct ar6k_device *pDev = (struct ar6k_device *)Context;
LOCK_AR6K(pDev); LOCK_AR6K(pDev);
pItem = DL_ListRemoveItemFromHead(&pDev->ScatterReqHead); pItem = DL_ListRemoveItemFromHead(&pDev->ScatterReqHead);
UNLOCK_AR6K(pDev); UNLOCK_AR6K(pDev);
...@@ -602,7 +602,7 @@ static HIF_SCATTER_REQ *DevAllocScatterReq(HIF_DEVICE *Context) ...@@ -602,7 +602,7 @@ static HIF_SCATTER_REQ *DevAllocScatterReq(HIF_DEVICE *Context)
static void DevFreeScatterReq(HIF_DEVICE *Context, HIF_SCATTER_REQ *pReq) static void DevFreeScatterReq(HIF_DEVICE *Context, HIF_SCATTER_REQ *pReq)
{ {
AR6K_DEVICE *pDev = (AR6K_DEVICE *)Context; struct ar6k_device *pDev = (struct ar6k_device *)Context;
LOCK_AR6K(pDev); LOCK_AR6K(pDev);
DL_ListInsertTail(&pDev->ScatterReqHead, &pReq->ListLink); DL_ListInsertTail(&pDev->ScatterReqHead, &pReq->ListLink);
UNLOCK_AR6K(pDev); UNLOCK_AR6K(pDev);
...@@ -650,7 +650,7 @@ int DevCopyScatterListToFromDMABuffer(HIF_SCATTER_REQ *pReq, bool FromDMA) ...@@ -650,7 +650,7 @@ int DevCopyScatterListToFromDMABuffer(HIF_SCATTER_REQ *pReq, bool FromDMA)
static void DevReadWriteScatterAsyncHandler(void *Context, HTC_PACKET *pPacket) static void DevReadWriteScatterAsyncHandler(void *Context, HTC_PACKET *pPacket)
{ {
AR6K_DEVICE *pDev = (AR6K_DEVICE *)Context; struct ar6k_device *pDev = (struct ar6k_device *)Context;
HIF_SCATTER_REQ *pReq = (HIF_SCATTER_REQ *)pPacket->pPktContext; HIF_SCATTER_REQ *pReq = (HIF_SCATTER_REQ *)pPacket->pPktContext;
AR_DEBUG_PRINTF(ATH_DEBUG_RECV,("+DevReadWriteScatterAsyncHandler: (dev: 0x%lX)\n", (unsigned long)pDev)); AR_DEBUG_PRINTF(ATH_DEBUG_RECV,("+DevReadWriteScatterAsyncHandler: (dev: 0x%lX)\n", (unsigned long)pDev));
...@@ -666,7 +666,7 @@ static void DevReadWriteScatterAsyncHandler(void *Context, HTC_PACKET *pPacket) ...@@ -666,7 +666,7 @@ static void DevReadWriteScatterAsyncHandler(void *Context, HTC_PACKET *pPacket)
static int DevReadWriteScatter(HIF_DEVICE *Context, HIF_SCATTER_REQ *pReq) static int DevReadWriteScatter(HIF_DEVICE *Context, HIF_SCATTER_REQ *pReq)
{ {
AR6K_DEVICE *pDev = (AR6K_DEVICE *)Context; struct ar6k_device *pDev = (struct ar6k_device *)Context;
int status = 0; int status = 0;
HTC_PACKET *pIOPacket = NULL; HTC_PACKET *pIOPacket = NULL;
u32 request = pReq->Request; u32 request = pReq->Request;
...@@ -734,7 +734,7 @@ static int DevReadWriteScatter(HIF_DEVICE *Context, HIF_SCATTER_REQ *pReq) ...@@ -734,7 +734,7 @@ static int DevReadWriteScatter(HIF_DEVICE *Context, HIF_SCATTER_REQ *pReq)
} }
static void DevCleanupVirtualScatterSupport(AR6K_DEVICE *pDev) static void DevCleanupVirtualScatterSupport(struct ar6k_device *pDev)
{ {
HIF_SCATTER_REQ *pReq; HIF_SCATTER_REQ *pReq;
...@@ -749,7 +749,7 @@ static void DevCleanupVirtualScatterSupport(AR6K_DEVICE *pDev) ...@@ -749,7 +749,7 @@ static void DevCleanupVirtualScatterSupport(AR6K_DEVICE *pDev)
} }
/* function to set up virtual scatter support if HIF layer has not implemented the interface */ /* function to set up virtual scatter support if HIF layer has not implemented the interface */
static int DevSetupVirtualScatterSupport(AR6K_DEVICE *pDev) static int DevSetupVirtualScatterSupport(struct ar6k_device *pDev)
{ {
int status = 0; int status = 0;
int bufferSize, sgreqSize; int bufferSize, sgreqSize;
...@@ -810,7 +810,7 @@ static int DevSetupVirtualScatterSupport(AR6K_DEVICE *pDev) ...@@ -810,7 +810,7 @@ static int DevSetupVirtualScatterSupport(AR6K_DEVICE *pDev)
return status; return status;
} }
int DevCleanupMsgBundling(AR6K_DEVICE *pDev) int DevCleanupMsgBundling(struct ar6k_device *pDev)
{ {
if(NULL != pDev) if(NULL != pDev)
{ {
...@@ -820,7 +820,7 @@ int DevCleanupMsgBundling(AR6K_DEVICE *pDev) ...@@ -820,7 +820,7 @@ int DevCleanupMsgBundling(AR6K_DEVICE *pDev)
return 0; return 0;
} }
int DevSetupMsgBundling(AR6K_DEVICE *pDev, int MaxMsgsPerTransfer) int DevSetupMsgBundling(struct ar6k_device *pDev, int MaxMsgsPerTransfer)
{ {
int status; int status;
...@@ -885,7 +885,7 @@ int DevSetupMsgBundling(AR6K_DEVICE *pDev, int MaxMsgsPerTransfer) ...@@ -885,7 +885,7 @@ int DevSetupMsgBundling(AR6K_DEVICE *pDev, int MaxMsgsPerTransfer)
return status; return status;
} }
int DevSubmitScatterRequest(AR6K_DEVICE *pDev, HIF_SCATTER_REQ *pScatterReq, bool Read, bool Async) int DevSubmitScatterRequest(struct ar6k_device *pDev, HIF_SCATTER_REQ *pScatterReq, bool Read, bool Async)
{ {
int status; int status;
...@@ -1134,7 +1134,7 @@ static u16 GetEndMarker(void) ...@@ -1134,7 +1134,7 @@ static u16 GetEndMarker(void)
#define ATH_PRINT_OUT_ZONE ATH_DEBUG_ERR #define ATH_PRINT_OUT_ZONE ATH_DEBUG_ERR
/* send the ordered buffers to the target */ /* send the ordered buffers to the target */
static int SendBuffers(AR6K_DEVICE *pDev, int mbox) static int SendBuffers(struct ar6k_device *pDev, int mbox)
{ {
int status = 0; int status = 0;
u32 request = HIF_WR_SYNC_BLOCK_INC; u32 request = HIF_WR_SYNC_BLOCK_INC;
...@@ -1178,7 +1178,7 @@ static int SendBuffers(AR6K_DEVICE *pDev, int mbox) ...@@ -1178,7 +1178,7 @@ static int SendBuffers(AR6K_DEVICE *pDev, int mbox)
} }
/* poll the mailbox credit counter until we get a credit or timeout */ /* poll the mailbox credit counter until we get a credit or timeout */
static int GetCredits(AR6K_DEVICE *pDev, int mbox, int *pCredits) static int GetCredits(struct ar6k_device *pDev, int mbox, int *pCredits)
{ {
int status = 0; int status = 0;
int timeout = TEST_CREDITS_RECV_TIMEOUT; int timeout = TEST_CREDITS_RECV_TIMEOUT;
...@@ -1225,7 +1225,7 @@ static int GetCredits(AR6K_DEVICE *pDev, int mbox, int *pCredits) ...@@ -1225,7 +1225,7 @@ static int GetCredits(AR6K_DEVICE *pDev, int mbox, int *pCredits)
/* wait for the buffers to come back */ /* wait for the buffers to come back */
static int RecvBuffers(AR6K_DEVICE *pDev, int mbox) static int RecvBuffers(struct ar6k_device *pDev, int mbox)
{ {
int status = 0; int status = 0;
u32 request = HIF_RD_SYNC_BLOCK_INC; u32 request = HIF_RD_SYNC_BLOCK_INC;
...@@ -1303,7 +1303,7 @@ static int RecvBuffers(AR6K_DEVICE *pDev, int mbox) ...@@ -1303,7 +1303,7 @@ static int RecvBuffers(AR6K_DEVICE *pDev, int mbox)
} }
static int DoOneMboxHWTest(AR6K_DEVICE *pDev, int mbox) static int DoOneMboxHWTest(struct ar6k_device *pDev, int mbox)
{ {
int status; int status;
...@@ -1339,7 +1339,7 @@ static int DoOneMboxHWTest(AR6K_DEVICE *pDev, int mbox) ...@@ -1339,7 +1339,7 @@ static int DoOneMboxHWTest(AR6K_DEVICE *pDev, int mbox)
} }
/* here is where the test starts */ /* here is where the test starts */
int DoMboxHWTest(AR6K_DEVICE *pDev) int DoMboxHWTest(struct ar6k_device *pDev)
{ {
int i; int i;
int status; int status;
......
...@@ -105,7 +105,7 @@ typedef struct _AR6K_GMBOX_INFO { ...@@ -105,7 +105,7 @@ typedef struct _AR6K_GMBOX_INFO {
bool CreditCountIRQEnabled; bool CreditCountIRQEnabled;
} AR6K_GMBOX_INFO; } AR6K_GMBOX_INFO;
typedef struct _AR6K_DEVICE { struct ar6k_device {
A_MUTEX_T Lock; A_MUTEX_T Lock;
u8 _Pad1[A_CACHE_LINE_PAD]; u8 _Pad1[A_CACHE_LINE_PAD];
AR6K_IRQ_PROC_REGISTERS IrqProcRegisters; /* cache-line safe with pads around */ AR6K_IRQ_PROC_REGISTERS IrqProcRegisters; /* cache-line safe with pads around */
...@@ -141,24 +141,24 @@ typedef struct _AR6K_DEVICE { ...@@ -141,24 +141,24 @@ typedef struct _AR6K_DEVICE {
bool GMboxEnabled; bool GMboxEnabled;
AR6K_GMBOX_CTRL_REGISTERS GMboxControlRegisters; AR6K_GMBOX_CTRL_REGISTERS GMboxControlRegisters;
int RecheckIRQStatusCnt; int RecheckIRQStatusCnt;
} AR6K_DEVICE; };
#define LOCK_AR6K(p) A_MUTEX_LOCK(&(p)->Lock); #define LOCK_AR6K(p) A_MUTEX_LOCK(&(p)->Lock);
#define UNLOCK_AR6K(p) A_MUTEX_UNLOCK(&(p)->Lock); #define UNLOCK_AR6K(p) A_MUTEX_UNLOCK(&(p)->Lock);
#define REF_IRQ_STATUS_RECHECK(p) (p)->RecheckIRQStatusCnt = 1 /* note: no need to lock this, it only gets set */ #define REF_IRQ_STATUS_RECHECK(p) (p)->RecheckIRQStatusCnt = 1 /* note: no need to lock this, it only gets set */
int DevSetup(AR6K_DEVICE *pDev); int DevSetup(struct ar6k_device *pDev);
void DevCleanup(AR6K_DEVICE *pDev); void DevCleanup(struct ar6k_device *pDev);
int DevUnmaskInterrupts(AR6K_DEVICE *pDev); int DevUnmaskInterrupts(struct ar6k_device *pDev);
int DevMaskInterrupts(AR6K_DEVICE *pDev); int DevMaskInterrupts(struct ar6k_device *pDev);
int DevPollMboxMsgRecv(AR6K_DEVICE *pDev, int DevPollMboxMsgRecv(struct ar6k_device *pDev,
u32 *pLookAhead, u32 *pLookAhead,
int TimeoutMS); int TimeoutMS);
int DevRWCompletionHandler(void *context, int status); int DevRWCompletionHandler(void *context, int status);
int DevDsrHandler(void *context); int DevDsrHandler(void *context);
int DevCheckPendingRecvMsgsAsync(void *context); int DevCheckPendingRecvMsgsAsync(void *context);
void DevAsyncIrqProcessComplete(AR6K_DEVICE *pDev); void DevAsyncIrqProcessComplete(struct ar6k_device *pDev);
void DevDumpRegisters(AR6K_DEVICE *pDev, void DevDumpRegisters(struct ar6k_device *pDev,
AR6K_IRQ_PROC_REGISTERS *pIrqProcRegs, AR6K_IRQ_PROC_REGISTERS *pIrqProcRegs,
AR6K_IRQ_ENABLE_REGISTERS *pIrqEnableRegs); AR6K_IRQ_ENABLE_REGISTERS *pIrqEnableRegs);
...@@ -166,17 +166,17 @@ void DevDumpRegisters(AR6K_DEVICE *pDev, ...@@ -166,17 +166,17 @@ void DevDumpRegisters(AR6K_DEVICE *pDev,
#define DEV_STOP_RECV_SYNC false #define DEV_STOP_RECV_SYNC false
#define DEV_ENABLE_RECV_ASYNC true #define DEV_ENABLE_RECV_ASYNC true
#define DEV_ENABLE_RECV_SYNC false #define DEV_ENABLE_RECV_SYNC false
int DevStopRecv(AR6K_DEVICE *pDev, bool ASyncMode); int DevStopRecv(struct ar6k_device *pDev, bool ASyncMode);
int DevEnableRecv(AR6K_DEVICE *pDev, bool ASyncMode); int DevEnableRecv(struct ar6k_device *pDev, bool ASyncMode);
int DevEnableInterrupts(AR6K_DEVICE *pDev); int DevEnableInterrupts(struct ar6k_device *pDev);
int DevDisableInterrupts(AR6K_DEVICE *pDev); int DevDisableInterrupts(struct ar6k_device *pDev);
int DevWaitForPendingRecv(AR6K_DEVICE *pDev,u32 TimeoutInMs,bool *pbIsRecvPending); int DevWaitForPendingRecv(struct ar6k_device *pDev,u32 TimeoutInMs,bool *pbIsRecvPending);
#define DEV_CALC_RECV_PADDED_LEN(pDev, length) (((length) + (pDev)->BlockMask) & (~((pDev)->BlockMask))) #define DEV_CALC_RECV_PADDED_LEN(pDev, length) (((length) + (pDev)->BlockMask) & (~((pDev)->BlockMask)))
#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(AR6K_DEVICE *pDev, HTC_PACKET *pPacket, u32 SendLength) { static INLINE int DevSendPacket(struct ar6k_device *pDev, 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(AR6K_DEVICE *pDev, HTC_PACKET *pPacket, u32 Send ...@@ -219,7 +219,7 @@ static INLINE int DevSendPacket(AR6K_DEVICE *pDev, HTC_PACKET *pPacket, u32 Send
return status; return status;
} }
static INLINE int DevRecvPacket(AR6K_DEVICE *pDev, HTC_PACKET *pPacket, u32 RecvLength) { static INLINE int DevRecvPacket(struct ar6k_device *pDev, 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;
...@@ -296,9 +296,9 @@ static INLINE int DEV_PREPARE_SCATTER_OPERATION(HIF_SCATTER_REQ *pReq) { ...@@ -296,9 +296,9 @@ static INLINE int DEV_PREPARE_SCATTER_OPERATION(HIF_SCATTER_REQ *pReq) {
} }
int DevSetupMsgBundling(AR6K_DEVICE *pDev, int MaxMsgsPerTransfer); int DevSetupMsgBundling(struct ar6k_device *pDev, int MaxMsgsPerTransfer);
int DevCleanupMsgBundling(AR6K_DEVICE *pDev); int DevCleanupMsgBundling(struct ar6k_device *pDev);
#define DEV_GET_MAX_MSG_PER_BUNDLE(pDev) (pDev)->HifScatterInfo.MaxScatterEntries #define DEV_GET_MAX_MSG_PER_BUNDLE(pDev) (pDev)->HifScatterInfo.MaxScatterEntries
#define DEV_GET_MAX_BUNDLE_LENGTH(pDev) (pDev)->HifScatterInfo.MaxTransferSizePerScatterReq #define DEV_GET_MAX_BUNDLE_LENGTH(pDev) (pDev)->HifScatterInfo.MaxTransferSizePerScatterReq
...@@ -315,10 +315,10 @@ int DevCleanupMsgBundling(AR6K_DEVICE *pDev); ...@@ -315,10 +315,10 @@ int DevCleanupMsgBundling(AR6K_DEVICE *pDev);
#define DEV_SCATTER_WRITE false #define DEV_SCATTER_WRITE false
#define DEV_SCATTER_ASYNC true #define DEV_SCATTER_ASYNC true
#define DEV_SCATTER_SYNC false #define DEV_SCATTER_SYNC false
int DevSubmitScatterRequest(AR6K_DEVICE *pDev, HIF_SCATTER_REQ *pScatterReq, bool Read, bool Async); int DevSubmitScatterRequest(struct ar6k_device *pDev, HIF_SCATTER_REQ *pScatterReq, bool Read, bool Async);
#ifdef MBOXHW_UNIT_TEST #ifdef MBOXHW_UNIT_TEST
int DoMboxHWTest(AR6K_DEVICE *pDev); int DoMboxHWTest(struct ar6k_device *pDev);
#endif #endif
/* completely virtual */ /* completely virtual */
...@@ -329,7 +329,7 @@ typedef struct _DEV_SCATTER_DMA_VIRTUAL_INFO { ...@@ -329,7 +329,7 @@ typedef struct _DEV_SCATTER_DMA_VIRTUAL_INFO {
void DumpAR6KDevState(AR6K_DEVICE *pDev); void DumpAR6KDevState(struct ar6k_device *pDev);
/**************************************************/ /**************************************************/
/****** GMBOX functions and definitions /****** GMBOX functions and definitions
...@@ -339,10 +339,10 @@ void DumpAR6KDevState(AR6K_DEVICE *pDev); ...@@ -339,10 +339,10 @@ void DumpAR6KDevState(AR6K_DEVICE *pDev);
#ifdef ATH_AR6K_ENABLE_GMBOX #ifdef ATH_AR6K_ENABLE_GMBOX
void DevCleanupGMbox(AR6K_DEVICE *pDev); void DevCleanupGMbox(struct ar6k_device *pDev);
int DevSetupGMbox(AR6K_DEVICE *pDev); int DevSetupGMbox(struct ar6k_device *pDev);
int DevCheckGMboxInterrupts(AR6K_DEVICE *pDev); int DevCheckGMboxInterrupts(struct ar6k_device *pDev);
void DevNotifyGMboxTargetFailure(AR6K_DEVICE *pDev); void DevNotifyGMboxTargetFailure(struct ar6k_device *pDev);
#else #else
...@@ -351,7 +351,7 @@ void DevNotifyGMboxTargetFailure(AR6K_DEVICE *pDev); ...@@ -351,7 +351,7 @@ void DevNotifyGMboxTargetFailure(AR6K_DEVICE *pDev);
#define DevCheckGMboxInterrupts(p) 0 #define DevCheckGMboxInterrupts(p) 0
#define DevNotifyGMboxTargetFailure(p) #define DevNotifyGMboxTargetFailure(p)
static INLINE int DevSetupGMbox(AR6K_DEVICE *pDev) { static INLINE int DevSetupGMbox(struct ar6k_device *pDev) {
pDev->GMboxEnabled = false; pDev->GMboxEnabled = false;
return 0; return 0;
} }
...@@ -361,12 +361,12 @@ static INLINE int DevSetupGMbox(AR6K_DEVICE *pDev) { ...@@ -361,12 +361,12 @@ static INLINE int DevSetupGMbox(AR6K_DEVICE *pDev) {
#ifdef ATH_AR6K_ENABLE_GMBOX #ifdef ATH_AR6K_ENABLE_GMBOX
/* GMBOX protocol modules must expose each of these internal APIs */ /* GMBOX protocol modules must expose each of these internal APIs */
HCI_TRANSPORT_HANDLE GMboxAttachProtocol(AR6K_DEVICE *pDev, HCI_TRANSPORT_CONFIG_INFO *pInfo); HCI_TRANSPORT_HANDLE GMboxAttachProtocol(struct ar6k_device *pDev, HCI_TRANSPORT_CONFIG_INFO *pInfo);
int GMboxProtocolInstall(AR6K_DEVICE *pDev); int GMboxProtocolInstall(struct ar6k_device *pDev);
void GMboxProtocolUninstall(AR6K_DEVICE *pDev); void GMboxProtocolUninstall(struct ar6k_device *pDev);
/* API used by GMBOX protocol modules */ /* API used by GMBOX protocol modules */
AR6K_DEVICE *HTCGetAR6KDevice(void *HTCHandle); struct ar6k_device *HTCGetAR6KDevice(void *HTCHandle);
#define DEV_GMBOX_SET_PROTOCOL(pDev,recv_callback,credits_pending,failure,statedump,context) \ #define DEV_GMBOX_SET_PROTOCOL(pDev,recv_callback,credits_pending,failure,statedump,context) \
{ \ { \
(pDev)->GMboxInfo.pProtocolContext = (context); \ (pDev)->GMboxInfo.pProtocolContext = (context); \
...@@ -378,8 +378,8 @@ AR6K_DEVICE *HTCGetAR6KDevice(void *HTCHandle); ...@@ -378,8 +378,8 @@ 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(AR6K_DEVICE *pDev, HTC_PACKET *pPacket, u32 WriteLength); int DevGMboxWrite(struct ar6k_device *pDev, HTC_PACKET *pPacket, u32 WriteLength);
int DevGMboxRead(AR6K_DEVICE *pDev, HTC_PACKET *pPacket, u32 ReadLength); int DevGMboxRead(struct ar6k_device *pDev, 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
...@@ -393,11 +393,11 @@ typedef enum GMBOX_IRQ_ACTION_TYPE { ...@@ -393,11 +393,11 @@ typedef enum GMBOX_IRQ_ACTION_TYPE {
GMBOX_CREDIT_IRQ_DISABLE, GMBOX_CREDIT_IRQ_DISABLE,
} GMBOX_IRQ_ACTION_TYPE; } GMBOX_IRQ_ACTION_TYPE;
int DevGMboxIRQAction(AR6K_DEVICE *pDev, GMBOX_IRQ_ACTION_TYPE, bool AsyncMode); int DevGMboxIRQAction(struct ar6k_device *pDev, GMBOX_IRQ_ACTION_TYPE, bool AsyncMode);
int DevGMboxReadCreditCounter(AR6K_DEVICE *pDev, bool AsyncMode, int *pCredits); int DevGMboxReadCreditCounter(struct ar6k_device *pDev, bool AsyncMode, int *pCredits);
int DevGMboxReadCreditSize(AR6K_DEVICE *pDev, int *pCreditSize); int DevGMboxReadCreditSize(struct ar6k_device *pDev, int *pCreditSize);
int DevGMboxRecvLookAheadPeek(AR6K_DEVICE *pDev, u8 *pLookAheadBuffer, int *pLookAheadBytes); int DevGMboxRecvLookAheadPeek(struct ar6k_device *pDev, u8 *pLookAheadBuffer, int *pLookAheadBytes);
int DevGMboxSetTargetInterrupt(AR6K_DEVICE *pDev, int SignalNumber, int AckTimeoutMS); int DevGMboxSetTargetInterrupt(struct ar6k_device *pDev, int SignalNumber, int AckTimeoutMS);
#endif #endif
......
...@@ -33,10 +33,10 @@ ...@@ -33,10 +33,10 @@
#include "htc_packet.h" #include "htc_packet.h"
#include "ar6k.h" #include "ar6k.h"
extern void AR6KFreeIOPacket(AR6K_DEVICE *pDev, HTC_PACKET *pPacket); extern void AR6KFreeIOPacket(struct ar6k_device *pDev, HTC_PACKET *pPacket);
extern HTC_PACKET *AR6KAllocIOPacket(AR6K_DEVICE *pDev); extern HTC_PACKET *AR6KAllocIOPacket(struct ar6k_device *pDev);
static int DevServiceDebugInterrupt(AR6K_DEVICE *pDev); static int DevServiceDebugInterrupt(struct ar6k_device *pDev);
#define DELAY_PER_INTERVAL_MS 10 /* 10 MS delay per polling interval */ #define DELAY_PER_INTERVAL_MS 10 /* 10 MS delay per polling interval */
...@@ -59,7 +59,7 @@ int DevRWCompletionHandler(void *context, int status) ...@@ -59,7 +59,7 @@ int DevRWCompletionHandler(void *context, int status)
} }
/* mailbox recv message polling */ /* mailbox recv message polling */
int DevPollMboxMsgRecv(AR6K_DEVICE *pDev, int DevPollMboxMsgRecv(struct ar6k_device *pDev,
u32 *pLookAhead, u32 *pLookAhead,
int TimeoutMS) int TimeoutMS)
{ {
...@@ -152,7 +152,7 @@ int DevPollMboxMsgRecv(AR6K_DEVICE *pDev, ...@@ -152,7 +152,7 @@ int DevPollMboxMsgRecv(AR6K_DEVICE *pDev,
return status; return status;
} }
static int DevServiceCPUInterrupt(AR6K_DEVICE *pDev) static int DevServiceCPUInterrupt(struct ar6k_device *pDev)
{ {
int status; int status;
u8 cpu_int_status; u8 cpu_int_status;
...@@ -192,7 +192,7 @@ static int DevServiceCPUInterrupt(AR6K_DEVICE *pDev) ...@@ -192,7 +192,7 @@ static int DevServiceCPUInterrupt(AR6K_DEVICE *pDev)
} }
static int DevServiceErrorInterrupt(AR6K_DEVICE *pDev) static int DevServiceErrorInterrupt(struct ar6k_device *pDev)
{ {
int status; int status;
u8 error_int_status; u8 error_int_status;
...@@ -245,7 +245,7 @@ static int DevServiceErrorInterrupt(AR6K_DEVICE *pDev) ...@@ -245,7 +245,7 @@ static int DevServiceErrorInterrupt(AR6K_DEVICE *pDev)
return status; return status;
} }
static int DevServiceDebugInterrupt(AR6K_DEVICE *pDev) static int DevServiceDebugInterrupt(struct ar6k_device *pDev)
{ {
u32 dummy; u32 dummy;
int status; int status;
...@@ -275,7 +275,7 @@ static int DevServiceDebugInterrupt(AR6K_DEVICE *pDev) ...@@ -275,7 +275,7 @@ static int DevServiceDebugInterrupt(AR6K_DEVICE *pDev)
return status; return status;
} }
static int DevServiceCounterInterrupt(AR6K_DEVICE *pDev) static int DevServiceCounterInterrupt(struct ar6k_device *pDev)
{ {
u8 counter_int_status; u8 counter_int_status;
...@@ -302,7 +302,7 @@ static int DevServiceCounterInterrupt(AR6K_DEVICE *pDev) ...@@ -302,7 +302,7 @@ static int DevServiceCounterInterrupt(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, HTC_PACKET *pPacket)
{ {
AR6K_DEVICE *pDev = (AR6K_DEVICE *)Context; struct ar6k_device *pDev = (struct ar6k_device *)Context;
u32 lookAhead = 0; u32 lookAhead = 0;
bool otherInts = false; bool otherInts = false;
...@@ -390,7 +390,7 @@ static void DevGetEventAsyncHandler(void *Context, HTC_PACKET *pPacket) ...@@ -390,7 +390,7 @@ static void DevGetEventAsyncHandler(void *Context, HTC_PACKET *pPacket)
* recv messages, this starts off a series of async requests to read interrupt registers */ * recv messages, this starts off a series of async requests to read interrupt registers */
int DevCheckPendingRecvMsgsAsync(void *context) int DevCheckPendingRecvMsgsAsync(void *context)
{ {
AR6K_DEVICE *pDev = (AR6K_DEVICE *)context; struct ar6k_device *pDev = (struct ar6k_device *)context;
int status = 0; int status = 0;
HTC_PACKET *pIOPacket; HTC_PACKET *pIOPacket;
...@@ -460,14 +460,14 @@ int DevCheckPendingRecvMsgsAsync(void *context) ...@@ -460,14 +460,14 @@ int DevCheckPendingRecvMsgsAsync(void *context)
return status; return status;
} }
void DevAsyncIrqProcessComplete(AR6K_DEVICE *pDev) void DevAsyncIrqProcessComplete(struct ar6k_device *pDev)
{ {
AR_DEBUG_PRINTF(ATH_DEBUG_IRQ,("DevAsyncIrqProcessComplete - forcing HIF IRQ ACK \n")); AR_DEBUG_PRINTF(ATH_DEBUG_IRQ,("DevAsyncIrqProcessComplete - forcing HIF IRQ ACK \n"));
HIFAckInterrupt(pDev->HIFDevice); HIFAckInterrupt(pDev->HIFDevice);
} }
/* process pending interrupts synchronously */ /* process pending interrupts synchronously */
static int ProcessPendingIRQs(AR6K_DEVICE *pDev, bool *pDone, bool *pASyncProcessing) static int ProcessPendingIRQs(struct ar6k_device *pDev, bool *pDone, bool *pASyncProcessing)
{ {
int status = 0; int status = 0;
u8 host_int_status = 0; u8 host_int_status = 0;
...@@ -683,7 +683,7 @@ static int ProcessPendingIRQs(AR6K_DEVICE *pDev, bool *pDone, bool *pASyncProces ...@@ -683,7 +683,7 @@ static int ProcessPendingIRQs(AR6K_DEVICE *pDev, bool *pDone, bool *pASyncProces
/* Synchronousinterrupt handler, this handler kicks off all interrupt processing.*/ /* Synchronousinterrupt handler, this handler kicks off all interrupt processing.*/
int DevDsrHandler(void *context) int DevDsrHandler(void *context)
{ {
AR6K_DEVICE *pDev = (AR6K_DEVICE *)context; struct ar6k_device *pDev = (struct ar6k_device *)context;
int status = 0; int status = 0;
bool done = false; bool done = false;
bool asyncProc = false; bool asyncProc = false;
...@@ -744,7 +744,7 @@ int DevDsrHandler(void *context) ...@@ -744,7 +744,7 @@ int DevDsrHandler(void *context)
} }
#ifdef ATH_DEBUG_MODULE #ifdef ATH_DEBUG_MODULE
void DumpAR6KDevState(AR6K_DEVICE *pDev) void DumpAR6KDevState(struct ar6k_device *pDev)
{ {
int status; int status;
AR6K_IRQ_ENABLE_REGISTERS regs; AR6K_IRQ_ENABLE_REGISTERS regs;
......
...@@ -54,14 +54,14 @@ ...@@ -54,14 +54,14 @@
/* 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(AR6K_DEVICE *pDev, HTC_PACKET *pPacket); extern void AR6KFreeIOPacket(struct ar6k_device *pDev, HTC_PACKET *pPacket);
extern HTC_PACKET *AR6KAllocIOPacket(AR6K_DEVICE *pDev); extern 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, HTC_PACKET *pPacket)
{ {
AR6K_DEVICE *pDev = (AR6K_DEVICE *)Context; struct ar6k_device *pDev = (struct ar6k_device *)Context;
AR_DEBUG_PRINTF(ATH_DEBUG_IRQ,("+DevGMboxIRQActionAsyncHandler: (dev: 0x%lX)\n", (unsigned long)pDev)); AR_DEBUG_PRINTF(ATH_DEBUG_IRQ,("+DevGMboxIRQActionAsyncHandler: (dev: 0x%lX)\n", (unsigned long)pDev));
...@@ -74,7 +74,7 @@ static void DevGMboxIRQActionAsyncHandler(void *Context, HTC_PACKET *pPacket) ...@@ -74,7 +74,7 @@ static void DevGMboxIRQActionAsyncHandler(void *Context, HTC_PACKET *pPacket)
AR_DEBUG_PRINTF(ATH_DEBUG_IRQ,("-DevGMboxIRQActionAsyncHandler \n")); AR_DEBUG_PRINTF(ATH_DEBUG_IRQ,("-DevGMboxIRQActionAsyncHandler \n"));
} }
static int DevGMboxCounterEnableDisable(AR6K_DEVICE *pDev, GMBOX_IRQ_ACTION_TYPE IrqAction, bool AsyncMode) static int DevGMboxCounterEnableDisable(struct ar6k_device *pDev, GMBOX_IRQ_ACTION_TYPE IrqAction, bool AsyncMode)
{ {
int status = 0; int status = 0;
AR6K_IRQ_ENABLE_REGISTERS regs; AR6K_IRQ_ENABLE_REGISTERS regs;
...@@ -155,7 +155,7 @@ static int DevGMboxCounterEnableDisable(AR6K_DEVICE *pDev, GMBOX_IRQ_ACTION_TYPE ...@@ -155,7 +155,7 @@ static int DevGMboxCounterEnableDisable(AR6K_DEVICE *pDev, GMBOX_IRQ_ACTION_TYPE
} }
int DevGMboxIRQAction(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; HTC_PACKET *pIOPacket = NULL;
...@@ -261,7 +261,7 @@ int DevGMboxIRQAction(AR6K_DEVICE *pDev, GMBOX_IRQ_ACTION_TYPE IrqAction, bool A ...@@ -261,7 +261,7 @@ int DevGMboxIRQAction(AR6K_DEVICE *pDev, GMBOX_IRQ_ACTION_TYPE IrqAction, bool A
return status; return status;
} }
void DevCleanupGMbox(AR6K_DEVICE *pDev) void DevCleanupGMbox(struct ar6k_device *pDev)
{ {
if (pDev->GMboxEnabled) { if (pDev->GMboxEnabled) {
pDev->GMboxEnabled = false; pDev->GMboxEnabled = false;
...@@ -269,7 +269,7 @@ void DevCleanupGMbox(AR6K_DEVICE *pDev) ...@@ -269,7 +269,7 @@ void DevCleanupGMbox(AR6K_DEVICE *pDev)
} }
} }
int DevSetupGMbox(AR6K_DEVICE *pDev) int DevSetupGMbox(struct ar6k_device *pDev)
{ {
int status = 0; int status = 0;
u8 muxControl[4]; u8 muxControl[4];
...@@ -322,7 +322,7 @@ int DevSetupGMbox(AR6K_DEVICE *pDev) ...@@ -322,7 +322,7 @@ int DevSetupGMbox(AR6K_DEVICE *pDev)
return status; return status;
} }
int DevCheckGMboxInterrupts(AR6K_DEVICE *pDev) int DevCheckGMboxInterrupts(struct ar6k_device *pDev)
{ {
int status = 0; int status = 0;
u8 counter_int_status; u8 counter_int_status;
...@@ -396,7 +396,7 @@ int DevCheckGMboxInterrupts(AR6K_DEVICE *pDev) ...@@ -396,7 +396,7 @@ int DevCheckGMboxInterrupts(AR6K_DEVICE *pDev)
} }
int DevGMboxWrite(AR6K_DEVICE *pDev, HTC_PACKET *pPacket, u32 WriteLength) int DevGMboxWrite(struct ar6k_device *pDev, 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(AR6K_DEVICE *pDev, HTC_PACKET *pPacket, u32 WriteLength) ...@@ -433,7 +433,7 @@ int DevGMboxWrite(AR6K_DEVICE *pDev, HTC_PACKET *pPacket, u32 WriteLength)
return status; return status;
} }
int DevGMboxRead(AR6K_DEVICE *pDev, HTC_PACKET *pPacket, u32 ReadLength) int DevGMboxRead(struct ar6k_device *pDev, HTC_PACKET *pPacket, u32 ReadLength)
{ {
u32 paddedLength; u32 paddedLength;
...@@ -518,7 +518,7 @@ static int ProcessCreditCounterReadBuffer(u8 *pBuffer, int Length) ...@@ -518,7 +518,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, HTC_PACKET *pPacket)
{ {
AR6K_DEVICE *pDev = (AR6K_DEVICE *)Context; struct ar6k_device *pDev = (struct ar6k_device *)Context;
AR_DEBUG_PRINTF(ATH_DEBUG_IRQ,("+DevGMboxReadCreditsAsyncHandler: (dev: 0x%lX)\n", (unsigned long)pDev)); AR_DEBUG_PRINTF(ATH_DEBUG_IRQ,("+DevGMboxReadCreditsAsyncHandler: (dev: 0x%lX)\n", (unsigned long)pDev));
...@@ -539,7 +539,7 @@ static void DevGMboxReadCreditsAsyncHandler(void *Context, HTC_PACKET *pPacket) ...@@ -539,7 +539,7 @@ static void DevGMboxReadCreditsAsyncHandler(void *Context, HTC_PACKET *pPacket)
AR_DEBUG_PRINTF(ATH_DEBUG_IRQ,("-DevGMboxReadCreditsAsyncHandler \n")); AR_DEBUG_PRINTF(ATH_DEBUG_IRQ,("-DevGMboxReadCreditsAsyncHandler \n"));
} }
int DevGMboxReadCreditCounter(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; HTC_PACKET *pIOPacket = NULL;
...@@ -602,7 +602,7 @@ int DevGMboxReadCreditCounter(AR6K_DEVICE *pDev, bool AsyncMode, int *pCredits) ...@@ -602,7 +602,7 @@ int DevGMboxReadCreditCounter(AR6K_DEVICE *pDev, bool AsyncMode, int *pCredits)
return status; return status;
} }
int DevGMboxReadCreditSize(AR6K_DEVICE *pDev, int *pCreditSize) int DevGMboxReadCreditSize(struct ar6k_device *pDev, int *pCreditSize)
{ {
int status; int status;
u8 buffer[4]; u8 buffer[4];
...@@ -626,7 +626,7 @@ int DevGMboxReadCreditSize(AR6K_DEVICE *pDev, int *pCreditSize) ...@@ -626,7 +626,7 @@ int DevGMboxReadCreditSize(AR6K_DEVICE *pDev, int *pCreditSize)
return status; return status;
} }
void DevNotifyGMboxTargetFailure(AR6K_DEVICE *pDev) void DevNotifyGMboxTargetFailure(struct ar6k_device *pDev)
{ {
/* Target ASSERTED!!! */ /* Target ASSERTED!!! */
if (pDev->GMboxInfo.pTargetFailureCallback != NULL) { if (pDev->GMboxInfo.pTargetFailureCallback != NULL) {
...@@ -634,7 +634,7 @@ void DevNotifyGMboxTargetFailure(AR6K_DEVICE *pDev) ...@@ -634,7 +634,7 @@ void DevNotifyGMboxTargetFailure(AR6K_DEVICE *pDev)
} }
} }
int DevGMboxRecvLookAheadPeek(AR6K_DEVICE *pDev, u8 *pLookAheadBuffer, int *pLookAheadBytes) int DevGMboxRecvLookAheadPeek(struct ar6k_device *pDev, u8 *pLookAheadBuffer, int *pLookAheadBytes)
{ {
int status = 0; int status = 0;
...@@ -676,7 +676,7 @@ int DevGMboxRecvLookAheadPeek(AR6K_DEVICE *pDev, u8 *pLookAheadBuffer, int *pLoo ...@@ -676,7 +676,7 @@ int DevGMboxRecvLookAheadPeek(AR6K_DEVICE *pDev, u8 *pLookAheadBuffer, int *pLoo
return status; return status;
} }
int DevGMboxSetTargetInterrupt(AR6K_DEVICE *pDev, int Signal, int AckTimeoutMS) int DevGMboxSetTargetInterrupt(struct ar6k_device *pDev, int Signal, int AckTimeoutMS)
{ {
int status = 0; int status = 0;
int i; int i;
......
...@@ -66,7 +66,7 @@ typedef struct { ...@@ -66,7 +66,7 @@ typedef struct {
HTC_PACKET_QUEUE SendQueue; /* write queue holding HCI Command and ACL packets */ HTC_PACKET_QUEUE SendQueue; /* write queue holding HCI Command and ACL packets */
HTC_PACKET_QUEUE HCIACLRecvBuffers; /* recv queue holding buffers for incomming ACL packets */ HTC_PACKET_QUEUE HCIACLRecvBuffers; /* recv queue holding buffers for incomming ACL packets */
HTC_PACKET_QUEUE HCIEventBuffers; /* recv queue holding buffers for incomming event packets */ HTC_PACKET_QUEUE HCIEventBuffers; /* recv queue holding buffers for incomming event packets */
AR6K_DEVICE *pDev; struct ar6k_device *pDev;
A_MUTEX_T HCIRxLock; A_MUTEX_T HCIRxLock;
A_MUTEX_T HCITxLock; A_MUTEX_T HCITxLock;
int CreditsMax; int CreditsMax;
...@@ -846,7 +846,7 @@ static void FlushRecvBuffers(GMBOX_PROTO_HCI_UART *pProt) ...@@ -846,7 +846,7 @@ static void FlushRecvBuffers(GMBOX_PROTO_HCI_UART *pProt)
/*** protocol module install entry point ***/ /*** protocol module install entry point ***/
int GMboxProtocolInstall(AR6K_DEVICE *pDev) int GMboxProtocolInstall(struct ar6k_device *pDev)
{ {
int status = 0; int status = 0;
GMBOX_PROTO_HCI_UART *pProtocol = NULL; GMBOX_PROTO_HCI_UART *pProtocol = NULL;
...@@ -889,7 +889,7 @@ int GMboxProtocolInstall(AR6K_DEVICE *pDev) ...@@ -889,7 +889,7 @@ int GMboxProtocolInstall(AR6K_DEVICE *pDev)
} }
/*** protocol module uninstall entry point ***/ /*** protocol module uninstall entry point ***/
void GMboxProtocolUninstall(AR6K_DEVICE *pDev) void GMboxProtocolUninstall(struct ar6k_device *pDev)
{ {
GMBOX_PROTO_HCI_UART *pProtocol = (GMBOX_PROTO_HCI_UART *)DEV_GMBOX_GET_PROTOCOL(pDev); GMBOX_PROTO_HCI_UART *pProtocol = (GMBOX_PROTO_HCI_UART *)DEV_GMBOX_GET_PROTOCOL(pDev);
...@@ -939,7 +939,7 @@ static int NotifyTransportReady(GMBOX_PROTO_HCI_UART *pProt) ...@@ -939,7 +939,7 @@ static int NotifyTransportReady(GMBOX_PROTO_HCI_UART *pProt)
HCI_TRANSPORT_HANDLE HCI_TransportAttach(void *HTCHandle, HCI_TRANSPORT_CONFIG_INFO *pInfo) HCI_TRANSPORT_HANDLE HCI_TransportAttach(void *HTCHandle, HCI_TRANSPORT_CONFIG_INFO *pInfo)
{ {
GMBOX_PROTO_HCI_UART *pProtocol = NULL; GMBOX_PROTO_HCI_UART *pProtocol = NULL;
AR6K_DEVICE *pDev; struct ar6k_device *pDev;
AR_DEBUG_PRINTF(ATH_DEBUG_TRC,("+HCI_TransportAttach \n")); AR_DEBUG_PRINTF(ATH_DEBUG_TRC,("+HCI_TransportAttach \n"));
...@@ -984,7 +984,7 @@ HCI_TRANSPORT_HANDLE HCI_TransportAttach(void *HTCHandle, HCI_TRANSPORT_CONFIG_I ...@@ -984,7 +984,7 @@ HCI_TRANSPORT_HANDLE HCI_TransportAttach(void *HTCHandle, HCI_TRANSPORT_CONFIG_I
void HCI_TransportDetach(HCI_TRANSPORT_HANDLE HciTrans) void HCI_TransportDetach(HCI_TRANSPORT_HANDLE HciTrans)
{ {
GMBOX_PROTO_HCI_UART *pProtocol = (GMBOX_PROTO_HCI_UART *)HciTrans; GMBOX_PROTO_HCI_UART *pProtocol = (GMBOX_PROTO_HCI_UART *)HciTrans;
AR6K_DEVICE *pDev = pProtocol->pDev; struct ar6k_device *pDev = pProtocol->pDev;
AR_DEBUG_PRINTF(ATH_DEBUG_TRC,("+HCI_TransportDetach \n")); AR_DEBUG_PRINTF(ATH_DEBUG_TRC,("+HCI_TransportDetach \n"));
......
...@@ -573,7 +573,7 @@ bool HTCGetEndpointStatistics(HTC_HANDLE HTCHandle, ...@@ -573,7 +573,7 @@ bool HTCGetEndpointStatistics(HTC_HANDLE HTCHandle,
#endif #endif
} }
AR6K_DEVICE *HTCGetAR6KDevice(void *HTCHandle) struct ar6k_device *HTCGetAR6KDevice(void *HTCHandle)
{ {
HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle); HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
return &target->Device; return &target->Device;
......
...@@ -122,7 +122,7 @@ typedef struct _HTC_TARGET { ...@@ -122,7 +122,7 @@ typedef struct _HTC_TARGET {
A_MUTEX_T HTCLock; A_MUTEX_T HTCLock;
A_MUTEX_T HTCRxLock; A_MUTEX_T HTCRxLock;
A_MUTEX_T HTCTxLock; A_MUTEX_T HTCTxLock;
AR6K_DEVICE Device; /* AR6K - specific state */ struct ar6k_device Device; /* AR6K - specific state */
u32 OpStateFlags; u32 OpStateFlags;
u32 RecvStateFlags; u32 RecvStateFlags;
HTC_ENDPOINT_ID EpWaitingForBuffers; HTC_ENDPOINT_ID EpWaitingForBuffers;
......
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