2011-03-14 17:59:14

by Luis R. Rodriguez

[permalink] [raw]
Subject: [PATCH 00/38] ath6kl: remove typedefs part II

Greg, here is my second cleanup series for ath6kl. This series addresses
more typedef removals. Given that I have so many and they all do the
same, and are tested I'm submitting them all in one series. I can really
split it but you can just do that yourself if you believe this is really
necessary. Either way they all go tested.

We still have some more typedefs left after this so that'll go in some
other series. This applies on top of Ilia Mirkin's submitted but not
yet merged patch titled, "staging: ath6kl: Remove NULL check before kfree"

Luis R. Rodriguez (38):
ath6kl: remove-tyepdef DL_LIST and PDL_LIST pointer
ath6kl: remove-typedef GMBOX_PROTO_HCI_UART
ath6kl: remove-typedef HCI_TRANSPORT_CALLBACKS
ath6kl: remove-typedef HCI_TRANSPORT_CONFIG_INFO
ath6kl: remove-typedef HCI_TRANSPORT_MISC_HANDLES
ath6kl: remove-typedef HCI_TRANSPORT_PROPERTIES
ath6kl: remove-typedef HIF_DEVICE_IRQ_YIELD_PARAMS
ath6kl: remove-typedef HIF_DEVICE_MBOX_INFO
ath6kl: remove-typedef HIF_DEVICE_OS_DEVICE_INFO
ath6kl: remove-typedef HIF_DEVICE_SCATTER_SUPPORT_INFO
ath6kl: remove-typedef HIF_MBOX_PROPERTIES
ath6kl: remove-typedef HIF_PENDING_EVENTS_INFO
ath6kl: remove-typedef HIF_SCATTER_ITEM
ath6kl: remove-typedef HIF_SCATTER_REQ_PRIV
ath6kl: remove-typedef HIF_SCATTER_REQ
ath6kl: remove-typedef HTC_CONTROL_BUFFER
ath6kl: remove-typedef HTC_ENDPOINT
ath6kl: remove-typedef HTC_ENDPOINT_CREDIT_DIST
ath6kl: remove-typedef HTC_ENDPOINT_STATS
ath6kl: remove-typedef HTC_EP_CALLBACKS
ath6kl: remove-typedef HTC_FRAME_HDR
ath6kl: remove-typedef HTC_INIT_INFO
ath6kl: remove-typedef HTC_PACKET
ath6kl: remove-typedef HTC_PACKET_QUEUE
ath6kl: remove-typedef HTC_RX_PACKET_INFO
ath6kl: remove-typedef HTC_SERVICE_CONNECT_REQ
ath6kl: remove-typedef HTC_SERVICE_CONNECT_RESP
ath6kl: remove-typedef HTC_TARGET
ath6kl: remove-typedef HTC_TX_PACKET_INFO
ath6kl: remove-typedef OSBUF_HOLD_Q
ath6kl: remove-typedef PSCmdPacket
ath6kl: remove-typedef RXTID
ath6kl: remove-typedef RXTID_STATS
ath6kl: remove-typedef ST_PS_DATA_FORMAT
ath6kl: remove-typedef ST_READ_STATUS
ath6kl: remove-typedef WINDOW_SNAPSHOT
ath6kl: remove-typedef AR_SOFTC_T
ath6kl: remove-typedef HIF_DEVICE

drivers/staging/ath6kl/bmi/include/bmi_internal.h | 4 +-
drivers/staging/ath6kl/bmi/src/bmi.c | 42 ++--
.../staging/ath6kl/hif/common/hif_sdio_common.h | 2 +-
.../hif/sdio/linux_sdio/include/hif_internal.h | 30 +-
.../staging/ath6kl/hif/sdio/linux_sdio/src/hif.c | 92 +++---
.../ath6kl/hif/sdio/linux_sdio/src/hif_scatter.c | 40 ++--
drivers/staging/ath6kl/htc2/AR6000/ar6k.c | 48 ++--
drivers/staging/ath6kl/htc2/AR6000/ar6k.h | 28 +-
drivers/staging/ath6kl/htc2/AR6000/ar6k_events.c | 18 +-
drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox.c | 18 +-
.../ath6kl/htc2/AR6000/ar6k_gmbox_hciuart.c | 102 ++++----
drivers/staging/ath6kl/htc2/htc.c | 60 ++--
drivers/staging/ath6kl/htc2/htc_internal.h | 84 +++---
drivers/staging/ath6kl/htc2/htc_recv.c | 142 +++++-----
drivers/staging/ath6kl/htc2/htc_send.c | 120 ++++----
drivers/staging/ath6kl/htc2/htc_services.c | 38 ++--
drivers/staging/ath6kl/include/ar3kconfig.h | 4 +-
drivers/staging/ath6kl/include/ar6000_diag.h | 12 +-
drivers/staging/ath6kl/include/bmi.h | 34 ++--
.../staging/ath6kl/include/common/epping_test.h | 2 +-
drivers/staging/ath6kl/include/common/htc.h | 8 +-
drivers/staging/ath6kl/include/common_drv.h | 28 +-
drivers/staging/ath6kl/include/dl_list.h | 26 +-
drivers/staging/ath6kl/include/hci_transport_api.h | 26 +-
drivers/staging/ath6kl/include/hif.h | 87 +++---
drivers/staging/ath6kl/include/htc_api.h | 70 +++---
drivers/staging/ath6kl/include/htc_packet.h | 46 ++--
drivers/staging/ath6kl/miscdrv/ar3kconfig.c | 12 +-
.../staging/ath6kl/miscdrv/ar3kps/ar3kpsconfig.c | 4 +-
.../staging/ath6kl/miscdrv/ar3kps/ar3kpsparser.c | 28 +-
.../staging/ath6kl/miscdrv/ar3kps/ar3kpsparser.h | 8 +-
drivers/staging/ath6kl/miscdrv/common_drv.c | 38 ++--
drivers/staging/ath6kl/miscdrv/credit_dist.c | 22 +-
drivers/staging/ath6kl/os/linux/ar6000_android.c | 2 +-
drivers/staging/ath6kl/os/linux/ar6000_drv.c | 298 ++++++++++----------
drivers/staging/ath6kl/os/linux/ar6000_pm.c | 18 +-
drivers/staging/ath6kl/os/linux/ar6000_raw_if.c | 26 +-
drivers/staging/ath6kl/os/linux/ar6k_pal.c | 12 +-
drivers/staging/ath6kl/os/linux/cfg80211.c | 50 ++--
drivers/staging/ath6kl/os/linux/eeprom.c | 6 +-
.../staging/ath6kl/os/linux/export_hci_transport.c | 22 +-
drivers/staging/ath6kl/os/linux/hci_bridge.c | 72 +++---
.../staging/ath6kl/os/linux/include/ar6000_drv.h | 48 ++--
drivers/staging/ath6kl/os/linux/include/cfg80211.h | 10 +-
.../ath6kl/os/linux/include/export_hci_transport.h | 16 +-
drivers/staging/ath6kl/os/linux/ioctl.c | 116 ++++----
drivers/staging/ath6kl/os/linux/netbuf.c | 4 +-
drivers/staging/ath6kl/os/linux/wireless_ext.c | 66 +++---
drivers/staging/ath6kl/reorder/aggr_rx_internal.h | 27 +-
drivers/staging/ath6kl/reorder/rcv_aggr.c | 42 ++--
50 files changed, 1078 insertions(+), 1080 deletions(-)

--
1.7.4.15.g7811d



2011-03-14 17:59:42

by Luis R. Rodriguez

[permalink] [raw]
Subject: [PATCH 21/38] ath6kl: remove-typedef HTC_FRAME_HDR

remove-typedef -s HTC_FRAME_HDR \
"struct htc_frame_hdr" drivers/staging/ath6kl/

Tested-by: Naveen Singh <[email protected]>
Signed-off-by: Luis R. Rodriguez <[email protected]>
---
drivers/staging/ath6kl/htc2/htc_internal.h | 12 ++++----
drivers/staging/ath6kl/htc2/htc_recv.c | 30 ++++++++++----------
.../staging/ath6kl/include/common/epping_test.h | 2 +-
drivers/staging/ath6kl/include/common/htc.h | 8 ++--
4 files changed, 26 insertions(+), 26 deletions(-)

diff --git a/drivers/staging/ath6kl/htc2/htc_internal.h b/drivers/staging/ath6kl/htc2/htc_internal.h
index d574015..deff62a 100644
--- a/drivers/staging/ath6kl/htc2/htc_internal.h
+++ b/drivers/staging/ath6kl/htc2/htc_internal.h
@@ -128,7 +128,7 @@ typedef struct _HTC_TARGET {
HTC_ENDPOINT_ID EpWaitingForBuffers;
bool TargetFailure;
#ifdef HTC_CAPTURE_LAST_FRAME
- HTC_FRAME_HDR LastFrameHdr; /* useful for debugging */
+ struct htc_frame_hdr LastFrameHdr; /* useful for debugging */
u8 LastTrailer[256];
u8 LastTrailerLength;
#endif
@@ -203,11 +203,11 @@ static INLINE HTC_PACKET *HTC_ALLOC_CONTROL_TX(HTC_TARGET *target) {
u8 *pHdrBuf; \
(pP)->pBuffer -= HTC_HDR_LENGTH; \
pHdrBuf = (pP)->pBuffer; \
- A_SET_UINT16_FIELD(pHdrBuf,HTC_FRAME_HDR,PayloadLen,(u16)(pP)->ActualLength); \
- A_SET_UINT8_FIELD(pHdrBuf,HTC_FRAME_HDR,Flags,(sendflags)); \
- A_SET_UINT8_FIELD(pHdrBuf,HTC_FRAME_HDR,EndpointID, (u8)(pP)->Endpoint); \
- A_SET_UINT8_FIELD(pHdrBuf,HTC_FRAME_HDR,ControlBytes[0], (u8)(ctrl0)); \
- A_SET_UINT8_FIELD(pHdrBuf,HTC_FRAME_HDR,ControlBytes[1], (u8)(ctrl1)); \
+ A_SET_UINT16_FIELD(pHdrBuf,struct htc_frame_hdr,PayloadLen,(u16)(pP)->ActualLength); \
+ A_SET_UINT8_FIELD(pHdrBuf,struct htc_frame_hdr,Flags,(sendflags)); \
+ A_SET_UINT8_FIELD(pHdrBuf,struct htc_frame_hdr,EndpointID, (u8)(pP)->Endpoint); \
+ A_SET_UINT8_FIELD(pHdrBuf,struct htc_frame_hdr,ControlBytes[0], (u8)(ctrl0)); \
+ A_SET_UINT8_FIELD(pHdrBuf,struct htc_frame_hdr,ControlBytes[1], (u8)(ctrl1)); \
}

#define HTC_UNPREPARE_SEND_PKT(pP) \
diff --git a/drivers/staging/ath6kl/htc2/htc_recv.c b/drivers/staging/ath6kl/htc2/htc_recv.c
index 4095f8e..771dc5e 100644
--- a/drivers/staging/ath6kl/htc2/htc_recv.c
+++ b/drivers/staging/ath6kl/htc2/htc_recv.c
@@ -252,7 +252,7 @@ static int HTCProcessRecvHeader(HTC_TARGET *target,
do {
/* note, we cannot assume the alignment of pBuffer, so we use the safe macros to
* retrieve 16 bit fields */
- payloadLen = A_GET_UINT16_FIELD(pBuf, HTC_FRAME_HDR, PayloadLen);
+ payloadLen = A_GET_UINT16_FIELD(pBuf, struct htc_frame_hdr, PayloadLen);

((u8 *)&lookAhead)[0] = pBuf[0];
((u8 *)&lookAhead)[1] = pBuf[1];
@@ -277,10 +277,10 @@ static int HTCProcessRecvHeader(HTC_TARGET *target,
break;
}

- if (pPacket->Endpoint != A_GET_UINT8_FIELD(pBuf, HTC_FRAME_HDR, EndpointID)) {
+ if (pPacket->Endpoint != A_GET_UINT8_FIELD(pBuf, struct htc_frame_hdr, EndpointID)) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,
("Refreshed HDR endpoint (%d) does not match expected endpoint (%d) \n",
- A_GET_UINT8_FIELD(pBuf, HTC_FRAME_HDR, EndpointID), pPacket->Endpoint));
+ A_GET_UINT8_FIELD(pBuf, struct htc_frame_hdr, EndpointID), pPacket->Endpoint));
status = A_EPROTO;
break;
}
@@ -294,9 +294,9 @@ static int HTCProcessRecvHeader(HTC_TARGET *target,
(unsigned long)pPacket, pPacket->PktInfo.AsRx.HTCRxFlags));
#ifdef ATH_DEBUG_MODULE
DebugDumpBytes((u8 *)&pPacket->PktInfo.AsRx.ExpectedHdr,4,"Expected Message LookAhead");
- DebugDumpBytes(pBuf,sizeof(HTC_FRAME_HDR),"Current Frame Header");
+ DebugDumpBytes(pBuf,sizeof(struct htc_frame_hdr),"Current Frame Header");
#ifdef HTC_CAPTURE_LAST_FRAME
- DebugDumpBytes((u8 *)&target->LastFrameHdr,sizeof(HTC_FRAME_HDR),"Last Frame Header");
+ DebugDumpBytes((u8 *)&target->LastFrameHdr,sizeof(struct htc_frame_hdr),"Last Frame Header");
if (target->LastTrailerLength != 0) {
DebugDumpBytes(target->LastTrailer,
target->LastTrailerLength,
@@ -309,13 +309,13 @@ static int HTCProcessRecvHeader(HTC_TARGET *target,
}

/* get flags */
- temp = A_GET_UINT8_FIELD(pBuf, HTC_FRAME_HDR, Flags);
+ temp = A_GET_UINT8_FIELD(pBuf, struct htc_frame_hdr, Flags);

if (temp & HTC_FLAGS_RECV_TRAILER) {
/* this packet has a trailer */

/* extract the trailer length in control byte 0 */
- temp = A_GET_UINT8_FIELD(pBuf, HTC_FRAME_HDR, ControlBytes[0]);
+ temp = A_GET_UINT8_FIELD(pBuf, struct htc_frame_hdr, ControlBytes[0]);

if ((temp < sizeof(HTC_RECORD_HDR)) || (temp > payloadLen)) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,
@@ -372,7 +372,7 @@ static int HTCProcessRecvHeader(HTC_TARGET *target,
#endif
} else {
#ifdef HTC_CAPTURE_LAST_FRAME
- memcpy(&target->LastFrameHdr,pBuf,sizeof(HTC_FRAME_HDR));
+ memcpy(&target->LastFrameHdr,pBuf,sizeof(struct htc_frame_hdr));
#endif
if (AR_DEBUG_LVL_CHECK(ATH_DEBUG_RECV)) {
if (pPacket->ActualLength > 0) {
@@ -500,7 +500,7 @@ static INLINE void SetRxPacketIndicationFlags(u32 LookAhead,
struct htc_endpoint *pEndpoint,
HTC_PACKET *pPacket)
{
- HTC_FRAME_HDR *pHdr = (HTC_FRAME_HDR *)&LookAhead;
+ struct htc_frame_hdr *pHdr = (struct htc_frame_hdr *)&LookAhead;
/* check to see if the "next" packet is from the same endpoint of the
completing packet */
if (pHdr->EndpointID == pPacket->Endpoint) {
@@ -592,7 +592,7 @@ int HTCWaitforControlMessage(HTC_TARGET *target, HTC_PACKET **ppControlPacket)
int status;
u32 lookAhead;
HTC_PACKET *pPacket = NULL;
- HTC_FRAME_HDR *pHdr;
+ struct htc_frame_hdr *pHdr;

AR_DEBUG_PRINTF(ATH_DEBUG_RECV,("+HTCWaitforControlMessage \n"));

@@ -613,7 +613,7 @@ int HTCWaitforControlMessage(HTC_TARGET *target, HTC_PACKET **ppControlPacket)
("HTCWaitforControlMessage : lookAhead : 0x%X \n", lookAhead));

/* check the lookahead */
- pHdr = (HTC_FRAME_HDR *)&lookAhead;
+ pHdr = (struct htc_frame_hdr *)&lookAhead;

if (pHdr->EndpointID != ENDPOINT_0) {
/* unexpected endpoint number, should be zero */
@@ -694,7 +694,7 @@ static int AllocAndPrepareRxPackets(HTC_TARGET *target,
{
int status = 0;
HTC_PACKET *pPacket;
- HTC_FRAME_HDR *pHdr;
+ struct htc_frame_hdr *pHdr;
int i,j;
int numMessages;
int fullLength;
@@ -705,7 +705,7 @@ static int AllocAndPrepareRxPackets(HTC_TARGET *target,

for (i = 0; i < Messages; i++) {

- pHdr = (HTC_FRAME_HDR *)&LookAheads[i];
+ pHdr = (struct htc_frame_hdr *)&LookAheads[i];

if (pHdr->EndpointID >= ENDPOINT_MAX) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("Invalid Endpoint in look-ahead: %d \n",pHdr->EndpointID));
@@ -751,7 +751,7 @@ static int AllocAndPrepareRxPackets(HTC_TARGET *target,
("HTC header indicates :%d messages can be fetched as a bundle \n",numMessages));
}

- fullLength = DEV_CALC_RECV_PADDED_LEN(&target->Device,pHdr->PayloadLen + sizeof(HTC_FRAME_HDR));
+ fullLength = DEV_CALC_RECV_PADDED_LEN(&target->Device,pHdr->PayloadLen + sizeof(struct htc_frame_hdr));

/* get packet buffers for each message, if there was a bundle detected in the header,
* use pHdr as a template to fetch all packets in the bundle */
@@ -1170,7 +1170,7 @@ int HTCRecvMessagePendingHandler(void *Context, u32 MsgLookAheads[], int NumLook
}

/* first lookahead sets the expected endpoint IDs for all packets in a bundle */
- id = ((HTC_FRAME_HDR *)&lookAheads[0])->EndpointID;
+ id = ((struct htc_frame_hdr *)&lookAheads[0])->EndpointID;
pEndpoint = &target->EndPoint[id];

if (id >= ENDPOINT_MAX) {
diff --git a/drivers/staging/ath6kl/include/common/epping_test.h b/drivers/staging/ath6kl/include/common/epping_test.h
index 2cd43c4..5c40d8a 100644
--- a/drivers/staging/ath6kl/include/common/epping_test.h
+++ b/drivers/staging/ath6kl/include/common/epping_test.h
@@ -30,7 +30,7 @@
#endif

/* alignment to 4-bytes */
-#define EPPING_ALIGNMENT_PAD (((sizeof(HTC_FRAME_HDR) + 3) & (~0x3)) - sizeof(HTC_FRAME_HDR))
+#define EPPING_ALIGNMENT_PAD (((sizeof(struct htc_frame_hdr) + 3) & (~0x3)) - sizeof(struct htc_frame_hdr))

#ifndef A_OFFSETOF
#define A_OFFSETOF(type,field) (int)(&(((type *)NULL)->field))
diff --git a/drivers/staging/ath6kl/include/common/htc.h b/drivers/staging/ath6kl/include/common/htc.h
index bed8e26..b9d4495 100644
--- a/drivers/staging/ath6kl/include/common/htc.h
+++ b/drivers/staging/ath6kl/include/common/htc.h
@@ -66,7 +66,7 @@
*/

/* HTC frame header */
-typedef PREPACK struct _HTC_FRAME_HDR{
+PREPACK struct htc_frame_hdr {
/* do not remove or re-arrange these fields, these are minimally required
* to take advantage of 4-byte lookaheads in some hardware implementations */
u8 EndpointID;
@@ -79,7 +79,7 @@ typedef PREPACK struct _HTC_FRAME_HDR{

/* message payload starts after the header */

-} POSTPACK HTC_FRAME_HDR;
+} POSTPACK;

/* frame header flags */

@@ -94,9 +94,9 @@ typedef PREPACK struct _HTC_FRAME_HDR{
#define HTC_FLAGS_RECV_BUNDLE_CNT_MASK (0xF0) /* bits 7..4 */
#define HTC_FLAGS_RECV_BUNDLE_CNT_SHIFT 4

-#define HTC_HDR_LENGTH (sizeof(HTC_FRAME_HDR))
+#define HTC_HDR_LENGTH (sizeof(struct htc_frame_hdr))
#define HTC_MAX_TRAILER_LENGTH 255
-#define HTC_MAX_PAYLOAD_LENGTH (4096 - sizeof(HTC_FRAME_HDR))
+#define HTC_MAX_PAYLOAD_LENGTH (4096 - sizeof(struct htc_frame_hdr))

/* HTC control message IDs */

--
1.7.4.15.g7811d


2011-03-14 17:59:45

by Luis R. Rodriguez

[permalink] [raw]
Subject: [PATCH 22/38] ath6kl: remove-typedef HTC_INIT_INFO

remove-typedef -s HTC_INIT_INFO \
"struct htc_init_info" drivers/staging/ath6kl/

Tested-by: Naveen Singh <[email protected]>
Signed-off-by: Luis R. Rodriguez <[email protected]>
---
drivers/staging/ath6kl/htc2/htc.c | 4 ++--
drivers/staging/ath6kl/htc2/htc_internal.h | 2 +-
drivers/staging/ath6kl/include/htc_api.h | 6 +++---
drivers/staging/ath6kl/os/linux/ar6000_drv.c | 2 +-
4 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/ath6kl/htc2/htc.c b/drivers/staging/ath6kl/htc2/htc.c
index 2a065b4..810fe7b 100644
--- a/drivers/staging/ath6kl/htc2/htc.c
+++ b/drivers/staging/ath6kl/htc2/htc.c
@@ -90,7 +90,7 @@ static void HTCCleanup(HTC_TARGET *target)
}

/* registered target arrival callback from the HIF layer */
-HTC_HANDLE HTCCreate(void *hif_handle, HTC_INIT_INFO *pInfo)
+HTC_HANDLE HTCCreate(void *hif_handle, struct htc_init_info *pInfo)
{
HTC_TARGET *target = NULL;
int status = 0;
@@ -130,7 +130,7 @@ HTC_HANDLE HTCCreate(void *hif_handle, HTC_INIT_INFO *pInfo)
target->Device.MessagePendingCallback = HTCRecvMessagePendingHandler;
target->EpWaitingForBuffers = ENDPOINT_MAX;

- memcpy(&target->HTCInitInfo,pInfo,sizeof(HTC_INIT_INFO));
+ memcpy(&target->HTCInitInfo,pInfo,sizeof(struct htc_init_info));

ResetEndpointStates(target);

diff --git a/drivers/staging/ath6kl/htc2/htc_internal.h b/drivers/staging/ath6kl/htc2/htc_internal.h
index deff62a..c5727ca 100644
--- a/drivers/staging/ath6kl/htc2/htc_internal.h
+++ b/drivers/staging/ath6kl/htc2/htc_internal.h
@@ -132,7 +132,7 @@ typedef struct _HTC_TARGET {
u8 LastTrailer[256];
u8 LastTrailerLength;
#endif
- HTC_INIT_INFO HTCInitInfo;
+ struct htc_init_info HTCInitInfo;
u8 HTCTargetVersion;
int MaxMsgPerBundle; /* max messages per bundle for HTC */
bool SendBundlingEnabled; /* run time enable for send bundling (dynamic) */
diff --git a/drivers/staging/ath6kl/include/htc_api.h b/drivers/staging/ath6kl/include/htc_api.h
index ad25d3e..5878417 100644
--- a/drivers/staging/ath6kl/include/htc_api.h
+++ b/drivers/staging/ath6kl/include/htc_api.h
@@ -43,10 +43,10 @@ typedef void *HTC_HANDLE;

typedef u16 HTC_SERVICE_ID;

-typedef struct _HTC_INIT_INFO {
+struct htc_init_info {
void *pContext; /* context for target failure notification */
void (*TargetFailure)(void *Instance, int Status);
-} HTC_INIT_INFO;
+};

/* per service connection send completion */
typedef void (*HTC_EP_SEND_PKT_COMPLETE)(void *,HTC_PACKET *);
@@ -269,7 +269,7 @@ struct htc_endpoint_stats {
@example:
@see also: HTCDestroy
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-HTC_HANDLE HTCCreate(void *HifDevice, HTC_INIT_INFO *pInfo);
+HTC_HANDLE HTCCreate(void *HifDevice, struct htc_init_info *pInfo);
/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@desc: Get the underlying HIF device handle
@function name: HTCGetHifDevice
diff --git a/drivers/staging/ath6kl/os/linux/ar6000_drv.c b/drivers/staging/ath6kl/os/linux/ar6000_drv.c
index b739943..ebfe1e8 100644
--- a/drivers/staging/ath6kl/os/linux/ar6000_drv.c
+++ b/drivers/staging/ath6kl/os/linux/ar6000_drv.c
@@ -1599,7 +1599,7 @@ ar6000_avail_ev(void *context, void *hif_handle)
void *ar_netif;
AR_SOFTC_T *ar;
int device_index = 0;
- HTC_INIT_INFO htcInfo;
+ struct htc_init_info htcInfo;
#ifdef ATH6K_CONFIG_CFG80211
struct wireless_dev *wdev;
#endif /* ATH6K_CONFIG_CFG80211 */
--
1.7.4.15.g7811d


2011-03-14 18:11:10

by Luis R. Rodriguez

[permalink] [raw]
Subject: [PATCH 36/38] ath6kl: remove-typedef WINDOW_SNAPSHOT

remove-typedef -s WINDOW_SNAPSHOT \
"struct window_snapshot" drivers/staging/ath6kl/

Tested-by: Naveen Singh <[email protected]>
Signed-off-by: Luis R. Rodriguez <[email protected]>
---
drivers/staging/ath6kl/reorder/aggr_rx_internal.h | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/ath6kl/reorder/aggr_rx_internal.h b/drivers/staging/ath6kl/reorder/aggr_rx_internal.h
index becbab9..1112596 100644
--- a/drivers/staging/ath6kl/reorder/aggr_rx_internal.h
+++ b/drivers/staging/ath6kl/reorder/aggr_rx_internal.h
@@ -67,10 +67,11 @@ struct osbuf_hold_q {


#if 0
-typedef struct {
+/* XXX: unused ? */
+struct window_snapshot {
u16 seqno_st;
u16 seqno_end;
-}WINDOW_SNAPSHOT;
+};
#endif

struct rxtid {
@@ -82,7 +83,7 @@ struct rxtid {
u32 hold_q_sz; /* Num of frames that can be held in hold q */
struct osbuf_hold_q *hold_q; /* Hold q for re-order */
#if 0
- WINDOW_SNAPSHOT old_win; /* Sliding window snapshot - for timeout */
+ struct window_snapshot old_win; /* Sliding window snapshot - for timeout */
#endif
A_NETBUF_QUEUE_T q; /* q head for enqueuing frames for dispatch */
A_MUTEX_T lock;
--
1.7.4.15.g7811d


2011-03-14 18:14:01

by Luis R. Rodriguez

[permalink] [raw]
Subject: [PATCH 38/38] ath6kl: remove-typedef HIF_DEVICE

remove-typedef -s HIF_DEVICE \
"struct hif_device" drivers/staging/ath6kl/

Tested-by: Naveen Singh <[email protected]>
Signed-off-by: Luis R. Rodriguez <[email protected]>
---
drivers/staging/ath6kl/bmi/include/bmi_internal.h | 4 +-
drivers/staging/ath6kl/bmi/src/bmi.c | 40 +++++-----
.../hif/sdio/linux_sdio/include/hif_internal.h | 18 ++--
.../staging/ath6kl/hif/sdio/linux_sdio/src/hif.c | 84 ++++++++++----------
.../ath6kl/hif/sdio/linux_sdio/src/hif_scatter.c | 12 ++--
drivers/staging/ath6kl/htc2/AR6000/ar6k.c | 10 +-
.../ath6kl/htc2/AR6000/ar6k_gmbox_hciuart.c | 2 +-
drivers/staging/ath6kl/include/ar3kconfig.h | 2 +-
drivers/staging/ath6kl/include/ar6000_diag.h | 12 ++--
drivers/staging/ath6kl/include/bmi.h | 34 ++++----
drivers/staging/ath6kl/include/common_drv.h | 18 ++--
drivers/staging/ath6kl/include/hif.h | 34 ++++----
drivers/staging/ath6kl/miscdrv/common_drv.c | 38 +++++-----
drivers/staging/ath6kl/os/linux/eeprom.c | 6 +-
.../staging/ath6kl/os/linux/export_hci_transport.c | 6 +-
drivers/staging/ath6kl/os/linux/hci_bridge.c | 4 +-
.../staging/ath6kl/os/linux/include/ar6000_drv.h | 4 +-
.../ath6kl/os/linux/include/export_hci_transport.h | 6 +-
drivers/staging/ath6kl/os/linux/ioctl.c | 2 +-
19 files changed, 168 insertions(+), 168 deletions(-)

diff --git a/drivers/staging/ath6kl/bmi/include/bmi_internal.h b/drivers/staging/ath6kl/bmi/include/bmi_internal.h
index e13fb01..6ae2ea7 100644
--- a/drivers/staging/ath6kl/bmi/include/bmi_internal.h
+++ b/drivers/staging/ath6kl/bmi/include/bmi_internal.h
@@ -42,12 +42,12 @@
static bool bmiDone;

int
-bmiBufferSend(HIF_DEVICE *device,
+bmiBufferSend(struct hif_device *device,
u8 *buffer,
u32 length);

int
-bmiBufferReceive(HIF_DEVICE *device,
+bmiBufferReceive(struct hif_device *device,
u8 *buffer,
u32 length,
bool want_timeout);
diff --git a/drivers/staging/ath6kl/bmi/src/bmi.c b/drivers/staging/ath6kl/bmi/src/bmi.c
index 34d1bef..9268bf3 100644
--- a/drivers/staging/ath6kl/bmi/src/bmi.c
+++ b/drivers/staging/ath6kl/bmi/src/bmi.c
@@ -106,7 +106,7 @@ BMICleanup(void)
}

int
-BMIDone(HIF_DEVICE *device)
+BMIDone(struct hif_device *device)
{
int status;
u32 cid;
@@ -142,7 +142,7 @@ BMIDone(HIF_DEVICE *device)
}

int
-BMIGetTargetInfo(HIF_DEVICE *device, struct bmi_target_info *targ_info)
+BMIGetTargetInfo(struct hif_device *device, struct bmi_target_info *targ_info)
{
int status;
u32 cid;
@@ -201,7 +201,7 @@ BMIGetTargetInfo(HIF_DEVICE *device, struct bmi_target_info *targ_info)
}

int
-BMIReadMemory(HIF_DEVICE *device,
+BMIReadMemory(struct hif_device *device,
u32 address,
u8 *buffer,
u32 length)
@@ -257,7 +257,7 @@ BMIReadMemory(HIF_DEVICE *device,
}

int
-BMIWriteMemory(HIF_DEVICE *device,
+BMIWriteMemory(struct hif_device *device,
u32 address,
u8 *buffer,
u32 length)
@@ -322,7 +322,7 @@ BMIWriteMemory(HIF_DEVICE *device,
}

int
-BMIExecute(HIF_DEVICE *device,
+BMIExecute(struct hif_device *device,
u32 address,
u32 *param)
{
@@ -370,7 +370,7 @@ BMIExecute(HIF_DEVICE *device,
}

int
-BMISetAppStart(HIF_DEVICE *device,
+BMISetAppStart(struct hif_device *device,
u32 address)
{
u32 cid;
@@ -407,7 +407,7 @@ BMISetAppStart(HIF_DEVICE *device,
}

int
-BMIReadSOCRegister(HIF_DEVICE *device,
+BMIReadSOCRegister(struct hif_device *device,
u32 address,
u32 *param)
{
@@ -453,7 +453,7 @@ BMIReadSOCRegister(HIF_DEVICE *device,
}

int
-BMIWriteSOCRegister(HIF_DEVICE *device,
+BMIWriteSOCRegister(struct hif_device *device,
u32 address,
u32 param)
{
@@ -493,7 +493,7 @@ BMIWriteSOCRegister(HIF_DEVICE *device,
}

int
-BMIrompatchInstall(HIF_DEVICE *device,
+BMIrompatchInstall(struct hif_device *device,
u32 ROM_addr,
u32 RAM_addr,
u32 nbytes,
@@ -549,7 +549,7 @@ BMIrompatchInstall(HIF_DEVICE *device,
}

int
-BMIrompatchUninstall(HIF_DEVICE *device,
+BMIrompatchUninstall(struct hif_device *device,
u32 rompatch_id)
{
u32 cid;
@@ -586,7 +586,7 @@ BMIrompatchUninstall(HIF_DEVICE *device,
}

static int
-_BMIrompatchChangeActivation(HIF_DEVICE *device,
+_BMIrompatchChangeActivation(struct hif_device *device,
u32 rompatch_count,
u32 *rompatch_list,
u32 do_activate)
@@ -630,7 +630,7 @@ _BMIrompatchChangeActivation(HIF_DEVICE *device,
}

int
-BMIrompatchActivate(HIF_DEVICE *device,
+BMIrompatchActivate(struct hif_device *device,
u32 rompatch_count,
u32 *rompatch_list)
{
@@ -638,7 +638,7 @@ BMIrompatchActivate(HIF_DEVICE *device,
}

int
-BMIrompatchDeactivate(HIF_DEVICE *device,
+BMIrompatchDeactivate(struct hif_device *device,
u32 rompatch_count,
u32 *rompatch_list)
{
@@ -646,7 +646,7 @@ BMIrompatchDeactivate(HIF_DEVICE *device,
}

int
-BMILZData(HIF_DEVICE *device,
+BMILZData(struct hif_device *device,
u8 *buffer,
u32 length)
{
@@ -696,7 +696,7 @@ BMILZData(HIF_DEVICE *device,
}

int
-BMILZStreamStart(HIF_DEVICE *device,
+BMILZStreamStart(struct hif_device *device,
u32 address)
{
u32 cid;
@@ -734,7 +734,7 @@ BMILZStreamStart(HIF_DEVICE *device,

/* BMI Access routines */
int
-bmiBufferSend(HIF_DEVICE *device,
+bmiBufferSend(struct hif_device *device,
u8 *buffer,
u32 length)
{
@@ -782,7 +782,7 @@ bmiBufferSend(HIF_DEVICE *device,
}

int
-bmiBufferReceive(HIF_DEVICE *device,
+bmiBufferReceive(struct hif_device *device,
u8 *buffer,
u32 length,
bool want_timeout)
@@ -958,7 +958,7 @@ bmiBufferReceive(HIF_DEVICE *device,
}

int
-BMIFastDownload(HIF_DEVICE *device, u32 address, u8 *buffer, u32 length)
+BMIFastDownload(struct hif_device *device, u32 address, u8 *buffer, u32 length)
{
int status = A_ERROR;
u32 lastWord = 0;
@@ -998,13 +998,13 @@ BMIFastDownload(HIF_DEVICE *device, u32 address, u8 *buffer, u32 length)
}

int
-BMIRawWrite(HIF_DEVICE *device, u8 *buffer, u32 length)
+BMIRawWrite(struct hif_device *device, u8 *buffer, u32 length)
{
return bmiBufferSend(device, buffer, length);
}

int
-BMIRawRead(HIF_DEVICE *device, u8 *buffer, u32 length, bool want_timeout)
+BMIRawRead(struct hif_device *device, u8 *buffer, u32 length, bool want_timeout)
{
return bmiBufferReceive(device, buffer, length, want_timeout);
}
diff --git a/drivers/staging/ath6kl/hif/sdio/linux_sdio/include/hif_internal.h b/drivers/staging/ath6kl/hif/sdio/linux_sdio/include/hif_internal.h
index 04fc284..6341560 100644
--- a/drivers/staging/ath6kl/hif/sdio/linux_sdio/include/hif_internal.h
+++ b/drivers/staging/ath6kl/hif/sdio/linux_sdio/include/hif_internal.h
@@ -88,9 +88,9 @@ struct hif_device {
#define CMD53_FIXED_ADDRESS 1
#define CMD53_INCR_ADDRESS 2

-BUS_REQUEST *hifAllocateBusRequest(HIF_DEVICE *device);
-void hifFreeBusRequest(HIF_DEVICE *device, BUS_REQUEST *busrequest);
-void AddToAsyncList(HIF_DEVICE *device, BUS_REQUEST *busrequest);
+BUS_REQUEST *hifAllocateBusRequest(struct hif_device *device);
+void hifFreeBusRequest(struct hif_device *device, BUS_REQUEST *busrequest);
+void AddToAsyncList(struct hif_device *device, BUS_REQUEST *busrequest);

#ifdef HIF_LINUX_MMC_SCATTER_SUPPORT

@@ -100,7 +100,7 @@ void AddToAsyncList(HIF_DEVICE *device, BUS_REQUEST *busrequest);

struct hif_scatter_req_priv {
struct hif_scatter_req *pHifScatterReq; /* HIF scatter request with allocated entries */
- HIF_DEVICE *device; /* this device */
+ struct hif_device *device; /* this device */
BUS_REQUEST *busrequest; /* request associated with request */
/* scatter list for linux */
struct scatterlist sgentries[MAX_SCATTER_ENTRIES_PER_REQ];
@@ -108,18 +108,18 @@ struct hif_scatter_req_priv {

#define ATH_DEBUG_SCATTER ATH_DEBUG_MAKE_MODULE_MASK(0)

-int SetupHIFScatterSupport(HIF_DEVICE *device, struct hif_device_scatter_support_info *pInfo);
-void CleanupHIFScatterResources(HIF_DEVICE *device);
-int DoHifReadWriteScatter(HIF_DEVICE *device, BUS_REQUEST *busrequest);
+int SetupHIFScatterSupport(struct hif_device *device, struct hif_device_scatter_support_info *pInfo);
+void CleanupHIFScatterResources(struct hif_device *device);
+int DoHifReadWriteScatter(struct hif_device *device, BUS_REQUEST *busrequest);

#else // HIF_LINUX_MMC_SCATTER_SUPPORT

-static inline int SetupHIFScatterSupport(HIF_DEVICE *device, struct hif_device_scatter_support_info *pInfo)
+static inline int SetupHIFScatterSupport(struct hif_device *device, struct hif_device_scatter_support_info *pInfo)
{
return A_ENOTSUP;
}

-static inline int DoHifReadWriteScatter(HIF_DEVICE *device, BUS_REQUEST *busrequest)
+static inline int DoHifReadWriteScatter(struct hif_device *device, BUS_REQUEST *busrequest)
{
return A_ENOTSUP;
}
diff --git a/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif.c b/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif.c
index 9c9fb1e..e6d9cd8 100644
--- a/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif.c
+++ b/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif.c
@@ -58,9 +58,9 @@ static int hifDeviceResume(struct device *dev);
#endif /* CONFIG_PM */
static int hifDeviceInserted(struct sdio_func *func, const struct sdio_device_id *id);
static void hifDeviceRemoved(struct sdio_func *func);
-static HIF_DEVICE *addHifDevice(struct sdio_func *func);
-static HIF_DEVICE *getHifDevice(struct sdio_func *func);
-static void delHifDevice(HIF_DEVICE * device);
+static struct hif_device *addHifDevice(struct sdio_func *func);
+static struct hif_device *getHifDevice(struct sdio_func *func);
+static void delHifDevice(struct hif_device * device);
static int Func0_CMD52WriteByte(struct mmc_card *card, unsigned int address, unsigned char byte);
static int Func0_CMD52ReadByte(struct mmc_card *card, unsigned int address, unsigned char *byte);

@@ -107,8 +107,8 @@ extern u32 busspeedlow;
extern u32 debughif;

static void ResetAllCards(void);
-static int hifDisableFunc(HIF_DEVICE *device, struct sdio_func *func);
-static int hifEnableFunc(HIF_DEVICE *device, struct sdio_func *func);
+static int hifDisableFunc(struct hif_device *device, struct sdio_func *func);
+static int hifEnableFunc(struct hif_device *device, struct sdio_func *func);

#ifdef DEBUG

@@ -153,7 +153,7 @@ int HIFInit(OSDRV_CALLBACKS *callbacks)
}

static int
-__HIFReadWrite(HIF_DEVICE *device,
+__HIFReadWrite(struct hif_device *device,
u32 address,
u8 *buffer,
u32 length,
@@ -304,7 +304,7 @@ __HIFReadWrite(HIF_DEVICE *device,
return status;
}

-void AddToAsyncList(HIF_DEVICE *device, BUS_REQUEST *busrequest)
+void AddToAsyncList(struct hif_device *device, BUS_REQUEST *busrequest)
{
unsigned long flags;
BUS_REQUEST *async;
@@ -330,7 +330,7 @@ void AddToAsyncList(HIF_DEVICE *device, BUS_REQUEST *busrequest)

/* queue a read/write request */
int
-HIFReadWrite(HIF_DEVICE *device,
+HIFReadWrite(struct hif_device *device,
u32 address,
u8 *buffer,
u32 length,
@@ -400,12 +400,12 @@ HIFReadWrite(HIF_DEVICE *device,
/* thread to serialize all requests, both sync and async */
static int async_task(void *param)
{
- HIF_DEVICE *device;
+ struct hif_device *device;
BUS_REQUEST *request;
int status;
unsigned long flags;

- device = (HIF_DEVICE *)param;
+ device = (struct hif_device *)param;
AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: async task\n"));
set_current_state(TASK_INTERRUPTIBLE);
while(!device->async_shutdown) {
@@ -465,7 +465,7 @@ static int async_task(void *param)
return 0;
}

-static s32 IssueSDCommand(HIF_DEVICE *device, u32 opcode, u32 arg, u32 flags, u32 *resp)
+static s32 IssueSDCommand(struct hif_device *device, u32 opcode, u32 arg, u32 flags, u32 *resp)
{
struct mmc_command cmd;
s32 err;
@@ -488,7 +488,7 @@ static s32 IssueSDCommand(HIF_DEVICE *device, u32 opcode, u32 arg, u32 flags, u3
return err;
}

-int ReinitSDIO(HIF_DEVICE *device)
+int ReinitSDIO(struct hif_device *device)
{
s32 err;
struct mmc_host *host;
@@ -648,7 +648,7 @@ int ReinitSDIO(HIF_DEVICE *device)
}

int
-PowerStateChangeNotify(HIF_DEVICE *device, HIF_DEVICE_POWER_CHANGE_TYPE config)
+PowerStateChangeNotify(struct hif_device *device, HIF_DEVICE_POWER_CHANGE_TYPE config)
{
int status = 0;
#if defined(CONFIG_PM)
@@ -691,7 +691,7 @@ PowerStateChangeNotify(HIF_DEVICE *device, HIF_DEVICE_POWER_CHANGE_TYPE config)
}

int
-HIFConfigureDevice(HIF_DEVICE *device, HIF_DEVICE_CONFIG_OPCODE opcode,
+HIFConfigureDevice(struct hif_device *device, HIF_DEVICE_CONFIG_OPCODE opcode,
void *config, u32 configLen)
{
u32 count;
@@ -745,7 +745,7 @@ HIFConfigureDevice(HIF_DEVICE *device, HIF_DEVICE_CONFIG_OPCODE opcode,
}

void
-HIFShutDownDevice(HIF_DEVICE *device)
+HIFShutDownDevice(struct hif_device *device)
{
AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: +HIFShutDownDevice\n"));
if (device != NULL) {
@@ -775,7 +775,7 @@ static void
hifIRQHandler(struct sdio_func *func)
{
int status;
- HIF_DEVICE *device;
+ struct hif_device *device;
AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: +hifIRQHandler\n"));

device = getHifDevice(func);
@@ -792,9 +792,9 @@ hifIRQHandler(struct sdio_func *func)
/* handle HTC startup via thread*/
static int startup_task(void *param)
{
- HIF_DEVICE *device;
+ struct hif_device *device;

- device = (HIF_DEVICE *)param;
+ device = (struct hif_device *)param;
AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: call HTC from startup_task\n"));
/* start up inform DRV layer */
if ((osdrvCallbacks.deviceInsertedHandler(osdrvCallbacks.context,device)) != 0) {
@@ -806,8 +806,8 @@ static int startup_task(void *param)
#if defined(CONFIG_PM)
static int enable_task(void *param)
{
- HIF_DEVICE *device;
- device = (HIF_DEVICE *)param;
+ struct hif_device *device;
+ device = (struct hif_device *)param;
AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: call from resume_task\n"));

/* start up inform DRV layer */
@@ -826,7 +826,7 @@ static int enable_task(void *param)
static int hifDeviceInserted(struct sdio_func *func, const struct sdio_device_id *id)
{
int ret;
- HIF_DEVICE * device;
+ struct hif_device * device;
int count;

AR_DEBUG_PRINTF(ATH_DEBUG_TRACE,
@@ -866,7 +866,7 @@ static int hifDeviceInserted(struct sdio_func *func, const struct sdio_device_id


void
-HIFAckInterrupt(HIF_DEVICE *device)
+HIFAckInterrupt(struct hif_device *device)
{
AR_DEBUG_ASSERT(device != NULL);

@@ -874,7 +874,7 @@ HIFAckInterrupt(HIF_DEVICE *device)
}

void
-HIFUnMaskInterrupt(HIF_DEVICE *device)
+HIFUnMaskInterrupt(struct hif_device *device)
{
int ret;

@@ -890,7 +890,7 @@ HIFUnMaskInterrupt(HIF_DEVICE *device)
AR_DEBUG_ASSERT(ret == 0);
}

-void HIFMaskInterrupt(HIF_DEVICE *device)
+void HIFMaskInterrupt(struct hif_device *device)
{
int ret;
AR_DEBUG_ASSERT(device != NULL);
@@ -910,7 +910,7 @@ void HIFMaskInterrupt(HIF_DEVICE *device)
AR_DEBUG_ASSERT(ret == 0);
}

-BUS_REQUEST *hifAllocateBusRequest(HIF_DEVICE *device)
+BUS_REQUEST *hifAllocateBusRequest(struct hif_device *device)
{
BUS_REQUEST *busrequest;
unsigned long flag;
@@ -930,7 +930,7 @@ BUS_REQUEST *hifAllocateBusRequest(HIF_DEVICE *device)
}

void
-hifFreeBusRequest(HIF_DEVICE *device, BUS_REQUEST *busrequest)
+hifFreeBusRequest(struct hif_device *device, BUS_REQUEST *busrequest)
{
unsigned long flag;

@@ -949,7 +949,7 @@ hifFreeBusRequest(HIF_DEVICE *device, BUS_REQUEST *busrequest)
spin_unlock_irqrestore(&device->lock, flag);
}

-static int hifDisableFunc(HIF_DEVICE *device, struct sdio_func *func)
+static int hifDisableFunc(struct hif_device *device, struct sdio_func *func)
{
int ret;
int status = 0;
@@ -996,7 +996,7 @@ static int hifDisableFunc(HIF_DEVICE *device, struct sdio_func *func)
return status;
}

-static int hifEnableFunc(HIF_DEVICE *device, struct sdio_func *func)
+static int hifEnableFunc(struct hif_device *device, struct sdio_func *func)
{
struct task_struct* pTask;
const char *taskName = NULL;
@@ -1081,7 +1081,7 @@ static int hifDeviceSuspend(struct device *dev)
{
struct sdio_func *func=dev_to_sdio_func(dev);
int status = 0;
- HIF_DEVICE *device;
+ struct hif_device *device;

device = getHifDevice(func);
AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: +hifDeviceSuspend\n"));
@@ -1109,7 +1109,7 @@ static int hifDeviceResume(struct device *dev)
{
struct sdio_func *func=dev_to_sdio_func(dev);
int status = 0;
- HIF_DEVICE *device;
+ struct hif_device *device;

device = getHifDevice(func);
AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: +hifDeviceResume\n"));
@@ -1128,7 +1128,7 @@ static int hifDeviceResume(struct device *dev)
static void hifDeviceRemoved(struct sdio_func *func)
{
int status = 0;
- HIF_DEVICE *device;
+ struct hif_device *device;
AR_DEBUG_ASSERT(func != NULL);

AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: +hifDeviceRemoved\n"));
@@ -1152,7 +1152,7 @@ static void hifDeviceRemoved(struct sdio_func *func)
/*
* This should be moved to AR6K HTC layer.
*/
-int hifWaitForPendingRecv(HIF_DEVICE *device)
+int hifWaitForPendingRecv(struct hif_device *device)
{
s32 cnt = 10;
u8 host_int_status;
@@ -1183,13 +1183,13 @@ int hifWaitForPendingRecv(HIF_DEVICE *device)
}


-static HIF_DEVICE *
+static struct hif_device *
addHifDevice(struct sdio_func *func)
{
- HIF_DEVICE *hifdevice;
+ struct hif_device *hifdevice;
AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: addHifDevice\n"));
AR_DEBUG_ASSERT(func != NULL);
- hifdevice = kzalloc(sizeof(HIF_DEVICE), GFP_KERNEL);
+ hifdevice = kzalloc(sizeof(struct hif_device), GFP_KERNEL);
AR_DEBUG_ASSERT(hifdevice != NULL);
#if HIF_USE_DMA_BOUNCE_BUFFER
hifdevice->dma_buffer = kmalloc(HIF_DMA_BUFFER_SIZE, GFP_KERNEL);
@@ -1202,15 +1202,15 @@ addHifDevice(struct sdio_func *func)
return hifdevice;
}

-static HIF_DEVICE *
+static struct hif_device *
getHifDevice(struct sdio_func *func)
{
AR_DEBUG_ASSERT(func != NULL);
- return (HIF_DEVICE *)sdio_get_drvdata(func);
+ return (struct hif_device *)sdio_get_drvdata(func);
}

static void
-delHifDevice(HIF_DEVICE * device)
+delHifDevice(struct hif_device * device)
{
AR_DEBUG_ASSERT(device!= NULL);
AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: delHifDevice; 0x%p\n", device));
@@ -1222,17 +1222,17 @@ static void ResetAllCards(void)
{
}

-void HIFClaimDevice(HIF_DEVICE *device, void *context)
+void HIFClaimDevice(struct hif_device *device, void *context)
{
device->claimedContext = context;
}

-void HIFReleaseDevice(HIF_DEVICE *device)
+void HIFReleaseDevice(struct hif_device *device)
{
device->claimedContext = NULL;
}

-int HIFAttachHTC(HIF_DEVICE *device, HTC_CALLBACKS *callbacks)
+int HIFAttachHTC(struct hif_device *device, HTC_CALLBACKS *callbacks)
{
if (device->htcCallbacks.context != NULL) {
/* already in use! */
@@ -1242,7 +1242,7 @@ int HIFAttachHTC(HIF_DEVICE *device, HTC_CALLBACKS *callbacks)
return 0;
}

-void HIFDetachHTC(HIF_DEVICE *device)
+void HIFDetachHTC(struct hif_device *device)
{
A_MEMZERO(&device->htcCallbacks,sizeof(device->htcCallbacks));
}
diff --git a/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif_scatter.c b/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif_scatter.c
index 2c64abe..a1fdcc1 100644
--- a/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif_scatter.c
+++ b/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif_scatter.c
@@ -48,7 +48,7 @@
(((address) & 0x1FFFF) << 9) | \
((bytes_blocks) & 0x1FF)

-static void FreeScatterReq(HIF_DEVICE *device, struct hif_scatter_req *pReq)
+static void FreeScatterReq(struct hif_device *device, struct hif_scatter_req *pReq)
{
unsigned long flag;

@@ -60,7 +60,7 @@ static void FreeScatterReq(HIF_DEVICE *device, struct hif_scatter_req *pReq)

}

-static struct hif_scatter_req *AllocScatterReq(HIF_DEVICE *device)
+static struct hif_scatter_req *AllocScatterReq(struct hif_device *device)
{
struct dl_list *pItem;
unsigned long flag;
@@ -79,7 +79,7 @@ static struct hif_scatter_req *AllocScatterReq(HIF_DEVICE *device)
}

/* called by async task to perform the operation synchronously using direct MMC APIs */
-int DoHifReadWriteScatter(HIF_DEVICE *device, BUS_REQUEST *busrequest)
+int DoHifReadWriteScatter(struct hif_device *device, BUS_REQUEST *busrequest)
{
int i;
u8 rw;
@@ -199,7 +199,7 @@ int DoHifReadWriteScatter(HIF_DEVICE *device, BUS_REQUEST *busrequest)
}

/* callback to issue a read-write scatter request */
-static int HifReadWriteScatter(HIF_DEVICE *device, struct hif_scatter_req *pReq)
+static int HifReadWriteScatter(struct hif_device *device, struct hif_scatter_req *pReq)
{
int status = A_EINVAL;
u32 request = pReq->Request;
@@ -275,7 +275,7 @@ static int HifReadWriteScatter(HIF_DEVICE *device, struct hif_scatter_req *pReq)
}

/* setup of HIF scatter resources */
-int SetupHIFScatterSupport(HIF_DEVICE *device, struct hif_device_scatter_support_info *pInfo)
+int SetupHIFScatterSupport(struct hif_device *device, struct hif_device_scatter_support_info *pInfo)
{
int status = A_ERROR;
int i;
@@ -356,7 +356,7 @@ int SetupHIFScatterSupport(HIF_DEVICE *device, struct hif_device_scatter_support
}

/* clean up scatter support */
-void CleanupHIFScatterResources(HIF_DEVICE *device)
+void CleanupHIFScatterResources(struct hif_device *device)
{
struct hif_scatter_req_priv *pReqPriv;
struct hif_scatter_req *pReq;
diff --git a/drivers/staging/ath6kl/htc2/AR6000/ar6k.c b/drivers/staging/ath6kl/htc2/AR6000/ar6k.c
index 91e763a..eeddf60 100644
--- a/drivers/staging/ath6kl/htc2/AR6000/ar6k.c
+++ b/drivers/staging/ath6kl/htc2/AR6000/ar6k.c
@@ -587,7 +587,7 @@ void DevDumpRegisters(struct ar6k_device *pDev,

#define DEV_GET_VIRT_DMA_INFO(p) ((struct dev_scatter_dma_virtual_info *)((p)->HIFPrivate[0]))

-static struct hif_scatter_req *DevAllocScatterReq(HIF_DEVICE *Context)
+static struct hif_scatter_req *DevAllocScatterReq(struct hif_device *Context)
{
struct dl_list *pItem;
struct ar6k_device *pDev = (struct ar6k_device *)Context;
@@ -600,7 +600,7 @@ static struct hif_scatter_req *DevAllocScatterReq(HIF_DEVICE *Context)
return NULL;
}

-static void DevFreeScatterReq(HIF_DEVICE *Context, struct hif_scatter_req *pReq)
+static void DevFreeScatterReq(struct hif_device *Context, struct hif_scatter_req *pReq)
{
struct ar6k_device *pDev = (struct ar6k_device *)Context;
LOCK_AR6K(pDev);
@@ -664,7 +664,7 @@ static void DevReadWriteScatterAsyncHandler(void *Context, struct htc_packet *pP
AR_DEBUG_PRINTF(ATH_DEBUG_RECV,("-DevReadWriteScatterAsyncHandler \n"));
}

-static int DevReadWriteScatter(HIF_DEVICE *Context, struct hif_scatter_req *pReq)
+static int DevReadWriteScatter(struct hif_device *Context, struct hif_scatter_req *pReq)
{
struct ar6k_device *pDev = (struct ar6k_device *)Context;
int status = 0;
@@ -739,7 +739,7 @@ static void DevCleanupVirtualScatterSupport(struct ar6k_device *pDev)
struct hif_scatter_req *pReq;

while (1) {
- pReq = DevAllocScatterReq((HIF_DEVICE *)pDev);
+ pReq = DevAllocScatterReq((struct hif_device *)pDev);
if (NULL == pReq) {
break;
}
@@ -787,7 +787,7 @@ static int DevSetupVirtualScatterSupport(struct ar6k_device *pDev)
pReq->ScatterMethod = HIF_SCATTER_DMA_BOUNCE;
pReq->pScatterBounceBuffer = pVirtualInfo->pVirtDmaBuffer;
/* free request to the list */
- DevFreeScatterReq((HIF_DEVICE *)pDev,pReq);
+ DevFreeScatterReq((struct hif_device *)pDev,pReq);
}

if (status) {
diff --git a/drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox_hciuart.c b/drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox_hciuart.c
index 8cf46b1..c6488e0 100644
--- a/drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox_hciuart.c
+++ b/drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox_hciuart.c
@@ -1233,7 +1233,7 @@ int HCI_TransportRecvHCIEventSync(HCI_TRANSPORT_HANDLE HciTrans,
int HCI_TransportSetBaudRate(HCI_TRANSPORT_HANDLE HciTrans, u32 Baud)
{
struct gmbox_proto_hci_uart *pProt = (struct gmbox_proto_hci_uart *)HciTrans;
- HIF_DEVICE *pHIFDevice = (HIF_DEVICE *)(pProt->pDev->HIFDevice);
+ struct hif_device *pHIFDevice = (struct hif_device *)(pProt->pDev->HIFDevice);
u32 scaledBaud, scratchAddr;
int status = 0;

diff --git a/drivers/staging/ath6kl/include/ar3kconfig.h b/drivers/staging/ath6kl/include/ar3kconfig.h
index 80f948e..91bc4ee 100644
--- a/drivers/staging/ath6kl/include/ar3kconfig.h
+++ b/drivers/staging/ath6kl/include/ar3kconfig.h
@@ -42,7 +42,7 @@ struct ar3k_config_info {
u32 Flags; /* config flags */
void *pHCIDev; /* HCI bridge device */
struct hci_transport_properties *pHCIProps; /* HCI bridge props */
- HIF_DEVICE *pHIFDevice; /* HIF layer device */
+ struct hif_device *pHIFDevice; /* HIF layer device */

u32 AR3KBaudRate; /* AR3K operational baud rate */
u16 AR6KScale; /* AR6K UART scale value */
diff --git a/drivers/staging/ath6kl/include/ar6000_diag.h b/drivers/staging/ath6kl/include/ar6000_diag.h
index ca0961a..739c01c 100644
--- a/drivers/staging/ath6kl/include/ar6000_diag.h
+++ b/drivers/staging/ath6kl/include/ar6000_diag.h
@@ -26,23 +26,23 @@


int
-ar6000_ReadRegDiag(HIF_DEVICE *hifDevice, u32 *address, u32 *data);
+ar6000_ReadRegDiag(struct hif_device *hifDevice, u32 *address, u32 *data);

int
-ar6000_WriteRegDiag(HIF_DEVICE *hifDevice, u32 *address, u32 *data);
+ar6000_WriteRegDiag(struct hif_device *hifDevice, u32 *address, u32 *data);

int
-ar6000_ReadDataDiag(HIF_DEVICE *hifDevice, u32 address,
+ar6000_ReadDataDiag(struct hif_device *hifDevice, u32 address,
u8 *data, u32 length);

int
-ar6000_WriteDataDiag(HIF_DEVICE *hifDevice, u32 address,
+ar6000_WriteDataDiag(struct hif_device *hifDevice, u32 address,
u8 *data, u32 length);

int
-ar6k_ReadTargetRegister(HIF_DEVICE *hifDevice, int regsel, u32 *regval);
+ar6k_ReadTargetRegister(struct hif_device *hifDevice, int regsel, u32 *regval);

void
-ar6k_FetchTargetRegs(HIF_DEVICE *hifDevice, u32 *targregs);
+ar6k_FetchTargetRegs(struct hif_device *hifDevice, u32 *targregs);

#endif /*AR6000_DIAG_H_*/
diff --git a/drivers/staging/ath6kl/include/bmi.h b/drivers/staging/ath6kl/include/bmi.h
index b44988d..eb1e756 100644
--- a/drivers/staging/ath6kl/include/bmi.h
+++ b/drivers/staging/ath6kl/include/bmi.h
@@ -44,44 +44,44 @@ void
BMICleanup(void);

int
-BMIDone(HIF_DEVICE *device);
+BMIDone(struct hif_device *device);

int
-BMIGetTargetInfo(HIF_DEVICE *device, struct bmi_target_info *targ_info);
+BMIGetTargetInfo(struct hif_device *device, struct bmi_target_info *targ_info);

int
-BMIReadMemory(HIF_DEVICE *device,
+BMIReadMemory(struct hif_device *device,
u32 address,
u8 *buffer,
u32 length);

int
-BMIWriteMemory(HIF_DEVICE *device,
+BMIWriteMemory(struct hif_device *device,
u32 address,
u8 *buffer,
u32 length);

int
-BMIExecute(HIF_DEVICE *device,
+BMIExecute(struct hif_device *device,
u32 address,
u32 *param);

int
-BMISetAppStart(HIF_DEVICE *device,
+BMISetAppStart(struct hif_device *device,
u32 address);

int
-BMIReadSOCRegister(HIF_DEVICE *device,
+BMIReadSOCRegister(struct hif_device *device,
u32 address,
u32 *param);

int
-BMIWriteSOCRegister(HIF_DEVICE *device,
+BMIWriteSOCRegister(struct hif_device *device,
u32 address,
u32 param);

int
-BMIrompatchInstall(HIF_DEVICE *device,
+BMIrompatchInstall(struct hif_device *device,
u32 ROM_addr,
u32 RAM_addr,
u32 nbytes,
@@ -89,41 +89,41 @@ BMIrompatchInstall(HIF_DEVICE *device,
u32 *patch_id);

int
-BMIrompatchUninstall(HIF_DEVICE *device,
+BMIrompatchUninstall(struct hif_device *device,
u32 rompatch_id);

int
-BMIrompatchActivate(HIF_DEVICE *device,
+BMIrompatchActivate(struct hif_device *device,
u32 rompatch_count,
u32 *rompatch_list);

int
-BMIrompatchDeactivate(HIF_DEVICE *device,
+BMIrompatchDeactivate(struct hif_device *device,
u32 rompatch_count,
u32 *rompatch_list);

int
-BMILZStreamStart(HIF_DEVICE *device,
+BMILZStreamStart(struct hif_device *device,
u32 address);

int
-BMILZData(HIF_DEVICE *device,
+BMILZData(struct hif_device *device,
u8 *buffer,
u32 length);

int
-BMIFastDownload(HIF_DEVICE *device,
+BMIFastDownload(struct hif_device *device,
u32 address,
u8 *buffer,
u32 length);

int
-BMIRawWrite(HIF_DEVICE *device,
+BMIRawWrite(struct hif_device *device,
u8 *buffer,
u32 length);

int
-BMIRawRead(HIF_DEVICE *device,
+BMIRawRead(struct hif_device *device,
u8 *buffer,
u32 length,
bool want_timeout);
diff --git a/drivers/staging/ath6kl/include/common_drv.h b/drivers/staging/ath6kl/include/common_drv.h
index 3508df4..b606334 100644
--- a/drivers/staging/ath6kl/include/common_drv.h
+++ b/drivers/staging/ath6kl/include/common_drv.h
@@ -66,30 +66,30 @@ extern "C" {
/* OS-independent APIs */
int ar6000_setup_credit_dist(HTC_HANDLE HTCHandle, struct common_credit_state_info *pCredInfo);

-int ar6000_ReadRegDiag(HIF_DEVICE *hifDevice, u32 *address, u32 *data);
+int ar6000_ReadRegDiag(struct hif_device *hifDevice, u32 *address, u32 *data);

-int ar6000_WriteRegDiag(HIF_DEVICE *hifDevice, u32 *address, u32 *data);
+int ar6000_WriteRegDiag(struct hif_device *hifDevice, u32 *address, u32 *data);

-int ar6000_ReadDataDiag(HIF_DEVICE *hifDevice, u32 address, u8 *data, u32 length);
+int ar6000_ReadDataDiag(struct hif_device *hifDevice, u32 address, u8 *data, u32 length);

-int ar6000_reset_device(HIF_DEVICE *hifDevice, u32 TargetType, bool waitForCompletion, bool coldReset);
+int ar6000_reset_device(struct hif_device *hifDevice, u32 TargetType, bool waitForCompletion, bool coldReset);

-void ar6000_dump_target_assert_info(HIF_DEVICE *hifDevice, u32 TargetType);
+void ar6000_dump_target_assert_info(struct hif_device *hifDevice, u32 TargetType);

-int ar6000_set_htc_params(HIF_DEVICE *hifDevice,
+int ar6000_set_htc_params(struct hif_device *hifDevice,
u32 TargetType,
u32 MboxIsrYieldValue,
u8 HtcControlBuffers);

-int ar6000_prepare_target(HIF_DEVICE *hifDevice,
+int ar6000_prepare_target(struct hif_device *hifDevice,
u32 TargetType,
u32 TargetVersion);

-int ar6000_set_hci_bridge_flags(HIF_DEVICE *hifDevice,
+int ar6000_set_hci_bridge_flags(struct hif_device *hifDevice,
u32 TargetType,
u32 Flags);

-void ar6000_copy_cust_data_from_target(HIF_DEVICE *hifDevice, u32 TargetType);
+void ar6000_copy_cust_data_from_target(struct hif_device *hifDevice, u32 TargetType);

u8 *ar6000_get_cust_data_buffer(u32 TargetType);

diff --git a/drivers/staging/ath6kl/include/hif.h b/drivers/staging/ath6kl/include/hif.h
index 3dcb787..83650d5 100644
--- a/drivers/staging/ath6kl/include/hif.h
+++ b/drivers/staging/ath6kl/include/hif.h
@@ -38,7 +38,7 @@ extern "C" {


typedef struct htc_callbacks HTC_CALLBACKS;
-typedef struct hif_device HIF_DEVICE;
+struct hif_device;

/*
* direction - Direction of transfer (HIF_READ/HIF_WRITE).
@@ -301,9 +301,9 @@ struct hif_scatter_req {
struct hif_scatter_item ScatterList[1]; /* start of scatter list */
};

-typedef struct hif_scatter_req * ( *HIF_ALLOCATE_SCATTER_REQUEST)(HIF_DEVICE *device);
-typedef void ( *HIF_FREE_SCATTER_REQUEST)(HIF_DEVICE *device, struct hif_scatter_req *request);
-typedef int ( *HIF_READWRITE_SCATTER)(HIF_DEVICE *device, struct hif_scatter_req *request);
+typedef struct hif_scatter_req * ( *HIF_ALLOCATE_SCATTER_REQUEST)(struct hif_device *device);
+typedef void ( *HIF_FREE_SCATTER_REQUEST)(struct hif_device *device, struct hif_scatter_req *request);
+typedef int ( *HIF_READWRITE_SCATTER)(struct hif_device *device, struct hif_scatter_req *request);

struct hif_device_scatter_support_info {
/* information returned from HIF layer */
@@ -354,14 +354,14 @@ struct hif_pending_events_info {

/* function to get pending events , some HIF modules use special mechanisms
* to detect packet available and other interrupts */
-typedef int ( *HIF_PENDING_EVENTS_FUNC)(HIF_DEVICE *device,
+typedef int ( *HIF_PENDING_EVENTS_FUNC)(struct hif_device *device,
struct hif_pending_events_info *pEvents,
void *AsyncContext);

#define HIF_MASK_RECV true
#define HIF_UNMASK_RECV false
/* function to mask recv events */
-typedef int ( *HIF_MASK_UNMASK_RECV_EVENT)(HIF_DEVICE *device,
+typedef int ( *HIF_MASK_UNMASK_RECV_EVENT)(struct hif_device *device,
bool Mask,
void *AsyncContext);

@@ -376,14 +376,14 @@ int HIFInit(OSDRV_CALLBACKS *callbacks);
/* This API claims the HIF device and provides a context for handling removal.
* The device removal callback is only called when the OSDRV layer claims
* a device. The claimed context must be non-NULL */
-void HIFClaimDevice(HIF_DEVICE *device, void *claimedContext);
+void HIFClaimDevice(struct hif_device *device, void *claimedContext);
/* release the claimed device */
-void HIFReleaseDevice(HIF_DEVICE *device);
+void HIFReleaseDevice(struct hif_device *device);

/* This API allows the HTC layer to attach to the HIF device */
-int HIFAttachHTC(HIF_DEVICE *device, HTC_CALLBACKS *callbacks);
+int HIFAttachHTC(struct hif_device *device, HTC_CALLBACKS *callbacks);
/* This API detaches the HTC layer from the HIF device */
-void HIFDetachHTC(HIF_DEVICE *device);
+void HIFDetachHTC(struct hif_device *device);

/*
* This API is used to provide the read/write interface over the specific bus
@@ -398,7 +398,7 @@ void HIFDetachHTC(HIF_DEVICE *device);
* request - Characterizes the attributes of the command.
*/
int
-HIFReadWrite(HIF_DEVICE *device,
+HIFReadWrite(struct hif_device *device,
u32 address,
u8 *buffer,
u32 length,
@@ -409,7 +409,7 @@ HIFReadWrite(HIF_DEVICE *device,
* This can be initiated from the unload driver context when the OSDRV layer has no more use for
* the device.
*/
-void HIFShutDownDevice(HIF_DEVICE *device);
+void HIFShutDownDevice(struct hif_device *device);

/*
* This should translate to an acknowledgment to the bus driver indicating that
@@ -418,11 +418,11 @@ void HIFShutDownDevice(HIF_DEVICE *device);
* This should prevent the bus driver from raising an interrupt unless the
* previous one has been serviced and acknowledged using the previous API.
*/
-void HIFAckInterrupt(HIF_DEVICE *device);
+void HIFAckInterrupt(struct hif_device *device);

-void HIFMaskInterrupt(HIF_DEVICE *device);
+void HIFMaskInterrupt(struct hif_device *device);

-void HIFUnMaskInterrupt(HIF_DEVICE *device);
+void HIFUnMaskInterrupt(struct hif_device *device);

#ifdef THREAD_X
/*
@@ -441,14 +441,14 @@ int HIFRWCompleteEventNotify(void);
#endif

int
-HIFConfigureDevice(HIF_DEVICE *device, HIF_DEVICE_CONFIG_OPCODE opcode,
+HIFConfigureDevice(struct hif_device *device, HIF_DEVICE_CONFIG_OPCODE opcode,
void *config, u32 configLen);

/*
* This API wait for the remaining MBOX messages to be drained
* This should be moved to HTC AR6K layer
*/
-int hifWaitForPendingRecv(HIF_DEVICE *device);
+int hifWaitForPendingRecv(struct hif_device *device);

#ifdef __cplusplus
}
diff --git a/drivers/staging/ath6kl/miscdrv/common_drv.c b/drivers/staging/ath6kl/miscdrv/common_drv.c
index 3ada331..a23a524 100644
--- a/drivers/staging/ath6kl/miscdrv/common_drv.c
+++ b/drivers/staging/ath6kl/miscdrv/common_drv.c
@@ -83,7 +83,7 @@ static u8 custDataAR6003[AR6003_CUST_DATA_SIZE];
#ifdef USE_4BYTE_REGISTER_ACCESS

/* set the window address register (using 4-byte register access ). */
-int ar6000_SetAddressWindowRegister(HIF_DEVICE *hifDevice, u32 RegisterAddr, u32 Address)
+int ar6000_SetAddressWindowRegister(struct hif_device *hifDevice, u32 RegisterAddr, u32 Address)
{
int status;
u8 addrValue[4];
@@ -144,7 +144,7 @@ int ar6000_SetAddressWindowRegister(HIF_DEVICE *hifDevice, u32 RegisterAddr, u32
#else

/* set the window address register */
-int ar6000_SetAddressWindowRegister(HIF_DEVICE *hifDevice, u32 RegisterAddr, u32 Address)
+int ar6000_SetAddressWindowRegister(struct hif_device *hifDevice, u32 RegisterAddr, u32 Address)
{
int status;

@@ -187,7 +187,7 @@ int ar6000_SetAddressWindowRegister(HIF_DEVICE *hifDevice, u32 RegisterAddr, u32
* No cooperation from the Target is required for this.
*/
int
-ar6000_ReadRegDiag(HIF_DEVICE *hifDevice, u32 *address, u32 *data)
+ar6000_ReadRegDiag(struct hif_device *hifDevice, u32 *address, u32 *data)
{
int status;

@@ -221,7 +221,7 @@ ar6000_ReadRegDiag(HIF_DEVICE *hifDevice, u32 *address, u32 *data)
* No cooperation from the Target is required for this.
*/
int
-ar6000_WriteRegDiag(HIF_DEVICE *hifDevice, u32 *address, u32 *data)
+ar6000_WriteRegDiag(struct hif_device *hifDevice, u32 *address, u32 *data)
{
int status;

@@ -244,7 +244,7 @@ ar6000_WriteRegDiag(HIF_DEVICE *hifDevice, u32 *address, u32 *data)
}

int
-ar6000_ReadDataDiag(HIF_DEVICE *hifDevice, u32 address,
+ar6000_ReadDataDiag(struct hif_device *hifDevice, u32 address,
u8 *data, u32 length)
{
u32 count;
@@ -262,7 +262,7 @@ ar6000_ReadDataDiag(HIF_DEVICE *hifDevice, u32 address,
}

int
-ar6000_WriteDataDiag(HIF_DEVICE *hifDevice, u32 address,
+ar6000_WriteDataDiag(struct hif_device *hifDevice, u32 address,
u8 *data, u32 length)
{
u32 count;
@@ -280,7 +280,7 @@ ar6000_WriteDataDiag(HIF_DEVICE *hifDevice, u32 address,
}

int
-ar6k_ReadTargetRegister(HIF_DEVICE *hifDevice, int regsel, u32 *regval)
+ar6k_ReadTargetRegister(struct hif_device *hifDevice, int regsel, u32 *regval)
{
int status;
u8 vals[4];
@@ -316,7 +316,7 @@ ar6k_ReadTargetRegister(HIF_DEVICE *hifDevice, int regsel, u32 *regval)
}

void
-ar6k_FetchTargetRegs(HIF_DEVICE *hifDevice, u32 *targregs)
+ar6k_FetchTargetRegs(struct hif_device *hifDevice, u32 *targregs)
{
int i;
u32 val;
@@ -330,7 +330,7 @@ ar6k_FetchTargetRegs(HIF_DEVICE *hifDevice, u32 *targregs)

#if 0
static int
-_do_write_diag(HIF_DEVICE *hifDevice, u32 addr, u32 value)
+_do_write_diag(struct hif_device *hifDevice, u32 addr, u32 value)
{
int status;

@@ -358,7 +358,7 @@ _do_write_diag(HIF_DEVICE *hifDevice, u32 addr, u32 value)
*/
#if 0
static int
-_delay_until_target_alive(HIF_DEVICE *hifDevice, s32 wait_msecs, u32 TargetType)
+_delay_until_target_alive(struct hif_device *hifDevice, s32 wait_msecs, u32 TargetType)
{
s32 actual_wait;
s32 i;
@@ -399,7 +399,7 @@ _delay_until_target_alive(HIF_DEVICE *hifDevice, s32 wait_msecs, u32 TargetType)
#define AR6002_RESET_CONTROL_ADDRESS 0x00004000
#define AR6003_RESET_CONTROL_ADDRESS 0x00004000
/* reset device */
-int ar6000_reset_device(HIF_DEVICE *hifDevice, u32 TargetType, bool waitForCompletion, bool coldReset)
+int ar6000_reset_device(struct hif_device *hifDevice, u32 TargetType, bool waitForCompletion, bool coldReset)
{
int status = 0;
u32 address;
@@ -481,7 +481,7 @@ int ar6000_reset_device(HIF_DEVICE *hifDevice, u32 TargetType, bool waitForCompl

/* This should be called in BMI phase after firmware is downloaded */
void
-ar6000_copy_cust_data_from_target(HIF_DEVICE *hifDevice, u32 TargetType)
+ar6000_copy_cust_data_from_target(struct hif_device *hifDevice, u32 TargetType)
{
u32 eepHeaderAddr;
u8 AR6003CustDataShadow[AR6003_CUST_DATA_SIZE+4];
@@ -552,7 +552,7 @@ u8 *ar6000_get_cust_data_buffer(u32 TargetType)
#endif


-void ar6000_dump_target_assert_info(HIF_DEVICE *hifDevice, u32 TargetType)
+void ar6000_dump_target_assert_info(struct hif_device *hifDevice, u32 TargetType)
{
u32 address;
u32 regDumpArea = 0;
@@ -624,7 +624,7 @@ void ar6000_dump_target_assert_info(HIF_DEVICE *hifDevice, u32 TargetType)

/* set HTC/Mbox operational parameters, this can only be called when the target is in the
* BMI phase */
-int ar6000_set_htc_params(HIF_DEVICE *hifDevice,
+int ar6000_set_htc_params(struct hif_device *hifDevice,
u32 TargetType,
u32 MboxIsrYieldValue,
u8 HtcControlBuffers)
@@ -684,7 +684,7 @@ int ar6000_set_htc_params(HIF_DEVICE *hifDevice,
}


-static int prepare_ar6002(HIF_DEVICE *hifDevice, u32 TargetVersion)
+static int prepare_ar6002(struct hif_device *hifDevice, u32 TargetVersion)
{
int status = 0;

@@ -693,7 +693,7 @@ static int prepare_ar6002(HIF_DEVICE *hifDevice, u32 TargetVersion)
return status;
}

-static int prepare_ar6003(HIF_DEVICE *hifDevice, u32 TargetVersion)
+static int prepare_ar6003(struct hif_device *hifDevice, u32 TargetVersion)
{
int status = 0;

@@ -703,7 +703,7 @@ static int prepare_ar6003(HIF_DEVICE *hifDevice, u32 TargetVersion)
}

/* this function assumes the caller has already initialized the BMI APIs */
-int ar6000_prepare_target(HIF_DEVICE *hifDevice,
+int ar6000_prepare_target(struct hif_device *hifDevice,
u32 TargetType,
u32 TargetVersion)
{
@@ -725,7 +725,7 @@ int ar6000_prepare_target(HIF_DEVICE *hifDevice,
* TBDXXX: Remove this function when REV 1.x is desupported.
*/
int
-ar6002_REV1_reset_force_host (HIF_DEVICE *hifDevice)
+ar6002_REV1_reset_force_host (struct hif_device *hifDevice)
{
s32 i;
struct forceROM_s {
@@ -998,7 +998,7 @@ void a_module_debug_support_cleanup(void)
}

/* can only be called during bmi init stage */
-int ar6000_set_hci_bridge_flags(HIF_DEVICE *hifDevice,
+int ar6000_set_hci_bridge_flags(struct hif_device *hifDevice,
u32 TargetType,
u32 Flags)
{
diff --git a/drivers/staging/ath6kl/os/linux/eeprom.c b/drivers/staging/ath6kl/os/linux/eeprom.c
index 7d049df..4cff9da 100644
--- a/drivers/staging/ath6kl/os/linux/eeprom.c
+++ b/drivers/staging/ath6kl/os/linux/eeprom.c
@@ -55,7 +55,7 @@ char *p_mac = NULL;

static u8 eeprom_data[EEPROM_SZ];
static u32 sys_sleep_reg;
-static HIF_DEVICE *p_bmi_device;
+static struct hif_device *p_bmi_device;

//
// Functions
@@ -158,7 +158,7 @@ BMI_write_mem(u32 address, u8 *p_data, u32 sz)
* so we can access the EEPROM.
*/
static void
-enable_SI(HIF_DEVICE *p_device)
+enable_SI(struct hif_device *p_device)
{
u32 regval;

@@ -361,7 +361,7 @@ commit_4bytes(int offset, u32 data)
}
/* ATHENV */
#ifdef ANDROID_ENV
-void eeprom_ar6000_transfer(HIF_DEVICE *device, char *fake_file, char *p_mac)
+void eeprom_ar6000_transfer(struct hif_device *device, char *fake_file, char *p_mac)
{
u32 first_word;
u32 board_data_addr;
diff --git a/drivers/staging/ath6kl/os/linux/export_hci_transport.c b/drivers/staging/ath6kl/os/linux/export_hci_transport.c
index 787a8bd..442a286 100644
--- a/drivers/staging/ath6kl/os/linux/export_hci_transport.c
+++ b/drivers/staging/ath6kl/os/linux/export_hci_transport.c
@@ -70,7 +70,7 @@ int ar6000_register_hci_transport(struct hci_transport_callbacks *hciTransCallba
}

int
-ar6000_get_hif_dev(HIF_DEVICE *device, void *config)
+ar6000_get_hif_dev(struct hif_device *device, void *config)
{
int status;

@@ -81,7 +81,7 @@ ar6000_get_hif_dev(HIF_DEVICE *device, void *config)
return status;
}

-int ar6000_set_uart_config(HIF_DEVICE *hifDevice,
+int ar6000_set_uart_config(struct hif_device *hifDevice,
u32 scale,
u32 step)
{
@@ -97,7 +97,7 @@ int ar6000_set_uart_config(HIF_DEVICE *hifDevice,
return status;
}

-int ar6000_get_core_clock_config(HIF_DEVICE *hifDevice, u32 *data)
+int ar6000_get_core_clock_config(struct hif_device *hifDevice, u32 *data)
{
u32 regAddress;
int status;
diff --git a/drivers/staging/ath6kl/os/linux/hci_bridge.c b/drivers/staging/ath6kl/os/linux/hci_bridge.c
index 1ff71e8..39e5798 100644
--- a/drivers/staging/ath6kl/os/linux/hci_bridge.c
+++ b/drivers/staging/ath6kl/os/linux/hci_bridge.c
@@ -270,7 +270,7 @@ static int ar6000_hci_transport_ready(HCI_TRANSPORT_HANDLE HCIHandle,
ar3kconfig.pHCIDev = pHcidevInfo->pHCIDev;
ar3kconfig.pHCIProps = &pHcidevInfo->HCIProps;
#ifdef EXPORT_HCI_BRIDGE_INTERFACE
- ar3kconfig.pHIFDevice = (HIF_DEVICE *)(pHcidevInfo->HCITransHdl.hifDevice);
+ ar3kconfig.pHIFDevice = (struct hif_device *)(pHcidevInfo->HCITransHdl.hifDevice);
#else
ar3kconfig.pHIFDevice = pHcidevInfo->ar->arHifDevice;
#endif
@@ -868,7 +868,7 @@ static int bt_setup_hci(struct ar6k_hci_bridge_info *pHcidevInfo)
A_MEMZERO(&osDevInfo,sizeof(osDevInfo));
/* get the underlying OS device */
#ifdef EXPORT_HCI_BRIDGE_INTERFACE
- status = ar6000_get_hif_dev((HIF_DEVICE *)(pHcidevInfo->HCITransHdl.hifDevice),
+ status = ar6000_get_hif_dev((struct hif_device *)(pHcidevInfo->HCITransHdl.hifDevice),
&osDevInfo);
#else
status = HIFConfigureDevice(pHcidevInfo->ar->arHifDevice,
diff --git a/drivers/staging/ath6kl/os/linux/include/ar6000_drv.h b/drivers/staging/ath6kl/os/linux/include/ar6000_drv.h
index 9b5c0a3..89fd80a 100644
--- a/drivers/staging/ath6kl/os/linux/include/ar6000_drv.h
+++ b/drivers/staging/ath6kl/os/linux/include/ar6000_drv.h
@@ -121,8 +121,8 @@ struct USER_SAVEDKEYS {
#define DBG_DEFAULTS (DBG_ERROR|DBG_WARNING)


-int ar6000_ReadRegDiag(HIF_DEVICE *hifDevice, u32 *address, u32 *data);
-int ar6000_WriteRegDiag(HIF_DEVICE *hifDevice, u32 *address, u32 *data);
+int ar6000_ReadRegDiag(struct hif_device *hifDevice, u32 *address, u32 *data);
+int ar6000_WriteRegDiag(struct hif_device *hifDevice, u32 *address, u32 *data);

#ifdef __cplusplus
extern "C" {
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 31f4f78..74f9861 100644
--- a/drivers/staging/ath6kl/os/linux/include/export_hci_transport.h
+++ b/drivers/staging/ath6kl/os/linux/include/export_hci_transport.h
@@ -63,9 +63,9 @@ extern int (*_HCI_TransportEnablePowerMgmt)(HCI_TRANSPORT_HANDLE HciTrans, bo

extern int ar6000_register_hci_transport(struct hci_transport_callbacks *hciTransCallbacks);

-extern int ar6000_get_hif_dev(HIF_DEVICE *device, void *config);
+extern int ar6000_get_hif_dev(struct hif_device *device, void *config);

-extern int ar6000_set_uart_config(HIF_DEVICE *hifDevice, u32 scale, u32 step);
+extern int ar6000_set_uart_config(struct hif_device *hifDevice, u32 scale, u32 step);

/* get core clock register settings
* data: 0 - 40/44MHz
@@ -73,4 +73,4 @@ extern int ar6000_set_uart_config(HIF_DEVICE *hifDevice, u32 scale, u32 step);
* where (5G band/2.4G band)
* assume 2.4G band for now
*/
-extern int ar6000_get_core_clock_config(HIF_DEVICE *hifDevice, u32 *data);
+extern int ar6000_get_core_clock_config(struct hif_device *hifDevice, u32 *data);
diff --git a/drivers/staging/ath6kl/os/linux/ioctl.c b/drivers/staging/ath6kl/os/linux/ioctl.c
index c650faa..0daa201 100644
--- a/drivers/staging/ath6kl/os/linux/ioctl.c
+++ b/drivers/staging/ath6kl/os/linux/ioctl.c
@@ -1865,7 +1865,7 @@ ar6000_ioctl_setkey(struct ar6_softc *ar, struct ieee80211req_key *ik)
int ar6000_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
{
struct ar6_softc *ar = (struct ar6_softc *)ar6k_priv(dev);
- HIF_DEVICE *hifDevice = ar->arHifDevice;
+ struct hif_device *hifDevice = ar->arHifDevice;
int ret = 0, param;
unsigned int address = 0;
unsigned int length = 0;
--
1.7.4.15.g7811d


2011-03-14 17:59:38

by Luis R. Rodriguez

[permalink] [raw]
Subject: [PATCH 17/38] ath6kl: remove-typedef HTC_ENDPOINT

remove-typedef -s HTC_ENDPOINT \
"struct htc_endpoint" drivers/staging/ath6kl/

Tested-by: Naveen Singh <[email protected]>
Signed-off-by: Luis R. Rodriguez <[email protected]>
---
drivers/staging/ath6kl/htc2/htc.c | 2 +-
drivers/staging/ath6kl/htc2/htc_internal.h | 6 ++--
drivers/staging/ath6kl/htc2/htc_recv.c | 24 ++++++++++----------
drivers/staging/ath6kl/htc2/htc_send.c | 34 ++++++++++++++--------------
drivers/staging/ath6kl/htc2/htc_services.c | 2 +-
5 files changed, 34 insertions(+), 34 deletions(-)

diff --git a/drivers/staging/ath6kl/htc2/htc.c b/drivers/staging/ath6kl/htc2/htc.c
index bb999b6..e897c0c 100644
--- a/drivers/staging/ath6kl/htc2/htc.c
+++ b/drivers/staging/ath6kl/htc2/htc.c
@@ -438,7 +438,7 @@ int HTCStart(HTC_HANDLE HTCHandle)

static void ResetEndpointStates(HTC_TARGET *target)
{
- HTC_ENDPOINT *pEndpoint;
+ struct htc_endpoint *pEndpoint;
int i;

for (i = ENDPOINT_0; i < ENDPOINT_MAX; i++) {
diff --git a/drivers/staging/ath6kl/htc2/htc_internal.h b/drivers/staging/ath6kl/htc2/htc_internal.h
index e3857cf..a6eaa1b 100644
--- a/drivers/staging/ath6kl/htc2/htc_internal.h
+++ b/drivers/staging/ath6kl/htc2/htc_internal.h
@@ -65,7 +65,7 @@ extern "C" {

#define HTC_SCATTER_REQ_FLAGS_PARTIAL_BUNDLE (1 << 0)

-typedef struct _HTC_ENDPOINT {
+struct htc_endpoint {
HTC_ENDPOINT_ID Id;
HTC_SERVICE_ID ServiceID; /* service ID this endpoint is bound to
non-zero value means this endpoint is in use */
@@ -85,7 +85,7 @@ typedef struct _HTC_ENDPOINT {
#ifdef HTC_EP_STAT_PROFILING
HTC_ENDPOINT_STATS EndPointStats; /* endpoint statistics */
#endif
-} HTC_ENDPOINT;
+};

#ifdef HTC_EP_STAT_PROFILING
#define INC_HTC_EP_STAT(p,stat,count) (p)->EndPointStats.stat += (count);
@@ -109,7 +109,7 @@ struct htc_control_buffer {

/* our HTC target state */
typedef struct _HTC_TARGET {
- HTC_ENDPOINT EndPoint[ENDPOINT_MAX];
+ struct htc_endpoint EndPoint[ENDPOINT_MAX];
struct htc_control_buffer HTCControlBuffers[NUM_CONTROL_BUFFERS];
HTC_ENDPOINT_CREDIT_DIST *EpCreditDistributionListHead;
HTC_PACKET_QUEUE ControlBufferTXFreeList;
diff --git a/drivers/staging/ath6kl/htc2/htc_recv.c b/drivers/staging/ath6kl/htc2/htc_recv.c
index 7a333ed..4095f8e 100644
--- a/drivers/staging/ath6kl/htc2/htc_recv.c
+++ b/drivers/staging/ath6kl/htc2/htc_recv.c
@@ -50,7 +50,7 @@
#define HTC_RX_STAT_PROFILE(t,ep,lookAhead)
#endif

-static void DoRecvCompletion(HTC_ENDPOINT *pEndpoint,
+static void DoRecvCompletion(struct htc_endpoint *pEndpoint,
HTC_PACKET_QUEUE *pQueueToIndicate)
{

@@ -432,7 +432,7 @@ static INLINE void HTCAsyncRecvCheckMorePackets(HTC_TARGET *target,
}

/* unload the recv completion queue */
-static INLINE void DrainRecvIndicationQueue(HTC_TARGET *target, HTC_ENDPOINT *pEndpoint)
+static INLINE void DrainRecvIndicationQueue(HTC_TARGET *target, struct htc_endpoint *pEndpoint)
{
HTC_PACKET_QUEUE recvCompletions;

@@ -497,7 +497,7 @@ static INLINE void DrainRecvIndicationQueue(HTC_TARGET *target, HTC_ENDPOINT *pE

/* note: this function can be called with the RX lock held */
static INLINE void SetRxPacketIndicationFlags(u32 LookAhead,
- HTC_ENDPOINT *pEndpoint,
+ struct htc_endpoint *pEndpoint,
HTC_PACKET *pPacket)
{
HTC_FRAME_HDR *pHdr = (HTC_FRAME_HDR *)&LookAhead;
@@ -518,7 +518,7 @@ static INLINE void SetRxPacketIndicationFlags(u32 LookAhead,
void HTCRecvCompleteHandler(void *Context, HTC_PACKET *pPacket)
{
HTC_TARGET *target = (HTC_TARGET *)Context;
- HTC_ENDPOINT *pEndpoint;
+ struct htc_endpoint *pEndpoint;
u32 nextLookAheads[HTC_HOST_MAX_MSG_PER_BUNDLE];
int numLookAheads = 0;
int status;
@@ -689,7 +689,7 @@ int HTCWaitforControlMessage(HTC_TARGET *target, HTC_PACKET **ppControlPacket)
static int AllocAndPrepareRxPackets(HTC_TARGET *target,
u32 LookAheads[],
int Messages,
- HTC_ENDPOINT *pEndpoint,
+ struct htc_endpoint *pEndpoint,
HTC_PACKET_QUEUE *pQueue)
{
int status = 0;
@@ -883,7 +883,7 @@ static void HTCAsyncRecvScatterCompletion(struct hif_scatter_req *pScatterReq)
{
int i;
HTC_PACKET *pPacket;
- HTC_ENDPOINT *pEndpoint;
+ struct htc_endpoint *pEndpoint;
u32 lookAheads[HTC_HOST_MAX_MSG_PER_BUNDLE];
int numLookAheads = 0;
HTC_TARGET *target = (HTC_TARGET *)pScatterReq->Context;
@@ -1102,7 +1102,7 @@ static int HTCIssueRecvPacketBundle(HTC_TARGET *target,
return status;
}

-static INLINE void CheckRecvWaterMark(HTC_ENDPOINT *pEndpoint)
+static INLINE void CheckRecvWaterMark(struct htc_endpoint *pEndpoint)
{
/* see if endpoint is using a refill watermark
* ** no need to use a lock here, since we are only inspecting...
@@ -1122,7 +1122,7 @@ int HTCRecvMessagePendingHandler(void *Context, u32 MsgLookAheads[], int NumLook
HTC_TARGET *target = (HTC_TARGET *)Context;
int status = 0;
HTC_PACKET *pPacket;
- HTC_ENDPOINT *pEndpoint;
+ struct htc_endpoint *pEndpoint;
bool asyncProc = false;
u32 lookAheads[HTC_HOST_MAX_MSG_PER_BUNDLE];
int pktsFetched;
@@ -1388,7 +1388,7 @@ int HTCRecvMessagePendingHandler(void *Context, u32 MsgLookAheads[], int NumLook
int HTCAddReceivePktMultiple(HTC_HANDLE HTCHandle, HTC_PACKET_QUEUE *pPktQueue)
{
HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
- HTC_ENDPOINT *pEndpoint;
+ struct htc_endpoint *pEndpoint;
bool unblockRecv = false;
int status = 0;
HTC_PACKET *pFirstPacket;
@@ -1486,7 +1486,7 @@ void HTCUnblockRecv(HTC_HANDLE HTCHandle)
}
}

-static void HTCFlushRxQueue(HTC_TARGET *target, HTC_ENDPOINT *pEndpoint, HTC_PACKET_QUEUE *pQueue)
+static void HTCFlushRxQueue(HTC_TARGET *target, struct htc_endpoint *pEndpoint, HTC_PACKET_QUEUE *pQueue)
{
HTC_PACKET *pPacket;
HTC_PACKET_QUEUE container;
@@ -1512,7 +1512,7 @@ static void HTCFlushRxQueue(HTC_TARGET *target, HTC_ENDPOINT *pEndpoint, HTC_PAC
UNLOCK_HTC_RX(target);
}

-static void HTCFlushEndpointRX(HTC_TARGET *target, HTC_ENDPOINT *pEndpoint)
+static void HTCFlushEndpointRX(HTC_TARGET *target, struct htc_endpoint *pEndpoint)
{
/* flush any recv indications not already made */
HTCFlushRxQueue(target,pEndpoint,&pEndpoint->RecvIndicationQueue);
@@ -1522,7 +1522,7 @@ static void HTCFlushEndpointRX(HTC_TARGET *target, HTC_ENDPOINT *pEndpoint)

void HTCFlushRecvBuffers(HTC_TARGET *target)
{
- HTC_ENDPOINT *pEndpoint;
+ struct htc_endpoint *pEndpoint;
int i;

for (i = ENDPOINT_0; i < ENDPOINT_MAX; i++) {
diff --git a/drivers/staging/ath6kl/htc2/htc_send.c b/drivers/staging/ath6kl/htc2/htc_send.c
index f133d93..4e1d9bc7 100644
--- a/drivers/staging/ath6kl/htc2/htc_send.c
+++ b/drivers/staging/ath6kl/htc2/htc_send.c
@@ -43,7 +43,7 @@ typedef enum _HTC_SEND_QUEUE_RESULT {
(reason)); \
}

-static void DoSendCompletion(HTC_ENDPOINT *pEndpoint,
+static void DoSendCompletion(struct htc_endpoint *pEndpoint,
HTC_PACKET_QUEUE *pQueueToIndicate)
{
do {
@@ -77,7 +77,7 @@ static void DoSendCompletion(HTC_ENDPOINT *pEndpoint,
}

/* do final completion on sent packet */
-static INLINE void CompleteSentPacket(HTC_TARGET *target, HTC_ENDPOINT *pEndpoint, HTC_PACKET *pPacket)
+static INLINE void CompleteSentPacket(HTC_TARGET *target, struct htc_endpoint *pEndpoint, HTC_PACKET *pPacket)
{
pPacket->Completion = NULL;

@@ -104,7 +104,7 @@ static INLINE void CompleteSentPacket(HTC_TARGET *target, HTC_ENDPOINT *pEndpoin
static void HTCSendPktCompletionHandler(void *Context, HTC_PACKET *pPacket)
{
HTC_TARGET *target = (HTC_TARGET *)Context;
- HTC_ENDPOINT *pEndpoint = &target->EndPoint[pPacket->Endpoint];
+ struct htc_endpoint *pEndpoint = &target->EndPoint[pPacket->Endpoint];
HTC_PACKET_QUEUE container;

CompleteSentPacket(target,pEndpoint,pPacket);
@@ -147,7 +147,7 @@ int HTCIssueSend(HTC_TARGET *target, HTC_PACKET *pPacket)

/* get HTC send packets from the TX queue on an endpoint */
static INLINE void GetHTCSendPackets(HTC_TARGET *target,
- HTC_ENDPOINT *pEndpoint,
+ struct htc_endpoint *pEndpoint,
HTC_PACKET_QUEUE *pQueue)
{
int creditsRequired;
@@ -268,7 +268,7 @@ static void HTCAsyncSendScatterCompletion(struct hif_scatter_req *pScatterReq)
{
int i;
HTC_PACKET *pPacket;
- HTC_ENDPOINT *pEndpoint = (HTC_ENDPOINT *)pScatterReq->Context;
+ struct htc_endpoint *pEndpoint = (struct htc_endpoint *)pScatterReq->Context;
HTC_TARGET *target = (HTC_TARGET *)pEndpoint->target;
int status = 0;
HTC_PACKET_QUEUE sendCompletes;
@@ -309,7 +309,7 @@ static void HTCAsyncSendScatterCompletion(struct hif_scatter_req *pScatterReq)
* - a message that will consume a partial credit will stop the bundling process early
* - we drop below the minimum number of messages for a bundle
* */
-static void HTCIssueSendBundle(HTC_ENDPOINT *pEndpoint,
+static void HTCIssueSendBundle(struct htc_endpoint *pEndpoint,
HTC_PACKET_QUEUE *pQueue,
int *pBundlesSent,
int *pTotalBundlesPkts)
@@ -478,7 +478,7 @@ static void HTCIssueSendBundle(HTC_ENDPOINT *pEndpoint,
* if there are no credits, the packet(s) remains in the queue.
* this function returns the result of the attempt to send a queue of HTC packets */
static HTC_SEND_QUEUE_RESULT HTCTrySend(HTC_TARGET *target,
- HTC_ENDPOINT *pEndpoint,
+ struct htc_endpoint *pEndpoint,
HTC_PACKET_QUEUE *pCallersSendQueue)
{
HTC_PACKET_QUEUE sendQueue; /* temp queue to hold packets at various stages */
@@ -671,7 +671,7 @@ static HTC_SEND_QUEUE_RESULT HTCTrySend(HTC_TARGET *target,
int HTCSendPktsMultiple(HTC_HANDLE HTCHandle, HTC_PACKET_QUEUE *pPktQueue)
{
HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
- HTC_ENDPOINT *pEndpoint;
+ struct htc_endpoint *pEndpoint;
HTC_PACKET *pPacket;

AR_DEBUG_PRINTF(ATH_DEBUG_SEND, ("+HTCSendPktsMultiple: Queue: 0x%lX, Pkts %d \n",
@@ -723,7 +723,7 @@ int HTCSendPkt(HTC_HANDLE HTCHandle, HTC_PACKET *pPacket)
/* check TX queues to drain because of credit distribution update */
static INLINE void HTCCheckEndpointTxQueues(HTC_TARGET *target)
{
- HTC_ENDPOINT *pEndpoint;
+ struct htc_endpoint *pEndpoint;
HTC_ENDPOINT_CREDIT_DIST *pDistItem;

AR_DEBUG_PRINTF(ATH_DEBUG_SEND, ("+HTCCheckEndpointTxQueues \n"));
@@ -734,7 +734,7 @@ static INLINE void HTCCheckEndpointTxQueues(HTC_TARGET *target)
* NOTE: no locks need to be taken since the distribution list
* is not dynamic (cannot be re-ordered) and we are not modifying any state */
while (pDistItem != NULL) {
- pEndpoint = (HTC_ENDPOINT *)pDistItem->pHTCReserved;
+ pEndpoint = (struct htc_endpoint *)pDistItem->pHTCReserved;

if (HTC_PACKET_QUEUE_DEPTH(&pEndpoint->TxQueue) > 0) {
AR_DEBUG_PRINTF(ATH_DEBUG_SEND, (" Ep %d has %d credits and %d Packets in TX Queue \n",
@@ -756,7 +756,7 @@ static INLINE void HTCCheckEndpointTxQueues(HTC_TARGET *target)
void HTCProcessCreditRpt(HTC_TARGET *target, HTC_CREDIT_REPORT *pRpt, int NumEntries, HTC_ENDPOINT_ID FromEndpoint)
{
int i;
- HTC_ENDPOINT *pEndpoint;
+ struct htc_endpoint *pEndpoint;
int totalCredits = 0;
bool doDist = false;

@@ -838,7 +838,7 @@ void HTCProcessCreditRpt(HTC_TARGET *target, HTC_CREDIT_REPORT *pRpt, int NumEnt
}

/* flush endpoint TX queue */
-static void HTCFlushEndpointTX(HTC_TARGET *target, HTC_ENDPOINT *pEndpoint, HTC_TX_TAG Tag)
+static void HTCFlushEndpointTX(HTC_TARGET *target, struct htc_endpoint *pEndpoint, HTC_TX_TAG Tag)
{
HTC_PACKET *pPacket;
HTC_PACKET_QUEUE discardQueue;
@@ -895,7 +895,7 @@ void DumpCreditDist(HTC_ENDPOINT_CREDIT_DIST *pEPDist)
AR_DEBUG_PRINTF(ATH_DEBUG_ANY, (" TxCreditsPerMaxMsg : %d \n", pEPDist->TxCreditsPerMaxMsg));
AR_DEBUG_PRINTF(ATH_DEBUG_ANY, (" TxCreditsToDist : %d \n", pEPDist->TxCreditsToDist));
AR_DEBUG_PRINTF(ATH_DEBUG_ANY, (" TxQueueDepth : %d \n",
- HTC_PACKET_QUEUE_DEPTH(&((HTC_ENDPOINT *)pEPDist->pHTCReserved)->TxQueue)));
+ HTC_PACKET_QUEUE_DEPTH(&((struct htc_endpoint *)pEPDist->pHTCReserved)->TxQueue)));
AR_DEBUG_PRINTF(ATH_DEBUG_ANY, ("----------------------------------------------------\n"));
}

@@ -919,7 +919,7 @@ void DumpCreditDistStates(HTC_TARGET *target)
/* flush all send packets from all endpoint queues */
void HTCFlushSendPkts(HTC_TARGET *target)
{
- HTC_ENDPOINT *pEndpoint;
+ struct htc_endpoint *pEndpoint;
int i;

if (AR_DEBUG_LVL_CHECK(ATH_DEBUG_TRC)) {
@@ -942,7 +942,7 @@ void HTCFlushSendPkts(HTC_TARGET *target)
void HTCFlushEndpoint(HTC_HANDLE HTCHandle, HTC_ENDPOINT_ID Endpoint, HTC_TX_TAG Tag)
{
HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
- HTC_ENDPOINT *pEndpoint = &target->EndPoint[Endpoint];
+ struct htc_endpoint *pEndpoint = &target->EndPoint[Endpoint];

if (pEndpoint->ServiceID == 0) {
AR_DEBUG_ASSERT(false);
@@ -959,7 +959,7 @@ void HTCIndicateActivityChange(HTC_HANDLE HTCHandle,
bool Active)
{
HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
- HTC_ENDPOINT *pEndpoint = &target->EndPoint[Endpoint];
+ struct htc_endpoint *pEndpoint = &target->EndPoint[Endpoint];
bool doDist = false;

if (pEndpoint->ServiceID == 0) {
@@ -1009,7 +1009,7 @@ bool HTCIsEndpointActive(HTC_HANDLE HTCHandle,
HTC_ENDPOINT_ID Endpoint)
{
HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
- HTC_ENDPOINT *pEndpoint = &target->EndPoint[Endpoint];
+ struct htc_endpoint *pEndpoint = &target->EndPoint[Endpoint];

if (pEndpoint->ServiceID == 0) {
return false;
diff --git a/drivers/staging/ath6kl/htc2/htc_services.c b/drivers/staging/ath6kl/htc2/htc_services.c
index 61a332e..2f99989 100644
--- a/drivers/staging/ath6kl/htc2/htc_services.c
+++ b/drivers/staging/ath6kl/htc2/htc_services.c
@@ -132,7 +132,7 @@ int HTCConnectService(HTC_HANDLE HTCHandle,
HTC_CONNECT_SERVICE_RESPONSE_MSG *pResponseMsg;
HTC_CONNECT_SERVICE_MSG *pConnectMsg;
HTC_ENDPOINT_ID assignedEndpoint = ENDPOINT_MAX;
- HTC_ENDPOINT *pEndpoint;
+ struct htc_endpoint *pEndpoint;
unsigned int maxMsgSize = 0;

AR_DEBUG_PRINTF(ATH_DEBUG_TRC, ("+HTCConnectService, target:0x%lX SvcID:0x%X \n",
--
1.7.4.15.g7811d


2011-03-14 17:59:35

by Luis R. Rodriguez

[permalink] [raw]
Subject: [PATCH 16/38] ath6kl: remove-typedef HTC_CONTROL_BUFFER

remove-typedef -s HTC_CONTROL_BUFFER \
"struct htc_control_buffer" drivers/staging/ath6kl/

Tested-by: Naveen Singh <[email protected]>
Signed-off-by: Luis R. Rodriguez <[email protected]>
---
drivers/staging/ath6kl/htc2/htc_internal.h | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/ath6kl/htc2/htc_internal.h b/drivers/staging/ath6kl/htc2/htc_internal.h
index 8bc3162..e3857cf 100644
--- a/drivers/staging/ath6kl/htc2/htc_internal.h
+++ b/drivers/staging/ath6kl/htc2/htc_internal.h
@@ -99,10 +99,10 @@ typedef struct _HTC_ENDPOINT {
#define NUM_CONTROL_TX_BUFFERS 2
#define NUM_CONTROL_RX_BUFFERS (NUM_CONTROL_BUFFERS - NUM_CONTROL_TX_BUFFERS)

-typedef struct HTC_CONTROL_BUFFER {
+struct htc_control_buffer {
HTC_PACKET HtcPacket;
u8 *Buffer;
-} HTC_CONTROL_BUFFER;
+};

#define HTC_RECV_WAIT_BUFFERS (1 << 0)
#define HTC_OP_STATE_STOPPING (1 << 0)
@@ -110,7 +110,7 @@ typedef struct HTC_CONTROL_BUFFER {
/* our HTC target state */
typedef struct _HTC_TARGET {
HTC_ENDPOINT EndPoint[ENDPOINT_MAX];
- HTC_CONTROL_BUFFER HTCControlBuffers[NUM_CONTROL_BUFFERS];
+ struct htc_control_buffer HTCControlBuffers[NUM_CONTROL_BUFFERS];
HTC_ENDPOINT_CREDIT_DIST *EpCreditDistributionListHead;
HTC_PACKET_QUEUE ControlBufferTXFreeList;
HTC_PACKET_QUEUE ControlBufferRXFreeList;
--
1.7.4.15.g7811d


2011-03-14 17:59:27

by Luis R. Rodriguez

[permalink] [raw]
Subject: [PATCH 10/38] ath6kl: remove-typedef HIF_DEVICE_SCATTER_SUPPORT_INFO

remove-typedef -s HIF_DEVICE_SCATTER_SUPPORT_INFO \
"struct hif_device_scatter_support_info" drivers/staging/ath6kl/

Tested-by: Naveen Singh <[email protected]>
Signed-off-by: Luis R. Rodriguez <[email protected]>
---
.../hif/sdio/linux_sdio/include/hif_internal.h | 4 ++--
.../staging/ath6kl/hif/sdio/linux_sdio/src/hif.c | 2 +-
.../ath6kl/hif/sdio/linux_sdio/src/hif_scatter.c | 2 +-
drivers/staging/ath6kl/htc2/AR6000/ar6k.h | 2 +-
drivers/staging/ath6kl/include/hif.h | 6 +++---
5 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/ath6kl/hif/sdio/linux_sdio/include/hif_internal.h b/drivers/staging/ath6kl/hif/sdio/linux_sdio/include/hif_internal.h
index b5d1ad4..e2d2266 100644
--- a/drivers/staging/ath6kl/hif/sdio/linux_sdio/include/hif_internal.h
+++ b/drivers/staging/ath6kl/hif/sdio/linux_sdio/include/hif_internal.h
@@ -110,13 +110,13 @@ typedef struct _HIF_SCATTER_REQ_PRIV {

#define ATH_DEBUG_SCATTER ATH_DEBUG_MAKE_MODULE_MASK(0)

-int SetupHIFScatterSupport(HIF_DEVICE *device, HIF_DEVICE_SCATTER_SUPPORT_INFO *pInfo);
+int SetupHIFScatterSupport(HIF_DEVICE *device, struct hif_device_scatter_support_info *pInfo);
void CleanupHIFScatterResources(HIF_DEVICE *device);
int DoHifReadWriteScatter(HIF_DEVICE *device, BUS_REQUEST *busrequest);

#else // HIF_LINUX_MMC_SCATTER_SUPPORT

-static inline int SetupHIFScatterSupport(HIF_DEVICE *device, HIF_DEVICE_SCATTER_SUPPORT_INFO *pInfo)
+static inline int SetupHIFScatterSupport(HIF_DEVICE *device, struct hif_device_scatter_support_info *pInfo)
{
return A_ENOTSUP;
}
diff --git a/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif.c b/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif.c
index 6d3b9f4..9c9fb1e 100644
--- a/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif.c
+++ b/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif.c
@@ -723,7 +723,7 @@ HIFConfigureDevice(HIF_DEVICE *device, HIF_DEVICE_CONFIG_OPCODE opcode,
if (!device->scatter_enabled) {
return A_ENOTSUP;
}
- status = SetupHIFScatterSupport(device, (HIF_DEVICE_SCATTER_SUPPORT_INFO *)config);
+ status = SetupHIFScatterSupport(device, (struct hif_device_scatter_support_info *)config);
if (status) {
device->scatter_enabled = false;
}
diff --git a/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif_scatter.c b/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif_scatter.c
index 2a56a50..567993f 100644
--- a/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif_scatter.c
+++ b/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif_scatter.c
@@ -275,7 +275,7 @@ static int HifReadWriteScatter(HIF_DEVICE *device, HIF_SCATTER_REQ *pReq)
}

/* setup of HIF scatter resources */
-int SetupHIFScatterSupport(HIF_DEVICE *device, HIF_DEVICE_SCATTER_SUPPORT_INFO *pInfo)
+int SetupHIFScatterSupport(HIF_DEVICE *device, struct hif_device_scatter_support_info *pInfo)
{
int status = A_ERROR;
int i;
diff --git a/drivers/staging/ath6kl/htc2/AR6000/ar6k.h b/drivers/staging/ath6kl/htc2/AR6000/ar6k.h
index 85c5915..08e9ef2 100644
--- a/drivers/staging/ath6kl/htc2/AR6000/ar6k.h
+++ b/drivers/staging/ath6kl/htc2/AR6000/ar6k.h
@@ -132,7 +132,7 @@ struct ar6k_device {
struct hif_device_irq_yield_params HifIRQYieldParams;
bool DSRCanYield;
int CurrentDSRRecvCount;
- HIF_DEVICE_SCATTER_SUPPORT_INFO HifScatterInfo;
+ struct hif_device_scatter_support_info HifScatterInfo;
struct dl_list ScatterReqHead;
bool ScatterIsVirtual;
int MaxRecvBundleSize;
diff --git a/drivers/staging/ath6kl/include/hif.h b/drivers/staging/ath6kl/include/hif.h
index 2c0f490..61e4392 100644
--- a/drivers/staging/ath6kl/include/hif.h
+++ b/drivers/staging/ath6kl/include/hif.h
@@ -203,7 +203,7 @@ typedef enum {
*
* HIF_CONFIGURE_QUERY_SCATTER_REQUEST_SUPPORT
* input : none
- * output : HIF_DEVICE_SCATTER_SUPPORT_INFO
+ * output : struct hif_device_scatter_support_info
* note: This query checks if the HIF layer implements the SCATTER request interface. Scatter requests
* allows upper layers to submit mailbox I/O operations using a list of buffers. This is useful for
* multi-message transfers that can better utilize the bus interconnect.
@@ -306,14 +306,14 @@ typedef HIF_SCATTER_REQ * ( *HIF_ALLOCATE_SCATTER_REQUEST)(HIF_DEVICE *device);
typedef void ( *HIF_FREE_SCATTER_REQUEST)(HIF_DEVICE *device, HIF_SCATTER_REQ *request);
typedef int ( *HIF_READWRITE_SCATTER)(HIF_DEVICE *device, HIF_SCATTER_REQ *request);

-typedef struct _HIF_DEVICE_SCATTER_SUPPORT_INFO {
+struct hif_device_scatter_support_info {
/* information returned from HIF layer */
HIF_ALLOCATE_SCATTER_REQUEST pAllocateReqFunc;
HIF_FREE_SCATTER_REQUEST pFreeReqFunc;
HIF_READWRITE_SCATTER pReadWriteScatterFunc;
int MaxScatterEntries;
int MaxTransferSizePerScatterReq;
-} HIF_DEVICE_SCATTER_SUPPORT_INFO;
+};

struct hif_device_os_device_info {
void *pOSDevice;
--
1.7.4.15.g7811d


2011-03-14 18:02:37

by Luis R. Rodriguez

[permalink] [raw]
Subject: [PATCH 24/38] ath6kl: remove-typedef HTC_PACKET_QUEUE

remove-typedef -s HTC_PACKET_QUEUE \
"struct htc_packet_queue" drivers/staging/ath6kl/

Tested-by: Naveen Singh <[email protected]>
Signed-off-by: Luis R. Rodriguez <[email protected]>
---
drivers/staging/ath6kl/htc2/AR6000/ar6k.h | 2 +-
.../ath6kl/htc2/AR6000/ar6k_gmbox_hciuart.c | 18 +++++++-------
drivers/staging/ath6kl/htc2/htc.c | 4 +-
drivers/staging/ath6kl/htc2/htc_internal.h | 14 +++++-----
drivers/staging/ath6kl/htc2/htc_recv.c | 24 ++++++++++----------
drivers/staging/ath6kl/htc2/htc_send.c | 22 +++++++++---------
drivers/staging/ath6kl/include/hci_transport_api.h | 2 +-
drivers/staging/ath6kl/include/htc_api.h | 16 ++++++------
drivers/staging/ath6kl/include/htc_packet.h | 10 ++++----
drivers/staging/ath6kl/os/linux/ar6000_drv.c | 8 +++---
.../staging/ath6kl/os/linux/export_hci_transport.c | 2 +-
drivers/staging/ath6kl/os/linux/hci_bridge.c | 4 +-
.../staging/ath6kl/os/linux/include/ar6000_drv.h | 2 +-
.../ath6kl/os/linux/include/export_hci_transport.h | 2 +-
14 files changed, 65 insertions(+), 65 deletions(-)

diff --git a/drivers/staging/ath6kl/htc2/AR6000/ar6k.h b/drivers/staging/ath6kl/htc2/AR6000/ar6k.h
index b01542e..1ff2218 100644
--- a/drivers/staging/ath6kl/htc2/AR6000/ar6k.h
+++ b/drivers/staging/ath6kl/htc2/AR6000/ar6k.h
@@ -118,7 +118,7 @@ struct ar6k_device {
struct hif_device_mbox_info MailBoxInfo;
HIF_PENDING_EVENTS_FUNC GetPendingEventsFunc;
void *HTCContext;
- HTC_PACKET_QUEUE RegisterIOList;
+ struct htc_packet_queue RegisterIOList;
struct ar6k_async_reg_io_buffer RegIOBuffers[AR6K_MAX_REG_IO_BUFFERS];
void (*TargetFailureCallback)(void *Context);
int (*MessagePendingCallback)(void *Context,
diff --git a/drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox_hciuart.c b/drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox_hciuart.c
index 90e303f..8cf46b1 100644
--- a/drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox_hciuart.c
+++ b/drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox_hciuart.c
@@ -63,9 +63,9 @@ struct gmbox_proto_hci_uart {
u32 RecvStateFlags;
u32 SendStateFlags;
HCI_TRANSPORT_PACKET_TYPE WaitBufferType;
- 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 HCIEventBuffers; /* recv queue holding buffers for incomming event packets */
+ struct htc_packet_queue SendQueue; /* write queue holding HCI Command and ACL packets */
+ struct htc_packet_queue HCIACLRecvBuffers; /* recv queue holding buffers for incomming ACL packets */
+ struct htc_packet_queue HCIEventBuffers; /* recv queue holding buffers for incomming event packets */
struct ar6k_device *pDev;
A_MUTEX_T HCIRxLock;
A_MUTEX_T HCITxLock;
@@ -366,7 +366,7 @@ static int HCIUartMessagePending(void *pContext, u8 LookAheadBytes[], int ValidB
LOCK_HCI_RX(pProt);

} else {
- HTC_PACKET_QUEUE *pQueue;
+ struct htc_packet_queue *pQueue;
/* user is using a refill handler that can refill multiple HTC buffers */

/* select buffer queue */
@@ -483,7 +483,7 @@ static int HCIUartMessagePending(void *pContext, u8 LookAheadBytes[], int ValidB

/* check if we need to refill recv buffers */
if ((pProt->HCIConfig.pHCIPktRecvRefill != NULL) && !recvRefillCalled) {
- HTC_PACKET_QUEUE *pQueue;
+ struct htc_packet_queue *pQueue;
int watermark;

if (pktType == HCI_ACL_TYPE) {
@@ -514,7 +514,7 @@ static int HCIUartMessagePending(void *pContext, u8 LookAheadBytes[], int ValidB

/* see if we need to recycle the recv buffer */
if (status && (pPacket != NULL)) {
- HTC_PACKET_QUEUE queue;
+ struct htc_packet_queue queue;

if (A_EPROTO == status) {
DebugDumpBytes(pPacket->pBuffer, totalRecvLength, "Bad HCI-UART Recv packet");
@@ -797,7 +797,7 @@ static int HCITrySend(struct gmbox_proto_hci_uart *pProt, struct htc_packet *pPa
static void FlushSendQueue(struct gmbox_proto_hci_uart *pProt)
{
struct htc_packet *pPacket;
- HTC_PACKET_QUEUE discardQueue;
+ struct htc_packet_queue discardQueue;

INIT_HTC_PACKET_QUEUE(&discardQueue);

@@ -820,7 +820,7 @@ static void FlushSendQueue(struct gmbox_proto_hci_uart *pProt)

static void FlushRecvBuffers(struct gmbox_proto_hci_uart *pProt)
{
- HTC_PACKET_QUEUE discardQueue;
+ struct htc_packet_queue discardQueue;
struct htc_packet *pPacket;

INIT_HTC_PACKET_QUEUE(&discardQueue);
@@ -1001,7 +1001,7 @@ void HCI_TransportDetach(HCI_TRANSPORT_HANDLE HciTrans)
AR_DEBUG_PRINTF(ATH_DEBUG_TRC,("-HCI_TransportAttach \n"));
}

-int HCI_TransportAddReceivePkts(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET_QUEUE *pQueue)
+int HCI_TransportAddReceivePkts(HCI_TRANSPORT_HANDLE HciTrans, struct htc_packet_queue *pQueue)
{
struct gmbox_proto_hci_uart *pProt = (struct gmbox_proto_hci_uart *)HciTrans;
int status = 0;
diff --git a/drivers/staging/ath6kl/htc2/htc.c b/drivers/staging/ath6kl/htc2/htc.c
index 04ba80e..bf4fdb3 100644
--- a/drivers/staging/ath6kl/htc2/htc.c
+++ b/drivers/staging/ath6kl/htc2/htc.c
@@ -43,14 +43,14 @@ ATH_DEBUG_INSTANTIATE_MODULE_VAR(htc,
static void HTCReportFailure(void *Context);
static void ResetEndpointStates(HTC_TARGET *target);

-void HTCFreeControlBuffer(HTC_TARGET *target, struct htc_packet *pPacket, HTC_PACKET_QUEUE *pList)
+void HTCFreeControlBuffer(HTC_TARGET *target, struct htc_packet *pPacket, struct htc_packet_queue *pList)
{
LOCK_HTC(target);
HTC_PACKET_ENQUEUE(pList,pPacket);
UNLOCK_HTC(target);
}

-struct htc_packet *HTCAllocControlBuffer(HTC_TARGET *target, HTC_PACKET_QUEUE *pList)
+struct htc_packet *HTCAllocControlBuffer(HTC_TARGET *target, struct htc_packet_queue *pList)
{
struct htc_packet *pPacket;

diff --git a/drivers/staging/ath6kl/htc2/htc_internal.h b/drivers/staging/ath6kl/htc2/htc_internal.h
index 5f85350..67de917 100644
--- a/drivers/staging/ath6kl/htc2/htc_internal.h
+++ b/drivers/staging/ath6kl/htc2/htc_internal.h
@@ -69,15 +69,15 @@ struct htc_endpoint {
HTC_ENDPOINT_ID Id;
HTC_SERVICE_ID ServiceID; /* service ID this endpoint is bound to
non-zero value means this endpoint is in use */
- HTC_PACKET_QUEUE TxQueue; /* HTC frame buffer TX queue */
- HTC_PACKET_QUEUE RxBuffers; /* HTC frame buffer RX list */
+ struct htc_packet_queue TxQueue; /* HTC frame buffer TX queue */
+ struct htc_packet_queue RxBuffers; /* HTC frame buffer RX list */
struct htc_endpoint_credit_dist CreditDist; /* credit distribution structure (exposed to driver layer) */
struct htc_ep_callbacks EpCallBacks; /* callbacks associated with this endpoint */
int MaxTxQueueDepth; /* max depth of the TX queue before we need to
call driver's full handler */
int MaxMsgLength; /* max length of endpoint message */
int TxProcessCount; /* reference count to continue tx processing */
- HTC_PACKET_QUEUE RecvIndicationQueue; /* recv packets ready to be indicated */
+ struct htc_packet_queue RecvIndicationQueue; /* recv packets ready to be indicated */
int RxProcessCount; /* reference count to allow single processing context */
struct _HTC_TARGET *target; /* back pointer to target */
u8 SeqNo; /* TX seq no (helpful) for debugging */
@@ -112,8 +112,8 @@ typedef struct _HTC_TARGET {
struct htc_endpoint EndPoint[ENDPOINT_MAX];
struct htc_control_buffer HTCControlBuffers[NUM_CONTROL_BUFFERS];
struct htc_endpoint_credit_dist *EpCreditDistributionListHead;
- HTC_PACKET_QUEUE ControlBufferTXFreeList;
- HTC_PACKET_QUEUE ControlBufferRXFreeList;
+ struct htc_packet_queue ControlBufferTXFreeList;
+ struct htc_packet_queue ControlBufferRXFreeList;
HTC_CREDIT_DIST_CALLBACK DistributeCredits;
HTC_CREDIT_INIT_CALLBACK InitCredits;
void *pCredDistContext;
@@ -165,8 +165,8 @@ typedef struct _HTC_TARGET {
void HTCControlTxComplete(void *Context, struct htc_packet *pPacket);
void HTCControlRecv(void *Context, struct htc_packet *pPacket);
int HTCWaitforControlMessage(HTC_TARGET *target, struct htc_packet **ppControlPacket);
-struct htc_packet *HTCAllocControlBuffer(HTC_TARGET *target, HTC_PACKET_QUEUE *pList);
-void HTCFreeControlBuffer(HTC_TARGET *target, struct htc_packet *pPacket, HTC_PACKET_QUEUE *pList);
+struct htc_packet *HTCAllocControlBuffer(HTC_TARGET *target, struct htc_packet_queue *pList);
+void HTCFreeControlBuffer(HTC_TARGET *target, struct htc_packet *pPacket, struct htc_packet_queue *pList);
int HTCIssueSend(HTC_TARGET *target, struct htc_packet *pPacket);
void HTCRecvCompleteHandler(void *Context, struct htc_packet *pPacket);
int HTCRecvMessagePendingHandler(void *Context, u32 MsgLookAheads[], int NumLookAheads, bool *pAsyncProc, int *pNumPktsFetched);
diff --git a/drivers/staging/ath6kl/htc2/htc_recv.c b/drivers/staging/ath6kl/htc2/htc_recv.c
index f702963..8ad1d03 100644
--- a/drivers/staging/ath6kl/htc2/htc_recv.c
+++ b/drivers/staging/ath6kl/htc2/htc_recv.c
@@ -51,7 +51,7 @@
#endif

static void DoRecvCompletion(struct htc_endpoint *pEndpoint,
- HTC_PACKET_QUEUE *pQueueToIndicate)
+ struct htc_packet_queue *pQueueToIndicate)
{

do {
@@ -434,7 +434,7 @@ static INLINE void HTCAsyncRecvCheckMorePackets(HTC_TARGET *target,
/* unload the recv completion queue */
static INLINE void DrainRecvIndicationQueue(HTC_TARGET *target, struct htc_endpoint *pEndpoint)
{
- HTC_PACKET_QUEUE recvCompletions;
+ struct htc_packet_queue recvCompletions;

AR_DEBUG_PRINTF(ATH_DEBUG_RECV, ("+DrainRecvIndicationQueue \n"));

@@ -690,7 +690,7 @@ static int AllocAndPrepareRxPackets(HTC_TARGET *target,
u32 LookAheads[],
int Messages,
struct htc_endpoint *pEndpoint,
- HTC_PACKET_QUEUE *pQueue)
+ struct htc_packet_queue *pQueue)
{
int status = 0;
struct htc_packet *pPacket;
@@ -889,7 +889,7 @@ static void HTCAsyncRecvScatterCompletion(struct hif_scatter_req *pScatterReq)
HTC_TARGET *target = (HTC_TARGET *)pScatterReq->Context;
int status;
bool partialBundle = false;
- HTC_PACKET_QUEUE localRecvQueue;
+ struct htc_packet_queue localRecvQueue;
bool procError = false;

AR_DEBUG_PRINTF(ATH_DEBUG_RECV,("+HTCAsyncRecvScatterCompletion TotLen: %d Entries: %d\n",
@@ -985,8 +985,8 @@ static void HTCAsyncRecvScatterCompletion(struct hif_scatter_req *pScatterReq)
}

static int HTCIssueRecvPacketBundle(HTC_TARGET *target,
- HTC_PACKET_QUEUE *pRecvPktQueue,
- HTC_PACKET_QUEUE *pSyncCompletionQueue,
+ struct htc_packet_queue *pRecvPktQueue,
+ struct htc_packet_queue *pSyncCompletionQueue,
int *pNumPacketsFetched,
bool PartialBundle)
{
@@ -1126,7 +1126,7 @@ int HTCRecvMessagePendingHandler(void *Context, u32 MsgLookAheads[], int NumLook
bool asyncProc = false;
u32 lookAheads[HTC_HOST_MAX_MSG_PER_BUNDLE];
int pktsFetched;
- HTC_PACKET_QUEUE recvPktQueue, syncCompletedPktsQueue;
+ struct htc_packet_queue recvPktQueue, syncCompletedPktsQueue;
bool partialBundle;
HTC_ENDPOINT_ID id;
int totalFetched = 0;
@@ -1283,7 +1283,7 @@ int HTCRecvMessagePendingHandler(void *Context, u32 MsgLookAheads[], int NumLook

/* unload sync completion queue */
while (!HTC_QUEUE_EMPTY(&syncCompletedPktsQueue)) {
- HTC_PACKET_QUEUE container;
+ struct htc_packet_queue container;

pPacket = HTC_PACKET_DEQUEUE(&syncCompletedPktsQueue);
A_ASSERT(pPacket != NULL);
@@ -1385,7 +1385,7 @@ int HTCRecvMessagePendingHandler(void *Context, u32 MsgLookAheads[], int NumLook
return status;
}

-int HTCAddReceivePktMultiple(HTC_HANDLE HTCHandle, HTC_PACKET_QUEUE *pPktQueue)
+int HTCAddReceivePktMultiple(HTC_HANDLE HTCHandle, struct htc_packet_queue *pPktQueue)
{
HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
struct htc_endpoint *pEndpoint;
@@ -1457,7 +1457,7 @@ int HTCAddReceivePktMultiple(HTC_HANDLE HTCHandle, HTC_PACKET_QUEUE *pPktQueue)
/* Makes a buffer available to the HTC module */
int HTCAddReceivePkt(HTC_HANDLE HTCHandle, struct htc_packet *pPacket)
{
- HTC_PACKET_QUEUE queue;
+ struct htc_packet_queue queue;
INIT_HTC_PACKET_QUEUE_AND_ADD(&queue,pPacket);
return HTCAddReceivePktMultiple(HTCHandle, &queue);
}
@@ -1486,10 +1486,10 @@ void HTCUnblockRecv(HTC_HANDLE HTCHandle)
}
}

-static void HTCFlushRxQueue(HTC_TARGET *target, struct htc_endpoint *pEndpoint, HTC_PACKET_QUEUE *pQueue)
+static void HTCFlushRxQueue(HTC_TARGET *target, struct htc_endpoint *pEndpoint, struct htc_packet_queue *pQueue)
{
struct htc_packet *pPacket;
- HTC_PACKET_QUEUE container;
+ struct htc_packet_queue container;

LOCK_HTC_RX(target);

diff --git a/drivers/staging/ath6kl/htc2/htc_send.c b/drivers/staging/ath6kl/htc2/htc_send.c
index 8fb05d9..8052658 100644
--- a/drivers/staging/ath6kl/htc2/htc_send.c
+++ b/drivers/staging/ath6kl/htc2/htc_send.c
@@ -44,7 +44,7 @@ typedef enum _HTC_SEND_QUEUE_RESULT {
}

static void DoSendCompletion(struct htc_endpoint *pEndpoint,
- HTC_PACKET_QUEUE *pQueueToIndicate)
+ struct htc_packet_queue *pQueueToIndicate)
{
do {

@@ -105,7 +105,7 @@ static void HTCSendPktCompletionHandler(void *Context, struct htc_packet *pPacke
{
HTC_TARGET *target = (HTC_TARGET *)Context;
struct htc_endpoint *pEndpoint = &target->EndPoint[pPacket->Endpoint];
- HTC_PACKET_QUEUE container;
+ struct htc_packet_queue container;

CompleteSentPacket(target,pEndpoint,pPacket);
INIT_HTC_PACKET_QUEUE_AND_ADD(&container,pPacket);
@@ -148,7 +148,7 @@ int HTCIssueSend(HTC_TARGET *target, struct htc_packet *pPacket)
/* get HTC send packets from the TX queue on an endpoint */
static INLINE void GetHTCSendPackets(HTC_TARGET *target,
struct htc_endpoint *pEndpoint,
- HTC_PACKET_QUEUE *pQueue)
+ struct htc_packet_queue *pQueue)
{
int creditsRequired;
int remainder;
@@ -271,7 +271,7 @@ static void HTCAsyncSendScatterCompletion(struct hif_scatter_req *pScatterReq)
struct htc_endpoint *pEndpoint = (struct htc_endpoint *)pScatterReq->Context;
HTC_TARGET *target = (HTC_TARGET *)pEndpoint->target;
int status = 0;
- HTC_PACKET_QUEUE sendCompletes;
+ struct htc_packet_queue sendCompletes;

INIT_HTC_PACKET_QUEUE(&sendCompletes);

@@ -310,7 +310,7 @@ static void HTCAsyncSendScatterCompletion(struct hif_scatter_req *pScatterReq)
* - we drop below the minimum number of messages for a bundle
* */
static void HTCIssueSendBundle(struct htc_endpoint *pEndpoint,
- HTC_PACKET_QUEUE *pQueue,
+ struct htc_packet_queue *pQueue,
int *pBundlesSent,
int *pTotalBundlesPkts)
{
@@ -479,9 +479,9 @@ static void HTCIssueSendBundle(struct htc_endpoint *pEndpoint,
* this function returns the result of the attempt to send a queue of HTC packets */
static HTC_SEND_QUEUE_RESULT HTCTrySend(HTC_TARGET *target,
struct htc_endpoint *pEndpoint,
- HTC_PACKET_QUEUE *pCallersSendQueue)
+ struct htc_packet_queue *pCallersSendQueue)
{
- HTC_PACKET_QUEUE sendQueue; /* temp queue to hold packets at various stages */
+ struct htc_packet_queue sendQueue; /* temp queue to hold packets at various stages */
struct htc_packet *pPacket;
int bundlesSent;
int pktsInBundles;
@@ -668,7 +668,7 @@ static HTC_SEND_QUEUE_RESULT HTCTrySend(HTC_TARGET *target,
return HTC_SEND_QUEUE_OK;
}

-int HTCSendPktsMultiple(HTC_HANDLE HTCHandle, HTC_PACKET_QUEUE *pPktQueue)
+int HTCSendPktsMultiple(HTC_HANDLE HTCHandle, struct htc_packet_queue *pPktQueue)
{
HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
struct htc_endpoint *pEndpoint;
@@ -711,7 +711,7 @@ int HTCSendPktsMultiple(HTC_HANDLE HTCHandle, HTC_PACKET_QUEUE *pPktQueue)
/* HTC API - HTCSendPkt */
int HTCSendPkt(HTC_HANDLE HTCHandle, struct htc_packet *pPacket)
{
- HTC_PACKET_QUEUE queue;
+ struct htc_packet_queue queue;

AR_DEBUG_PRINTF(ATH_DEBUG_SEND,
("+-HTCSendPkt: Enter endPointId: %d, buffer: 0x%lX, length: %d \n",
@@ -841,8 +841,8 @@ void HTCProcessCreditRpt(HTC_TARGET *target, HTC_CREDIT_REPORT *pRpt, int NumEnt
static void HTCFlushEndpointTX(HTC_TARGET *target, struct htc_endpoint *pEndpoint, HTC_TX_TAG Tag)
{
struct htc_packet *pPacket;
- HTC_PACKET_QUEUE discardQueue;
- HTC_PACKET_QUEUE container;
+ struct htc_packet_queue discardQueue;
+ struct htc_packet_queue container;

/* initialize the discard queue */
INIT_HTC_PACKET_QUEUE(&discardQueue);
diff --git a/drivers/staging/ath6kl/include/hci_transport_api.h b/drivers/staging/ath6kl/include/hci_transport_api.h
index 3eac192..5e903fa 100644
--- a/drivers/staging/ath6kl/include/hci_transport_api.h
+++ b/drivers/staging/ath6kl/include/hci_transport_api.h
@@ -141,7 +141,7 @@ void HCI_TransportDetach(HCI_TRANSPORT_HANDLE HciTrans);
@example:
@see also:
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-int HCI_TransportAddReceivePkts(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET_QUEUE *pQueue);
+int HCI_TransportAddReceivePkts(HCI_TRANSPORT_HANDLE HciTrans, struct htc_packet_queue *pQueue);

/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@desc: Send an HCI packet packet
diff --git a/drivers/staging/ath6kl/include/htc_api.h b/drivers/staging/ath6kl/include/htc_api.h
index ca85bad..ae41f98 100644
--- a/drivers/staging/ath6kl/include/htc_api.h
+++ b/drivers/staging/ath6kl/include/htc_api.h
@@ -51,21 +51,21 @@ struct htc_init_info {
/* per service connection send completion */
typedef void (*HTC_EP_SEND_PKT_COMPLETE)(void *,struct htc_packet *);
/* per service connection callback when a plurality of packets have been sent
- * The HTC_PACKET_QUEUE is a temporary queue object (e.g. freed on return from the callback)
+ * The struct htc_packet_queue is a temporary queue object (e.g. freed on return from the callback)
* to hold a list of completed send packets.
* If the handler cannot fully traverse the packet queue before returning, it should
* transfer the items of the queue into the caller's private queue using:
* HTC_PACKET_ENQUEUE() */
-typedef void (*HTC_EP_SEND_PKT_COMP_MULTIPLE)(void *,HTC_PACKET_QUEUE *);
+typedef void (*HTC_EP_SEND_PKT_COMP_MULTIPLE)(void *,struct htc_packet_queue *);
/* per service connection pkt received */
typedef void (*HTC_EP_RECV_PKT)(void *,struct htc_packet *);
/* per service connection callback when a plurality of packets are received
- * The HTC_PACKET_QUEUE is a temporary queue object (e.g. freed on return from the callback)
+ * The struct htc_packet_queue is a temporary queue object (e.g. freed on return from the callback)
* to hold a list of recv packets.
* If the handler cannot fully traverse the packet queue before returning, it should
* transfer the items of the queue into the caller's private queue using:
* HTC_PACKET_ENQUEUE() */
-typedef void (*HTC_EP_RECV_PKT_MULTIPLE)(void *,HTC_PACKET_QUEUE *);
+typedef void (*HTC_EP_RECV_PKT_MULTIPLE)(void *,struct htc_packet_queue *);

/* Optional per service connection receive buffer re-fill callback,
* On some OSes (like Linux) packets are allocated from a global pool and indicated up
@@ -502,7 +502,7 @@ void HTCUnblockRecv(HTC_HANDLE HTCHandle);
@return: 0
@notes: Caller must initialize each packet using SET_HTC_PACKET_INFO_TX() macro.
The queue must only contain packets directed at the same endpoint.
- Caller supplies a pointer to an HTC_PACKET_QUEUE structure holding the TX packets in FIFO order.
+ Caller supplies a pointer to an struct htc_packet_queue structure holding the TX packets in FIFO order.
This API will remove the packets from the pkt queue and place them into the HTC Tx Queue
and bundle messages where possible.
The caller may allocate the pkt queue on the stack to hold the packets.
@@ -511,7 +511,7 @@ void HTCUnblockRecv(HTC_HANDLE HTCHandle);
@example:
@see also: HTCFlushEndpoint
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-int HTCSendPktsMultiple(HTC_HANDLE HTCHandle, HTC_PACKET_QUEUE *pPktQueue);
+int HTCSendPktsMultiple(HTC_HANDLE HTCHandle, struct htc_packet_queue *pPktQueue);

/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@desc: Add multiple receive packets to HTC
@@ -523,14 +523,14 @@ int HTCSendPktsMultiple(HTC_HANDLE HTCHandle, HTC_PACKET_QUEUE *pPktQueue);
@notes: user must supply HTC packets for capturing incomming HTC frames. The caller
must initialize each HTC packet using the SET_HTC_PACKET_INFO_RX_REFILL()
macro. The queue must only contain recv packets for the same endpoint.
- Caller supplies a pointer to an HTC_PACKET_QUEUE structure holding the recv packet.
+ Caller supplies a pointer to an struct htc_packet_queue structure holding the recv packet.
This API will remove the packets from the pkt queue and place them into internal
recv packet list.
The caller may allocate the pkt queue on the stack to hold the packets.
@example:
@see also:
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-int HTCAddReceivePktMultiple(HTC_HANDLE HTCHandle, HTC_PACKET_QUEUE *pPktQueue);
+int HTCAddReceivePktMultiple(HTC_HANDLE HTCHandle, struct htc_packet_queue *pPktQueue);

/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@desc: Check if an endpoint is marked active
diff --git a/drivers/staging/ath6kl/include/htc_packet.h b/drivers/staging/ath6kl/include/htc_packet.h
index 4311c93..ca23efd 100644
--- a/drivers/staging/ath6kl/include/htc_packet.h
+++ b/drivers/staging/ath6kl/include/htc_packet.h
@@ -139,10 +139,10 @@ struct htc_packet {
}

/* HTC Packet Queueing Macros */
-typedef struct _HTC_PACKET_QUEUE {
+struct htc_packet_queue {
struct dl_list QueueHead;
int Depth;
-} HTC_PACKET_QUEUE;
+};

/* initialize queue */
#define INIT_HTC_PACKET_QUEUE(pQ) \
@@ -165,7 +165,7 @@ typedef struct _HTC_PACKET_QUEUE {
/* test if a queue is empty */
#define HTC_QUEUE_EMPTY(pQ) ((pQ)->Depth == 0)
/* get packet at head without removing it */
-static INLINE struct htc_packet *HTC_GET_PKT_AT_HEAD(HTC_PACKET_QUEUE *queue) {
+static INLINE struct htc_packet *HTC_GET_PKT_AT_HEAD(struct htc_packet_queue *queue) {
if (queue->Depth == 0) {
return NULL;
}
@@ -179,7 +179,7 @@ static INLINE struct htc_packet *HTC_GET_PKT_AT_HEAD(HTC_PACKET_QUEUE *queue)
}

/* dequeue an HTC packet from the head of the queue */
-static INLINE struct htc_packet *HTC_PACKET_DEQUEUE(HTC_PACKET_QUEUE *queue) {
+static INLINE struct htc_packet *HTC_PACKET_DEQUEUE(struct htc_packet_queue *queue) {
struct dl_list *pItem = DL_ListRemoveItemFromHead(&queue->QueueHead);
if (pItem != NULL) {
queue->Depth--;
@@ -189,7 +189,7 @@ static INLINE struct htc_packet *HTC_PACKET_DEQUEUE(HTC_PACKET_QUEUE *queue) {
}

/* dequeue an HTC packet from the tail of the queue */
-static INLINE struct htc_packet *HTC_PACKET_DEQUEUE_TAIL(HTC_PACKET_QUEUE *queue) {
+static INLINE struct htc_packet *HTC_PACKET_DEQUEUE_TAIL(struct htc_packet_queue *queue) {
struct dl_list *pItem = DL_ListRemoveItemFromTail(&queue->QueueHead);
if (pItem != NULL) {
queue->Depth--;
diff --git a/drivers/staging/ath6kl/os/linux/ar6000_drv.c b/drivers/staging/ath6kl/os/linux/ar6000_drv.c
index ebfc7fd..fab1e02 100644
--- a/drivers/staging/ath6kl/os/linux/ar6000_drv.c
+++ b/drivers/staging/ath6kl/os/linux/ar6000_drv.c
@@ -317,7 +317,7 @@ static void ar6000_rx(void *Context, struct htc_packet *pPacket);

static void ar6000_rx_refill(void *Context,HTC_ENDPOINT_ID Endpoint);

-static void ar6000_tx_complete(void *Context, HTC_PACKET_QUEUE *pPackets);
+static void ar6000_tx_complete(void *Context, struct htc_packet_queue *pPackets);

static HTC_SEND_FULL_ACTION ar6000_tx_queue_full(void *Context, struct htc_packet *pPacket);

@@ -3461,7 +3461,7 @@ static HTC_SEND_FULL_ACTION ar6000_tx_queue_full(void *Context, struct htc_packe


static void
-ar6000_tx_complete(void *Context, HTC_PACKET_QUEUE *pPacketQueue)
+ar6000_tx_complete(void *Context, struct htc_packet_queue *pPacketQueue)
{
AR_SOFTC_T *ar = (AR_SOFTC_T *)Context;
u32 mapNo = 0;
@@ -3992,7 +3992,7 @@ ar6000_rx_refill(void *Context, HTC_ENDPOINT_ID Endpoint)
int RxBuffers;
int buffersToRefill;
struct htc_packet *pPacket;
- HTC_PACKET_QUEUE queue;
+ struct htc_packet_queue queue;

buffersToRefill = (int)AR6000_MAX_RX_BUFFERS -
HTCGetNumRecvBuffers(ar->arHtcTarget, Endpoint);
@@ -6323,7 +6323,7 @@ static void DoHTCSendPktsTest(AR_SOFTC_T *ar, int MapNo, HTC_ENDPOINT_ID eid, st
struct sk_buff *new_skb;
int i;
int pkts = 0;
- HTC_PACKET_QUEUE pktQueue;
+ struct htc_packet_queue pktQueue;
EPPING_HEADER *eppingHdr;

eppingHdr = A_NETBUF_DATA(dupskb);
diff --git a/drivers/staging/ath6kl/os/linux/export_hci_transport.c b/drivers/staging/ath6kl/os/linux/export_hci_transport.c
index 319dc2e..787a8bd 100644
--- a/drivers/staging/ath6kl/os/linux/export_hci_transport.c
+++ b/drivers/staging/ath6kl/os/linux/export_hci_transport.c
@@ -38,7 +38,7 @@

HCI_TRANSPORT_HANDLE (*_HCI_TransportAttach)(void *HTCHandle, struct hci_transport_config_info *pInfo);
void (*_HCI_TransportDetach)(HCI_TRANSPORT_HANDLE HciTrans);
-int (*_HCI_TransportAddReceivePkts)(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET_QUEUE *pQueue);
+int (*_HCI_TransportAddReceivePkts)(HCI_TRANSPORT_HANDLE HciTrans, struct htc_packet_queue *pQueue);
int (*_HCI_TransportSendPkt)(HCI_TRANSPORT_HANDLE HciTrans, struct htc_packet *pPacket, bool Synchronous);
void (*_HCI_TransportStop)(HCI_TRANSPORT_HANDLE HciTrans);
int (*_HCI_TransportStart)(HCI_TRANSPORT_HANDLE HciTrans);
diff --git a/drivers/staging/ath6kl/os/linux/hci_bridge.c b/drivers/staging/ath6kl/os/linux/hci_bridge.c
index 4324a9d..4b7f5a8 100644
--- a/drivers/staging/ath6kl/os/linux/hci_bridge.c
+++ b/drivers/staging/ath6kl/os/linux/hci_bridge.c
@@ -79,7 +79,7 @@ struct ar6k_hci_bridge_info {
struct hci_dev *pBtStackHCIDev; /* BT Stack HCI dev */
bool HciNormalMode; /* Actual HCI mode enabled (non-TEST)*/
bool HciRegistered; /* HCI device registered with stack */
- HTC_PACKET_QUEUE HTCPacketStructHead;
+ struct htc_packet_queue HTCPacketStructHead;
u8 *pHTCStructAlloc;
spinlock_t BridgeLock;
#ifdef EXPORT_HCI_BRIDGE_INTERFACE
@@ -163,7 +163,7 @@ static void RefillRecvBuffers(struct ar6k_hci_bridge_info *pHcidevInfo,
{
int length, i;
void *osBuf = NULL;
- HTC_PACKET_QUEUE queue;
+ struct htc_packet_queue queue;
struct htc_packet *pPacket;

INIT_HTC_PACKET_QUEUE(&queue);
diff --git a/drivers/staging/ath6kl/os/linux/include/ar6000_drv.h b/drivers/staging/ath6kl/os/linux/include/ar6000_drv.h
index 29ac830..8d8a964 100644
--- a/drivers/staging/ath6kl/os/linux/include/ar6000_drv.h
+++ b/drivers/staging/ath6kl/os/linux/include/ar6000_drv.h
@@ -586,7 +586,7 @@ typedef struct ar6_softc {
u16 ap_beacon_interval;
u16 arRTS;
u16 arACS; /* AP mode - Auto Channel Selection */
- HTC_PACKET_QUEUE amsdu_rx_buffer_queue;
+ struct htc_packet_queue amsdu_rx_buffer_queue;
bool bIsDestroyProgress; /* flag to indicate ar6k destroy is in progress */
A_TIMER disconnect_timer;
u8 rxMetaVersion;
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 8e52de7..31f4f78 100644
--- a/drivers/staging/ath6kl/os/linux/include/export_hci_transport.h
+++ b/drivers/staging/ath6kl/os/linux/include/export_hci_transport.h
@@ -27,7 +27,7 @@

extern HCI_TRANSPORT_HANDLE (*_HCI_TransportAttach)(void *HTCHandle, struct hci_transport_config_info *pInfo);
extern void (*_HCI_TransportDetach)(HCI_TRANSPORT_HANDLE HciTrans);
-extern int (*_HCI_TransportAddReceivePkts)(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET_QUEUE *pQueue);
+extern int (*_HCI_TransportAddReceivePkts)(HCI_TRANSPORT_HANDLE HciTrans, struct htc_packet_queue *pQueue);
extern int (*_HCI_TransportSendPkt)(HCI_TRANSPORT_HANDLE HciTrans, struct htc_packet *pPacket, bool Synchronous);
extern void (*_HCI_TransportStop)(HCI_TRANSPORT_HANDLE HciTrans);
extern int (*_HCI_TransportStart)(HCI_TRANSPORT_HANDLE HciTrans);
--
1.7.4.15.g7811d


2011-03-14 17:59:41

by Luis R. Rodriguez

[permalink] [raw]
Subject: [PATCH 20/38] ath6kl: remove-typedef HTC_EP_CALLBACKS

remove-typedef -s HTC_EP_CALLBACKS \
"struct htc_ep_callbacks" drivers/staging/ath6kl/

Tested-by: Naveen Singh <[email protected]>
Signed-off-by: Luis R. Rodriguez <[email protected]>
---
drivers/staging/ath6kl/htc2/htc_internal.h | 2 +-
drivers/staging/ath6kl/include/htc_api.h | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/ath6kl/htc2/htc_internal.h b/drivers/staging/ath6kl/htc2/htc_internal.h
index 0e363a8..d574015 100644
--- a/drivers/staging/ath6kl/htc2/htc_internal.h
+++ b/drivers/staging/ath6kl/htc2/htc_internal.h
@@ -72,7 +72,7 @@ struct htc_endpoint {
HTC_PACKET_QUEUE TxQueue; /* HTC frame buffer TX queue */
HTC_PACKET_QUEUE RxBuffers; /* HTC frame buffer RX list */
struct htc_endpoint_credit_dist CreditDist; /* credit distribution structure (exposed to driver layer) */
- HTC_EP_CALLBACKS EpCallBacks; /* callbacks associated with this endpoint */
+ struct htc_ep_callbacks EpCallBacks; /* callbacks associated with this endpoint */
int MaxTxQueueDepth; /* max depth of the TX queue before we need to
call driver's full handler */
int MaxMsgLength; /* max length of endpoint message */
diff --git a/drivers/staging/ath6kl/include/htc_api.h b/drivers/staging/ath6kl/include/htc_api.h
index db3cbcf9..ad25d3e 100644
--- a/drivers/staging/ath6kl/include/htc_api.h
+++ b/drivers/staging/ath6kl/include/htc_api.h
@@ -116,7 +116,7 @@ typedef enum _HTC_SEND_FULL_ACTION {
* must ONLY inspect the packet, it may not free or reclaim the packet. */
typedef HTC_SEND_FULL_ACTION (*HTC_EP_SEND_QUEUE_FULL)(void *, HTC_PACKET *pPacket);

-typedef struct _HTC_EP_CALLBACKS {
+struct htc_ep_callbacks {
void *pContext; /* context for each callback */
HTC_EP_SEND_PKT_COMPLETE EpTxComplete; /* tx completion callback for connected endpoint */
HTC_EP_RECV_PKT EpRecv; /* receive callback for connected endpoint */
@@ -136,7 +136,7 @@ typedef struct _HTC_EP_CALLBACKS {
when the recv queue drops below this value
if set to 0, the refill is only called when packets
are empty */
-} HTC_EP_CALLBACKS;
+};

/* service connection information */
typedef struct _HTC_SERVICE_CONNECT_REQ {
@@ -144,7 +144,7 @@ typedef struct _HTC_SERVICE_CONNECT_REQ {
u16 ConnectionFlags; /* connection flags, see htc protocol definition */
u8 *pMetaData; /* ptr to optional service-specific meta-data */
u8 MetaDataLength; /* optional meta data length */
- HTC_EP_CALLBACKS EpCallbacks; /* endpoint callbacks */
+ struct htc_ep_callbacks EpCallbacks; /* endpoint callbacks */
int MaxSendQueueDepth; /* maximum depth of any send queue */
u32 LocalConnectionFlags; /* HTC flags for the host-side (local) connection */
unsigned int MaxSendMsgSize; /* override max message size in send direction */
--
1.7.4.15.g7811d


2011-03-14 17:59:25

by Luis R. Rodriguez

[permalink] [raw]
Subject: [PATCH 08/38] ath6kl: remove-typedef HIF_DEVICE_MBOX_INFO

remove-typedef -s HIF_DEVICE_MBOX_INFO \
"struct hif_device_mbox_info" drivers/staging/ath6kl/

Tested-by: Naveen Singh <[email protected]>
Signed-off-by: Luis R. Rodriguez <[email protected]>
---
.../staging/ath6kl/hif/common/hif_sdio_common.h | 2 +-
.../staging/ath6kl/hif/sdio/linux_sdio/src/hif.c | 4 ++--
drivers/staging/ath6kl/htc2/AR6000/ar6k.h | 2 +-
drivers/staging/ath6kl/include/hif.h | 6 +++---
4 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/ath6kl/hif/common/hif_sdio_common.h b/drivers/staging/ath6kl/hif/common/hif_sdio_common.h
index 9939a4a..93a2adc 100644
--- a/drivers/staging/ath6kl/hif/common/hif_sdio_common.h
+++ b/drivers/staging/ath6kl/hif/common/hif_sdio_common.h
@@ -58,7 +58,7 @@
#define HIF_DEFAULT_IO_BLOCK_SIZE 128

/* set extended MBOX window information for SDIO interconnects */
-static INLINE void SetExtendedMboxWindowInfo(u16 Manfid, HIF_DEVICE_MBOX_INFO *pInfo)
+static INLINE void SetExtendedMboxWindowInfo(u16 Manfid, struct hif_device_mbox_info *pInfo)
{
switch (Manfid & MANUFACTURER_ID_AR6K_BASE_MASK) {
case MANUFACTURER_ID_AR6002_BASE :
diff --git a/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif.c b/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif.c
index 8a1cedb..9b947b4 100644
--- a/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif.c
+++ b/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif.c
@@ -710,9 +710,9 @@ HIFConfigureDevice(HIF_DEVICE *device, HIF_DEVICE_CONFIG_OPCODE opcode,
((u32 *)config)[count] = HIF_MBOX_START_ADDR(count);
}

- if (configLen >= sizeof(HIF_DEVICE_MBOX_INFO)) {
+ if (configLen >= sizeof(struct hif_device_mbox_info)) {
SetExtendedMboxWindowInfo((u16)device->func->device,
- (HIF_DEVICE_MBOX_INFO *)config);
+ (struct hif_device_mbox_info *)config);
}

break;
diff --git a/drivers/staging/ath6kl/htc2/AR6000/ar6k.h b/drivers/staging/ath6kl/htc2/AR6000/ar6k.h
index e367288..85c5915 100644
--- a/drivers/staging/ath6kl/htc2/AR6000/ar6k.h
+++ b/drivers/staging/ath6kl/htc2/AR6000/ar6k.h
@@ -115,7 +115,7 @@ struct ar6k_device {
void *HIFDevice;
u32 BlockSize;
u32 BlockMask;
- HIF_DEVICE_MBOX_INFO MailBoxInfo;
+ struct hif_device_mbox_info MailBoxInfo;
HIF_PENDING_EVENTS_FUNC GetPendingEventsFunc;
void *HTCContext;
HTC_PACKET_QUEUE RegisterIOList;
diff --git a/drivers/staging/ath6kl/include/hif.h b/drivers/staging/ath6kl/include/hif.h
index 044af7e..8df01b3 100644
--- a/drivers/staging/ath6kl/include/hif.h
+++ b/drivers/staging/ath6kl/include/hif.h
@@ -153,7 +153,7 @@ typedef enum {
*
* HIF_DEVICE_GET_MBOX_ADDR
* input : none
- * output : HIF_DEVICE_MBOX_INFO
+ * output : struct hif_device_mbox_info
* notes:
*
* HIF_DEVICE_GET_PENDING_EVENTS_FUNC
@@ -235,7 +235,7 @@ typedef enum _MBOX_BUF_IF_TYPE {
MBOX_BUS_IF_SPI = 1,
} MBOX_BUF_IF_TYPE;

-typedef struct {
+struct hif_device_mbox_info {
u32 MboxAddresses[4]; /* must be first element for legacy HIFs that return the address in
and ARRAY of 32-bit words */

@@ -247,7 +247,7 @@ typedef struct {
u32 GMboxSize;
u32 Flags; /* flags to describe mbox behavior or usage */
MBOX_BUF_IF_TYPE MboxBusIFType; /* mailbox bus interface type */
-} HIF_DEVICE_MBOX_INFO;
+};

typedef enum {
HIF_DEVICE_IRQ_SYNC_ONLY, /* for HIF implementations that require the DSR to process all
--
1.7.4.15.g7811d


2011-03-14 19:14:11

by Greg KH

[permalink] [raw]
Subject: Re: [PATCH 00/38] ath6kl: remove typedefs part II

On Mon, Mar 14, 2011 at 10:58:34AM -0700, Luis R. Rodriguez wrote:
> Greg, here is my second cleanup series for ath6kl. This series addresses
> more typedef removals. Given that I have so many and they all do the
> same, and are tested I'm submitting them all in one series. I can really
> split it but you can just do that yourself if you believe this is really
> necessary. Either way they all go tested.

Nice, all applied now, thanks.

greg k-h

2011-03-14 17:59:31

by Luis R. Rodriguez

[permalink] [raw]
Subject: [PATCH 12/38] ath6kl: remove-typedef HIF_PENDING_EVENTS_INFO

remove-typedef -s HIF_PENDING_EVENTS_INFO \
"struct hif_pending_events_info" drivers/staging/ath6kl/

Tested-by: Naveen Singh <[email protected]>
Signed-off-by: Luis R. Rodriguez <[email protected]>
---
drivers/staging/ath6kl/bmi/src/bmi.c | 2 +-
drivers/staging/ath6kl/htc2/AR6000/ar6k_events.c | 8 ++++----
drivers/staging/ath6kl/include/hif.h | 6 +++---
3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/ath6kl/bmi/src/bmi.c b/drivers/staging/ath6kl/bmi/src/bmi.c
index a9615b7..34d1bef 100644
--- a/drivers/staging/ath6kl/bmi/src/bmi.c
+++ b/drivers/staging/ath6kl/bmi/src/bmi.c
@@ -790,7 +790,7 @@ bmiBufferReceive(HIF_DEVICE *device,
int status;
u32 address;
u32 mboxAddress[HTC_MAILBOX_NUM_MAX];
- HIF_PENDING_EVENTS_INFO hifPendingEvents;
+ struct hif_pending_events_info hifPendingEvents;
static HIF_PENDING_EVENTS_FUNC getPendingEventsFunc = NULL;

if (!pendingEventsFuncCheck) {
diff --git a/drivers/staging/ath6kl/htc2/AR6000/ar6k_events.c b/drivers/staging/ath6kl/htc2/AR6000/ar6k_events.c
index bac4f93..ca6abb4 100644
--- a/drivers/staging/ath6kl/htc2/AR6000/ar6k_events.c
+++ b/drivers/staging/ath6kl/htc2/AR6000/ar6k_events.c
@@ -74,7 +74,7 @@ int DevPollMboxMsgRecv(struct ar6k_device *pDev,

if (pDev->GetPendingEventsFunc != NULL) {

- HIF_PENDING_EVENTS_INFO events;
+ struct hif_pending_events_info events;

#ifdef THREAD_X
events.Polling =1;
@@ -319,7 +319,7 @@ static void DevGetEventAsyncHandler(void *Context, HTC_PACKET *pPacket)

if (pDev->GetPendingEventsFunc != NULL) {
/* the HIF layer collected the information for us */
- HIF_PENDING_EVENTS_INFO *pEvents = (HIF_PENDING_EVENTS_INFO *)pPacket->pBuffer;
+ struct hif_pending_events_info *pEvents = (struct hif_pending_events_info *)pPacket->pBuffer;
if (pEvents->Events & HIF_RECV_MSG_AVAIL) {
lookAhead = pEvents->LookAhead;
if (0 == lookAhead) {
@@ -439,7 +439,7 @@ int DevCheckPendingRecvMsgsAsync(void *context)
if (pDev->GetPendingEventsFunc) {
/* HIF layer has it's own mechanism, pass the IO to it.. */
status = pDev->GetPendingEventsFunc(pDev->HIFDevice,
- (HIF_PENDING_EVENTS_INFO *)pIOPacket->pBuffer,
+ (struct hif_pending_events_info *)pIOPacket->pBuffer,
pIOPacket);

} else {
@@ -490,7 +490,7 @@ static int ProcessPendingIRQs(struct ar6k_device *pDev, bool *pDone, bool *pASyn
}

if (pDev->GetPendingEventsFunc != NULL) {
- HIF_PENDING_EVENTS_INFO events;
+ struct hif_pending_events_info events;

#ifdef THREAD_X
events.Polling= 0;
diff --git a/drivers/staging/ath6kl/include/hif.h b/drivers/staging/ath6kl/include/hif.h
index 4f9be8a..8d0c94e 100644
--- a/drivers/staging/ath6kl/include/hif.h
+++ b/drivers/staging/ath6kl/include/hif.h
@@ -343,7 +343,7 @@ typedef struct osdrv_callbacks {
needs to read the register table to figure out what */
#define HIF_RECV_MSG_AVAIL (1 << 1) /* pending recv packet */

-typedef struct _HIF_PENDING_EVENTS_INFO {
+struct hif_pending_events_info {
u32 Events;
u32 LookAhead;
u32 AvailableRecvBytes;
@@ -351,12 +351,12 @@ typedef struct _HIF_PENDING_EVENTS_INFO {
u32 Polling;
u32 INT_CAUSE_REG;
#endif
-} HIF_PENDING_EVENTS_INFO;
+};

/* function to get pending events , some HIF modules use special mechanisms
* to detect packet available and other interrupts */
typedef int ( *HIF_PENDING_EVENTS_FUNC)(HIF_DEVICE *device,
- HIF_PENDING_EVENTS_INFO *pEvents,
+ struct hif_pending_events_info *pEvents,
void *AsyncContext);

#define HIF_MASK_RECV true
--
1.7.4.15.g7811d


2011-03-14 17:59:32

by Luis R. Rodriguez

[permalink] [raw]
Subject: [PATCH 14/38] ath6kl: remove-typedef HIF_SCATTER_REQ_PRIV

remove-typedef -s HIF_SCATTER_REQ_PRIV \
"struct hif_scatter_req_priv" drivers/staging/ath6kl/

Tested-by: Naveen Singh <[email protected]>
Signed-off-by: Luis R. Rodriguez <[email protected]>
---
.../hif/sdio/linux_sdio/include/hif_internal.h | 8 +++-----
.../ath6kl/hif/sdio/linux_sdio/src/hif_scatter.c | 14 +++++++-------
2 files changed, 10 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/ath6kl/hif/sdio/linux_sdio/include/hif_internal.h b/drivers/staging/ath6kl/hif/sdio/linux_sdio/include/hif_internal.h
index e2d2266..99885e3 100644
--- a/drivers/staging/ath6kl/hif/sdio/linux_sdio/include/hif_internal.h
+++ b/drivers/staging/ath6kl/hif/sdio/linux_sdio/include/hif_internal.h
@@ -47,8 +47,6 @@
#define HIF_MBOX2_BLOCK_SIZE HIF_MBOX_BLOCK_SIZE
#define HIF_MBOX3_BLOCK_SIZE HIF_MBOX_BLOCK_SIZE

-struct _HIF_SCATTER_REQ_PRIV;
-
typedef struct bus_request {
struct bus_request *next; /* link list of available requests */
struct bus_request *inusenext; /* link list of in use requests */
@@ -59,7 +57,7 @@ typedef struct bus_request {
u32 request;
void *context;
int status;
- struct _HIF_SCATTER_REQ_PRIV *pScatterReq; /* this request is a scatter request */
+ struct hif_scatter_req_priv *pScatterReq; /* this request is a scatter request */
} BUS_REQUEST;

struct hif_device {
@@ -100,13 +98,13 @@ void AddToAsyncList(HIF_DEVICE *device, BUS_REQUEST *busrequest);
#define MAX_SCATTER_ENTRIES_PER_REQ 16
#define MAX_SCATTER_REQ_TRANSFER_SIZE 32*1024

-typedef struct _HIF_SCATTER_REQ_PRIV {
+struct hif_scatter_req_priv {
HIF_SCATTER_REQ *pHifScatterReq; /* HIF scatter request with allocated entries */
HIF_DEVICE *device; /* this device */
BUS_REQUEST *busrequest; /* request associated with request */
/* scatter list for linux */
struct scatterlist sgentries[MAX_SCATTER_ENTRIES_PER_REQ];
-} HIF_SCATTER_REQ_PRIV;
+};

#define ATH_DEBUG_SCATTER ATH_DEBUG_MAKE_MODULE_MASK(0)

diff --git a/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif_scatter.c b/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif_scatter.c
index 196d33d..9f07040 100644
--- a/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif_scatter.c
+++ b/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif_scatter.c
@@ -87,7 +87,7 @@ int DoHifReadWriteScatter(HIF_DEVICE *device, BUS_REQUEST *busrequest)
struct mmc_request mmcreq;
struct mmc_command cmd;
struct mmc_data data;
- HIF_SCATTER_REQ_PRIV *pReqPriv;
+ struct hif_scatter_req_priv *pReqPriv;
HIF_SCATTER_REQ *pReq;
int status = 0;
struct scatterlist *pSg;
@@ -203,7 +203,7 @@ static int HifReadWriteScatter(HIF_DEVICE *device, HIF_SCATTER_REQ *pReq)
{
int status = A_EINVAL;
u32 request = pReq->Request;
- HIF_SCATTER_REQ_PRIV *pReqPriv = (HIF_SCATTER_REQ_PRIV *)pReq->HIFPrivate[0];
+ struct hif_scatter_req_priv *pReqPriv = (struct hif_scatter_req_priv *)pReq->HIFPrivate[0];

do {

@@ -279,7 +279,7 @@ int SetupHIFScatterSupport(HIF_DEVICE *device, struct hif_device_scatter_support
{
int status = A_ERROR;
int i;
- HIF_SCATTER_REQ_PRIV *pReqPriv;
+ struct hif_scatter_req_priv *pReqPriv;
BUS_REQUEST *busrequest;

do {
@@ -297,11 +297,11 @@ int SetupHIFScatterSupport(HIF_DEVICE *device, struct hif_device_scatter_support

for (i = 0; i < MAX_SCATTER_REQUESTS; i++) {
/* allocate the private request blob */
- pReqPriv = (HIF_SCATTER_REQ_PRIV *)A_MALLOC(sizeof(HIF_SCATTER_REQ_PRIV));
+ pReqPriv = (struct hif_scatter_req_priv *)A_MALLOC(sizeof(struct hif_scatter_req_priv));
if (NULL == pReqPriv) {
break;
}
- A_MEMZERO(pReqPriv, sizeof(HIF_SCATTER_REQ_PRIV));
+ A_MEMZERO(pReqPriv, sizeof(struct hif_scatter_req_priv));
/* save the device instance*/
pReqPriv->device = device;
/* allocate the scatter request */
@@ -358,7 +358,7 @@ int SetupHIFScatterSupport(HIF_DEVICE *device, struct hif_device_scatter_support
/* clean up scatter support */
void CleanupHIFScatterResources(HIF_DEVICE *device)
{
- HIF_SCATTER_REQ_PRIV *pReqPriv;
+ struct hif_scatter_req_priv *pReqPriv;
HIF_SCATTER_REQ *pReq;

/* empty the free list */
@@ -371,7 +371,7 @@ void CleanupHIFScatterResources(HIF_DEVICE *device)
break;
}

- pReqPriv = (HIF_SCATTER_REQ_PRIV *)pReq->HIFPrivate[0];
+ pReqPriv = (struct hif_scatter_req_priv *)pReq->HIFPrivate[0];
A_ASSERT(pReqPriv != NULL);

if (pReqPriv->busrequest != NULL) {
--
1.7.4.15.g7811d


2011-03-14 17:59:23

by Luis R. Rodriguez

[permalink] [raw]
Subject: [PATCH 07/38] ath6kl: remove-typedef HIF_DEVICE_IRQ_YIELD_PARAMS

remove-typedef -s HIF_DEVICE_IRQ_YIELD_PARAMS \
"struct hif_device_irq_yield_params" drivers/staging/ath6kl/

Tested-by: Naveen Singh <[email protected]>
Signed-off-by: Luis R. Rodriguez <[email protected]>
---
drivers/staging/ath6kl/htc2/AR6000/ar6k.h | 2 +-
drivers/staging/ath6kl/include/hif.h | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/ath6kl/htc2/AR6000/ar6k.h b/drivers/staging/ath6kl/htc2/AR6000/ar6k.h
index 4b69f91..e367288 100644
--- a/drivers/staging/ath6kl/htc2/AR6000/ar6k.h
+++ b/drivers/staging/ath6kl/htc2/AR6000/ar6k.h
@@ -129,7 +129,7 @@ struct ar6k_device {
HIF_DEVICE_IRQ_PROCESSING_MODE HifIRQProcessingMode;
HIF_MASK_UNMASK_RECV_EVENT HifMaskUmaskRecvEvent;
bool HifAttached;
- HIF_DEVICE_IRQ_YIELD_PARAMS HifIRQYieldParams;
+ struct hif_device_irq_yield_params HifIRQYieldParams;
bool DSRCanYield;
int CurrentDSRRecvCount;
HIF_DEVICE_SCATTER_SUPPORT_INFO HifScatterInfo;
diff --git a/drivers/staging/ath6kl/include/hif.h b/drivers/staging/ath6kl/include/hif.h
index 3421a59..044af7e 100644
--- a/drivers/staging/ath6kl/include/hif.h
+++ b/drivers/staging/ath6kl/include/hif.h
@@ -190,7 +190,7 @@ typedef enum {
* HIF_DEVICE_GET_IRQ_YIELD_PARAMS
*
* input : none
- * output : HIF_DEVICE_IRQ_YIELD_PARAMS
+ * output : struct hif_device_irq_yield_params
* note: This query checks if the HIF layer wishes to impose a processing yield count for the DSR handler.
* The DSR callback handler will exit after a fixed number of RX packets or events are processed.
* This query is only made if the device reports an IRQ processing mode of HIF_DEVICE_IRQ_SYNC_ONLY.
@@ -265,9 +265,9 @@ typedef enum {
*/
} HIF_DEVICE_POWER_CHANGE_TYPE;

-typedef struct {
+struct hif_device_irq_yield_params {
int RecvPacketYieldCount; /* max number of packets to force DSR to return */
-} HIF_DEVICE_IRQ_YIELD_PARAMS;
+};


typedef struct _HIF_SCATTER_ITEM {
--
1.7.4.15.g7811d


2011-03-14 18:05:26

by Luis R. Rodriguez

[permalink] [raw]
Subject: [PATCH 25/38] ath6kl: remove-typedef HTC_RX_PACKET_INFO

remove-typedef -s HTC_RX_PACKET_INFO \
"struct htc_rx_packet_info" drivers/staging/ath6kl/

Tested-by: Naveen Singh <[email protected]>
Signed-off-by: Luis R. Rodriguez <[email protected]>
---
drivers/staging/ath6kl/include/htc_packet.h | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/ath6kl/include/htc_packet.h b/drivers/staging/ath6kl/include/htc_packet.h
index ca23efd..b6ecf7e 100644
--- a/drivers/staging/ath6kl/include/htc_packet.h
+++ b/drivers/staging/ath6kl/include/htc_packet.h
@@ -59,11 +59,11 @@ typedef struct _HTC_TX_PACKET_INFO {
#define HTC_TX_PACKET_TAG_INTERNAL 1 /* internal tags start here */
#define HTC_TX_PACKET_TAG_USER_DEFINED (HTC_TX_PACKET_TAG_INTERNAL + 9) /* user-defined tags start here */

-typedef struct _HTC_RX_PACKET_INFO {
+struct htc_rx_packet_info {
u32 ExpectedHdr; /* HTC internal use */
u32 HTCRxFlags; /* HTC internal use */
u32 IndicationFlags; /* indication flags set on each RX packet indication */
-} HTC_RX_PACKET_INFO;
+};

#define HTC_RX_FLAGS_INDICATE_MORE_PKTS (1 << 0) /* more packets on this endpoint are being fetched */

@@ -92,7 +92,7 @@ struct htc_packet {
int Status; /* completion status */
union {
HTC_TX_PACKET_INFO AsTx; /* Tx Packet specific info */
- HTC_RX_PACKET_INFO AsRx; /* Rx Packet specific info */
+ struct htc_rx_packet_info AsRx; /* Rx Packet specific info */
} PktInfo;

/* the following fields are for internal HTC use */
--
1.7.4.15.g7811d


2011-03-14 18:05:26

by Luis R. Rodriguez

[permalink] [raw]
Subject: [PATCH 26/38] ath6kl: remove-typedef HTC_SERVICE_CONNECT_REQ

remove-typedef -s HTC_SERVICE_CONNECT_REQ \
"struct htc_service_connect_req" drivers/staging/ath6kl/

Tested-by: Naveen Singh <[email protected]>
Signed-off-by: Luis R. Rodriguez <[email protected]>
---
drivers/staging/ath6kl/htc2/htc.c | 2 +-
drivers/staging/ath6kl/htc2/htc_services.c | 2 +-
drivers/staging/ath6kl/include/htc_api.h | 6 +++---
drivers/staging/ath6kl/os/linux/ar6000_drv.c | 4 ++--
drivers/staging/ath6kl/os/linux/ar6000_raw_if.c | 2 +-
5 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/ath6kl/htc2/htc.c b/drivers/staging/ath6kl/htc2/htc.c
index bf4fdb3..887a687 100644
--- a/drivers/staging/ath6kl/htc2/htc.c
+++ b/drivers/staging/ath6kl/htc2/htc.c
@@ -229,7 +229,7 @@ int HTCWaitTarget(HTC_HANDLE HTCHandle)
struct htc_packet *pPacket = NULL;
HTC_READY_EX_MSG *pRdyMsg;

- HTC_SERVICE_CONNECT_REQ connect;
+ struct htc_service_connect_req connect;
HTC_SERVICE_CONNECT_RESP resp;

AR_DEBUG_PRINTF(ATH_DEBUG_TRC, ("HTCWaitTarget - Enter (target:0x%lX) \n", (unsigned long)target));
diff --git a/drivers/staging/ath6kl/htc2/htc_services.c b/drivers/staging/ath6kl/htc2/htc_services.c
index cb0731f..5c092fd 100644
--- a/drivers/staging/ath6kl/htc2/htc_services.c
+++ b/drivers/staging/ath6kl/htc2/htc_services.c
@@ -122,7 +122,7 @@ int HTCSendSetupComplete(HTC_TARGET *target)


int HTCConnectService(HTC_HANDLE HTCHandle,
- HTC_SERVICE_CONNECT_REQ *pConnectReq,
+ struct htc_service_connect_req *pConnectReq,
HTC_SERVICE_CONNECT_RESP *pConnectResp)
{
HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
diff --git a/drivers/staging/ath6kl/include/htc_api.h b/drivers/staging/ath6kl/include/htc_api.h
index ae41f98..f8f00a0 100644
--- a/drivers/staging/ath6kl/include/htc_api.h
+++ b/drivers/staging/ath6kl/include/htc_api.h
@@ -139,7 +139,7 @@ struct htc_ep_callbacks {
};

/* service connection information */
-typedef struct _HTC_SERVICE_CONNECT_REQ {
+struct htc_service_connect_req {
HTC_SERVICE_ID ServiceID; /* service ID to connect to */
u16 ConnectionFlags; /* connection flags, see htc protocol definition */
u8 *pMetaData; /* ptr to optional service-specific meta-data */
@@ -148,7 +148,7 @@ typedef struct _HTC_SERVICE_CONNECT_REQ {
int MaxSendQueueDepth; /* maximum depth of any send queue */
u32 LocalConnectionFlags; /* HTC flags for the host-side (local) connection */
unsigned int MaxSendMsgSize; /* override max message size in send direction */
-} HTC_SERVICE_CONNECT_REQ;
+};

#define HTC_LOCAL_CONN_FLAGS_ENABLE_SEND_BUNDLE_PADDING (1 << 0) /* enable send bundle padding for this endpoint */

@@ -362,7 +362,7 @@ int HTCAddReceivePkt(HTC_HANDLE HTCHandle, struct htc_packet *pPacket);
@see also: HTCStart
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
int HTCConnectService(HTC_HANDLE HTCHandle,
- HTC_SERVICE_CONNECT_REQ *pReq,
+ struct htc_service_connect_req *pReq,
HTC_SERVICE_CONNECT_RESP *pResp);
/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@desc: Send an HTC packet
diff --git a/drivers/staging/ath6kl/os/linux/ar6000_drv.c b/drivers/staging/ath6kl/os/linux/ar6000_drv.c
index fab1e02..a7c57e3 100644
--- a/drivers/staging/ath6kl/os/linux/ar6000_drv.c
+++ b/drivers/staging/ath6kl/os/linux/ar6000_drv.c
@@ -2339,7 +2339,7 @@ ar6000_close(struct net_device *dev)

/* connect to a service */
static int ar6000_connectservice(AR_SOFTC_T *ar,
- HTC_SERVICE_CONNECT_REQ *pConnect,
+ struct htc_service_connect_req *pConnect,
char *pDesc)
{
int status;
@@ -2605,7 +2605,7 @@ int ar6000_init(struct net_device *dev)
}

do {
- HTC_SERVICE_CONNECT_REQ connect;
+ struct htc_service_connect_req connect;

/* the reason we have to wait for the target here is that the driver layer
* has to init BMI in order to set the host block size,
diff --git a/drivers/staging/ath6kl/os/linux/ar6000_raw_if.c b/drivers/staging/ath6kl/os/linux/ar6000_raw_if.c
index f8637f6..35de2fb 100644
--- a/drivers/staging/ath6kl/os/linux/ar6000_raw_if.c
+++ b/drivers/staging/ath6kl/os/linux/ar6000_raw_if.c
@@ -117,7 +117,7 @@ static int ar6000_connect_raw_service(AR_SOFTC_T *ar,
int status;
HTC_SERVICE_CONNECT_RESP response;
u8 streamNo;
- HTC_SERVICE_CONNECT_REQ connect;
+ struct htc_service_connect_req connect;

do {

--
1.7.4.15.g7811d


2011-03-14 17:59:21

by Luis R. Rodriguez

[permalink] [raw]
Subject: [PATCH 04/38] ath6kl: remove-typedef HCI_TRANSPORT_CONFIG_INFO

remove-typedef -s HCI_TRANSPORT_CONFIG_INFO \
"struct hci_transport_config_info" drivers/staging/ath6kl/

Tested-by: Naveen Singh <[email protected]>
Signed-off-by: Luis R. Rodriguez <[email protected]>
---
drivers/staging/ath6kl/htc2/AR6000/ar6k.h | 2 +-
.../ath6kl/htc2/AR6000/ar6k_gmbox_hciuart.c | 6 +++---
drivers/staging/ath6kl/include/hci_transport_api.h | 6 +++---
.../staging/ath6kl/os/linux/export_hci_transport.c | 2 +-
drivers/staging/ath6kl/os/linux/hci_bridge.c | 4 ++--
.../ath6kl/os/linux/include/export_hci_transport.h | 2 +-
6 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/drivers/staging/ath6kl/htc2/AR6000/ar6k.h b/drivers/staging/ath6kl/htc2/AR6000/ar6k.h
index 88ef25a..4b69f91 100644
--- a/drivers/staging/ath6kl/htc2/AR6000/ar6k.h
+++ b/drivers/staging/ath6kl/htc2/AR6000/ar6k.h
@@ -361,7 +361,7 @@ static INLINE int DevSetupGMbox(struct ar6k_device *pDev) {
#ifdef ATH_AR6K_ENABLE_GMBOX

/* GMBOX protocol modules must expose each of these internal APIs */
-HCI_TRANSPORT_HANDLE GMboxAttachProtocol(struct ar6k_device *pDev, HCI_TRANSPORT_CONFIG_INFO *pInfo);
+HCI_TRANSPORT_HANDLE GMboxAttachProtocol(struct ar6k_device *pDev, struct hci_transport_config_info *pInfo);
int GMboxProtocolInstall(struct ar6k_device *pDev);
void GMboxProtocolUninstall(struct ar6k_device *pDev);

diff --git a/drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox_hciuart.c b/drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox_hciuart.c
index 78da8a1..c7e8f71 100644
--- a/drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox_hciuart.c
+++ b/drivers/staging/ath6kl/htc2/AR6000/ar6k_gmbox_hciuart.c
@@ -57,7 +57,7 @@
#define BTPWRSAV_TIMEOUT_MS 1

struct gmbox_proto_hci_uart {
- HCI_TRANSPORT_CONFIG_INFO HCIConfig;
+ struct hci_transport_config_info HCIConfig;
bool HCIAttached;
bool HCIStopped;
u32 RecvStateFlags;
@@ -936,7 +936,7 @@ static int NotifyTransportReady(struct gmbox_proto_hci_uart *pProt)

/*********** HCI UART protocol implementation ************************************************/

-HCI_TRANSPORT_HANDLE HCI_TransportAttach(void *HTCHandle, HCI_TRANSPORT_CONFIG_INFO *pInfo)
+HCI_TRANSPORT_HANDLE HCI_TransportAttach(void *HTCHandle, struct hci_transport_config_info *pInfo)
{
struct gmbox_proto_hci_uart *pProtocol = NULL;
struct ar6k_device *pDev;
@@ -961,7 +961,7 @@ HCI_TRANSPORT_HANDLE HCI_TransportAttach(void *HTCHandle, HCI_TRANSPORT_CONFIG_I
break;
}

- memcpy(&pProtocol->HCIConfig, pInfo, sizeof(HCI_TRANSPORT_CONFIG_INFO));
+ memcpy(&pProtocol->HCIConfig, pInfo, sizeof(struct hci_transport_config_info));

A_ASSERT(pProtocol->HCIConfig.pHCIPktRecv != NULL);
A_ASSERT(pProtocol->HCIConfig.pHCISendComplete != NULL);
diff --git a/drivers/staging/ath6kl/include/hci_transport_api.h b/drivers/staging/ath6kl/include/hci_transport_api.h
index 8ab692d..7fa44f0 100644
--- a/drivers/staging/ath6kl/include/hci_transport_api.h
+++ b/drivers/staging/ath6kl/include/hci_transport_api.h
@@ -85,7 +85,7 @@ typedef struct {
int IOBlockPad; /* I/O block padding required (always a power of 2) */
} HCI_TRANSPORT_PROPERTIES;

-typedef struct _HCI_TRANSPORT_CONFIG_INFO {
+struct hci_transport_config_info {
int ACLRecvBufferWaterMark; /* low watermark to trigger recv refill */
int EventRecvBufferWaterMark; /* low watermark to trigger recv refill */
int MaxSendQueueDepth; /* max number of packets in the single send queue */
@@ -99,7 +99,7 @@ typedef struct _HCI_TRANSPORT_CONFIG_INFO {
HCI_TRANSPORT_RECV_REFILL pHCIPktRecvRefill;
HCI_TRANSPORT_RECV_ALLOC pHCIPktRecvAlloc;
HCI_TRANSPORT_SEND_FULL pHCISendFull;
-} HCI_TRANSPORT_CONFIG_INFO;
+};

/* ------ Function Prototypes ------ */
/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@@ -113,7 +113,7 @@ typedef struct _HCI_TRANSPORT_CONFIG_INFO {
@example:
@see also: HCI_TransportDetach
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-HCI_TRANSPORT_HANDLE HCI_TransportAttach(void *HTCHandle, HCI_TRANSPORT_CONFIG_INFO *pInfo);
+HCI_TRANSPORT_HANDLE HCI_TransportAttach(void *HTCHandle, struct hci_transport_config_info *pInfo);

/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@desc: Detach from the HCI transport module
diff --git a/drivers/staging/ath6kl/os/linux/export_hci_transport.c b/drivers/staging/ath6kl/os/linux/export_hci_transport.c
index 168d6f7..fd87526 100644
--- a/drivers/staging/ath6kl/os/linux/export_hci_transport.c
+++ b/drivers/staging/ath6kl/os/linux/export_hci_transport.c
@@ -36,7 +36,7 @@
#include "AR6002/hw4.0/hw/uart_reg.h"
#include "AR6002/hw4.0/hw/rtc_wlan_reg.h"

-HCI_TRANSPORT_HANDLE (*_HCI_TransportAttach)(void *HTCHandle, HCI_TRANSPORT_CONFIG_INFO *pInfo);
+HCI_TRANSPORT_HANDLE (*_HCI_TransportAttach)(void *HTCHandle, struct hci_transport_config_info *pInfo);
void (*_HCI_TransportDetach)(HCI_TRANSPORT_HANDLE HciTrans);
int (*_HCI_TransportAddReceivePkts)(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET_QUEUE *pQueue);
int (*_HCI_TransportSendPkt)(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET *pPacket, bool Synchronous);
diff --git a/drivers/staging/ath6kl/os/linux/hci_bridge.c b/drivers/staging/ath6kl/os/linux/hci_bridge.c
index 61ce094..d0b6814 100644
--- a/drivers/staging/ath6kl/os/linux/hci_bridge.c
+++ b/drivers/staging/ath6kl/os/linux/hci_bridge.c
@@ -469,7 +469,7 @@ int ar6000_setup_hci(void *ar)
int ar6000_setup_hci(AR_SOFTC_T *ar)
#endif
{
- HCI_TRANSPORT_CONFIG_INFO config;
+ struct hci_transport_config_info config;
int status = 0;
int i;
HTC_PACKET *pPacket;
@@ -521,7 +521,7 @@ int ar6000_setup_hci(AR_SOFTC_T *ar)
FreeHTCStruct(pHcidevInfo,pPacket);
}

- A_MEMZERO(&config,sizeof(HCI_TRANSPORT_CONFIG_INFO));
+ A_MEMZERO(&config,sizeof(struct hci_transport_config_info));
config.ACLRecvBufferWaterMark = MAX_ACL_RECV_BUFS / 2;
config.EventRecvBufferWaterMark = MAX_EVT_RECV_BUFS / 2;
config.MaxSendQueueDepth = MAX_HCI_WRITE_QUEUE_DEPTH;
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 51187f6..cf66717 100644
--- a/drivers/staging/ath6kl/os/linux/include/export_hci_transport.h
+++ b/drivers/staging/ath6kl/os/linux/include/export_hci_transport.h
@@ -25,7 +25,7 @@
#include "hci_transport_api.h"
#include "common_drv.h"

-extern HCI_TRANSPORT_HANDLE (*_HCI_TransportAttach)(void *HTCHandle, HCI_TRANSPORT_CONFIG_INFO *pInfo);
+extern HCI_TRANSPORT_HANDLE (*_HCI_TransportAttach)(void *HTCHandle, struct hci_transport_config_info *pInfo);
extern void (*_HCI_TransportDetach)(HCI_TRANSPORT_HANDLE HciTrans);
extern int (*_HCI_TransportAddReceivePkts)(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET_QUEUE *pQueue);
extern int (*_HCI_TransportSendPkt)(HCI_TRANSPORT_HANDLE HciTrans, HTC_PACKET *pPacket, bool Synchronous);
--
1.7.4.15.g7811d


2011-03-14 17:59:26

by Luis R. Rodriguez

[permalink] [raw]
Subject: [PATCH 09/38] ath6kl: remove-typedef HIF_DEVICE_OS_DEVICE_INFO

remove-typedef -s HIF_DEVICE_OS_DEVICE_INFO \
"struct hif_device_os_device_info" drivers/staging/ath6kl/

Tested-by: Naveen Singh <[email protected]>
Signed-off-by: Luis R. Rodriguez <[email protected]>
---
.../staging/ath6kl/hif/sdio/linux_sdio/src/hif.c | 2 +-
drivers/staging/ath6kl/include/hif.h | 6 +++---
drivers/staging/ath6kl/os/linux/ar6000_drv.c | 10 +++++-----
.../staging/ath6kl/os/linux/export_hci_transport.c | 4 ++--
drivers/staging/ath6kl/os/linux/hci_bridge.c | 2 +-
.../staging/ath6kl/os/linux/include/ar6000_drv.h | 2 +-
6 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif.c b/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif.c
index 9b947b4..6d3b9f4 100644
--- a/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif.c
+++ b/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif.c
@@ -730,7 +730,7 @@ HIFConfigureDevice(HIF_DEVICE *device, HIF_DEVICE_CONFIG_OPCODE opcode,
break;
case HIF_DEVICE_GET_OS_DEVICE:
/* pass back a pointer to the SDIO function's "dev" struct */
- ((HIF_DEVICE_OS_DEVICE_INFO *)config)->pOSDevice = &device->func->dev;
+ ((struct hif_device_os_device_info *)config)->pOSDevice = &device->func->dev;
break;
case HIF_DEVICE_POWER_STATE_CHANGE:
status = PowerStateChangeNotify(device, *(HIF_DEVICE_POWER_CHANGE_TYPE *)config);
diff --git a/drivers/staging/ath6kl/include/hif.h b/drivers/staging/ath6kl/include/hif.h
index 8df01b3..2c0f490 100644
--- a/drivers/staging/ath6kl/include/hif.h
+++ b/drivers/staging/ath6kl/include/hif.h
@@ -211,7 +211,7 @@ typedef enum {
*
* HIF_DEVICE_GET_OS_DEVICE
* intput : none
- * output : HIF_DEVICE_OS_DEVICE_INFO;
+ * output : struct hif_device_os_device_info;
* note: On some operating systems, the HIF layer has a parent device object for the bus. This object
* may be required to register certain types of logical devices.
*
@@ -315,9 +315,9 @@ typedef struct _HIF_DEVICE_SCATTER_SUPPORT_INFO {
int MaxTransferSizePerScatterReq;
} HIF_DEVICE_SCATTER_SUPPORT_INFO;

-typedef struct {
+struct hif_device_os_device_info {
void *pOSDevice;
-} HIF_DEVICE_OS_DEVICE_INFO;
+};

#define HIF_MAX_DEVICES 1

diff --git a/drivers/staging/ath6kl/os/linux/ar6000_drv.c b/drivers/staging/ath6kl/os/linux/ar6000_drv.c
index 749e284..b739943 100644
--- a/drivers/staging/ath6kl/os/linux/ar6000_drv.c
+++ b/drivers/staging/ath6kl/os/linux/ar6000_drv.c
@@ -803,7 +803,7 @@ ar6000_sysfs_bmi_read(struct file *fp, struct kobject *kobj,
{
int index;
AR_SOFTC_T *ar;
- HIF_DEVICE_OS_DEVICE_INFO *osDevInfo;
+ struct hif_device_os_device_info *osDevInfo;

AR_DEBUG_PRINTF(ATH_DEBUG_INFO,("BMI: Read %d bytes\n", (u32)count));
for (index=0; index < MAX_AR6000; index++) {
@@ -830,7 +830,7 @@ ar6000_sysfs_bmi_write(struct file *fp, struct kobject *kobj,
{
int index;
AR_SOFTC_T *ar;
- HIF_DEVICE_OS_DEVICE_INFO *osDevInfo;
+ struct hif_device_os_device_info *osDevInfo;

AR_DEBUG_PRINTF(ATH_DEBUG_INFO,("BMI: Write %d bytes\n", (u32)count));
for (index=0; index < MAX_AR6000; index++) {
@@ -856,13 +856,13 @@ ar6000_sysfs_bmi_init(AR_SOFTC_T *ar)
int status;

AR_DEBUG_PRINTF(ATH_DEBUG_INFO,("BMI: Creating sysfs entry\n"));
- A_MEMZERO(&ar->osDevInfo, sizeof(HIF_DEVICE_OS_DEVICE_INFO));
+ A_MEMZERO(&ar->osDevInfo, sizeof(struct hif_device_os_device_info));

/* Get the underlying OS device */
status = HIFConfigureDevice(ar->arHifDevice,
HIF_DEVICE_GET_OS_DEVICE,
&ar->osDevInfo,
- sizeof(HIF_DEVICE_OS_DEVICE_INFO));
+ sizeof(struct hif_device_os_device_info));

if (status) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("BMI: Failed to get OS device info from HIF\n"));
@@ -1604,7 +1604,7 @@ ar6000_avail_ev(void *context, void *hif_handle)
struct wireless_dev *wdev;
#endif /* ATH6K_CONFIG_CFG80211 */
int init_status = 0;
- HIF_DEVICE_OS_DEVICE_INFO osDevInfo;
+ struct hif_device_os_device_info osDevInfo;

memset(&osDevInfo, 0, sizeof(osDevInfo));
if (HIFConfigureDevice(hif_handle, HIF_DEVICE_GET_OS_DEVICE,
diff --git a/drivers/staging/ath6kl/os/linux/export_hci_transport.c b/drivers/staging/ath6kl/os/linux/export_hci_transport.c
index fd87526..79b30eb 100644
--- a/drivers/staging/ath6kl/os/linux/export_hci_transport.c
+++ b/drivers/staging/ath6kl/os/linux/export_hci_transport.c
@@ -76,8 +76,8 @@ ar6000_get_hif_dev(HIF_DEVICE *device, void *config)

status = HIFConfigureDevice(device,
HIF_DEVICE_GET_OS_DEVICE,
- (HIF_DEVICE_OS_DEVICE_INFO *)config,
- sizeof(HIF_DEVICE_OS_DEVICE_INFO));
+ (struct hif_device_os_device_info *)config,
+ sizeof(struct hif_device_os_device_info));
return status;
}

diff --git a/drivers/staging/ath6kl/os/linux/hci_bridge.c b/drivers/staging/ath6kl/os/linux/hci_bridge.c
index 4500f84..d30ca24 100644
--- a/drivers/staging/ath6kl/os/linux/hci_bridge.c
+++ b/drivers/staging/ath6kl/os/linux/hci_bridge.c
@@ -857,7 +857,7 @@ static int bt_setup_hci(struct ar6k_hci_bridge_info *pHcidevInfo)
{
int status = 0;
struct hci_dev *pHciDev = NULL;
- HIF_DEVICE_OS_DEVICE_INFO osDevInfo;
+ struct hif_device_os_device_info osDevInfo;

if (!setupbtdev) {
return 0;
diff --git a/drivers/staging/ath6kl/os/linux/include/ar6000_drv.h b/drivers/staging/ath6kl/os/linux/include/ar6000_drv.h
index 2373ed5..a209133 100644
--- a/drivers/staging/ath6kl/os/linux/include/ar6000_drv.h
+++ b/drivers/staging/ath6kl/os/linux/include/ar6000_drv.h
@@ -596,7 +596,7 @@ typedef struct ar6_softc {
WMI_BTCOEX_CONFIG_EVENT arBtcoexConfig;
WMI_BTCOEX_STATS_EVENT arBtcoexStats;
s32 (*exitCallback)(void *config); /* generic callback at AR6K exit */
- HIF_DEVICE_OS_DEVICE_INFO osDevInfo;
+ struct hif_device_os_device_info osDevInfo;
#ifdef ATH6K_CONFIG_CFG80211
struct wireless_dev *wdev;
struct cfg80211_scan_request *scan_request;
--
1.7.4.15.g7811d


2011-03-14 17:59:34

by Luis R. Rodriguez

[permalink] [raw]
Subject: [PATCH 15/38] ath6kl: remove-typedef HIF_SCATTER_REQ

This requird two passes:

remove-typedef -s HIF_SCATTER_REQ \
"struct hif_scatter_req" drivers/staging/ath6kl/

remove-typedef -s _HIF_SCATTER_REQ \
"struct hif_scatter_req" drivers/staging/ath6kl/

Tested-by: Naveen Singh <[email protected]>
Signed-off-by: Luis R. Rodriguez <[email protected]>
---
.../hif/sdio/linux_sdio/include/hif_internal.h | 2 +-
.../ath6kl/hif/sdio/linux_sdio/src/hif_scatter.c | 16 +++++++-------
drivers/staging/ath6kl/htc2/AR6000/ar6k.c | 22 ++++++++++----------
drivers/staging/ath6kl/htc2/AR6000/ar6k.h | 6 ++--
drivers/staging/ath6kl/htc2/htc_recv.c | 4 +-
drivers/staging/ath6kl/htc2/htc_send.c | 4 +-
drivers/staging/ath6kl/include/hif.h | 15 ++++++-------
7 files changed, 34 insertions(+), 35 deletions(-)

diff --git a/drivers/staging/ath6kl/hif/sdio/linux_sdio/include/hif_internal.h b/drivers/staging/ath6kl/hif/sdio/linux_sdio/include/hif_internal.h
index 99885e3..04fc284 100644
--- a/drivers/staging/ath6kl/hif/sdio/linux_sdio/include/hif_internal.h
+++ b/drivers/staging/ath6kl/hif/sdio/linux_sdio/include/hif_internal.h
@@ -99,7 +99,7 @@ void AddToAsyncList(HIF_DEVICE *device, BUS_REQUEST *busrequest);
#define MAX_SCATTER_REQ_TRANSFER_SIZE 32*1024

struct hif_scatter_req_priv {
- HIF_SCATTER_REQ *pHifScatterReq; /* HIF scatter request with allocated entries */
+ struct hif_scatter_req *pHifScatterReq; /* HIF scatter request with allocated entries */
HIF_DEVICE *device; /* this device */
BUS_REQUEST *busrequest; /* request associated with request */
/* scatter list for linux */
diff --git a/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif_scatter.c b/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif_scatter.c
index 9f07040..2c64abe 100644
--- a/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif_scatter.c
+++ b/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif_scatter.c
@@ -48,7 +48,7 @@
(((address) & 0x1FFFF) << 9) | \
((bytes_blocks) & 0x1FF)

-static void FreeScatterReq(HIF_DEVICE *device, HIF_SCATTER_REQ *pReq)
+static void FreeScatterReq(HIF_DEVICE *device, struct hif_scatter_req *pReq)
{
unsigned long flag;

@@ -60,7 +60,7 @@ static void FreeScatterReq(HIF_DEVICE *device, HIF_SCATTER_REQ *pReq)

}

-static HIF_SCATTER_REQ *AllocScatterReq(HIF_DEVICE *device)
+static struct hif_scatter_req *AllocScatterReq(HIF_DEVICE *device)
{
struct dl_list *pItem;
unsigned long flag;
@@ -72,7 +72,7 @@ static HIF_SCATTER_REQ *AllocScatterReq(HIF_DEVICE *device)
spin_unlock_irqrestore(&device->lock, flag);

if (pItem != NULL) {
- return A_CONTAINING_STRUCT(pItem, HIF_SCATTER_REQ, ListLink);
+ return A_CONTAINING_STRUCT(pItem, struct hif_scatter_req, ListLink);
}

return NULL;
@@ -88,7 +88,7 @@ int DoHifReadWriteScatter(HIF_DEVICE *device, BUS_REQUEST *busrequest)
struct mmc_command cmd;
struct mmc_data data;
struct hif_scatter_req_priv *pReqPriv;
- HIF_SCATTER_REQ *pReq;
+ struct hif_scatter_req *pReq;
int status = 0;
struct scatterlist *pSg;

@@ -199,7 +199,7 @@ int DoHifReadWriteScatter(HIF_DEVICE *device, BUS_REQUEST *busrequest)
}

/* callback to issue a read-write scatter request */
-static int HifReadWriteScatter(HIF_DEVICE *device, HIF_SCATTER_REQ *pReq)
+static int HifReadWriteScatter(HIF_DEVICE *device, struct hif_scatter_req *pReq)
{
int status = A_EINVAL;
u32 request = pReq->Request;
@@ -305,7 +305,7 @@ int SetupHIFScatterSupport(HIF_DEVICE *device, struct hif_device_scatter_support
/* save the device instance*/
pReqPriv->device = device;
/* allocate the scatter request */
- pReqPriv->pHifScatterReq = (HIF_SCATTER_REQ *)A_MALLOC(sizeof(HIF_SCATTER_REQ) +
+ pReqPriv->pHifScatterReq = (struct hif_scatter_req *)A_MALLOC(sizeof(struct hif_scatter_req) +
(MAX_SCATTER_ENTRIES_PER_REQ - 1) * (sizeof(struct hif_scatter_item)));

if (NULL == pReqPriv->pHifScatterReq) {
@@ -313,7 +313,7 @@ int SetupHIFScatterSupport(HIF_DEVICE *device, struct hif_device_scatter_support
break;
}
/* just zero the main part of the scatter request */
- A_MEMZERO(pReqPriv->pHifScatterReq, sizeof(HIF_SCATTER_REQ));
+ A_MEMZERO(pReqPriv->pHifScatterReq, sizeof(struct hif_scatter_req));
/* back pointer to the private struct */
pReqPriv->pHifScatterReq->HIFPrivate[0] = pReqPriv;
/* allocate a bus request for this scatter request */
@@ -359,7 +359,7 @@ int SetupHIFScatterSupport(HIF_DEVICE *device, struct hif_device_scatter_support
void CleanupHIFScatterResources(HIF_DEVICE *device)
{
struct hif_scatter_req_priv *pReqPriv;
- HIF_SCATTER_REQ *pReq;
+ struct hif_scatter_req *pReq;

/* empty the free list */

diff --git a/drivers/staging/ath6kl/htc2/AR6000/ar6k.c b/drivers/staging/ath6kl/htc2/AR6000/ar6k.c
index 3ebf630..c780e4f 100644
--- a/drivers/staging/ath6kl/htc2/AR6000/ar6k.c
+++ b/drivers/staging/ath6kl/htc2/AR6000/ar6k.c
@@ -587,7 +587,7 @@ void DevDumpRegisters(struct ar6k_device *pDev,

#define DEV_GET_VIRT_DMA_INFO(p) ((struct dev_scatter_dma_virtual_info *)((p)->HIFPrivate[0]))

-static HIF_SCATTER_REQ *DevAllocScatterReq(HIF_DEVICE *Context)
+static struct hif_scatter_req *DevAllocScatterReq(HIF_DEVICE *Context)
{
struct dl_list *pItem;
struct ar6k_device *pDev = (struct ar6k_device *)Context;
@@ -595,12 +595,12 @@ static HIF_SCATTER_REQ *DevAllocScatterReq(HIF_DEVICE *Context)
pItem = DL_ListRemoveItemFromHead(&pDev->ScatterReqHead);
UNLOCK_AR6K(pDev);
if (pItem != NULL) {
- return A_CONTAINING_STRUCT(pItem, HIF_SCATTER_REQ, ListLink);
+ return A_CONTAINING_STRUCT(pItem, struct hif_scatter_req, ListLink);
}
return NULL;
}

-static void DevFreeScatterReq(HIF_DEVICE *Context, HIF_SCATTER_REQ *pReq)
+static void DevFreeScatterReq(HIF_DEVICE *Context, struct hif_scatter_req *pReq)
{
struct ar6k_device *pDev = (struct ar6k_device *)Context;
LOCK_AR6K(pDev);
@@ -608,7 +608,7 @@ static void DevFreeScatterReq(HIF_DEVICE *Context, HIF_SCATTER_REQ *pReq)
UNLOCK_AR6K(pDev);
}

-int DevCopyScatterListToFromDMABuffer(HIF_SCATTER_REQ *pReq, bool FromDMA)
+int DevCopyScatterListToFromDMABuffer(struct hif_scatter_req *pReq, bool FromDMA)
{
u8 *pDMABuffer = NULL;
int i, remaining;
@@ -651,7 +651,7 @@ int DevCopyScatterListToFromDMABuffer(HIF_SCATTER_REQ *pReq, bool FromDMA)
static void DevReadWriteScatterAsyncHandler(void *Context, HTC_PACKET *pPacket)
{
struct ar6k_device *pDev = (struct ar6k_device *)Context;
- HIF_SCATTER_REQ *pReq = (HIF_SCATTER_REQ *)pPacket->pPktContext;
+ struct hif_scatter_req *pReq = (struct hif_scatter_req *)pPacket->pPktContext;

AR_DEBUG_PRINTF(ATH_DEBUG_RECV,("+DevReadWriteScatterAsyncHandler: (dev: 0x%lX)\n", (unsigned long)pDev));

@@ -664,7 +664,7 @@ static void DevReadWriteScatterAsyncHandler(void *Context, HTC_PACKET *pPacket)
AR_DEBUG_PRINTF(ATH_DEBUG_RECV,("-DevReadWriteScatterAsyncHandler \n"));
}

-static int DevReadWriteScatter(HIF_DEVICE *Context, HIF_SCATTER_REQ *pReq)
+static int DevReadWriteScatter(HIF_DEVICE *Context, struct hif_scatter_req *pReq)
{
struct ar6k_device *pDev = (struct ar6k_device *)Context;
int status = 0;
@@ -736,7 +736,7 @@ static int DevReadWriteScatter(HIF_DEVICE *Context, HIF_SCATTER_REQ *pReq)

static void DevCleanupVirtualScatterSupport(struct ar6k_device *pDev)
{
- HIF_SCATTER_REQ *pReq;
+ struct hif_scatter_req *pReq;

while (1) {
pReq = DevAllocScatterReq((HIF_DEVICE *)pDev);
@@ -755,17 +755,17 @@ static int DevSetupVirtualScatterSupport(struct ar6k_device *pDev)
int bufferSize, sgreqSize;
int i;
struct dev_scatter_dma_virtual_info *pVirtualInfo;
- HIF_SCATTER_REQ *pReq;
+ struct hif_scatter_req *pReq;

bufferSize = sizeof(struct dev_scatter_dma_virtual_info) +
2 * (A_GET_CACHE_LINE_BYTES()) + AR6K_MAX_TRANSFER_SIZE_PER_SCATTER;

- sgreqSize = sizeof(HIF_SCATTER_REQ) +
+ sgreqSize = sizeof(struct hif_scatter_req) +
(AR6K_SCATTER_ENTRIES_PER_REQ - 1) * (sizeof(struct hif_scatter_item));

for (i = 0; i < AR6K_SCATTER_REQS; i++) {
/* allocate the scatter request, buffer info and the actual virtual buffer itself */
- pReq = (HIF_SCATTER_REQ *)A_MALLOC(sgreqSize + bufferSize);
+ pReq = (struct hif_scatter_req *)A_MALLOC(sgreqSize + bufferSize);

if (NULL == pReq) {
status = A_NO_MEMORY;
@@ -885,7 +885,7 @@ int DevSetupMsgBundling(struct ar6k_device *pDev, int MaxMsgsPerTransfer)
return status;
}

-int DevSubmitScatterRequest(struct ar6k_device *pDev, HIF_SCATTER_REQ *pScatterReq, bool Read, bool Async)
+int DevSubmitScatterRequest(struct ar6k_device *pDev, struct hif_scatter_req *pScatterReq, bool Read, bool Async)
{
int status;

diff --git a/drivers/staging/ath6kl/htc2/AR6000/ar6k.h b/drivers/staging/ath6kl/htc2/AR6000/ar6k.h
index 08e9ef2..baad0bf 100644
--- a/drivers/staging/ath6kl/htc2/AR6000/ar6k.h
+++ b/drivers/staging/ath6kl/htc2/AR6000/ar6k.h
@@ -272,7 +272,7 @@ static INLINE int DevRecvPacket(struct ar6k_device *pDev, HTC_PACKET *pPacket, u
*
*/

-int DevCopyScatterListToFromDMABuffer(HIF_SCATTER_REQ *pReq, bool FromDMA);
+int DevCopyScatterListToFromDMABuffer(struct hif_scatter_req *pReq, bool FromDMA);

/* copy any READ data back into scatter list */
#define DEV_FINISH_SCATTER_OPERATION(pR) \
@@ -287,7 +287,7 @@ do { \
} while (0)

/* copy any WRITE data to bounce buffer */
-static INLINE int DEV_PREPARE_SCATTER_OPERATION(HIF_SCATTER_REQ *pReq) {
+static INLINE int DEV_PREPARE_SCATTER_OPERATION(struct hif_scatter_req *pReq) {
if ((pReq->Request & HIF_WRITE) && (pReq->ScatterMethod == HIF_SCATTER_DMA_BOUNCE)) {
return DevCopyScatterListToFromDMABuffer(pReq,TO_DMA_BUFFER);
} else {
@@ -315,7 +315,7 @@ int DevCleanupMsgBundling(struct ar6k_device *pDev);
#define DEV_SCATTER_WRITE false
#define DEV_SCATTER_ASYNC true
#define DEV_SCATTER_SYNC false
-int DevSubmitScatterRequest(struct ar6k_device *pDev, HIF_SCATTER_REQ *pScatterReq, bool Read, bool Async);
+int DevSubmitScatterRequest(struct ar6k_device *pDev, struct hif_scatter_req *pScatterReq, bool Read, bool Async);

#ifdef MBOXHW_UNIT_TEST
int DoMboxHWTest(struct ar6k_device *pDev);
diff --git a/drivers/staging/ath6kl/htc2/htc_recv.c b/drivers/staging/ath6kl/htc2/htc_recv.c
index daa6efc..7a333ed 100644
--- a/drivers/staging/ath6kl/htc2/htc_recv.c
+++ b/drivers/staging/ath6kl/htc2/htc_recv.c
@@ -879,7 +879,7 @@ static int AllocAndPrepareRxPackets(HTC_TARGET *target,
return status;
}

-static void HTCAsyncRecvScatterCompletion(HIF_SCATTER_REQ *pScatterReq)
+static void HTCAsyncRecvScatterCompletion(struct hif_scatter_req *pScatterReq)
{
int i;
HTC_PACKET *pPacket;
@@ -991,7 +991,7 @@ static int HTCIssueRecvPacketBundle(HTC_TARGET *target,
bool PartialBundle)
{
int status = 0;
- HIF_SCATTER_REQ *pScatterReq;
+ struct hif_scatter_req *pScatterReq;
int i, totalLength;
int pktsToScatter;
HTC_PACKET *pPacket;
diff --git a/drivers/staging/ath6kl/htc2/htc_send.c b/drivers/staging/ath6kl/htc2/htc_send.c
index a31acae..f133d93 100644
--- a/drivers/staging/ath6kl/htc2/htc_send.c
+++ b/drivers/staging/ath6kl/htc2/htc_send.c
@@ -264,7 +264,7 @@ static INLINE void GetHTCSendPackets(HTC_TARGET *target,

}

-static void HTCAsyncSendScatterCompletion(HIF_SCATTER_REQ *pScatterReq)
+static void HTCAsyncSendScatterCompletion(struct hif_scatter_req *pScatterReq)
{
int i;
HTC_PACKET *pPacket;
@@ -316,7 +316,7 @@ static void HTCIssueSendBundle(HTC_ENDPOINT *pEndpoint,
{
int pktsToScatter;
unsigned int scatterSpaceRemaining;
- HIF_SCATTER_REQ *pScatterReq = NULL;
+ struct hif_scatter_req *pScatterReq = NULL;
int i, packetsInScatterReq;
unsigned int transferLength;
HTC_PACKET *pPacket;
diff --git a/drivers/staging/ath6kl/include/hif.h b/drivers/staging/ath6kl/include/hif.h
index 427e7b8..3dcb787 100644
--- a/drivers/staging/ath6kl/include/hif.h
+++ b/drivers/staging/ath6kl/include/hif.h
@@ -276,9 +276,8 @@ struct hif_scatter_item {
void *pCallerContexts[2]; /* space for caller to insert a context associated with this item */
};

-struct _HIF_SCATTER_REQ;
-
-typedef void ( *HIF_SCATTER_COMP_CB)(struct _HIF_SCATTER_REQ *);
+struct hif_scatter_req;
+typedef void ( *HIF_SCATTER_COMP_CB)(struct hif_scatter_req *);

typedef enum _HIF_SCATTER_METHOD {
HIF_SCATTER_NONE = 0,
@@ -286,7 +285,7 @@ typedef enum _HIF_SCATTER_METHOD {
HIF_SCATTER_DMA_BOUNCE, /* Uses SG DMA but HIF layer uses an internal bounce buffer */
} HIF_SCATTER_METHOD;

-typedef struct _HIF_SCATTER_REQ {
+struct hif_scatter_req {
struct dl_list ListLink; /* link management */
u32 Address; /* address for the read/write operation */
u32 Request; /* request flags */
@@ -300,11 +299,11 @@ typedef struct _HIF_SCATTER_REQ {
void *HIFPrivate[4]; /* HIF private area */
u8 *pScatterBounceBuffer; /* bounce buffer for upper layers to copy to/from */
struct hif_scatter_item ScatterList[1]; /* start of scatter list */
-} HIF_SCATTER_REQ;
+};

-typedef HIF_SCATTER_REQ * ( *HIF_ALLOCATE_SCATTER_REQUEST)(HIF_DEVICE *device);
-typedef void ( *HIF_FREE_SCATTER_REQUEST)(HIF_DEVICE *device, HIF_SCATTER_REQ *request);
-typedef int ( *HIF_READWRITE_SCATTER)(HIF_DEVICE *device, HIF_SCATTER_REQ *request);
+typedef struct hif_scatter_req * ( *HIF_ALLOCATE_SCATTER_REQUEST)(HIF_DEVICE *device);
+typedef void ( *HIF_FREE_SCATTER_REQUEST)(HIF_DEVICE *device, struct hif_scatter_req *request);
+typedef int ( *HIF_READWRITE_SCATTER)(HIF_DEVICE *device, struct hif_scatter_req *request);

struct hif_device_scatter_support_info {
/* information returned from HIF layer */
--
1.7.4.15.g7811d


2011-03-14 18:06:20

by Luis R. Rodriguez

[permalink] [raw]
Subject: Re: [PATCH 00/38] ath6kl: remove typedefs part II

On Mon, Mar 14, 2011 at 10:58 AM, Luis R. Rodriguez
<[email protected]> wrote:
> Greg, here is my second cleanup series for ath6kl. This series addresses
> more typedef removals. Given that I have so many and they all do the
> same, and are tested I'm submitting them all in one series. I can really
> split it but you can just do that yourself if you believe this is really
> necessary. Either way they all go tested.
>
> We still have some more typedefs left after this so that'll go in some
> other series. This applies on top of Ilia Mirkin's submitted but not
> yet merged patch titled, "staging: ath6kl: Remove NULL check before kfree"

FYI - the linux-wireless mailing list rejected a few patches so I had
to resend them, but they go unchanged. If you see a patch twice just
ignore the duplicate.

Luis

2011-03-14 17:59:17

by Luis R. Rodriguez

[permalink] [raw]
Subject: [PATCH 01/38] ath6kl: remove-tyepdef DL_LIST and PDL_LIST pointer

This required two passes:

remove-typedef -s DL_LIST "struct dl_list" \
drivers/staging/ath6kl/
remove-typedef -s PDL_LIST "struct dl_list *" \
drivers/staging/ath6kl/

Tested-by: Naveen Singh <[email protected]>
Signed-off-by: Luis R. Rodriguez <[email protected]>
---
.../hif/sdio/linux_sdio/include/hif_internal.h | 2 +-
.../ath6kl/hif/sdio/linux_sdio/src/hif_scatter.c | 2 +-
drivers/staging/ath6kl/htc2/AR6000/ar6k.c | 2 +-
drivers/staging/ath6kl/htc2/AR6000/ar6k.h | 2 +-
drivers/staging/ath6kl/include/dl_list.h | 26 ++++++++++----------
drivers/staging/ath6kl/include/hif.h | 2 +-
drivers/staging/ath6kl/include/htc_packet.h | 8 +++---
7 files changed, 22 insertions(+), 22 deletions(-)

diff --git a/drivers/staging/ath6kl/hif/sdio/linux_sdio/include/hif_internal.h b/drivers/staging/ath6kl/hif/sdio/linux_sdio/include/hif_internal.h
index 87057e3..b5d1ad4 100644
--- a/drivers/staging/ath6kl/hif/sdio/linux_sdio/include/hif_internal.h
+++ b/drivers/staging/ath6kl/hif/sdio/linux_sdio/include/hif_internal.h
@@ -77,7 +77,7 @@ struct hif_device {
void *claimedContext;
HTC_CALLBACKS htcCallbacks;
u8 *dma_buffer;
- DL_LIST ScatterReqHead; /* scatter request list head */
+ struct dl_list ScatterReqHead; /* scatter request list head */
bool scatter_enabled; /* scatter enabled flag */
bool is_suspend;
bool is_disabled;
diff --git a/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif_scatter.c b/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif_scatter.c
index 78cbbb1..2a56a50 100644
--- a/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif_scatter.c
+++ b/drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif_scatter.c
@@ -62,7 +62,7 @@ static void FreeScatterReq(HIF_DEVICE *device, HIF_SCATTER_REQ *pReq)

static HIF_SCATTER_REQ *AllocScatterReq(HIF_DEVICE *device)
{
- DL_LIST *pItem;
+ struct dl_list *pItem;
unsigned long flag;

spin_lock_irqsave(&device->lock, flag);
diff --git a/drivers/staging/ath6kl/htc2/AR6000/ar6k.c b/drivers/staging/ath6kl/htc2/AR6000/ar6k.c
index a41ed12..f9f411a 100644
--- a/drivers/staging/ath6kl/htc2/AR6000/ar6k.c
+++ b/drivers/staging/ath6kl/htc2/AR6000/ar6k.c
@@ -589,7 +589,7 @@ void DevDumpRegisters(struct ar6k_device *pDev,

static HIF_SCATTER_REQ *DevAllocScatterReq(HIF_DEVICE *Context)
{
- DL_LIST *pItem;
+ struct dl_list *pItem;
struct ar6k_device *pDev = (struct ar6k_device *)Context;
LOCK_AR6K(pDev);
pItem = DL_ListRemoveItemFromHead(&pDev->ScatterReqHead);
diff --git a/drivers/staging/ath6kl/htc2/AR6000/ar6k.h b/drivers/staging/ath6kl/htc2/AR6000/ar6k.h
index 3e4ece8..88ef25a 100644
--- a/drivers/staging/ath6kl/htc2/AR6000/ar6k.h
+++ b/drivers/staging/ath6kl/htc2/AR6000/ar6k.h
@@ -133,7 +133,7 @@ struct ar6k_device {
bool DSRCanYield;
int CurrentDSRRecvCount;
HIF_DEVICE_SCATTER_SUPPORT_INFO HifScatterInfo;
- DL_LIST ScatterReqHead;
+ struct dl_list ScatterReqHead;
bool ScatterIsVirtual;
int MaxRecvBundleSize;
int MaxSendBundleSize;
diff --git a/drivers/staging/ath6kl/include/dl_list.h b/drivers/staging/ath6kl/include/dl_list.h
index 110e1d8..13b1e69 100644
--- a/drivers/staging/ath6kl/include/dl_list.h
+++ b/drivers/staging/ath6kl/include/dl_list.h
@@ -32,10 +32,10 @@

/* list functions */
/* pointers for the list */
-typedef struct _DL_LIST {
- struct _DL_LIST *pPrev;
- struct _DL_LIST *pNext;
-}DL_LIST, *PDL_LIST;
+struct dl_list {
+ struct dl_list *pPrev;
+ struct dl_list *pNext;
+};
/*
* DL_LIST_INIT , initialize doubly linked list
*/
@@ -67,7 +67,7 @@ typedef struct _DL_LIST {
*/
#define ITERATE_OVER_LIST_ALLOW_REMOVE(pStart,pItem,st,offset) \
{ \
- PDL_LIST pTemp; \
+ struct dl_list * pTemp; \
pTemp = (pStart)->pNext; \
while (pTemp != (pStart)) { \
(pItem) = A_CONTAINING_STRUCT(pTemp,st,offset); \
@@ -78,7 +78,7 @@ typedef struct _DL_LIST {
/*
* DL_ListInsertTail - insert pAdd to the end of the list
*/
-static INLINE PDL_LIST DL_ListInsertTail(PDL_LIST pList, PDL_LIST pAdd) {
+static INLINE struct dl_list *DL_ListInsertTail(struct dl_list *pList, struct dl_list *pAdd) {
/* insert at tail */
pAdd->pPrev = pList->pPrev;
pAdd->pNext = pList;
@@ -90,7 +90,7 @@ static INLINE PDL_LIST DL_ListInsertTail(PDL_LIST pList, PDL_LIST pAdd) {
/*
* DL_ListInsertHead - insert pAdd into the head of the list
*/
-static INLINE PDL_LIST DL_ListInsertHead(PDL_LIST pList, PDL_LIST pAdd) {
+static INLINE struct dl_list * DL_ListInsertHead(struct dl_list * pList, struct dl_list * pAdd) {
/* insert at head */
pAdd->pPrev = pList;
pAdd->pNext = pList->pNext;
@@ -103,7 +103,7 @@ static INLINE PDL_LIST DL_ListInsertHead(PDL_LIST pList, PDL_LIST pAdd) {
/*
* DL_ListRemove - remove pDel from list
*/
-static INLINE PDL_LIST DL_ListRemove(PDL_LIST pDel) {
+static INLINE struct dl_list * DL_ListRemove(struct dl_list * pDel) {
pDel->pNext->pPrev = pDel->pPrev;
pDel->pPrev->pNext = pDel->pNext;
/* point back to itself just to be safe, incase remove is called again */
@@ -115,8 +115,8 @@ static INLINE PDL_LIST DL_ListRemove(PDL_LIST pDel) {
/*
* DL_ListRemoveItemFromHead - get a list item from the head
*/
-static INLINE PDL_LIST DL_ListRemoveItemFromHead(PDL_LIST pList) {
- PDL_LIST pItem = NULL;
+static INLINE struct dl_list * DL_ListRemoveItemFromHead(struct dl_list * pList) {
+ struct dl_list * pItem = NULL;
if (pList->pNext != pList) {
pItem = pList->pNext;
/* remove the first item from head */
@@ -125,8 +125,8 @@ static INLINE PDL_LIST DL_ListRemoveItemFromHead(PDL_LIST pList) {
return pItem;
}

-static INLINE PDL_LIST DL_ListRemoveItemFromTail(PDL_LIST pList) {
- PDL_LIST pItem = NULL;
+static INLINE struct dl_list * DL_ListRemoveItemFromTail(struct dl_list * pList) {
+ struct dl_list * pItem = NULL;
if (pList->pPrev != pList) {
pItem = pList->pPrev;
/* remove the item from tail */
@@ -136,7 +136,7 @@ static INLINE PDL_LIST DL_ListRemoveItemFromTail(PDL_LIST pList) {
}

/* transfer src list items to the tail of the destination list */
-static INLINE void DL_ListTransferItemsToTail(PDL_LIST pDest, PDL_LIST pSrc) {
+static INLINE void DL_ListTransferItemsToTail(struct dl_list * pDest, struct dl_list * pSrc) {
/* only concatenate if src is not empty */
if (!DL_LIST_IS_EMPTY(pSrc)) {
/* cut out circular list in src and re-attach to end of dest */
diff --git a/drivers/staging/ath6kl/include/hif.h b/drivers/staging/ath6kl/include/hif.h
index ab1f4c1..3421a59 100644
--- a/drivers/staging/ath6kl/include/hif.h
+++ b/drivers/staging/ath6kl/include/hif.h
@@ -287,7 +287,7 @@ typedef enum _HIF_SCATTER_METHOD {
} HIF_SCATTER_METHOD;

typedef struct _HIF_SCATTER_REQ {
- DL_LIST ListLink; /* link management */
+ struct dl_list ListLink; /* link management */
u32 Address; /* address for the read/write operation */
u32 Request; /* request flags */
u32 TotalLength; /* total length of entire transfer */
diff --git a/drivers/staging/ath6kl/include/htc_packet.h b/drivers/staging/ath6kl/include/htc_packet.h
index fcf0a0c..9282e90 100644
--- a/drivers/staging/ath6kl/include/htc_packet.h
+++ b/drivers/staging/ath6kl/include/htc_packet.h
@@ -69,7 +69,7 @@ typedef struct _HTC_RX_PACKET_INFO {

/* wrapper around endpoint-specific packets */
typedef struct _HTC_PACKET {
- DL_LIST ListLink; /* double link */
+ struct dl_list ListLink; /* double link */
void *pPktContext; /* caller's per packet specific context */

u8 *pBufferStart; /* the true buffer start , the caller can
@@ -140,7 +140,7 @@ typedef struct _HTC_PACKET {

/* HTC Packet Queueing Macros */
typedef struct _HTC_PACKET_QUEUE {
- DL_LIST QueueHead;
+ struct dl_list QueueHead;
int Depth;
} HTC_PACKET_QUEUE;

@@ -180,7 +180,7 @@ static INLINE HTC_PACKET *HTC_GET_PKT_AT_HEAD(HTC_PACKET_QUEUE *queue) {

/* dequeue an HTC packet from the head of the queue */
static INLINE HTC_PACKET *HTC_PACKET_DEQUEUE(HTC_PACKET_QUEUE *queue) {
- DL_LIST *pItem = DL_ListRemoveItemFromHead(&queue->QueueHead);
+ struct dl_list *pItem = DL_ListRemoveItemFromHead(&queue->QueueHead);
if (pItem != NULL) {
queue->Depth--;
return A_CONTAINING_STRUCT(pItem, HTC_PACKET, ListLink);
@@ -190,7 +190,7 @@ static INLINE HTC_PACKET *HTC_PACKET_DEQUEUE(HTC_PACKET_QUEUE *queue) {

/* dequeue an HTC packet from the tail of the queue */
static INLINE HTC_PACKET *HTC_PACKET_DEQUEUE_TAIL(HTC_PACKET_QUEUE *queue) {
- DL_LIST *pItem = DL_ListRemoveItemFromTail(&queue->QueueHead);
+ struct dl_list *pItem = DL_ListRemoveItemFromTail(&queue->QueueHead);
if (pItem != NULL) {
queue->Depth--;
return A_CONTAINING_STRUCT(pItem, HTC_PACKET, ListLink);
--
1.7.4.15.g7811d


2011-03-14 18:22:34

by Luis R. Rodriguez

[permalink] [raw]
Subject: [PATCH 31/38] ath6kl: remove-typedef PSCmdPacket

remove-typedef -s PSCmdPacket \
"struct ps_cmd_packet" drivers/staging/ath6kl/

Tested-by: Naveen Singh <[email protected]>
Signed-off-by: Luis R. Rodriguez <[email protected]>
---
.../staging/ath6kl/miscdrv/ar3kps/ar3kpsconfig.c | 4 ++--
.../staging/ath6kl/miscdrv/ar3kps/ar3kpsparser.c | 12 ++++++------
.../staging/ath6kl/miscdrv/ar3kps/ar3kpsparser.h | 8 ++++----
3 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsconfig.c b/drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsconfig.c
index 3436cbd..8393efe 100644
--- a/drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsconfig.c
+++ b/drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsconfig.c
@@ -41,7 +41,7 @@
*/
typedef struct {

- PSCmdPacket *HciCmdList;
+ struct ps_cmd_packet *HciCmdList;
u32 num_packets;
struct ar3k_config_info *dev;
}HciCommandListParam;
@@ -133,7 +133,7 @@ int PSSendOps(void *arg)
{
int i;
int status = 0;
- PSCmdPacket *HciCmdList; /* List storing the commands */
+ struct ps_cmd_packet *HciCmdList; /* List storing the commands */
const struct firmware* firmware;
u32 numCmds;
u8 *event;
diff --git a/drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsparser.c b/drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsparser.c
index 300c501..b334a3d 100644
--- a/drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsparser.c
+++ b/drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsparser.c
@@ -130,7 +130,7 @@ tRamPatch RamPatch[MAX_NUM_PATCH_ENTRY];
int AthParseFilesUnified(u8 *srcbuffer,u32 srclen, int FileFormat);
char AthReadChar(u8 *buffer, u32 len,u32 *pos);
char *AthGetLine(char *buffer, int maxlen, u8 *srcbuffer,u32 len,u32 *pos);
-static int AthPSCreateHCICommand(u8 Opcode, u32 Param1,PSCmdPacket *PSPatchPacket,u32 *index);
+static int AthPSCreateHCICommand(u8 Opcode, u32 Param1,struct ps_cmd_packet *PSPatchPacket,u32 *index);

/* Function to reads the next character from the input buffer */
char AthReadChar(u8 *buffer, u32 len,u32 *pos)
@@ -764,7 +764,7 @@ static void LoadHeader(u8 *HCI_PS_Command,u8 opcode,int length,int index){

/////////////////////////
//
-int AthCreateCommandList(PSCmdPacket **HciPacketList, u32 *numPackets)
+int AthCreateCommandList(struct ps_cmd_packet **HciPacketList, u32 *numPackets)
{

u8 count;
@@ -785,8 +785,8 @@ int AthCreateCommandList(PSCmdPacket **HciPacketList, u32 *numPackets)
if(Patch_Count > 0) {
NumcmdEntry++; /* Patch Enable Command */
}
- AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("Num Cmd Entries %d Size %d \r\n",NumcmdEntry,(u32)sizeof(PSCmdPacket) * NumcmdEntry));
- (*HciPacketList) = A_MALLOC(sizeof(PSCmdPacket) * NumcmdEntry);
+ AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("Num Cmd Entries %d Size %d \r\n",NumcmdEntry,(u32)sizeof(struct ps_cmd_packet) * NumcmdEntry));
+ (*HciPacketList) = A_MALLOC(sizeof(struct ps_cmd_packet) * NumcmdEntry);
if(NULL == *HciPacketList) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("memory allocation failed \r\n"));
}
@@ -833,7 +833,7 @@ int AthCreateCommandList(PSCmdPacket **HciPacketList, u32 *numPackets)
////////////////////////

/////////////
-static int AthPSCreateHCICommand(u8 Opcode, u32 Param1,PSCmdPacket *PSPatchPacket,u32 *index)
+static int AthPSCreateHCICommand(u8 Opcode, u32 Param1,struct ps_cmd_packet *PSPatchPacket,u32 *index)
{
u8 *HCI_PS_Command;
u32 Length;
@@ -955,7 +955,7 @@ static int AthPSCreateHCICommand(u8 Opcode, u32 Param1,PSCmdPacket *PSPatchPacke
}
return 0;
}
-int AthFreeCommandList(PSCmdPacket **HciPacketList, u32 numPackets)
+int AthFreeCommandList(struct ps_cmd_packet **HciPacketList, u32 numPackets)
{
int i;
if(*HciPacketList == NULL) {
diff --git a/drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsparser.h b/drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsparser.h
index 62e298d..9378efc 100644
--- a/drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsparser.h
+++ b/drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsparser.h
@@ -89,11 +89,11 @@



-typedef struct PSCmdPacket
+struct ps_cmd_packet
{
u8 *Hcipacket;
int packetLen;
-} PSCmdPacket;
+};

/* Parses a Patch information buffer and store it in global structure */
int AthDoParsePatch(u8 *, u32 );
@@ -112,8 +112,8 @@ int AthDoParsePS(u8 *, u32 );
* PS Tag Command(s)
*
*/
-int AthCreateCommandList(PSCmdPacket **, u32 *);
+int AthCreateCommandList(struct ps_cmd_packet **, u32 *);

/* Cleanup the dynamically allicated HCI command list */
-int AthFreeCommandList(PSCmdPacket **HciPacketList, u32 numPackets);
+int AthFreeCommandList(struct ps_cmd_packet **HciPacketList, u32 numPackets);
#endif /* __AR3KPSPARSER_H */
--
1.7.4.15.g7811d


2011-03-14 18:08:19

by Luis R. Rodriguez

[permalink] [raw]
Subject: [PATCH 32/38] ath6kl: remove-typedef RXTID

remove-typedef -s RXTID \
"struct rxtid" drivers/staging/ath6kl/

Tested-by: Naveen Singh <[email protected]>
Signed-off-by: Luis R. Rodriguez <[email protected]>
---
drivers/staging/ath6kl/reorder/aggr_rx_internal.h | 6 ++--
drivers/staging/ath6kl/reorder/rcv_aggr.c | 22 ++++++++++----------
2 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/drivers/staging/ath6kl/reorder/aggr_rx_internal.h b/drivers/staging/ath6kl/reorder/aggr_rx_internal.h
index 082a8da..8b091df 100644
--- a/drivers/staging/ath6kl/reorder/aggr_rx_internal.h
+++ b/drivers/staging/ath6kl/reorder/aggr_rx_internal.h
@@ -73,7 +73,7 @@ typedef struct {
}WINDOW_SNAPSHOT;
#endif

-typedef struct {
+struct rxtid {
bool aggr; /* is it ON or OFF */
bool progress; /* true when frames have arrived after a timer start */
bool timerMon; /* true if the timer started for the sake of this TID */
@@ -86,7 +86,7 @@ typedef struct {
#endif
A_NETBUF_QUEUE_T q; /* q head for enqueuing frames for dispatch */
A_MUTEX_T lock;
-}RXTID;
+};

typedef struct {
u32 num_into_aggr; /* hitting at the input of this module */
@@ -106,7 +106,7 @@ struct aggr_info {
A_TIMER timer; /* timer for returning held up pkts in re-order que */
void *dev; /* dev handle */
RX_CALLBACK rx_fn; /* callback function to return frames; to upper layer */
- RXTID RxTid[NUM_OF_TIDS]; /* Per tid window */
+ struct rxtid RxTid[NUM_OF_TIDS]; /* Per tid window */
ALLOC_NETBUFS netbuf_allocator; /* OS netbuf alloc fn */
A_NETBUF_QUEUE_T freeQ; /* pre-allocated buffers - for A_MSDU slicing */
RXTID_STATS stat[NUM_OF_TIDS]; /* Tid based statistics */
diff --git a/drivers/staging/ath6kl/reorder/rcv_aggr.c b/drivers/staging/ath6kl/reorder/rcv_aggr.c
index c54d492..8d13489 100644
--- a/drivers/staging/ath6kl/reorder/rcv_aggr.c
+++ b/drivers/staging/ath6kl/reorder/rcv_aggr.c
@@ -37,7 +37,7 @@ extern int
wmi_dot3_2_dix(void *osbuf);

static void
-aggr_slice_amsdu(struct aggr_info *p_aggr, RXTID *rxtid, void **osbuf);
+aggr_slice_amsdu(struct aggr_info *p_aggr, struct rxtid *rxtid, void **osbuf);

static void
aggr_timeout(A_ATH_TIMER arg);
@@ -55,7 +55,7 @@ void *
aggr_init(ALLOC_NETBUFS netbuf_allocator)
{
struct aggr_info *p_aggr = NULL;
- RXTID *rxtid;
+ struct rxtid *rxtid;
u8 i;
int status = 0;

@@ -103,7 +103,7 @@ aggr_init(ALLOC_NETBUFS netbuf_allocator)
static void
aggr_delete_tid_state(struct aggr_info *p_aggr, u8 tid)
{
- RXTID *rxtid;
+ struct rxtid *rxtid;
RXTID_STATS *stats;

A_ASSERT(tid < NUM_OF_TIDS && p_aggr);
@@ -134,7 +134,7 @@ void
aggr_module_destroy(void *cntxt)
{
struct aggr_info *p_aggr = (struct aggr_info *)cntxt;
- RXTID *rxtid;
+ struct rxtid *rxtid;
u8 i, k;
A_PRINTF("%s(): aggr = %p\n",_A_FUNCNAME_, p_aggr);
A_ASSERT(p_aggr);
@@ -204,7 +204,7 @@ void
aggr_recv_addba_req_evt(void *cntxt, u8 tid, u16 seq_no, u8 win_sz)
{
struct aggr_info *p_aggr = (struct aggr_info *)cntxt;
- RXTID *rxtid;
+ struct rxtid *rxtid;
RXTID_STATS *stats;

A_ASSERT(p_aggr);
@@ -256,7 +256,7 @@ void
aggr_recv_delba_req_evt(void *cntxt, u8 tid)
{
struct aggr_info *p_aggr = (struct aggr_info *)cntxt;
- RXTID *rxtid;
+ struct rxtid *rxtid;

A_ASSERT(p_aggr);
A_PRINTF("%s(): tid %d\n", _A_FUNCNAME_, tid);
@@ -271,7 +271,7 @@ aggr_recv_delba_req_evt(void *cntxt, u8 tid)
static void
aggr_deque_frms(struct aggr_info *p_aggr, u8 tid, u16 seq_no, u8 order)
{
- RXTID *rxtid;
+ struct rxtid *rxtid;
struct osbuf_hold_q *node;
u16 idx, idx_end, seq_end;
RXTID_STATS *stats;
@@ -356,7 +356,7 @@ aggr_get_osbuf(struct aggr_info *p_aggr)


static void
-aggr_slice_amsdu(struct aggr_info *p_aggr, RXTID *rxtid, void **osbuf)
+aggr_slice_amsdu(struct aggr_info *p_aggr, struct rxtid *rxtid, void **osbuf)
{
void *new_buf;
u16 frame_8023_len, payload_8023_len, mac_hdr_len, amsdu_len;
@@ -429,7 +429,7 @@ void
aggr_process_recv_frm(void *cntxt, u8 tid, u16 seq_no, bool is_amsdu, void **osbuf)
{
struct aggr_info *p_aggr = (struct aggr_info *)cntxt;
- RXTID *rxtid;
+ struct rxtid *rxtid;
RXTID_STATS *stats;
u16 idx, st, cur, end;
u16 *log_idx;
@@ -577,7 +577,7 @@ aggr_timeout(A_ATH_TIMER arg)
{
u8 i,j;
struct aggr_info *p_aggr = (struct aggr_info *)arg;
- RXTID *rxtid;
+ struct rxtid *rxtid;
RXTID_STATS *stats;
/*
* If the q for which the timer was originally started has
@@ -643,7 +643,7 @@ void
aggr_dump_stats(void *cntxt, PACKET_LOG **log_buf)
{
struct aggr_info *p_aggr = (struct aggr_info *)cntxt;
- RXTID *rxtid;
+ struct rxtid *rxtid;
RXTID_STATS *stats;
u8 i;

--
1.7.4.15.g7811d


2011-03-14 17:59:29

by Luis R. Rodriguez

[permalink] [raw]
Subject: [PATCH 11/38] ath6kl: remove-typedef HIF_MBOX_PROPERTIES

remove-typedef -s HIF_MBOX_PROPERTIES \
"struct hif_mbox_properties" drivers/staging/ath6kl/

Tested-by: Naveen Singh <[email protected]>
Signed-off-by: Luis R. Rodriguez <[email protected]>
---
drivers/staging/ath6kl/include/hif.h | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/ath6kl/include/hif.h b/drivers/staging/ath6kl/include/hif.h
index 61e4392..4f9be8a 100644
--- a/drivers/staging/ath6kl/include/hif.h
+++ b/drivers/staging/ath6kl/include/hif.h
@@ -223,10 +223,10 @@ typedef enum {
*
*/

-typedef struct {
+struct hif_mbox_properties {
u32 ExtendedAddress; /* extended address for larger writes */
u32 ExtendedSize;
-} HIF_MBOX_PROPERTIES;
+};

#define HIF_MBOX_FLAG_NO_BUNDLING (1 << 0) /* do not allow bundling over the mailbox */

@@ -240,7 +240,7 @@ struct hif_device_mbox_info {
and ARRAY of 32-bit words */

/* the following describe extended mailbox properties */
- HIF_MBOX_PROPERTIES MboxProp[4];
+ struct hif_mbox_properties MboxProp[4];
/* if the HIF supports the GMbox extended address region it can report it
* here, some interfaces cannot support the GMBOX address range and not set this */
u32 GMboxAddress;
--
1.7.4.15.g7811d