aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/ath6kl
diff options
context:
space:
mode:
authorLuis R. Rodriguez <lrodriguez@atheros.com>2011-03-14 13:58:57 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2011-03-14 14:58:50 -0400
commitc6528e2f0dca96ee2c4bf7f1600d9537fad88197 (patch)
tree631836395a7c5f9e36d49d99892fd30de10e7d88 /drivers/staging/ath6kl
parent4f0cce96a1c40e3874ac7d3794ad0d36c79fb995 (diff)
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: Naveen Singh <nsingh@atheros.com> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/ath6kl')
-rw-r--r--drivers/staging/ath6kl/htc2/AR6000/ar6k.c18
-rw-r--r--drivers/staging/ath6kl/htc2/AR6000/ar6k.h10
-rw-r--r--drivers/staging/ath6kl/htc2/AR6000/ar6k_events.c10
-rw-r--r--drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox.c18
-rw-r--r--drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox_hciuart.c18
-rw-r--r--drivers/staging/ath6kl/htc2/htc.c14
-rw-r--r--drivers/staging/ath6kl/htc2/htc_internal.h20
-rw-r--r--drivers/staging/ath6kl/htc2/htc_recv.c32
-rw-r--r--drivers/staging/ath6kl/htc2/htc_send.c30
-rw-r--r--drivers/staging/ath6kl/htc2/htc_services.c10
-rw-r--r--drivers/staging/ath6kl/include/hci_transport_api.h12
-rw-r--r--drivers/staging/ath6kl/include/htc_api.h12
-rw-r--r--drivers/staging/ath6kl/include/htc_packet.h22
-rw-r--r--drivers/staging/ath6kl/miscdrv/ar3kconfig.c12
-rw-r--r--drivers/staging/ath6kl/os/linux/ar6000_drv.c26
-rw-r--r--drivers/staging/ath6kl/os/linux/ar6000_raw_if.c4
-rw-r--r--drivers/staging/ath6kl/os/linux/export_hci_transport.c4
-rw-r--r--drivers/staging/ath6kl/os/linux/hci_bridge.c24
-rw-r--r--drivers/staging/ath6kl/os/linux/include/ar6000_drv.h4
-rw-r--r--drivers/staging/ath6kl/os/linux/include/export_hci_transport.h4
-rw-r--r--drivers/staging/ath6kl/os/linux/netbuf.c4
21 files changed, 154 insertions, 154 deletions
diff --git a/drivers/staging/ath6kl/htc2/AR6000/ar6k.c b/drivers/staging/ath6kl/htc2/AR6000/ar6k.c
index c780e4fb49b..91e763a4abf 100644
--- a/drivers/staging/ath6kl/htc2/AR6000/ar6k.c
+++ b/drivers/staging/ath6kl/htc2/AR6000/ar6k.c
@@ -40,16 +40,16 @@ int DevDisableInterrupts(struct ar6k_device *pDev);
40 40
41static void DevCleanupVirtualScatterSupport(struct ar6k_device *pDev); 41static void DevCleanupVirtualScatterSupport(struct ar6k_device *pDev);
42 42
43void AR6KFreeIOPacket(struct ar6k_device *pDev, HTC_PACKET *pPacket) 43void AR6KFreeIOPacket(struct ar6k_device *pDev, struct htc_packet *pPacket)
44{ 44{
45 LOCK_AR6K(pDev); 45 LOCK_AR6K(pDev);
46 HTC_PACKET_ENQUEUE(&pDev->RegisterIOList,pPacket); 46 HTC_PACKET_ENQUEUE(&pDev->RegisterIOList,pPacket);
47 UNLOCK_AR6K(pDev); 47 UNLOCK_AR6K(pDev);
48} 48}
49 49
50HTC_PACKET *AR6KAllocIOPacket(struct ar6k_device *pDev) 50struct htc_packet *AR6KAllocIOPacket(struct ar6k_device *pDev)
51{ 51{
52 HTC_PACKET *pPacket; 52 struct htc_packet *pPacket;
53 53
54 LOCK_AR6K(pDev); 54 LOCK_AR6K(pDev);
55 pPacket = HTC_PACKET_DEQUEUE(&pDev->RegisterIOList); 55 pPacket = HTC_PACKET_DEQUEUE(&pDev->RegisterIOList);
@@ -113,7 +113,7 @@ int DevSetup(struct ar6k_device *pDev)
113 113
114 /* carve up register I/O packets (these are for ASYNC register I/O ) */ 114 /* carve up register I/O packets (these are for ASYNC register I/O ) */
115 for (i = 0; i < AR6K_MAX_REG_IO_BUFFERS; i++) { 115 for (i = 0; i < AR6K_MAX_REG_IO_BUFFERS; i++) {
116 HTC_PACKET *pIOPacket; 116 struct htc_packet *pIOPacket;
117 pIOPacket = &pDev->RegIOBuffers[i].HtcPacket; 117 pIOPacket = &pDev->RegIOBuffers[i].HtcPacket;
118 SET_HTC_PACKET_INFO_RX_REFILL(pIOPacket, 118 SET_HTC_PACKET_INFO_RX_REFILL(pIOPacket,
119 pDev, 119 pDev,
@@ -337,7 +337,7 @@ int DevMaskInterrupts(struct ar6k_device *pDev)
337} 337}
338 338
339/* callback when our fetch to enable/disable completes */ 339/* callback when our fetch to enable/disable completes */
340static void DevDoEnableDisableRecvAsyncHandler(void *Context, HTC_PACKET *pPacket) 340static void DevDoEnableDisableRecvAsyncHandler(void *Context, struct htc_packet *pPacket)
341{ 341{
342 struct ar6k_device *pDev = (struct ar6k_device *)Context; 342 struct ar6k_device *pDev = (struct ar6k_device *)Context;
343 343
@@ -358,7 +358,7 @@ static void DevDoEnableDisableRecvAsyncHandler(void *Context, HTC_PACKET *pPacke
358static int DevDoEnableDisableRecvOverride(struct ar6k_device *pDev, bool EnableRecv, bool AsyncMode) 358static int DevDoEnableDisableRecvOverride(struct ar6k_device *pDev, bool EnableRecv, bool AsyncMode)
359{ 359{
360 int status = 0; 360 int status = 0;
361 HTC_PACKET *pIOPacket = NULL; 361 struct htc_packet *pIOPacket = NULL;
362 362
363 AR_DEBUG_PRINTF(ATH_DEBUG_TRC,("DevDoEnableDisableRecvOverride: Enable:%d Mode:%d\n", 363 AR_DEBUG_PRINTF(ATH_DEBUG_TRC,("DevDoEnableDisableRecvOverride: Enable:%d Mode:%d\n",
364 EnableRecv,AsyncMode)); 364 EnableRecv,AsyncMode));
@@ -406,7 +406,7 @@ static int DevDoEnableDisableRecvOverride(struct ar6k_device *pDev, bool EnableR
406static int DevDoEnableDisableRecvNormal(struct ar6k_device *pDev, bool EnableRecv, bool AsyncMode) 406static int DevDoEnableDisableRecvNormal(struct ar6k_device *pDev, bool EnableRecv, bool AsyncMode)
407{ 407{
408 int status = 0; 408 int status = 0;
409 HTC_PACKET *pIOPacket = NULL; 409 struct htc_packet *pIOPacket = NULL;
410 struct ar6k_irq_enable_registers regs; 410 struct ar6k_irq_enable_registers regs;
411 411
412 /* take the lock to protect interrupt enable shadows */ 412 /* take the lock to protect interrupt enable shadows */
@@ -648,7 +648,7 @@ int DevCopyScatterListToFromDMABuffer(struct hif_scatter_req *pReq, bool FromDMA
648 return 0; 648 return 0;
649} 649}
650 650
651static void DevReadWriteScatterAsyncHandler(void *Context, HTC_PACKET *pPacket) 651static void DevReadWriteScatterAsyncHandler(void *Context, struct htc_packet *pPacket)
652{ 652{
653 struct ar6k_device *pDev = (struct ar6k_device *)Context; 653 struct ar6k_device *pDev = (struct ar6k_device *)Context;
654 struct hif_scatter_req *pReq = (struct hif_scatter_req *)pPacket->pPktContext; 654 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{ 668{
669 struct ar6k_device *pDev = (struct ar6k_device *)Context; 669 struct ar6k_device *pDev = (struct ar6k_device *)Context;
670 int status = 0; 670 int status = 0;
671 HTC_PACKET *pIOPacket = NULL; 671 struct htc_packet *pIOPacket = NULL;
672 u32 request = pReq->Request; 672 u32 request = pReq->Request;
673 673
674 do { 674 do {
diff --git a/drivers/staging/ath6kl/htc2/AR6000/ar6k.h b/drivers/staging/ath6kl/htc2/AR6000/ar6k.h
index baad0bf472d..b01542e2c3a 100644
--- a/drivers/staging/ath6kl/htc2/AR6000/ar6k.h
+++ b/drivers/staging/ath6kl/htc2/AR6000/ar6k.h
@@ -90,7 +90,7 @@ PREPACK struct ar6k_gmbox_ctrl_registers {
90 90
91/* buffers for ASYNC I/O */ 91/* buffers for ASYNC I/O */
92struct ar6k_async_reg_io_buffer { 92struct ar6k_async_reg_io_buffer {
93 HTC_PACKET HtcPacket; /* we use an HTC packet as a wrapper for our async register-based I/O */ 93 struct htc_packet HtcPacket; /* we use an HTC packet as a wrapper for our async register-based I/O */
94 u8 _Pad1[A_CACHE_LINE_PAD]; 94 u8 _Pad1[A_CACHE_LINE_PAD];
95 u8 Buffer[AR6K_REG_IO_BUFFER_SIZE]; /* cache-line safe with pads around */ 95 u8 Buffer[AR6K_REG_IO_BUFFER_SIZE]; /* cache-line safe with pads around */
96 u8 _Pad2[A_CACHE_LINE_PAD]; 96 u8 _Pad2[A_CACHE_LINE_PAD];
@@ -176,7 +176,7 @@ int DevWaitForPendingRecv(struct ar6k_device *pDev,u32 TimeoutInMs,bool *pbIsRec
176#define DEV_CALC_SEND_PADDED_LEN(pDev, length) DEV_CALC_RECV_PADDED_LEN(pDev,length) 176#define DEV_CALC_SEND_PADDED_LEN(pDev, length) DEV_CALC_RECV_PADDED_LEN(pDev,length)
177#define DEV_IS_LEN_BLOCK_ALIGNED(pDev, length) (((length) % (pDev)->BlockSize) == 0) 177#define DEV_IS_LEN_BLOCK_ALIGNED(pDev, length) (((length) % (pDev)->BlockSize) == 0)
178 178
179static INLINE int DevSendPacket(struct ar6k_device *pDev, HTC_PACKET *pPacket, u32 SendLength) { 179static INLINE int DevSendPacket(struct ar6k_device *pDev, struct htc_packet *pPacket, u32 SendLength) {
180 u32 paddedLength; 180 u32 paddedLength;
181 bool sync = (pPacket->Completion == NULL) ? true : false; 181 bool sync = (pPacket->Completion == NULL) ? true : false;
182 int status; 182 int status;
@@ -219,7 +219,7 @@ static INLINE int DevSendPacket(struct ar6k_device *pDev, HTC_PACKET *pPacket, u
219 return status; 219 return status;
220} 220}
221 221
222static INLINE int DevRecvPacket(struct ar6k_device *pDev, HTC_PACKET *pPacket, u32 RecvLength) { 222static INLINE int DevRecvPacket(struct ar6k_device *pDev, struct htc_packet *pPacket, u32 RecvLength) {
223 u32 paddedLength; 223 u32 paddedLength;
224 int status; 224 int status;
225 bool sync = (pPacket->Completion == NULL) ? true : false; 225 bool sync = (pPacket->Completion == NULL) ? true : false;
@@ -378,8 +378,8 @@ struct ar6k_device *HTCGetAR6KDevice(void *HTCHandle);
378 378
379#define DEV_GMBOX_GET_PROTOCOL(pDev) (pDev)->GMboxInfo.pProtocolContext 379#define DEV_GMBOX_GET_PROTOCOL(pDev) (pDev)->GMboxInfo.pProtocolContext
380 380
381int DevGMboxWrite(struct ar6k_device *pDev, HTC_PACKET *pPacket, u32 WriteLength); 381int DevGMboxWrite(struct ar6k_device *pDev, struct htc_packet *pPacket, u32 WriteLength);
382int DevGMboxRead(struct ar6k_device *pDev, HTC_PACKET *pPacket, u32 ReadLength); 382int DevGMboxRead(struct ar6k_device *pDev, struct htc_packet *pPacket, u32 ReadLength);
383 383
384#define PROC_IO_ASYNC true 384#define PROC_IO_ASYNC true
385#define PROC_IO_SYNC false 385#define PROC_IO_SYNC false
diff --git a/drivers/staging/ath6kl/htc2/AR6000/ar6k_events.c b/drivers/staging/ath6kl/htc2/AR6000/ar6k_events.c
index ca6abb490e2..5e6d1e06292 100644
--- a/drivers/staging/ath6kl/htc2/AR6000/ar6k_events.c
+++ b/drivers/staging/ath6kl/htc2/AR6000/ar6k_events.c
@@ -33,8 +33,8 @@
33#include "htc_packet.h" 33#include "htc_packet.h"
34#include "ar6k.h" 34#include "ar6k.h"
35 35
36extern void AR6KFreeIOPacket(struct ar6k_device *pDev, HTC_PACKET *pPacket); 36extern void AR6KFreeIOPacket(struct ar6k_device *pDev, struct htc_packet *pPacket);
37extern HTC_PACKET *AR6KAllocIOPacket(struct ar6k_device *pDev); 37extern struct htc_packet *AR6KAllocIOPacket(struct ar6k_device *pDev);
38 38
39static int DevServiceDebugInterrupt(struct ar6k_device *pDev); 39static int DevServiceDebugInterrupt(struct ar6k_device *pDev);
40 40
@@ -43,7 +43,7 @@ static int DevServiceDebugInterrupt(struct ar6k_device *pDev);
43/* completion routine for ALL HIF layer async I/O */ 43/* completion routine for ALL HIF layer async I/O */
44int DevRWCompletionHandler(void *context, int status) 44int DevRWCompletionHandler(void *context, int status)
45{ 45{
46 HTC_PACKET *pPacket = (HTC_PACKET *)context; 46 struct htc_packet *pPacket = (struct htc_packet *)context;
47 47
48 AR_DEBUG_PRINTF(ATH_DEBUG_RECV, 48 AR_DEBUG_PRINTF(ATH_DEBUG_RECV,
49 ("+DevRWCompletionHandler (Pkt:0x%lX) , Status: %d \n", 49 ("+DevRWCompletionHandler (Pkt:0x%lX) , Status: %d \n",
@@ -300,7 +300,7 @@ static int DevServiceCounterInterrupt(struct ar6k_device *pDev)
300} 300}
301 301
302/* callback when our fetch to get interrupt status registers completes */ 302/* callback when our fetch to get interrupt status registers completes */
303static void DevGetEventAsyncHandler(void *Context, HTC_PACKET *pPacket) 303static void DevGetEventAsyncHandler(void *Context, struct htc_packet *pPacket)
304{ 304{
305 struct ar6k_device *pDev = (struct ar6k_device *)Context; 305 struct ar6k_device *pDev = (struct ar6k_device *)Context;
306 u32 lookAhead = 0; 306 u32 lookAhead = 0;
@@ -392,7 +392,7 @@ int DevCheckPendingRecvMsgsAsync(void *context)
392{ 392{
393 struct ar6k_device *pDev = (struct ar6k_device *)context; 393 struct ar6k_device *pDev = (struct ar6k_device *)context;
394 int status = 0; 394 int status = 0;
395 HTC_PACKET *pIOPacket; 395 struct htc_packet *pIOPacket;
396 396
397 /* this is called in an ASYNC only context, we may NOT block, sleep or call any apis that can 397 /* this is called in an ASYNC only context, we may NOT block, sleep or call any apis that can
398 * cause us to switch contexts */ 398 * cause us to switch contexts */
diff --git a/drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox.c b/drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox.c
index 106f9bf7b11..374001155fe 100644
--- a/drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox.c
+++ b/drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox.c
@@ -54,12 +54,12 @@
54 54
55 55
56 /* external APIs for allocating and freeing internal I/O packets to handle ASYNC I/O */ 56 /* external APIs for allocating and freeing internal I/O packets to handle ASYNC I/O */
57extern void AR6KFreeIOPacket(struct ar6k_device *pDev, HTC_PACKET *pPacket); 57extern void AR6KFreeIOPacket(struct ar6k_device *pDev, struct htc_packet *pPacket);
58extern HTC_PACKET *AR6KAllocIOPacket(struct ar6k_device *pDev); 58extern struct htc_packet *AR6KAllocIOPacket(struct ar6k_device *pDev);
59 59
60 60
61/* callback when our fetch to enable/disable completes */ 61/* callback when our fetch to enable/disable completes */
62static void DevGMboxIRQActionAsyncHandler(void *Context, HTC_PACKET *pPacket) 62static void DevGMboxIRQActionAsyncHandler(void *Context, struct htc_packet *pPacket)
63{ 63{
64 struct ar6k_device *pDev = (struct ar6k_device *)Context; 64 struct ar6k_device *pDev = (struct ar6k_device *)Context;
65 65
@@ -78,7 +78,7 @@ static int DevGMboxCounterEnableDisable(struct ar6k_device *pDev, GMBOX_IRQ_ACTI
78{ 78{
79 int status = 0; 79 int status = 0;
80 struct ar6k_irq_enable_registers regs; 80 struct ar6k_irq_enable_registers regs;
81 HTC_PACKET *pIOPacket = NULL; 81 struct htc_packet *pIOPacket = NULL;
82 82
83 LOCK_AR6K(pDev); 83 LOCK_AR6K(pDev);
84 84
@@ -158,7 +158,7 @@ static int DevGMboxCounterEnableDisable(struct ar6k_device *pDev, GMBOX_IRQ_ACTI
158int DevGMboxIRQAction(struct ar6k_device *pDev, GMBOX_IRQ_ACTION_TYPE IrqAction, bool AsyncMode) 158int DevGMboxIRQAction(struct ar6k_device *pDev, GMBOX_IRQ_ACTION_TYPE IrqAction, bool AsyncMode)
159{ 159{
160 int status = 0; 160 int status = 0;
161 HTC_PACKET *pIOPacket = NULL; 161 struct htc_packet *pIOPacket = NULL;
162 u8 GMboxIntControl[4]; 162 u8 GMboxIntControl[4];
163 163
164 if (GMBOX_CREDIT_IRQ_ENABLE == IrqAction) { 164 if (GMBOX_CREDIT_IRQ_ENABLE == IrqAction) {
@@ -396,7 +396,7 @@ int DevCheckGMboxInterrupts(struct ar6k_device *pDev)
396} 396}
397 397
398 398
399int DevGMboxWrite(struct ar6k_device *pDev, HTC_PACKET *pPacket, u32 WriteLength) 399int DevGMboxWrite(struct ar6k_device *pDev, struct htc_packet *pPacket, u32 WriteLength)
400{ 400{
401 u32 paddedLength; 401 u32 paddedLength;
402 bool sync = (pPacket->Completion == NULL) ? true : false; 402 bool sync = (pPacket->Completion == NULL) ? true : false;
@@ -433,7 +433,7 @@ int DevGMboxWrite(struct ar6k_device *pDev, HTC_PACKET *pPacket, u32 WriteLength
433 return status; 433 return status;
434} 434}
435 435
436int DevGMboxRead(struct ar6k_device *pDev, HTC_PACKET *pPacket, u32 ReadLength) 436int DevGMboxRead(struct ar6k_device *pDev, struct htc_packet *pPacket, u32 ReadLength)
437{ 437{
438 438
439 u32 paddedLength; 439 u32 paddedLength;
@@ -516,7 +516,7 @@ static int ProcessCreditCounterReadBuffer(u8 *pBuffer, int Length)
516 516
517 517
518/* callback when our fetch to enable/disable completes */ 518/* callback when our fetch to enable/disable completes */
519static void DevGMboxReadCreditsAsyncHandler(void *Context, HTC_PACKET *pPacket) 519static void DevGMboxReadCreditsAsyncHandler(void *Context, struct htc_packet *pPacket)
520{ 520{
521 struct ar6k_device *pDev = (struct ar6k_device *)Context; 521 struct ar6k_device *pDev = (struct ar6k_device *)Context;
522 522
@@ -542,7 +542,7 @@ static void DevGMboxReadCreditsAsyncHandler(void *Context, HTC_PACKET *pPacket)
542int DevGMboxReadCreditCounter(struct ar6k_device *pDev, bool AsyncMode, int *pCredits) 542int DevGMboxReadCreditCounter(struct ar6k_device *pDev, bool AsyncMode, int *pCredits)
543{ 543{
544 int status = 0; 544 int status = 0;
545 HTC_PACKET *pIOPacket = NULL; 545 struct htc_packet *pIOPacket = NULL;
546 546
547 AR_DEBUG_PRINTF(ATH_DEBUG_SEND,("+DevGMboxReadCreditCounter (%s) \n", AsyncMode ? "ASYNC" : "SYNC")); 547 AR_DEBUG_PRINTF(ATH_DEBUG_SEND,("+DevGMboxReadCreditCounter (%s) \n", AsyncMode ? "ASYNC" : "SYNC"));
548 548
diff --git a/drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox_hciuart.c b/drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox_hciuart.c
index 8e5abe8e67e..90e303f342a 100644
--- a/drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox_hciuart.c
+++ b/drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox_hciuart.c
@@ -99,7 +99,7 @@ do { \
99 (p)->HCIConfig.pHCISendComplete((p)->HCIConfig.pContext, (pt)); \ 99 (p)->HCIConfig.pHCISendComplete((p)->HCIConfig.pContext, (pt)); \
100} 100}
101 101
102static int HCITrySend(struct gmbox_proto_hci_uart *pProt, HTC_PACKET *pPacket, bool Synchronous); 102static int HCITrySend(struct gmbox_proto_hci_uart *pProt, struct htc_packet *pPacket, bool Synchronous);
103 103
104static void HCIUartCleanup(struct gmbox_proto_hci_uart *pProtocol) 104static void HCIUartCleanup(struct gmbox_proto_hci_uart *pProtocol)
105{ 105{
@@ -312,7 +312,7 @@ static int HCIUartMessagePending(void *pContext, u8 LookAheadBytes[], int ValidB
312 HCI_TRANSPORT_PACKET_TYPE pktType = HCI_PACKET_INVALID; 312 HCI_TRANSPORT_PACKET_TYPE pktType = HCI_PACKET_INVALID;
313 bool recvRefillCalled = false; 313 bool recvRefillCalled = false;
314 bool blockRecv = false; 314 bool blockRecv = false;
315 HTC_PACKET *pPacket = NULL; 315 struct htc_packet *pPacket = NULL;
316 316
317 /** caller guarantees that this is a fully block-able context (synch I/O is allowed) */ 317 /** caller guarantees that this is a fully block-able context (synch I/O is allowed) */
318 318
@@ -532,7 +532,7 @@ static int HCIUartMessagePending(void *pContext, u8 LookAheadBytes[], int ValidB
532 return status; 532 return status;
533} 533}
534 534
535static void HCISendPacketCompletion(void *Context, HTC_PACKET *pPacket) 535static void HCISendPacketCompletion(void *Context, struct htc_packet *pPacket)
536{ 536{
537 struct gmbox_proto_hci_uart *pProt = (struct gmbox_proto_hci_uart *)Context; 537 struct gmbox_proto_hci_uart *pProt = (struct gmbox_proto_hci_uart *)Context;
538 AR_DEBUG_PRINTF(ATH_DEBUG_SEND,("+HCISendPacketCompletion (pPacket:0x%lX) \n",(unsigned long)pPacket)); 538 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 return status; 579 return status;
580} 580}
581 581
582static int HCITrySend(struct gmbox_proto_hci_uart *pProt, HTC_PACKET *pPacket, bool Synchronous) 582static int HCITrySend(struct gmbox_proto_hci_uart *pProt, struct htc_packet *pPacket, bool Synchronous)
583{ 583{
584 int status = 0; 584 int status = 0;
585 int transferLength; 585 int transferLength;
@@ -796,7 +796,7 @@ static int HCITrySend(struct gmbox_proto_hci_uart *pProt, HTC_PACKET *pPacket, b
796 796
797static void FlushSendQueue(struct gmbox_proto_hci_uart *pProt) 797static void FlushSendQueue(struct gmbox_proto_hci_uart *pProt)
798{ 798{
799 HTC_PACKET *pPacket; 799 struct htc_packet *pPacket;
800 HTC_PACKET_QUEUE discardQueue; 800 HTC_PACKET_QUEUE discardQueue;
801 801
802 INIT_HTC_PACKET_QUEUE(&discardQueue); 802 INIT_HTC_PACKET_QUEUE(&discardQueue);
@@ -821,7 +821,7 @@ static void FlushSendQueue(struct gmbox_proto_hci_uart *pProt)
821static void FlushRecvBuffers(struct gmbox_proto_hci_uart *pProt) 821static void FlushRecvBuffers(struct gmbox_proto_hci_uart *pProt)
822{ 822{
823 HTC_PACKET_QUEUE discardQueue; 823 HTC_PACKET_QUEUE discardQueue;
824 HTC_PACKET *pPacket; 824 struct htc_packet *pPacket;
825 825
826 INIT_HTC_PACKET_QUEUE(&discardQueue); 826 INIT_HTC_PACKET_QUEUE(&discardQueue);
827 827
@@ -1006,7 +1006,7 @@ int HCI_TransportAddReceivePkts(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET_QUEUE
1006 struct gmbox_proto_hci_uart *pProt = (struct gmbox_proto_hci_uart *)HciTrans; 1006 struct gmbox_proto_hci_uart *pProt = (struct gmbox_proto_hci_uart *)HciTrans;
1007 int status = 0; 1007 int status = 0;
1008 bool unblockRecv = false; 1008 bool unblockRecv = false;
1009 HTC_PACKET *pPacket; 1009 struct htc_packet *pPacket;
1010 1010
1011 AR_DEBUG_PRINTF(ATH_DEBUG_RECV,("+HCI_TransportAddReceivePkt \n")); 1011 AR_DEBUG_PRINTF(ATH_DEBUG_RECV,("+HCI_TransportAddReceivePkt \n"));
1012 1012
@@ -1069,7 +1069,7 @@ int HCI_TransportAddReceivePkts(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET_QUEUE
1069 return 0; 1069 return 0;
1070} 1070}
1071 1071
1072int HCI_TransportSendPkt(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET *pPacket, bool Synchronous) 1072int HCI_TransportSendPkt(HCI_TRANSPORT_HANDLE HciTrans, struct htc_packet *pPacket, bool Synchronous)
1073{ 1073{
1074 struct gmbox_proto_hci_uart *pProt = (struct gmbox_proto_hci_uart *)HciTrans; 1074 struct gmbox_proto_hci_uart *pProt = (struct gmbox_proto_hci_uart *)HciTrans;
1075 1075
@@ -1159,7 +1159,7 @@ int HCI_TransportEnableDisableAsyncRecv(HCI_TRANSPORT_HANDLE HciTrans, bool Enab
1159} 1159}
1160 1160
1161int HCI_TransportRecvHCIEventSync(HCI_TRANSPORT_HANDLE HciTrans, 1161int HCI_TransportRecvHCIEventSync(HCI_TRANSPORT_HANDLE HciTrans,
1162 HTC_PACKET *pPacket, 1162 struct htc_packet *pPacket,
1163 int MaxPollMS) 1163 int MaxPollMS)
1164{ 1164{
1165 struct gmbox_proto_hci_uart *pProt = (struct gmbox_proto_hci_uart *)HciTrans; 1165 struct gmbox_proto_hci_uart *pProt = (struct gmbox_proto_hci_uart *)HciTrans;
diff --git a/drivers/staging/ath6kl/htc2/htc.c b/drivers/staging/ath6kl/htc2/htc.c
index 810fe7b919e..04ba80ef822 100644
--- a/drivers/staging/ath6kl/htc2/htc.c
+++ b/drivers/staging/ath6kl/htc2/htc.c
@@ -43,16 +43,16 @@ ATH_DEBUG_INSTANTIATE_MODULE_VAR(htc,
43static void HTCReportFailure(void *Context); 43static void HTCReportFailure(void *Context);
44static void ResetEndpointStates(HTC_TARGET *target); 44static void ResetEndpointStates(HTC_TARGET *target);
45 45
46void HTCFreeControlBuffer(HTC_TARGET *target, HTC_PACKET *pPacket, HTC_PACKET_QUEUE *pList) 46void HTCFreeControlBuffer(HTC_TARGET *target, struct htc_packet *pPacket, HTC_PACKET_QUEUE *pList)
47{ 47{
48 LOCK_HTC(target); 48 LOCK_HTC(target);
49 HTC_PACKET_ENQUEUE(pList,pPacket); 49 HTC_PACKET_ENQUEUE(pList,pPacket);
50 UNLOCK_HTC(target); 50 UNLOCK_HTC(target);
51} 51}
52 52
53HTC_PACKET *HTCAllocControlBuffer(HTC_TARGET *target, HTC_PACKET_QUEUE *pList) 53struct htc_packet *HTCAllocControlBuffer(HTC_TARGET *target, HTC_PACKET_QUEUE *pList)
54{ 54{
55 HTC_PACKET *pPacket; 55 struct htc_packet *pPacket;
56 56
57 LOCK_HTC(target); 57 LOCK_HTC(target);
58 pPacket = HTC_PACKET_DEQUEUE(pList); 58 pPacket = HTC_PACKET_DEQUEUE(pList);
@@ -171,7 +171,7 @@ HTC_HANDLE HTCCreate(void *hif_handle, struct htc_init_info *pInfo)
171 171
172 /* carve up buffers/packets for control messages */ 172 /* carve up buffers/packets for control messages */
173 for (i = 0; i < NUM_CONTROL_RX_BUFFERS; i++) { 173 for (i = 0; i < NUM_CONTROL_RX_BUFFERS; i++) {
174 HTC_PACKET *pControlPacket; 174 struct htc_packet *pControlPacket;
175 pControlPacket = &target->HTCControlBuffers[i].HtcPacket; 175 pControlPacket = &target->HTCControlBuffers[i].HtcPacket;
176 SET_HTC_PACKET_INFO_RX_REFILL(pControlPacket, 176 SET_HTC_PACKET_INFO_RX_REFILL(pControlPacket,
177 target, 177 target,
@@ -182,7 +182,7 @@ HTC_HANDLE HTCCreate(void *hif_handle, struct htc_init_info *pInfo)
182 } 182 }
183 183
184 for (;i < NUM_CONTROL_BUFFERS;i++) { 184 for (;i < NUM_CONTROL_BUFFERS;i++) {
185 HTC_PACKET *pControlPacket; 185 struct htc_packet *pControlPacket;
186 pControlPacket = &target->HTCControlBuffers[i].HtcPacket; 186 pControlPacket = &target->HTCControlBuffers[i].HtcPacket;
187 INIT_HTC_PACKET_INFO(pControlPacket, 187 INIT_HTC_PACKET_INFO(pControlPacket,
188 target->HTCControlBuffers[i].Buffer, 188 target->HTCControlBuffers[i].Buffer,
@@ -226,7 +226,7 @@ int HTCWaitTarget(HTC_HANDLE HTCHandle)
226{ 226{
227 HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle); 227 HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
228 int status; 228 int status;
229 HTC_PACKET *pPacket = NULL; 229 struct htc_packet *pPacket = NULL;
230 HTC_READY_EX_MSG *pRdyMsg; 230 HTC_READY_EX_MSG *pRdyMsg;
231 231
232 HTC_SERVICE_CONNECT_REQ connect; 232 HTC_SERVICE_CONNECT_REQ connect;
@@ -372,7 +372,7 @@ int HTCWaitTarget(HTC_HANDLE HTCHandle)
372int HTCStart(HTC_HANDLE HTCHandle) 372int HTCStart(HTC_HANDLE HTCHandle)
373{ 373{
374 HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle); 374 HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
375 HTC_PACKET *pPacket; 375 struct htc_packet *pPacket;
376 int status; 376 int status;
377 377
378 AR_DEBUG_PRINTF(ATH_DEBUG_TRC, ("HTCStart Enter\n")); 378 AR_DEBUG_PRINTF(ATH_DEBUG_TRC, ("HTCStart Enter\n"));
diff --git a/drivers/staging/ath6kl/htc2/htc_internal.h b/drivers/staging/ath6kl/htc2/htc_internal.h
index c5727ca6093..5f85350b50a 100644
--- a/drivers/staging/ath6kl/htc2/htc_internal.h
+++ b/drivers/staging/ath6kl/htc2/htc_internal.h
@@ -100,7 +100,7 @@ struct htc_endpoint {
100#define NUM_CONTROL_RX_BUFFERS (NUM_CONTROL_BUFFERS - NUM_CONTROL_TX_BUFFERS) 100#define NUM_CONTROL_RX_BUFFERS (NUM_CONTROL_BUFFERS - NUM_CONTROL_TX_BUFFERS)
101 101
102struct htc_control_buffer { 102struct htc_control_buffer {
103 HTC_PACKET HtcPacket; 103 struct htc_packet HtcPacket;
104 u8 *Buffer; 104 u8 *Buffer;
105}; 105};
106 106
@@ -162,13 +162,13 @@ typedef struct _HTC_TARGET {
162} 162}
163 163
164/* internal HTC functions */ 164/* internal HTC functions */
165void HTCControlTxComplete(void *Context, HTC_PACKET *pPacket); 165void HTCControlTxComplete(void *Context, struct htc_packet *pPacket);
166void HTCControlRecv(void *Context, HTC_PACKET *pPacket); 166void HTCControlRecv(void *Context, struct htc_packet *pPacket);
167int HTCWaitforControlMessage(HTC_TARGET *target, HTC_PACKET **ppControlPacket); 167int HTCWaitforControlMessage(HTC_TARGET *target, struct htc_packet **ppControlPacket);
168HTC_PACKET *HTCAllocControlBuffer(HTC_TARGET *target, HTC_PACKET_QUEUE *pList); 168struct htc_packet *HTCAllocControlBuffer(HTC_TARGET *target, HTC_PACKET_QUEUE *pList);
169void HTCFreeControlBuffer(HTC_TARGET *target, HTC_PACKET *pPacket, HTC_PACKET_QUEUE *pList); 169void HTCFreeControlBuffer(HTC_TARGET *target, struct htc_packet *pPacket, HTC_PACKET_QUEUE *pList);
170int HTCIssueSend(HTC_TARGET *target, HTC_PACKET *pPacket); 170int HTCIssueSend(HTC_TARGET *target, struct htc_packet *pPacket);
171void HTCRecvCompleteHandler(void *Context, HTC_PACKET *pPacket); 171void HTCRecvCompleteHandler(void *Context, struct htc_packet *pPacket);
172int HTCRecvMessagePendingHandler(void *Context, u32 MsgLookAheads[], int NumLookAheads, bool *pAsyncProc, int *pNumPktsFetched); 172int HTCRecvMessagePendingHandler(void *Context, u32 MsgLookAheads[], int NumLookAheads, bool *pAsyncProc, int *pNumPktsFetched);
173void HTCProcessCreditRpt(HTC_TARGET *target, HTC_CREDIT_REPORT *pRpt, int NumEntries, HTC_ENDPOINT_ID FromEndpoint); 173void HTCProcessCreditRpt(HTC_TARGET *target, HTC_CREDIT_REPORT *pRpt, int NumEntries, HTC_ENDPOINT_ID FromEndpoint);
174int HTCSendSetupComplete(HTC_TARGET *target); 174int HTCSendSetupComplete(HTC_TARGET *target);
@@ -181,8 +181,8 @@ void DumpCreditDistStates(HTC_TARGET *target);
181void DebugDumpBytes(u8 *buffer, u16 length, char *pDescription); 181void DebugDumpBytes(u8 *buffer, u16 length, char *pDescription);
182#endif 182#endif
183 183
184static INLINE HTC_PACKET *HTC_ALLOC_CONTROL_TX(HTC_TARGET *target) { 184static INLINE struct htc_packet *HTC_ALLOC_CONTROL_TX(HTC_TARGET *target) {
185 HTC_PACKET *pPacket = HTCAllocControlBuffer(target,&target->ControlBufferTXFreeList); 185 struct htc_packet *pPacket = HTCAllocControlBuffer(target,&target->ControlBufferTXFreeList);
186 if (pPacket != NULL) { 186 if (pPacket != NULL) {
187 /* set payload pointer area with some headroom */ 187 /* set payload pointer area with some headroom */
188 pPacket->pBuffer = pPacket->pBufferStart + HTC_HDR_LENGTH; 188 pPacket->pBuffer = pPacket->pBufferStart + HTC_HDR_LENGTH;
diff --git a/drivers/staging/ath6kl/htc2/htc_recv.c b/drivers/staging/ath6kl/htc2/htc_recv.c
index 771dc5e217c..f70296321b7 100644
--- a/drivers/staging/ath6kl/htc2/htc_recv.c
+++ b/drivers/staging/ath6kl/htc2/htc_recv.c
@@ -69,7 +69,7 @@ static void DoRecvCompletion(struct htc_endpoint *pEndpoint,
69 pQueueToIndicate); 69 pQueueToIndicate);
70 INIT_HTC_PACKET_QUEUE(pQueueToIndicate); 70 INIT_HTC_PACKET_QUEUE(pQueueToIndicate);
71 } else { 71 } else {
72 HTC_PACKET *pPacket; 72 struct htc_packet *pPacket;
73 /* using legacy EpRecv */ 73 /* using legacy EpRecv */
74 do { 74 do {
75 pPacket = HTC_PACKET_DEQUEUE(pQueueToIndicate); 75 pPacket = HTC_PACKET_DEQUEUE(pQueueToIndicate);
@@ -227,7 +227,7 @@ static INLINE int HTCProcessTrailer(HTC_TARGET *target,
227/* process a received message (i.e. strip off header, process any trailer data) 227/* process a received message (i.e. strip off header, process any trailer data)
228 * note : locks must be released when this function is called */ 228 * note : locks must be released when this function is called */
229static int HTCProcessRecvHeader(HTC_TARGET *target, 229static int HTCProcessRecvHeader(HTC_TARGET *target,
230 HTC_PACKET *pPacket, 230 struct htc_packet *pPacket,
231 u32 *pNextLookAheads, 231 u32 *pNextLookAheads,
232 int *pNumLookAheads) 232 int *pNumLookAheads)
233{ 233{
@@ -498,7 +498,7 @@ static INLINE void DrainRecvIndicationQueue(HTC_TARGET *target, struct htc_endpo
498 /* note: this function can be called with the RX lock held */ 498 /* note: this function can be called with the RX lock held */
499static INLINE void SetRxPacketIndicationFlags(u32 LookAhead, 499static INLINE void SetRxPacketIndicationFlags(u32 LookAhead,
500 struct htc_endpoint *pEndpoint, 500 struct htc_endpoint *pEndpoint,
501 HTC_PACKET *pPacket) 501 struct htc_packet *pPacket)
502{ 502{
503 struct htc_frame_hdr *pHdr = (struct htc_frame_hdr *)&LookAhead; 503 struct htc_frame_hdr *pHdr = (struct htc_frame_hdr *)&LookAhead;
504 /* check to see if the "next" packet is from the same endpoint of the 504 /* 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 515
516/* asynchronous completion handler for recv packet fetching, when the device layer 516/* asynchronous completion handler for recv packet fetching, when the device layer
517 * completes a read request, it will call this completion handler */ 517 * completes a read request, it will call this completion handler */
518void HTCRecvCompleteHandler(void *Context, HTC_PACKET *pPacket) 518void HTCRecvCompleteHandler(void *Context, struct htc_packet *pPacket)
519{ 519{
520 HTC_TARGET *target = (HTC_TARGET *)Context; 520 HTC_TARGET *target = (HTC_TARGET *)Context;
521 struct htc_endpoint *pEndpoint; 521 struct htc_endpoint *pEndpoint;
@@ -587,11 +587,11 @@ void HTCRecvCompleteHandler(void *Context, HTC_PACKET *pPacket)
587/* synchronously wait for a control message from the target, 587/* synchronously wait for a control message from the target,
588 * This function is used at initialization time ONLY. At init messages 588 * This function is used at initialization time ONLY. At init messages
589 * on ENDPOINT 0 are expected. */ 589 * on ENDPOINT 0 are expected. */
590int HTCWaitforControlMessage(HTC_TARGET *target, HTC_PACKET **ppControlPacket) 590int HTCWaitforControlMessage(HTC_TARGET *target, struct htc_packet **ppControlPacket)
591{ 591{
592 int status; 592 int status;
593 u32 lookAhead; 593 u32 lookAhead;
594 HTC_PACKET *pPacket = NULL; 594 struct htc_packet *pPacket = NULL;
595 struct htc_frame_hdr *pHdr; 595 struct htc_frame_hdr *pHdr;
596 596
597 AR_DEBUG_PRINTF(ATH_DEBUG_RECV,("+HTCWaitforControlMessage \n")); 597 AR_DEBUG_PRINTF(ATH_DEBUG_RECV,("+HTCWaitforControlMessage \n"));
@@ -693,7 +693,7 @@ static int AllocAndPrepareRxPackets(HTC_TARGET *target,
693 HTC_PACKET_QUEUE *pQueue) 693 HTC_PACKET_QUEUE *pQueue)
694{ 694{
695 int status = 0; 695 int status = 0;
696 HTC_PACKET *pPacket; 696 struct htc_packet *pPacket;
697 struct htc_frame_hdr *pHdr; 697 struct htc_frame_hdr *pHdr;
698 int i,j; 698 int i,j;
699 int numMessages; 699 int numMessages;
@@ -882,7 +882,7 @@ static int AllocAndPrepareRxPackets(HTC_TARGET *target,
882static void HTCAsyncRecvScatterCompletion(struct hif_scatter_req *pScatterReq) 882static void HTCAsyncRecvScatterCompletion(struct hif_scatter_req *pScatterReq)
883{ 883{
884 int i; 884 int i;
885 HTC_PACKET *pPacket; 885 struct htc_packet *pPacket;
886 struct htc_endpoint *pEndpoint; 886 struct htc_endpoint *pEndpoint;
887 u32 lookAheads[HTC_HOST_MAX_MSG_PER_BUNDLE]; 887 u32 lookAheads[HTC_HOST_MAX_MSG_PER_BUNDLE];
888 int numLookAheads = 0; 888 int numLookAheads = 0;
@@ -909,7 +909,7 @@ static void HTCAsyncRecvScatterCompletion(struct hif_scatter_req *pScatterReq)
909 909
910 INIT_HTC_PACKET_QUEUE(&localRecvQueue); 910 INIT_HTC_PACKET_QUEUE(&localRecvQueue);
911 911
912 pPacket = (HTC_PACKET *)pScatterReq->ScatterList[0].pCallerContexts[0]; 912 pPacket = (struct htc_packet *)pScatterReq->ScatterList[0].pCallerContexts[0];
913 /* note: all packets in a scatter req are for the same endpoint ! */ 913 /* note: all packets in a scatter req are for the same endpoint ! */
914 pEndpoint = &target->EndPoint[pPacket->Endpoint]; 914 pEndpoint = &target->EndPoint[pPacket->Endpoint];
915 915
@@ -917,7 +917,7 @@ static void HTCAsyncRecvScatterCompletion(struct hif_scatter_req *pScatterReq)
917 /* **** NOTE: DO NOT HOLD ANY LOCKS here, HTCProcessRecvHeader can take the TX lock 917 /* **** NOTE: DO NOT HOLD ANY LOCKS here, HTCProcessRecvHeader can take the TX lock
918 * as it processes credit reports */ 918 * as it processes credit reports */
919 for (i = 0; i < pScatterReq->ValidScatterEntries; i++) { 919 for (i = 0; i < pScatterReq->ValidScatterEntries; i++) {
920 pPacket = (HTC_PACKET *)pScatterReq->ScatterList[i].pCallerContexts[0]; 920 pPacket = (struct htc_packet *)pScatterReq->ScatterList[i].pCallerContexts[0];
921 A_ASSERT(pPacket != NULL); 921 A_ASSERT(pPacket != NULL);
922 /* reset count, we are only interested in the look ahead in the last packet when we 922 /* reset count, we are only interested in the look ahead in the last packet when we
923 * break out of this loop */ 923 * break out of this loop */
@@ -994,7 +994,7 @@ static int HTCIssueRecvPacketBundle(HTC_TARGET *target,
994 struct hif_scatter_req *pScatterReq; 994 struct hif_scatter_req *pScatterReq;
995 int i, totalLength; 995 int i, totalLength;
996 int pktsToScatter; 996 int pktsToScatter;
997 HTC_PACKET *pPacket; 997 struct htc_packet *pPacket;
998 bool asyncMode = (pSyncCompletionQueue == NULL) ? true : false; 998 bool asyncMode = (pSyncCompletionQueue == NULL) ? true : false;
999 int scatterSpaceRemaining = DEV_GET_MAX_BUNDLE_RECV_LENGTH(&target->Device); 999 int scatterSpaceRemaining = DEV_GET_MAX_BUNDLE_RECV_LENGTH(&target->Device);
1000 1000
@@ -1121,7 +1121,7 @@ int HTCRecvMessagePendingHandler(void *Context, u32 MsgLookAheads[], int NumLook
1121{ 1121{
1122 HTC_TARGET *target = (HTC_TARGET *)Context; 1122 HTC_TARGET *target = (HTC_TARGET *)Context;
1123 int status = 0; 1123 int status = 0;
1124 HTC_PACKET *pPacket; 1124 struct htc_packet *pPacket;
1125 struct htc_endpoint *pEndpoint; 1125 struct htc_endpoint *pEndpoint;
1126 bool asyncProc = false; 1126 bool asyncProc = false;
1127 u32 lookAheads[HTC_HOST_MAX_MSG_PER_BUNDLE]; 1127 u32 lookAheads[HTC_HOST_MAX_MSG_PER_BUNDLE];
@@ -1391,7 +1391,7 @@ int HTCAddReceivePktMultiple(HTC_HANDLE HTCHandle, HTC_PACKET_QUEUE *pPktQueue)
1391 struct htc_endpoint *pEndpoint; 1391 struct htc_endpoint *pEndpoint;
1392 bool unblockRecv = false; 1392 bool unblockRecv = false;
1393 int status = 0; 1393 int status = 0;
1394 HTC_PACKET *pFirstPacket; 1394 struct htc_packet *pFirstPacket;
1395 1395
1396 pFirstPacket = HTC_GET_PKT_AT_HEAD(pPktQueue); 1396 pFirstPacket = HTC_GET_PKT_AT_HEAD(pPktQueue);
1397 1397
@@ -1415,7 +1415,7 @@ int HTCAddReceivePktMultiple(HTC_HANDLE HTCHandle, HTC_PACKET_QUEUE *pPktQueue)
1415 LOCK_HTC_RX(target); 1415 LOCK_HTC_RX(target);
1416 1416
1417 if (HTC_STOPPING(target)) { 1417 if (HTC_STOPPING(target)) {
1418 HTC_PACKET *pPacket; 1418 struct htc_packet *pPacket;
1419 1419
1420 UNLOCK_HTC_RX(target); 1420 UNLOCK_HTC_RX(target);
1421 1421
@@ -1455,7 +1455,7 @@ int HTCAddReceivePktMultiple(HTC_HANDLE HTCHandle, HTC_PACKET_QUEUE *pPktQueue)
1455} 1455}
1456 1456
1457/* Makes a buffer available to the HTC module */ 1457/* Makes a buffer available to the HTC module */
1458int HTCAddReceivePkt(HTC_HANDLE HTCHandle, HTC_PACKET *pPacket) 1458int HTCAddReceivePkt(HTC_HANDLE HTCHandle, struct htc_packet *pPacket)
1459{ 1459{
1460 HTC_PACKET_QUEUE queue; 1460 HTC_PACKET_QUEUE queue;
1461 INIT_HTC_PACKET_QUEUE_AND_ADD(&queue,pPacket); 1461 INIT_HTC_PACKET_QUEUE_AND_ADD(&queue,pPacket);
@@ -1488,7 +1488,7 @@ void HTCUnblockRecv(HTC_HANDLE HTCHandle)
1488 1488
1489static void HTCFlushRxQueue(HTC_TARGET *target, struct htc_endpoint *pEndpoint, HTC_PACKET_QUEUE *pQueue) 1489static void HTCFlushRxQueue(HTC_TARGET *target, struct htc_endpoint *pEndpoint, HTC_PACKET_QUEUE *pQueue)
1490{ 1490{
1491 HTC_PACKET *pPacket; 1491 struct htc_packet *pPacket;
1492 HTC_PACKET_QUEUE container; 1492 HTC_PACKET_QUEUE container;
1493 1493
1494 LOCK_HTC_RX(target); 1494 LOCK_HTC_RX(target);
diff --git a/drivers/staging/ath6kl/htc2/htc_send.c b/drivers/staging/ath6kl/htc2/htc_send.c
index b3135735bb9..8fb05d9fdbc 100644
--- a/drivers/staging/ath6kl/htc2/htc_send.c
+++ b/drivers/staging/ath6kl/htc2/htc_send.c
@@ -62,7 +62,7 @@ static void DoSendCompletion(struct htc_endpoint *pEndpoint,
62 /* all packets are now owned by the callback, reset queue to be safe */ 62 /* all packets are now owned by the callback, reset queue to be safe */
63 INIT_HTC_PACKET_QUEUE(pQueueToIndicate); 63 INIT_HTC_PACKET_QUEUE(pQueueToIndicate);
64 } else { 64 } else {
65 HTC_PACKET *pPacket; 65 struct htc_packet *pPacket;
66 /* using legacy EpTxComplete */ 66 /* using legacy EpTxComplete */
67 do { 67 do {
68 pPacket = HTC_PACKET_DEQUEUE(pQueueToIndicate); 68 pPacket = HTC_PACKET_DEQUEUE(pQueueToIndicate);
@@ -77,7 +77,7 @@ static void DoSendCompletion(struct htc_endpoint *pEndpoint,
77} 77}
78 78
79/* do final completion on sent packet */ 79/* do final completion on sent packet */
80static INLINE void CompleteSentPacket(HTC_TARGET *target, struct htc_endpoint *pEndpoint, HTC_PACKET *pPacket) 80static INLINE void CompleteSentPacket(HTC_TARGET *target, struct htc_endpoint *pEndpoint, struct htc_packet *pPacket)
81{ 81{
82 pPacket->Completion = NULL; 82 pPacket->Completion = NULL;
83 83
@@ -101,7 +101,7 @@ static INLINE void CompleteSentPacket(HTC_TARGET *target, struct htc_endpoint *p
101 101
102/* our internal send packet completion handler when packets are submited to the AR6K device 102/* our internal send packet completion handler when packets are submited to the AR6K device
103 * layer */ 103 * layer */
104static void HTCSendPktCompletionHandler(void *Context, HTC_PACKET *pPacket) 104static void HTCSendPktCompletionHandler(void *Context, struct htc_packet *pPacket)
105{ 105{
106 HTC_TARGET *target = (HTC_TARGET *)Context; 106 HTC_TARGET *target = (HTC_TARGET *)Context;
107 struct htc_endpoint *pEndpoint = &target->EndPoint[pPacket->Endpoint]; 107 struct htc_endpoint *pEndpoint = &target->EndPoint[pPacket->Endpoint];
@@ -113,7 +113,7 @@ static void HTCSendPktCompletionHandler(void *Context, HTC_PACKET *pPacket)
113 DO_EP_TX_COMPLETION(pEndpoint,&container); 113 DO_EP_TX_COMPLETION(pEndpoint,&container);
114} 114}
115 115
116int HTCIssueSend(HTC_TARGET *target, HTC_PACKET *pPacket) 116int HTCIssueSend(HTC_TARGET *target, struct htc_packet *pPacket)
117{ 117{
118 int status; 118 int status;
119 bool sync = false; 119 bool sync = false;
@@ -153,7 +153,7 @@ static INLINE void GetHTCSendPackets(HTC_TARGET *target,
153 int creditsRequired; 153 int creditsRequired;
154 int remainder; 154 int remainder;
155 u8 sendFlags; 155 u8 sendFlags;
156 HTC_PACKET *pPacket; 156 struct htc_packet *pPacket;
157 unsigned int transferLength; 157 unsigned int transferLength;
158 158
159 /****** NOTE : the TX lock is held when this function is called *****************/ 159 /****** NOTE : the TX lock is held when this function is called *****************/
@@ -267,7 +267,7 @@ static INLINE void GetHTCSendPackets(HTC_TARGET *target,
267static void HTCAsyncSendScatterCompletion(struct hif_scatter_req *pScatterReq) 267static void HTCAsyncSendScatterCompletion(struct hif_scatter_req *pScatterReq)
268{ 268{
269 int i; 269 int i;
270 HTC_PACKET *pPacket; 270 struct htc_packet *pPacket;
271 struct htc_endpoint *pEndpoint = (struct htc_endpoint *)pScatterReq->Context; 271 struct htc_endpoint *pEndpoint = (struct htc_endpoint *)pScatterReq->Context;
272 HTC_TARGET *target = (HTC_TARGET *)pEndpoint->target; 272 HTC_TARGET *target = (HTC_TARGET *)pEndpoint->target;
273 int status = 0; 273 int status = 0;
@@ -287,7 +287,7 @@ static void HTCAsyncSendScatterCompletion(struct hif_scatter_req *pScatterReq)
287 287
288 /* walk through the scatter list and process */ 288 /* walk through the scatter list and process */
289 for (i = 0; i < pScatterReq->ValidScatterEntries; i++) { 289 for (i = 0; i < pScatterReq->ValidScatterEntries; i++) {
290 pPacket = (HTC_PACKET *)(pScatterReq->ScatterList[i].pCallerContexts[0]); 290 pPacket = (struct htc_packet *)(pScatterReq->ScatterList[i].pCallerContexts[0]);
291 A_ASSERT(pPacket != NULL); 291 A_ASSERT(pPacket != NULL);
292 pPacket->Status = status; 292 pPacket->Status = status;
293 CompleteSentPacket(target,pEndpoint,pPacket); 293 CompleteSentPacket(target,pEndpoint,pPacket);
@@ -319,7 +319,7 @@ static void HTCIssueSendBundle(struct htc_endpoint *pEndpoint,
319 struct hif_scatter_req *pScatterReq = NULL; 319 struct hif_scatter_req *pScatterReq = NULL;
320 int i, packetsInScatterReq; 320 int i, packetsInScatterReq;
321 unsigned int transferLength; 321 unsigned int transferLength;
322 HTC_PACKET *pPacket; 322 struct htc_packet *pPacket;
323 bool done = false; 323 bool done = false;
324 int bundlesSent = 0; 324 int bundlesSent = 0;
325 int totalPktsInBundle = 0; 325 int totalPktsInBundle = 0;
@@ -450,7 +450,7 @@ static void HTCIssueSendBundle(struct htc_endpoint *pEndpoint,
450 if (packetsInScatterReq > 0) { 450 if (packetsInScatterReq > 0) {
451 /* work backwards to requeue requests */ 451 /* work backwards to requeue requests */
452 for (i = (packetsInScatterReq - 1); i >= 0; i--) { 452 for (i = (packetsInScatterReq - 1); i >= 0; i--) {
453 pPacket = (HTC_PACKET *)(pScatterReq->ScatterList[i].pCallerContexts[0]); 453 pPacket = (struct htc_packet *)(pScatterReq->ScatterList[i].pCallerContexts[0]);
454 if (pPacket != NULL) { 454 if (pPacket != NULL) {
455 /* undo any prep */ 455 /* undo any prep */
456 HTC_UNPREPARE_SEND_PKT(pPacket); 456 HTC_UNPREPARE_SEND_PKT(pPacket);
@@ -482,7 +482,7 @@ static HTC_SEND_QUEUE_RESULT HTCTrySend(HTC_TARGET *target,
482 HTC_PACKET_QUEUE *pCallersSendQueue) 482 HTC_PACKET_QUEUE *pCallersSendQueue)
483{ 483{
484 HTC_PACKET_QUEUE sendQueue; /* temp queue to hold packets at various stages */ 484 HTC_PACKET_QUEUE sendQueue; /* temp queue to hold packets at various stages */
485 HTC_PACKET *pPacket; 485 struct htc_packet *pPacket;
486 int bundlesSent; 486 int bundlesSent;
487 int pktsInBundles; 487 int pktsInBundles;
488 int overflow; 488 int overflow;
@@ -546,7 +546,7 @@ static HTC_SEND_QUEUE_RESULT HTCTrySend(HTC_TARGET *target,
546 546
547 /* the caller's queue has all the packets that won't fit*/ 547 /* the caller's queue has all the packets that won't fit*/
548 /* walk through the caller's queue and indicate each one to the send full handler */ 548 /* walk through the caller's queue and indicate each one to the send full handler */
549 ITERATE_OVER_LIST_ALLOW_REMOVE(&pCallersSendQueue->QueueHead, pPacket, HTC_PACKET, ListLink) { 549 ITERATE_OVER_LIST_ALLOW_REMOVE(&pCallersSendQueue->QueueHead, pPacket, struct htc_packet, ListLink) {
550 550
551 AR_DEBUG_PRINTF(ATH_DEBUG_SEND, (" Indicating overflowed TX packet: 0x%lX \n", 551 AR_DEBUG_PRINTF(ATH_DEBUG_SEND, (" Indicating overflowed TX packet: 0x%lX \n",
552 (unsigned long)pPacket)); 552 (unsigned long)pPacket));
@@ -672,7 +672,7 @@ int HTCSendPktsMultiple(HTC_HANDLE HTCHandle, HTC_PACKET_QUEUE *pPktQueue)
672{ 672{
673 HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle); 673 HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
674 struct htc_endpoint *pEndpoint; 674 struct htc_endpoint *pEndpoint;
675 HTC_PACKET *pPacket; 675 struct htc_packet *pPacket;
676 676
677 AR_DEBUG_PRINTF(ATH_DEBUG_SEND, ("+HTCSendPktsMultiple: Queue: 0x%lX, Pkts %d \n", 677 AR_DEBUG_PRINTF(ATH_DEBUG_SEND, ("+HTCSendPktsMultiple: Queue: 0x%lX, Pkts %d \n",
678 (unsigned long)pPktQueue, HTC_PACKET_QUEUE_DEPTH(pPktQueue))); 678 (unsigned long)pPktQueue, HTC_PACKET_QUEUE_DEPTH(pPktQueue)));
@@ -709,7 +709,7 @@ int HTCSendPktsMultiple(HTC_HANDLE HTCHandle, HTC_PACKET_QUEUE *pPktQueue)
709} 709}
710 710
711/* HTC API - HTCSendPkt */ 711/* HTC API - HTCSendPkt */
712int HTCSendPkt(HTC_HANDLE HTCHandle, HTC_PACKET *pPacket) 712int HTCSendPkt(HTC_HANDLE HTCHandle, struct htc_packet *pPacket)
713{ 713{
714 HTC_PACKET_QUEUE queue; 714 HTC_PACKET_QUEUE queue;
715 715
@@ -840,7 +840,7 @@ void HTCProcessCreditRpt(HTC_TARGET *target, HTC_CREDIT_REPORT *pRpt, int NumEnt
840/* flush endpoint TX queue */ 840/* flush endpoint TX queue */
841static void HTCFlushEndpointTX(HTC_TARGET *target, struct htc_endpoint *pEndpoint, HTC_TX_TAG Tag) 841static void HTCFlushEndpointTX(HTC_TARGET *target, struct htc_endpoint *pEndpoint, HTC_TX_TAG Tag)
842{ 842{
843 HTC_PACKET *pPacket; 843 struct htc_packet *pPacket;
844 HTC_PACKET_QUEUE discardQueue; 844 HTC_PACKET_QUEUE discardQueue;
845 HTC_PACKET_QUEUE container; 845 HTC_PACKET_QUEUE container;
846 846
@@ -850,7 +850,7 @@ static void HTCFlushEndpointTX(HTC_TARGET *target, struct htc_endpoint *pEndpoin
850 LOCK_HTC_TX(target); 850 LOCK_HTC_TX(target);
851 851
852 /* interate from the front of the TX queue and flush out packets */ 852 /* interate from the front of the TX queue and flush out packets */
853 ITERATE_OVER_LIST_ALLOW_REMOVE(&pEndpoint->TxQueue.QueueHead, pPacket, HTC_PACKET, ListLink) { 853 ITERATE_OVER_LIST_ALLOW_REMOVE(&pEndpoint->TxQueue.QueueHead, pPacket, struct htc_packet, ListLink) {
854 854
855 /* check for removal */ 855 /* check for removal */
856 if ((HTC_TX_PACKET_TAG_ALL == Tag) || (Tag == pPacket->PktInfo.AsTx.Tag)) { 856 if ((HTC_TX_PACKET_TAG_ALL == Tag) || (Tag == pPacket->PktInfo.AsTx.Tag)) {
diff --git a/drivers/staging/ath6kl/htc2/htc_services.c b/drivers/staging/ath6kl/htc2/htc_services.c
index 34bba7e8f41..cb0731f4586 100644
--- a/drivers/staging/ath6kl/htc2/htc_services.c
+++ b/drivers/staging/ath6kl/htc2/htc_services.c
@@ -22,7 +22,7 @@
22//============================================================================== 22//==============================================================================
23#include "htc_internal.h" 23#include "htc_internal.h"
24 24
25void HTCControlTxComplete(void *Context, HTC_PACKET *pPacket) 25void HTCControlTxComplete(void *Context, struct htc_packet *pPacket)
26{ 26{
27 /* not implemented 27 /* not implemented
28 * we do not send control TX frames during normal runtime, only during setup */ 28 * 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} 30}
31 31
32 /* callback when a control message arrives on this endpoint */ 32 /* callback when a control message arrives on this endpoint */
33void HTCControlRecv(void *Context, HTC_PACKET *pPacket) 33void HTCControlRecv(void *Context, struct htc_packet *pPacket)
34{ 34{
35 AR_DEBUG_ASSERT(pPacket->Endpoint == ENDPOINT_0); 35 AR_DEBUG_ASSERT(pPacket->Endpoint == ENDPOINT_0);
36 36
@@ -59,7 +59,7 @@ void HTCControlRecv(void *Context, HTC_PACKET *pPacket)
59 59
60int HTCSendSetupComplete(HTC_TARGET *target) 60int HTCSendSetupComplete(HTC_TARGET *target)
61{ 61{
62 HTC_PACKET *pSendPacket = NULL; 62 struct htc_packet *pSendPacket = NULL;
63 int status; 63 int status;
64 64
65 do { 65 do {
@@ -127,8 +127,8 @@ int HTCConnectService(HTC_HANDLE HTCHandle,
127{ 127{
128 HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle); 128 HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
129 int status = 0; 129 int status = 0;
130 HTC_PACKET *pRecvPacket = NULL; 130 struct htc_packet *pRecvPacket = NULL;
131 HTC_PACKET *pSendPacket = NULL; 131 struct htc_packet *pSendPacket = NULL;
132 HTC_CONNECT_SERVICE_RESPONSE_MSG *pResponseMsg; 132 HTC_CONNECT_SERVICE_RESPONSE_MSG *pResponseMsg;
133 HTC_CONNECT_SERVICE_MSG *pConnectMsg; 133 HTC_CONNECT_SERVICE_MSG *pConnectMsg;
134 HTC_ENDPOINT_ID assignedEndpoint = ENDPOINT_MAX; 134 HTC_ENDPOINT_ID assignedEndpoint = ENDPOINT_MAX;
diff --git a/drivers/staging/ath6kl/include/hci_transport_api.h b/drivers/staging/ath6kl/include/hci_transport_api.h
index ee25c6b5cfd..3eac1922183 100644
--- a/drivers/staging/ath6kl/include/hci_transport_api.h
+++ b/drivers/staging/ath6kl/include/hci_transport_api.h
@@ -43,9 +43,9 @@ typedef HTC_ENDPOINT_ID HCI_TRANSPORT_PACKET_TYPE;
43#define HCI_SET_PACKET_TYPE(pP,s) (pP)->Endpoint = (s) 43#define HCI_SET_PACKET_TYPE(pP,s) (pP)->Endpoint = (s)
44 44
45/* callback when an HCI packet was completely sent */ 45/* callback when an HCI packet was completely sent */
46typedef void (*HCI_TRANSPORT_SEND_PKT_COMPLETE)(void *, HTC_PACKET *); 46typedef void (*HCI_TRANSPORT_SEND_PKT_COMPLETE)(void *, struct htc_packet *);
47/* callback when an HCI packet is received */ 47/* callback when an HCI packet is received */
48typedef void (*HCI_TRANSPORT_RECV_PKT)(void *, HTC_PACKET *); 48typedef void (*HCI_TRANSPORT_RECV_PKT)(void *, struct htc_packet *);
49/* Optional receive buffer re-fill callback, 49/* Optional receive buffer re-fill callback,
50 * On some OSes (like Linux) packets are allocated from a global pool and indicated up 50 * On some OSes (like Linux) packets are allocated from a global pool and indicated up
51 * to the network stack. The driver never gets the packets back from the OS. For these OSes 51 * 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 * NOTE*** This callback is mutually exclusive with the the refill callback above. 68 * NOTE*** This callback is mutually exclusive with the the refill callback above.
69 * 69 *
70 * */ 70 * */
71typedef HTC_PACKET *(*HCI_TRANSPORT_RECV_ALLOC)(void *, HCI_TRANSPORT_PACKET_TYPE Type, int Length); 71typedef struct htc_packet *(*HCI_TRANSPORT_RECV_ALLOC)(void *, HCI_TRANSPORT_PACKET_TYPE Type, int Length);
72 72
73typedef enum _HCI_SEND_FULL_ACTION { 73typedef enum _HCI_SEND_FULL_ACTION {
74 HCI_SEND_FULL_KEEP = 0, /* packet that overflowed should be kept in the queue */ 74 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 77
78/* callback when an HCI send queue exceeds the caller's MaxSendQueueDepth threshold, 78/* callback when an HCI send queue exceeds the caller's MaxSendQueueDepth threshold,
79 * the callback must return the send full action to take (either DROP or KEEP) */ 79 * the callback must return the send full action to take (either DROP or KEEP) */
80typedef HCI_SEND_FULL_ACTION (*HCI_TRANSPORT_SEND_FULL)(void *, HTC_PACKET *); 80typedef HCI_SEND_FULL_ACTION (*HCI_TRANSPORT_SEND_FULL)(void *, struct htc_packet *);
81 81
82struct hci_transport_properties { 82struct hci_transport_properties {
83 int HeadRoom; /* number of bytes in front of HCI packet for header space */ 83 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 @example: 166 @example:
167 @see also: 167 @see also:
168+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ 168+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
169int HCI_TransportSendPkt(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET *pPacket, bool Synchronous); 169int HCI_TransportSendPkt(HCI_TRANSPORT_HANDLE HciTrans, struct htc_packet *pPacket, bool Synchronous);
170 170
171 171
172/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 172/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@@ -223,7 +223,7 @@ int HCI_TransportEnableDisableAsyncRecv(HCI_TRANSPORT_HANDLE HciTrans, bool E
223 @see also: HCI_TransportEnableDisableAsyncRecv 223 @see also: HCI_TransportEnableDisableAsyncRecv
224+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ 224+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
225int HCI_TransportRecvHCIEventSync(HCI_TRANSPORT_HANDLE HciTrans, 225int HCI_TransportRecvHCIEventSync(HCI_TRANSPORT_HANDLE HciTrans,
226 HTC_PACKET *pPacket, 226 struct htc_packet *pPacket,
227 int MaxPollMS); 227 int MaxPollMS);
228 228
229/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 229/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
diff --git a/drivers/staging/ath6kl/include/htc_api.h b/drivers/staging/ath6kl/include/htc_api.h
index 5878417c344..ca85bada6d5 100644
--- a/drivers/staging/ath6kl/include/htc_api.h
+++ b/drivers/staging/ath6kl/include/htc_api.h
@@ -49,7 +49,7 @@ struct htc_init_info {
49}; 49};
50 50
51/* per service connection send completion */ 51/* per service connection send completion */
52typedef void (*HTC_EP_SEND_PKT_COMPLETE)(void *,HTC_PACKET *); 52typedef void (*HTC_EP_SEND_PKT_COMPLETE)(void *,struct htc_packet *);
53/* per service connection callback when a plurality of packets have been sent 53/* per service connection callback when a plurality of packets have been sent
54 * The HTC_PACKET_QUEUE is a temporary queue object (e.g. freed on return from the callback) 54 * The HTC_PACKET_QUEUE is a temporary queue object (e.g. freed on return from the callback)
55 * to hold a list of completed send packets. 55 * to hold a list of completed send packets.
@@ -58,7 +58,7 @@ typedef void (*HTC_EP_SEND_PKT_COMPLETE)(void *,HTC_PACKET *);
58 * HTC_PACKET_ENQUEUE() */ 58 * HTC_PACKET_ENQUEUE() */
59typedef void (*HTC_EP_SEND_PKT_COMP_MULTIPLE)(void *,HTC_PACKET_QUEUE *); 59typedef void (*HTC_EP_SEND_PKT_COMP_MULTIPLE)(void *,HTC_PACKET_QUEUE *);
60/* per service connection pkt received */ 60/* per service connection pkt received */
61typedef void (*HTC_EP_RECV_PKT)(void *,HTC_PACKET *); 61typedef void (*HTC_EP_RECV_PKT)(void *,struct htc_packet *);
62/* per service connection callback when a plurality of packets are received 62/* per service connection callback when a plurality of packets are received
63 * The HTC_PACKET_QUEUE is a temporary queue object (e.g. freed on return from the callback) 63 * The HTC_PACKET_QUEUE is a temporary queue object (e.g. freed on return from the callback)
64 * to hold a list of recv packets. 64 * to hold a list of recv packets.
@@ -94,7 +94,7 @@ typedef void (*HTC_EP_RECV_REFILL)(void *, HTC_ENDPOINT_ID Endpoint);
94 * amount of "committed" memory used to receive packets. 94 * amount of "committed" memory used to receive packets.
95 * 95 *
96 * */ 96 * */
97typedef HTC_PACKET *(*HTC_EP_RECV_ALLOC)(void *, HTC_ENDPOINT_ID Endpoint, int Length); 97typedef struct htc_packet *(*HTC_EP_RECV_ALLOC)(void *, HTC_ENDPOINT_ID Endpoint, int Length);
98 98
99typedef enum _HTC_SEND_FULL_ACTION { 99typedef enum _HTC_SEND_FULL_ACTION {
100 HTC_SEND_FULL_KEEP = 0, /* packet that overflowed should be kept in the queue */ 100 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 * closed loop mechanism will prevent the network stack from overunning the NIC 114 * closed loop mechanism will prevent the network stack from overunning the NIC
115 * The packet to keep or drop is passed for inspection to the registered handler the handler 115 * The packet to keep or drop is passed for inspection to the registered handler the handler
116 * must ONLY inspect the packet, it may not free or reclaim the packet. */ 116 * must ONLY inspect the packet, it may not free or reclaim the packet. */
117typedef HTC_SEND_FULL_ACTION (*HTC_EP_SEND_QUEUE_FULL)(void *, HTC_PACKET *pPacket); 117typedef HTC_SEND_FULL_ACTION (*HTC_EP_SEND_QUEUE_FULL)(void *, struct htc_packet *pPacket);
118 118
119struct htc_ep_callbacks { 119struct htc_ep_callbacks {
120 void *pContext; /* context for each callback */ 120 void *pContext; /* context for each callback */
@@ -348,7 +348,7 @@ int HTCStart(HTC_HANDLE HTCHandle);
348 @example: 348 @example:
349 @see also: 349 @see also:
350+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ 350+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
351int HTCAddReceivePkt(HTC_HANDLE HTCHandle, HTC_PACKET *pPacket); 351int HTCAddReceivePkt(HTC_HANDLE HTCHandle, struct htc_packet *pPacket);
352/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 352/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
353 @desc: Connect to an HTC service 353 @desc: Connect to an HTC service
354 @function name: HTCConnectService 354 @function name: HTCConnectService
@@ -377,7 +377,7 @@ int HTCConnectService(HTC_HANDLE HTCHandle,
377 @example: 377 @example:
378 @see also: HTCFlushEndpoint 378 @see also: HTCFlushEndpoint
379+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ 379+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
380int HTCSendPkt(HTC_HANDLE HTCHandle, HTC_PACKET *pPacket); 380int HTCSendPkt(HTC_HANDLE HTCHandle, struct htc_packet *pPacket);
381/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 381/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
382 @desc: Stop HTC service communications 382 @desc: Stop HTC service communications
383 @function name: HTCStop 383 @function name: HTCStop
diff --git a/drivers/staging/ath6kl/include/htc_packet.h b/drivers/staging/ath6kl/include/htc_packet.h
index 9282e909fc8..4311c932b30 100644
--- a/drivers/staging/ath6kl/include/htc_packet.h
+++ b/drivers/staging/ath6kl/include/htc_packet.h
@@ -42,9 +42,9 @@ typedef enum
42 ENDPOINT_MAX, 42 ENDPOINT_MAX,
43} HTC_ENDPOINT_ID; 43} HTC_ENDPOINT_ID;
44 44
45struct _HTC_PACKET; 45struct htc_packet;
46 46
47typedef void (* HTC_PACKET_COMPLETION)(void *,struct _HTC_PACKET *); 47typedef void (* HTC_PACKET_COMPLETION)(void *,struct htc_packet *);
48 48
49typedef u16 HTC_TX_TAG; 49typedef u16 HTC_TX_TAG;
50 50
@@ -68,7 +68,7 @@ typedef struct _HTC_RX_PACKET_INFO {
68#define HTC_RX_FLAGS_INDICATE_MORE_PKTS (1 << 0) /* more packets on this endpoint are being fetched */ 68#define HTC_RX_FLAGS_INDICATE_MORE_PKTS (1 << 0) /* more packets on this endpoint are being fetched */
69 69
70/* wrapper around endpoint-specific packets */ 70/* wrapper around endpoint-specific packets */
71typedef struct _HTC_PACKET { 71struct htc_packet {
72 struct dl_list ListLink; /* double link */ 72 struct dl_list ListLink; /* double link */
73 void *pPktContext; /* caller's per packet specific context */ 73 void *pPktContext; /* caller's per packet specific context */
74 74
@@ -98,7 +98,7 @@ typedef struct _HTC_PACKET {
98 /* the following fields are for internal HTC use */ 98 /* the following fields are for internal HTC use */
99 HTC_PACKET_COMPLETION Completion; /* completion */ 99 HTC_PACKET_COMPLETION Completion; /* completion */
100 void *pContext; /* HTC private completion context */ 100 void *pContext; /* HTC private completion context */
101} HTC_PACKET; 101};
102 102
103 103
104 104
@@ -165,11 +165,11 @@ typedef struct _HTC_PACKET_QUEUE {
165/* test if a queue is empty */ 165/* test if a queue is empty */
166#define HTC_QUEUE_EMPTY(pQ) ((pQ)->Depth == 0) 166#define HTC_QUEUE_EMPTY(pQ) ((pQ)->Depth == 0)
167/* get packet at head without removing it */ 167/* get packet at head without removing it */
168static INLINE HTC_PACKET *HTC_GET_PKT_AT_HEAD(HTC_PACKET_QUEUE *queue) { 168static INLINE struct htc_packet *HTC_GET_PKT_AT_HEAD(HTC_PACKET_QUEUE *queue) {
169 if (queue->Depth == 0) { 169 if (queue->Depth == 0) {
170 return NULL; 170 return NULL;
171 } 171 }
172 return A_CONTAINING_STRUCT((DL_LIST_GET_ITEM_AT_HEAD(&queue->QueueHead)),HTC_PACKET,ListLink); 172 return A_CONTAINING_STRUCT((DL_LIST_GET_ITEM_AT_HEAD(&queue->QueueHead)),struct htc_packet,ListLink);
173} 173}
174/* remove a packet from a queue, where-ever it is in the queue */ 174/* remove a packet from a queue, where-ever it is in the queue */
175#define HTC_PACKET_REMOVE(pQ,p) \ 175#define HTC_PACKET_REMOVE(pQ,p) \
@@ -179,21 +179,21 @@ static INLINE HTC_PACKET *HTC_GET_PKT_AT_HEAD(HTC_PACKET_QUEUE *queue) {
179} 179}
180 180
181/* dequeue an HTC packet from the head of the queue */ 181/* dequeue an HTC packet from the head of the queue */
182static INLINE HTC_PACKET *HTC_PACKET_DEQUEUE(HTC_PACKET_QUEUE *queue) { 182static INLINE struct htc_packet *HTC_PACKET_DEQUEUE(HTC_PACKET_QUEUE *queue) {
183 struct dl_list *pItem = DL_ListRemoveItemFromHead(&queue->QueueHead); 183 struct dl_list *pItem = DL_ListRemoveItemFromHead(&queue->QueueHead);
184 if (pItem != NULL) { 184 if (pItem != NULL) {
185 queue->Depth--; 185 queue->Depth--;
186 return A_CONTAINING_STRUCT(pItem, HTC_PACKET, ListLink); 186 return A_CONTAINING_STRUCT(pItem, struct htc_packet, ListLink);
187 } 187 }
188 return NULL; 188 return NULL;
189} 189}
190 190
191/* dequeue an HTC packet from the tail of the queue */ 191/* dequeue an HTC packet from the tail of the queue */
192static INLINE HTC_PACKET *HTC_PACKET_DEQUEUE_TAIL(HTC_PACKET_QUEUE *queue) { 192static INLINE struct htc_packet *HTC_PACKET_DEQUEUE_TAIL(HTC_PACKET_QUEUE *queue) {
193 struct dl_list *pItem = DL_ListRemoveItemFromTail(&queue->QueueHead); 193 struct dl_list *pItem = DL_ListRemoveItemFromTail(&queue->QueueHead);
194 if (pItem != NULL) { 194 if (pItem != NULL) {
195 queue->Depth--; 195 queue->Depth--;
196 return A_CONTAINING_STRUCT(pItem, HTC_PACKET, ListLink); 196 return A_CONTAINING_STRUCT(pItem, struct htc_packet, ListLink);
197 } 197 }
198 return NULL; 198 return NULL;
199} 199}
@@ -220,7 +220,7 @@ static INLINE HTC_PACKET *HTC_PACKET_DEQUEUE_TAIL(HTC_PACKET_QUEUE *queue) {
220} 220}
221 221
222#define HTC_PACKET_QUEUE_ITERATE_ALLOW_REMOVE(pQ, pPTemp) \ 222#define HTC_PACKET_QUEUE_ITERATE_ALLOW_REMOVE(pQ, pPTemp) \
223 ITERATE_OVER_LIST_ALLOW_REMOVE(&(pQ)->QueueHead,(pPTemp), HTC_PACKET, ListLink) 223 ITERATE_OVER_LIST_ALLOW_REMOVE(&(pQ)->QueueHead,(pPTemp), struct htc_packet, ListLink)
224 224
225#define HTC_PACKET_QUEUE_ITERATE_END ITERATE_END 225#define HTC_PACKET_QUEUE_ITERATE_END ITERATE_END
226 226
diff --git a/drivers/staging/ath6kl/miscdrv/ar3kconfig.c b/drivers/staging/ath6kl/miscdrv/ar3kconfig.c
index 3e9c95ea4eb..4f18f430646 100644
--- a/drivers/staging/ath6kl/miscdrv/ar3kconfig.c
+++ b/drivers/staging/ath6kl/miscdrv/ar3kconfig.c
@@ -53,18 +53,18 @@ static int SendHCICommand(struct ar3k_config_info *pConfig,
53 u8 *pBuffer, 53 u8 *pBuffer,
54 int Length) 54 int Length)
55{ 55{
56 HTC_PACKET *pPacket = NULL; 56 struct htc_packet *pPacket = NULL;
57 int status = 0; 57 int status = 0;
58 58
59 do { 59 do {
60 60
61 pPacket = (HTC_PACKET *)A_MALLOC(sizeof(HTC_PACKET)); 61 pPacket = (struct htc_packet *)A_MALLOC(sizeof(struct htc_packet));
62 if (NULL == pPacket) { 62 if (NULL == pPacket) {
63 status = A_NO_MEMORY; 63 status = A_NO_MEMORY;
64 break; 64 break;
65 } 65 }
66 66
67 A_MEMZERO(pPacket,sizeof(HTC_PACKET)); 67 A_MEMZERO(pPacket,sizeof(struct htc_packet));
68 SET_HTC_PACKET_INFO_TX(pPacket, 68 SET_HTC_PACKET_INFO_TX(pPacket,
69 NULL, 69 NULL,
70 pBuffer, 70 pBuffer,
@@ -89,18 +89,18 @@ static int RecvHCIEvent(struct ar3k_config_info *pConfig,
89 int *pLength) 89 int *pLength)
90{ 90{
91 int status = 0; 91 int status = 0;
92 HTC_PACKET *pRecvPacket = NULL; 92 struct htc_packet *pRecvPacket = NULL;
93 93
94 do { 94 do {
95 95
96 pRecvPacket = (HTC_PACKET *)A_MALLOC(sizeof(HTC_PACKET)); 96 pRecvPacket = (struct htc_packet *)A_MALLOC(sizeof(struct htc_packet));
97 if (NULL == pRecvPacket) { 97 if (NULL == pRecvPacket) {
98 status = A_NO_MEMORY; 98 status = A_NO_MEMORY;
99 AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("Failed to alloc HTC struct \n")); 99 AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("Failed to alloc HTC struct \n"));
100 break; 100 break;
101 } 101 }
102 102
103 A_MEMZERO(pRecvPacket,sizeof(HTC_PACKET)); 103 A_MEMZERO(pRecvPacket,sizeof(struct htc_packet));
104 104
105 SET_HTC_PACKET_INFO_RX_REFILL(pRecvPacket,NULL,pBuffer,*pLength,HCI_EVENT_TYPE); 105 SET_HTC_PACKET_INFO_RX_REFILL(pRecvPacket,NULL,pBuffer,*pLength,HCI_EVENT_TYPE);
106 106
diff --git a/drivers/staging/ath6kl/os/linux/ar6000_drv.c b/drivers/staging/ath6kl/os/linux/ar6000_drv.c
index ebfe1e8b0f8..ebfc7fdb53a 100644
--- a/drivers/staging/ath6kl/os/linux/ar6000_drv.c
+++ b/drivers/staging/ath6kl/os/linux/ar6000_drv.c
@@ -313,13 +313,13 @@ int ar6000_configure_target(AR_SOFTC_T *ar);
313 313
314static void ar6000_target_failure(void *Instance, int Status); 314static void ar6000_target_failure(void *Instance, int Status);
315 315
316static void ar6000_rx(void *Context, HTC_PACKET *pPacket); 316static void ar6000_rx(void *Context, struct htc_packet *pPacket);
317 317
318static void ar6000_rx_refill(void *Context,HTC_ENDPOINT_ID Endpoint); 318static void ar6000_rx_refill(void *Context,HTC_ENDPOINT_ID Endpoint);
319 319
320static void ar6000_tx_complete(void *Context, HTC_PACKET_QUEUE *pPackets); 320static void ar6000_tx_complete(void *Context, HTC_PACKET_QUEUE *pPackets);
321 321
322static HTC_SEND_FULL_ACTION ar6000_tx_queue_full(void *Context, HTC_PACKET *pPacket); 322static HTC_SEND_FULL_ACTION ar6000_tx_queue_full(void *Context, struct htc_packet *pPacket);
323 323
324#ifdef ATH_AR6K_11N_SUPPORT 324#ifdef ATH_AR6K_11N_SUPPORT
325static void ar6000_alloc_netbufs(A_NETBUF_QUEUE_T *q, u16 num); 325static 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);
327static void ar6000_deliver_frames_to_nw_stack(void * dev, void *osbuf); 327static void ar6000_deliver_frames_to_nw_stack(void * dev, void *osbuf);
328//static void ar6000_deliver_frames_to_bt_stack(void * dev, void *osbuf); 328//static void ar6000_deliver_frames_to_bt_stack(void * dev, void *osbuf);
329 329
330static HTC_PACKET *ar6000_alloc_amsdu_rxbuf(void *Context, HTC_ENDPOINT_ID Endpoint, int Length); 330static struct htc_packet *ar6000_alloc_amsdu_rxbuf(void *Context, HTC_ENDPOINT_ID Endpoint, int Length);
331 331
332static void ar6000_refill_amsdu_rxbufs(AR_SOFTC_T *ar, int Count); 332static void ar6000_refill_amsdu_rxbufs(AR_SOFTC_T *ar, int Count);
333 333
@@ -3376,7 +3376,7 @@ applyAPTCHeuristics(AR_SOFTC_T *ar)
3376} 3376}
3377#endif /* ADAPTIVE_POWER_THROUGHPUT_CONTROL */ 3377#endif /* ADAPTIVE_POWER_THROUGHPUT_CONTROL */
3378 3378
3379static HTC_SEND_FULL_ACTION ar6000_tx_queue_full(void *Context, HTC_PACKET *pPacket) 3379static HTC_SEND_FULL_ACTION ar6000_tx_queue_full(void *Context, struct htc_packet *pPacket)
3380{ 3380{
3381 AR_SOFTC_T *ar = (AR_SOFTC_T *)Context; 3381 AR_SOFTC_T *ar = (AR_SOFTC_T *)Context;
3382 HTC_SEND_FULL_ACTION action = HTC_SEND_FULL_KEEP; 3382 HTC_SEND_FULL_ACTION action = HTC_SEND_FULL_KEEP;
@@ -3470,7 +3470,7 @@ ar6000_tx_complete(void *Context, HTC_PACKET_QUEUE *pPacketQueue)
3470 HTC_ENDPOINT_ID eid; 3470 HTC_ENDPOINT_ID eid;
3471 bool wakeEvent = false; 3471 bool wakeEvent = false;
3472 struct sk_buff_head skb_queue; 3472 struct sk_buff_head skb_queue;
3473 HTC_PACKET *pPacket; 3473 struct htc_packet *pPacket;
3474 struct sk_buff *pktSkb; 3474 struct sk_buff *pktSkb;
3475 bool flushing = false; 3475 bool flushing = false;
3476 3476
@@ -3642,7 +3642,7 @@ sta_t *ieee80211_find_conn_for_aid(AR_SOFTC_T *ar, u8 aid)
3642 */ 3642 */
3643int pktcount; 3643int pktcount;
3644static void 3644static void
3645ar6000_rx(void *Context, HTC_PACKET *pPacket) 3645ar6000_rx(void *Context, struct htc_packet *pPacket)
3646{ 3646{
3647 AR_SOFTC_T *ar = (AR_SOFTC_T *)Context; 3647 AR_SOFTC_T *ar = (AR_SOFTC_T *)Context;
3648 struct sk_buff *skb = (struct sk_buff *)pPacket->pPktContext; 3648 struct sk_buff *skb = (struct sk_buff *)pPacket->pPktContext;
@@ -3991,7 +3991,7 @@ ar6000_rx_refill(void *Context, HTC_ENDPOINT_ID Endpoint)
3991 void *osBuf; 3991 void *osBuf;
3992 int RxBuffers; 3992 int RxBuffers;
3993 int buffersToRefill; 3993 int buffersToRefill;
3994 HTC_PACKET *pPacket; 3994 struct htc_packet *pPacket;
3995 HTC_PACKET_QUEUE queue; 3995 HTC_PACKET_QUEUE queue;
3996 3996
3997 buffersToRefill = (int)AR6000_MAX_RX_BUFFERS - 3997 buffersToRefill = (int)AR6000_MAX_RX_BUFFERS -
@@ -4014,7 +4014,7 @@ ar6000_rx_refill(void *Context, HTC_ENDPOINT_ID Endpoint)
4014 } 4014 }
4015 /* the HTC packet wrapper is at the head of the reserved area 4015 /* the HTC packet wrapper is at the head of the reserved area
4016 * in the skb */ 4016 * in the skb */
4017 pPacket = (HTC_PACKET *)(A_NETBUF_HEAD(osBuf)); 4017 pPacket = (struct htc_packet *)(A_NETBUF_HEAD(osBuf));
4018 /* set re-fill info */ 4018 /* set re-fill info */
4019 SET_HTC_PACKET_INFO_RX_REFILL(pPacket,osBuf,A_NETBUF_DATA(osBuf),AR6000_BUFFER_SIZE,Endpoint); 4019 SET_HTC_PACKET_INFO_RX_REFILL(pPacket,osBuf,A_NETBUF_DATA(osBuf),AR6000_BUFFER_SIZE,Endpoint);
4020 /* add to queue */ 4020 /* add to queue */
@@ -4031,7 +4031,7 @@ ar6000_rx_refill(void *Context, HTC_ENDPOINT_ID Endpoint)
4031 /* clean up our amsdu buffer list */ 4031 /* clean up our amsdu buffer list */
4032static void ar6000_cleanup_amsdu_rxbufs(AR_SOFTC_T *ar) 4032static void ar6000_cleanup_amsdu_rxbufs(AR_SOFTC_T *ar)
4033{ 4033{
4034 HTC_PACKET *pPacket; 4034 struct htc_packet *pPacket;
4035 void *osBuf; 4035 void *osBuf;
4036 4036
4037 /* empty AMSDU buffer queue and free OS bufs */ 4037 /* empty AMSDU buffer queue and free OS bufs */
@@ -4060,7 +4060,7 @@ static void ar6000_cleanup_amsdu_rxbufs(AR_SOFTC_T *ar)
4060 /* refill the amsdu buffer list */ 4060 /* refill the amsdu buffer list */
4061static void ar6000_refill_amsdu_rxbufs(AR_SOFTC_T *ar, int Count) 4061static void ar6000_refill_amsdu_rxbufs(AR_SOFTC_T *ar, int Count)
4062{ 4062{
4063 HTC_PACKET *pPacket; 4063 struct htc_packet *pPacket;
4064 void *osBuf; 4064 void *osBuf;
4065 4065
4066 while (Count > 0) { 4066 while (Count > 0) {
@@ -4070,7 +4070,7 @@ static void ar6000_refill_amsdu_rxbufs(AR_SOFTC_T *ar, int Count)
4070 } 4070 }
4071 /* the HTC packet wrapper is at the head of the reserved area 4071 /* the HTC packet wrapper is at the head of the reserved area
4072 * in the skb */ 4072 * in the skb */
4073 pPacket = (HTC_PACKET *)(A_NETBUF_HEAD(osBuf)); 4073 pPacket = (struct htc_packet *)(A_NETBUF_HEAD(osBuf));
4074 /* set re-fill info */ 4074 /* set re-fill info */
4075 SET_HTC_PACKET_INFO_RX_REFILL(pPacket,osBuf,A_NETBUF_DATA(osBuf),AR6000_AMSDU_BUFFER_SIZE,0); 4075 SET_HTC_PACKET_INFO_RX_REFILL(pPacket,osBuf,A_NETBUF_DATA(osBuf),AR6000_AMSDU_BUFFER_SIZE,0);
4076 4076
@@ -4090,9 +4090,9 @@ static void ar6000_refill_amsdu_rxbufs(AR_SOFTC_T *ar, int Count)
4090 * keep the allocation size the same to optimize cached-slab allocations. 4090 * keep the allocation size the same to optimize cached-slab allocations.
4091 * 4091 *
4092 * */ 4092 * */
4093static HTC_PACKET *ar6000_alloc_amsdu_rxbuf(void *Context, HTC_ENDPOINT_ID Endpoint, int Length) 4093static struct htc_packet *ar6000_alloc_amsdu_rxbuf(void *Context, HTC_ENDPOINT_ID Endpoint, int Length)
4094{ 4094{
4095 HTC_PACKET *pPacket = NULL; 4095 struct htc_packet *pPacket = NULL;
4096 AR_SOFTC_T *ar = (AR_SOFTC_T *)Context; 4096 AR_SOFTC_T *ar = (AR_SOFTC_T *)Context;
4097 int refillCount = 0; 4097 int refillCount = 0;
4098 4098
diff --git a/drivers/staging/ath6kl/os/linux/ar6000_raw_if.c b/drivers/staging/ath6kl/os/linux/ar6000_raw_if.c
index 8a197ff9a36..f8637f6b447 100644
--- a/drivers/staging/ath6kl/os/linux/ar6000_raw_if.c
+++ b/drivers/staging/ath6kl/os/linux/ar6000_raw_if.c
@@ -26,7 +26,7 @@
26#ifdef HTC_RAW_INTERFACE 26#ifdef HTC_RAW_INTERFACE
27 27
28static void 28static void
29ar6000_htc_raw_read_cb(void *Context, HTC_PACKET *pPacket) 29ar6000_htc_raw_read_cb(void *Context, struct htc_packet *pPacket)
30{ 30{
31 AR_SOFTC_T *ar = (AR_SOFTC_T *)Context; 31 AR_SOFTC_T *ar = (AR_SOFTC_T *)Context;
32 raw_htc_buffer *busy; 32 raw_htc_buffer *busy;
@@ -70,7 +70,7 @@ ar6000_htc_raw_read_cb(void *Context, HTC_PACKET *pPacket)
70} 70}
71 71
72static void 72static void
73ar6000_htc_raw_write_cb(void *Context, HTC_PACKET *pPacket) 73ar6000_htc_raw_write_cb(void *Context, struct htc_packet *pPacket)
74{ 74{
75 AR_SOFTC_T *ar = (AR_SOFTC_T *)Context; 75 AR_SOFTC_T *ar = (AR_SOFTC_T *)Context;
76 raw_htc_buffer *free; 76 raw_htc_buffer *free;
diff --git a/drivers/staging/ath6kl/os/linux/export_hci_transport.c b/drivers/staging/ath6kl/os/linux/export_hci_transport.c
index 79b30ebab79..319dc2ea731 100644
--- a/drivers/staging/ath6kl/os/linux/export_hci_transport.c
+++ b/drivers/staging/ath6kl/os/linux/export_hci_transport.c
@@ -39,12 +39,12 @@
39HCI_TRANSPORT_HANDLE (*_HCI_TransportAttach)(void *HTCHandle, struct hci_transport_config_info *pInfo); 39HCI_TRANSPORT_HANDLE (*_HCI_TransportAttach)(void *HTCHandle, struct hci_transport_config_info *pInfo);
40void (*_HCI_TransportDetach)(HCI_TRANSPORT_HANDLE HciTrans); 40void (*_HCI_TransportDetach)(HCI_TRANSPORT_HANDLE HciTrans);
41int (*_HCI_TransportAddReceivePkts)(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET_QUEUE *pQueue); 41int (*_HCI_TransportAddReceivePkts)(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET_QUEUE *pQueue);
42int (*_HCI_TransportSendPkt)(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET *pPacket, bool Synchronous); 42int (*_HCI_TransportSendPkt)(HCI_TRANSPORT_HANDLE HciTrans, struct htc_packet *pPacket, bool Synchronous);
43void (*_HCI_TransportStop)(HCI_TRANSPORT_HANDLE HciTrans); 43void (*_HCI_TransportStop)(HCI_TRANSPORT_HANDLE HciTrans);
44int (*_HCI_TransportStart)(HCI_TRANSPORT_HANDLE HciTrans); 44int (*_HCI_TransportStart)(HCI_TRANSPORT_HANDLE HciTrans);
45int (*_HCI_TransportEnableDisableAsyncRecv)(HCI_TRANSPORT_HANDLE HciTrans, bool Enable); 45int (*_HCI_TransportEnableDisableAsyncRecv)(HCI_TRANSPORT_HANDLE HciTrans, bool Enable);
46int (*_HCI_TransportRecvHCIEventSync)(HCI_TRANSPORT_HANDLE HciTrans, 46int (*_HCI_TransportRecvHCIEventSync)(HCI_TRANSPORT_HANDLE HciTrans,
47 HTC_PACKET *pPacket, 47 struct htc_packet *pPacket,
48 int MaxPollMS); 48 int MaxPollMS);
49int (*_HCI_TransportSetBaudRate)(HCI_TRANSPORT_HANDLE HciTrans, u32 Baud); 49int (*_HCI_TransportSetBaudRate)(HCI_TRANSPORT_HANDLE HciTrans, u32 Baud);
50int (*_HCI_TransportEnablePowerMgmt)(HCI_TRANSPORT_HANDLE HciTrans, bool Enable); 50int (*_HCI_TransportEnablePowerMgmt)(HCI_TRANSPORT_HANDLE HciTrans, bool Enable);
diff --git a/drivers/staging/ath6kl/os/linux/hci_bridge.c b/drivers/staging/ath6kl/os/linux/hci_bridge.c
index d30ca24a1d5..4324a9d1b0e 100644
--- a/drivers/staging/ath6kl/os/linux/hci_bridge.c
+++ b/drivers/staging/ath6kl/os/linux/hci_bridge.c
@@ -139,16 +139,16 @@ static inline void FreeBtOsBuf(struct ar6k_hci_bridge_info *pHcidevInfo, void *o
139 } 139 }
140} 140}
141 141
142static void FreeHTCStruct(struct ar6k_hci_bridge_info *pHcidevInfo, HTC_PACKET *pPacket) 142static void FreeHTCStruct(struct ar6k_hci_bridge_info *pHcidevInfo, struct htc_packet *pPacket)
143{ 143{
144 LOCK_BRIDGE(pHcidevInfo); 144 LOCK_BRIDGE(pHcidevInfo);
145 HTC_PACKET_ENQUEUE(&pHcidevInfo->HTCPacketStructHead,pPacket); 145 HTC_PACKET_ENQUEUE(&pHcidevInfo->HTCPacketStructHead,pPacket);
146 UNLOCK_BRIDGE(pHcidevInfo); 146 UNLOCK_BRIDGE(pHcidevInfo);
147} 147}
148 148
149static HTC_PACKET * AllocHTCStruct(struct ar6k_hci_bridge_info *pHcidevInfo) 149static struct htc_packet * AllocHTCStruct(struct ar6k_hci_bridge_info *pHcidevInfo)
150{ 150{
151 HTC_PACKET *pPacket = NULL; 151 struct htc_packet *pPacket = NULL;
152 LOCK_BRIDGE(pHcidevInfo); 152 LOCK_BRIDGE(pHcidevInfo);
153 pPacket = HTC_PACKET_DEQUEUE(&pHcidevInfo->HTCPacketStructHead); 153 pPacket = HTC_PACKET_DEQUEUE(&pHcidevInfo->HTCPacketStructHead);
154 UNLOCK_BRIDGE(pHcidevInfo); 154 UNLOCK_BRIDGE(pHcidevInfo);
@@ -164,7 +164,7 @@ static void RefillRecvBuffers(struct ar6k_hci_bridge_info *pHcidevInfo,
164 int length, i; 164 int length, i;
165 void *osBuf = NULL; 165 void *osBuf = NULL;
166 HTC_PACKET_QUEUE queue; 166 HTC_PACKET_QUEUE queue;
167 HTC_PACKET *pPacket; 167 struct htc_packet *pPacket;
168 168
169 INIT_HTC_PACKET_QUEUE(&queue); 169 INIT_HTC_PACKET_QUEUE(&queue);
170 170
@@ -347,7 +347,7 @@ static void ar6000_hci_transport_removed(void *pContext)
347 pHcidevInfo->pHCIDev = NULL; 347 pHcidevInfo->pHCIDev = NULL;
348} 348}
349 349
350static void ar6000_hci_send_complete(void *pContext, HTC_PACKET *pPacket) 350static void ar6000_hci_send_complete(void *pContext, struct htc_packet *pPacket)
351{ 351{
352 struct ar6k_hci_bridge_info *pHcidevInfo = (struct ar6k_hci_bridge_info *)pContext; 352 struct ar6k_hci_bridge_info *pHcidevInfo = (struct ar6k_hci_bridge_info *)pContext;
353 void *osbuf = pPacket->pPktContext; 353 void *osbuf = pPacket->pPktContext;
@@ -365,7 +365,7 @@ static void ar6000_hci_send_complete(void *pContext, HTC_PACKET *pPacket)
365 365
366} 366}
367 367
368static void ar6000_hci_pkt_recv(void *pContext, HTC_PACKET *pPacket) 368static void ar6000_hci_pkt_recv(void *pContext, struct htc_packet *pPacket)
369{ 369{
370 struct ar6k_hci_bridge_info *pHcidevInfo = (struct ar6k_hci_bridge_info *)pContext; 370 struct ar6k_hci_bridge_info *pHcidevInfo = (struct ar6k_hci_bridge_info *)pContext;
371 struct sk_buff *skb; 371 struct sk_buff *skb;
@@ -447,7 +447,7 @@ static void ar6000_hci_pkt_refill(void *pContext, HCI_TRANSPORT_PACKET_TYPE Typ
447 447
448} 448}
449 449
450static HCI_SEND_FULL_ACTION ar6000_hci_pkt_send_full(void *pContext, HTC_PACKET *pPacket) 450static HCI_SEND_FULL_ACTION ar6000_hci_pkt_send_full(void *pContext, struct htc_packet *pPacket)
451{ 451{
452 struct ar6k_hci_bridge_info *pHcidevInfo = (struct ar6k_hci_bridge_info *)pContext; 452 struct ar6k_hci_bridge_info *pHcidevInfo = (struct ar6k_hci_bridge_info *)pContext;
453 HCI_SEND_FULL_ACTION action = HCI_SEND_FULL_KEEP; 453 HCI_SEND_FULL_ACTION action = HCI_SEND_FULL_KEEP;
@@ -472,7 +472,7 @@ int ar6000_setup_hci(AR_SOFTC_T *ar)
472 struct hci_transport_config_info config; 472 struct hci_transport_config_info config;
473 int status = 0; 473 int status = 0;
474 int i; 474 int i;
475 HTC_PACKET *pPacket; 475 struct htc_packet *pPacket;
476 struct ar6k_hci_bridge_info *pHcidevInfo; 476 struct ar6k_hci_bridge_info *pHcidevInfo;
477 477
478 478
@@ -509,14 +509,14 @@ int ar6000_setup_hci(AR_SOFTC_T *ar)
509 AR_DEBUG_PRINTF(ATH_DEBUG_HCI_BRIDGE, ("HCI Bridge: running in test mode... \n")); 509 AR_DEBUG_PRINTF(ATH_DEBUG_HCI_BRIDGE, ("HCI Bridge: running in test mode... \n"));
510 } 510 }
511 511
512 pHcidevInfo->pHTCStructAlloc = (u8 *)A_MALLOC((sizeof(HTC_PACKET)) * NUM_HTC_PACKET_STRUCTS); 512 pHcidevInfo->pHTCStructAlloc = (u8 *)A_MALLOC((sizeof(struct htc_packet)) * NUM_HTC_PACKET_STRUCTS);
513 513
514 if (NULL == pHcidevInfo->pHTCStructAlloc) { 514 if (NULL == pHcidevInfo->pHTCStructAlloc) {
515 status = A_NO_MEMORY; 515 status = A_NO_MEMORY;
516 break; 516 break;
517 } 517 }
518 518
519 pPacket = (HTC_PACKET *)pHcidevInfo->pHTCStructAlloc; 519 pPacket = (struct htc_packet *)pHcidevInfo->pHTCStructAlloc;
520 for (i = 0; i < NUM_HTC_PACKET_STRUCTS; i++,pPacket++) { 520 for (i = 0; i < NUM_HTC_PACKET_STRUCTS; i++,pPacket++) {
521 FreeHTCStruct(pHcidevInfo,pPacket); 521 FreeHTCStruct(pHcidevInfo,pPacket);
522 } 522 }
@@ -604,7 +604,7 @@ int hci_test_send(AR_SOFTC_T *ar, struct sk_buff *skb)
604 int status = 0; 604 int status = 0;
605 int length; 605 int length;
606 EPPING_HEADER *pHeader; 606 EPPING_HEADER *pHeader;
607 HTC_PACKET *pPacket; 607 struct htc_packet *pPacket;
608 HTC_TX_TAG htc_tag = AR6K_DATA_PKT_TAG; 608 HTC_TX_TAG htc_tag = AR6K_DATA_PKT_TAG;
609#ifdef EXPORT_HCI_BRIDGE_INTERFACE 609#ifdef EXPORT_HCI_BRIDGE_INTERFACE
610 struct ar6k_hci_bridge_info *pHcidevInfo = g_pHcidevInfo; 610 struct ar6k_hci_bridge_info *pHcidevInfo = g_pHcidevInfo;
@@ -711,7 +711,7 @@ static int bt_send_frame(struct sk_buff *skb)
711 struct hci_dev *hdev = (struct hci_dev *)skb->dev; 711 struct hci_dev *hdev = (struct hci_dev *)skb->dev;
712 HCI_TRANSPORT_PACKET_TYPE type; 712 HCI_TRANSPORT_PACKET_TYPE type;
713 struct ar6k_hci_bridge_info *pHcidevInfo; 713 struct ar6k_hci_bridge_info *pHcidevInfo;
714 HTC_PACKET *pPacket; 714 struct htc_packet *pPacket;
715 int status = 0; 715 int status = 0;
716 struct sk_buff *txSkb = NULL; 716 struct sk_buff *txSkb = NULL;
717 717
diff --git a/drivers/staging/ath6kl/os/linux/include/ar6000_drv.h b/drivers/staging/ath6kl/os/linux/include/ar6000_drv.h
index a2091338030..29ac8300c47 100644
--- a/drivers/staging/ath6kl/os/linux/include/ar6000_drv.h
+++ b/drivers/staging/ath6kl/os/linux/include/ar6000_drv.h
@@ -362,7 +362,7 @@ typedef struct {
362 int currPtr; 362 int currPtr;
363 int length; 363 int length;
364 unsigned char data[HTC_RAW_BUFFER_SIZE]; 364 unsigned char data[HTC_RAW_BUFFER_SIZE];
365 HTC_PACKET HTCPacket; 365 struct htc_packet HTCPacket;
366} raw_htc_buffer; 366} raw_htc_buffer;
367 367
368#ifdef CONFIG_HOST_TCMD_SUPPORT 368#ifdef CONFIG_HOST_TCMD_SUPPORT
@@ -410,7 +410,7 @@ struct ar_node_mapping {
410 410
411struct ar_cookie { 411struct ar_cookie {
412 unsigned long arc_bp[2]; /* Must be first field */ 412 unsigned long arc_bp[2]; /* Must be first field */
413 HTC_PACKET HtcPkt; /* HTC packet wrapper */ 413 struct htc_packet HtcPkt; /* HTC packet wrapper */
414 struct ar_cookie *arc_list_next; 414 struct ar_cookie *arc_list_next;
415}; 415};
416 416
diff --git a/drivers/staging/ath6kl/os/linux/include/export_hci_transport.h b/drivers/staging/ath6kl/os/linux/include/export_hci_transport.h
index cf66717de39..8e52de7c280 100644
--- a/drivers/staging/ath6kl/os/linux/include/export_hci_transport.h
+++ b/drivers/staging/ath6kl/os/linux/include/export_hci_transport.h
@@ -28,12 +28,12 @@
28extern HCI_TRANSPORT_HANDLE (*_HCI_TransportAttach)(void *HTCHandle, struct hci_transport_config_info *pInfo); 28extern HCI_TRANSPORT_HANDLE (*_HCI_TransportAttach)(void *HTCHandle, struct hci_transport_config_info *pInfo);
29extern void (*_HCI_TransportDetach)(HCI_TRANSPORT_HANDLE HciTrans); 29extern void (*_HCI_TransportDetach)(HCI_TRANSPORT_HANDLE HciTrans);
30extern int (*_HCI_TransportAddReceivePkts)(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET_QUEUE *pQueue); 30extern int (*_HCI_TransportAddReceivePkts)(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET_QUEUE *pQueue);
31extern int (*_HCI_TransportSendPkt)(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET *pPacket, bool Synchronous); 31extern int (*_HCI_TransportSendPkt)(HCI_TRANSPORT_HANDLE HciTrans, struct htc_packet *pPacket, bool Synchronous);
32extern void (*_HCI_TransportStop)(HCI_TRANSPORT_HANDLE HciTrans); 32extern void (*_HCI_TransportStop)(HCI_TRANSPORT_HANDLE HciTrans);
33extern int (*_HCI_TransportStart)(HCI_TRANSPORT_HANDLE HciTrans); 33extern int (*_HCI_TransportStart)(HCI_TRANSPORT_HANDLE HciTrans);
34extern int (*_HCI_TransportEnableDisableAsyncRecv)(HCI_TRANSPORT_HANDLE HciTrans, bool Enable); 34extern int (*_HCI_TransportEnableDisableAsyncRecv)(HCI_TRANSPORT_HANDLE HciTrans, bool Enable);
35extern int (*_HCI_TransportRecvHCIEventSync)(HCI_TRANSPORT_HANDLE HciTrans, 35extern int (*_HCI_TransportRecvHCIEventSync)(HCI_TRANSPORT_HANDLE HciTrans,
36 HTC_PACKET *pPacket, 36 struct htc_packet *pPacket,
37 int MaxPollMS); 37 int MaxPollMS);
38extern int (*_HCI_TransportSetBaudRate)(HCI_TRANSPORT_HANDLE HciTrans, u32 Baud); 38extern int (*_HCI_TransportSetBaudRate)(HCI_TRANSPORT_HANDLE HciTrans, u32 Baud);
39extern int (*_HCI_TransportEnablePowerMgmt)(HCI_TRANSPORT_HANDLE HciTrans, bool Enable); 39extern int (*_HCI_TransportEnablePowerMgmt)(HCI_TRANSPORT_HANDLE HciTrans, bool Enable);
diff --git a/drivers/staging/ath6kl/os/linux/netbuf.c b/drivers/staging/ath6kl/os/linux/netbuf.c
index 63acedf8e3a..a9c96b315c4 100644
--- a/drivers/staging/ath6kl/os/linux/netbuf.c
+++ b/drivers/staging/ath6kl/os/linux/netbuf.c
@@ -63,8 +63,8 @@ a_netbuf_alloc(int size)
63{ 63{
64 struct sk_buff *skb; 64 struct sk_buff *skb;
65 size += 2 * (A_GET_CACHE_LINE_BYTES()); /* add some cacheline space at front and back of buffer */ 65 size += 2 * (A_GET_CACHE_LINE_BYTES()); /* add some cacheline space at front and back of buffer */
66 skb = dev_alloc_skb(AR6000_DATA_OFFSET + sizeof(HTC_PACKET) + size); 66 skb = dev_alloc_skb(AR6000_DATA_OFFSET + sizeof(struct htc_packet) + size);
67 skb_reserve(skb, AR6000_DATA_OFFSET + sizeof(HTC_PACKET) + A_GET_CACHE_LINE_BYTES()); 67 skb_reserve(skb, AR6000_DATA_OFFSET + sizeof(struct htc_packet) + A_GET_CACHE_LINE_BYTES());
68 return ((void *)skb); 68 return ((void *)skb);
69} 69}
70 70