aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/ath6kl
diff options
context:
space:
mode:
authorLuis R. Rodriguez <lrodriguez@atheros.com>2011-03-14 13:58:55 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2011-03-14 14:58:48 -0400
commitaf26f25c84a8340eae1362727ee0584870b2948d (patch)
tree1c7398d0da0a6c152c7640a17825d14ec0c8e906 /drivers/staging/ath6kl
parent80ab2899c223599450ec5d0c188c0783b6806057 (diff)
ath6kl: remove-typedef HTC_FRAME_HDR
remove-typedef -s HTC_FRAME_HDR \ "struct htc_frame_hdr" drivers/staging/ath6kl/ Tested-by: Naveen Singh <nsingh@atheros.com> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/ath6kl')
-rw-r--r--drivers/staging/ath6kl/htc2/htc_internal.h12
-rw-r--r--drivers/staging/ath6kl/htc2/htc_recv.c30
-rw-r--r--drivers/staging/ath6kl/include/common/epping_test.h2
-rw-r--r--drivers/staging/ath6kl/include/common/htc.h8
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 d5740152ae4..deff62a6cf1 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 {
128 HTC_ENDPOINT_ID EpWaitingForBuffers; 128 HTC_ENDPOINT_ID EpWaitingForBuffers;
129 bool TargetFailure; 129 bool TargetFailure;
130#ifdef HTC_CAPTURE_LAST_FRAME 130#ifdef HTC_CAPTURE_LAST_FRAME
131 HTC_FRAME_HDR LastFrameHdr; /* useful for debugging */ 131 struct htc_frame_hdr LastFrameHdr; /* useful for debugging */
132 u8 LastTrailer[256]; 132 u8 LastTrailer[256];
133 u8 LastTrailerLength; 133 u8 LastTrailerLength;
134#endif 134#endif
@@ -203,11 +203,11 @@ static INLINE HTC_PACKET *HTC_ALLOC_CONTROL_TX(HTC_TARGET *target) {
203 u8 *pHdrBuf; \ 203 u8 *pHdrBuf; \
204 (pP)->pBuffer -= HTC_HDR_LENGTH; \ 204 (pP)->pBuffer -= HTC_HDR_LENGTH; \
205 pHdrBuf = (pP)->pBuffer; \ 205 pHdrBuf = (pP)->pBuffer; \
206 A_SET_UINT16_FIELD(pHdrBuf,HTC_FRAME_HDR,PayloadLen,(u16)(pP)->ActualLength); \ 206 A_SET_UINT16_FIELD(pHdrBuf,struct htc_frame_hdr,PayloadLen,(u16)(pP)->ActualLength); \
207 A_SET_UINT8_FIELD(pHdrBuf,HTC_FRAME_HDR,Flags,(sendflags)); \ 207 A_SET_UINT8_FIELD(pHdrBuf,struct htc_frame_hdr,Flags,(sendflags)); \
208 A_SET_UINT8_FIELD(pHdrBuf,HTC_FRAME_HDR,EndpointID, (u8)(pP)->Endpoint); \ 208 A_SET_UINT8_FIELD(pHdrBuf,struct htc_frame_hdr,EndpointID, (u8)(pP)->Endpoint); \
209 A_SET_UINT8_FIELD(pHdrBuf,HTC_FRAME_HDR,ControlBytes[0], (u8)(ctrl0)); \ 209 A_SET_UINT8_FIELD(pHdrBuf,struct htc_frame_hdr,ControlBytes[0], (u8)(ctrl0)); \
210 A_SET_UINT8_FIELD(pHdrBuf,HTC_FRAME_HDR,ControlBytes[1], (u8)(ctrl1)); \ 210 A_SET_UINT8_FIELD(pHdrBuf,struct htc_frame_hdr,ControlBytes[1], (u8)(ctrl1)); \
211} 211}
212 212
213#define HTC_UNPREPARE_SEND_PKT(pP) \ 213#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 4095f8e07e5..771dc5e217c 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,
252 do { 252 do {
253 /* note, we cannot assume the alignment of pBuffer, so we use the safe macros to 253 /* note, we cannot assume the alignment of pBuffer, so we use the safe macros to
254 * retrieve 16 bit fields */ 254 * retrieve 16 bit fields */
255 payloadLen = A_GET_UINT16_FIELD(pBuf, HTC_FRAME_HDR, PayloadLen); 255 payloadLen = A_GET_UINT16_FIELD(pBuf, struct htc_frame_hdr, PayloadLen);
256 256
257 ((u8 *)&lookAhead)[0] = pBuf[0]; 257 ((u8 *)&lookAhead)[0] = pBuf[0];
258 ((u8 *)&lookAhead)[1] = pBuf[1]; 258 ((u8 *)&lookAhead)[1] = pBuf[1];
@@ -277,10 +277,10 @@ static int HTCProcessRecvHeader(HTC_TARGET *target,
277 break; 277 break;
278 } 278 }
279 279
280 if (pPacket->Endpoint != A_GET_UINT8_FIELD(pBuf, HTC_FRAME_HDR, EndpointID)) { 280 if (pPacket->Endpoint != A_GET_UINT8_FIELD(pBuf, struct htc_frame_hdr, EndpointID)) {
281 AR_DEBUG_PRINTF(ATH_DEBUG_ERR, 281 AR_DEBUG_PRINTF(ATH_DEBUG_ERR,
282 ("Refreshed HDR endpoint (%d) does not match expected endpoint (%d) \n", 282 ("Refreshed HDR endpoint (%d) does not match expected endpoint (%d) \n",
283 A_GET_UINT8_FIELD(pBuf, HTC_FRAME_HDR, EndpointID), pPacket->Endpoint)); 283 A_GET_UINT8_FIELD(pBuf, struct htc_frame_hdr, EndpointID), pPacket->Endpoint));
284 status = A_EPROTO; 284 status = A_EPROTO;
285 break; 285 break;
286 } 286 }
@@ -294,9 +294,9 @@ static int HTCProcessRecvHeader(HTC_TARGET *target,
294 (unsigned long)pPacket, pPacket->PktInfo.AsRx.HTCRxFlags)); 294 (unsigned long)pPacket, pPacket->PktInfo.AsRx.HTCRxFlags));
295#ifdef ATH_DEBUG_MODULE 295#ifdef ATH_DEBUG_MODULE
296 DebugDumpBytes((u8 *)&pPacket->PktInfo.AsRx.ExpectedHdr,4,"Expected Message LookAhead"); 296 DebugDumpBytes((u8 *)&pPacket->PktInfo.AsRx.ExpectedHdr,4,"Expected Message LookAhead");
297 DebugDumpBytes(pBuf,sizeof(HTC_FRAME_HDR),"Current Frame Header"); 297 DebugDumpBytes(pBuf,sizeof(struct htc_frame_hdr),"Current Frame Header");
298#ifdef HTC_CAPTURE_LAST_FRAME 298#ifdef HTC_CAPTURE_LAST_FRAME
299 DebugDumpBytes((u8 *)&target->LastFrameHdr,sizeof(HTC_FRAME_HDR),"Last Frame Header"); 299 DebugDumpBytes((u8 *)&target->LastFrameHdr,sizeof(struct htc_frame_hdr),"Last Frame Header");
300 if (target->LastTrailerLength != 0) { 300 if (target->LastTrailerLength != 0) {
301 DebugDumpBytes(target->LastTrailer, 301 DebugDumpBytes(target->LastTrailer,
302 target->LastTrailerLength, 302 target->LastTrailerLength,
@@ -309,13 +309,13 @@ static int HTCProcessRecvHeader(HTC_TARGET *target,
309 } 309 }
310 310
311 /* get flags */ 311 /* get flags */
312 temp = A_GET_UINT8_FIELD(pBuf, HTC_FRAME_HDR, Flags); 312 temp = A_GET_UINT8_FIELD(pBuf, struct htc_frame_hdr, Flags);
313 313
314 if (temp & HTC_FLAGS_RECV_TRAILER) { 314 if (temp & HTC_FLAGS_RECV_TRAILER) {
315 /* this packet has a trailer */ 315 /* this packet has a trailer */
316 316
317 /* extract the trailer length in control byte 0 */ 317 /* extract the trailer length in control byte 0 */
318 temp = A_GET_UINT8_FIELD(pBuf, HTC_FRAME_HDR, ControlBytes[0]); 318 temp = A_GET_UINT8_FIELD(pBuf, struct htc_frame_hdr, ControlBytes[0]);
319 319
320 if ((temp < sizeof(HTC_RECORD_HDR)) || (temp > payloadLen)) { 320 if ((temp < sizeof(HTC_RECORD_HDR)) || (temp > payloadLen)) {
321 AR_DEBUG_PRINTF(ATH_DEBUG_ERR, 321 AR_DEBUG_PRINTF(ATH_DEBUG_ERR,
@@ -372,7 +372,7 @@ static int HTCProcessRecvHeader(HTC_TARGET *target,
372#endif 372#endif
373 } else { 373 } else {
374#ifdef HTC_CAPTURE_LAST_FRAME 374#ifdef HTC_CAPTURE_LAST_FRAME
375 memcpy(&target->LastFrameHdr,pBuf,sizeof(HTC_FRAME_HDR)); 375 memcpy(&target->LastFrameHdr,pBuf,sizeof(struct htc_frame_hdr));
376#endif 376#endif
377 if (AR_DEBUG_LVL_CHECK(ATH_DEBUG_RECV)) { 377 if (AR_DEBUG_LVL_CHECK(ATH_DEBUG_RECV)) {
378 if (pPacket->ActualLength > 0) { 378 if (pPacket->ActualLength > 0) {
@@ -500,7 +500,7 @@ static INLINE void SetRxPacketIndicationFlags(u32 LookAhead,
500 struct htc_endpoint *pEndpoint, 500 struct htc_endpoint *pEndpoint,
501 HTC_PACKET *pPacket) 501 HTC_PACKET *pPacket)
502{ 502{
503 HTC_FRAME_HDR *pHdr = (HTC_FRAME_HDR *)&LookAhead; 503 struct htc_frame_hdr *pHdr = (struct htc_frame_hdr *)&LookAhead;
504 /* check to see if the "next" packet is from the same endpoint of the 504 /* check to see if the "next" packet is from the same endpoint of the
505 completing packet */ 505 completing packet */
506 if (pHdr->EndpointID == pPacket->Endpoint) { 506 if (pHdr->EndpointID == pPacket->Endpoint) {
@@ -592,7 +592,7 @@ int HTCWaitforControlMessage(HTC_TARGET *target, HTC_PACKET **ppControlPacket)
592 int status; 592 int status;
593 u32 lookAhead; 593 u32 lookAhead;
594 HTC_PACKET *pPacket = NULL; 594 HTC_PACKET *pPacket = NULL;
595 HTC_FRAME_HDR *pHdr; 595 struct htc_frame_hdr *pHdr;
596 596
597 AR_DEBUG_PRINTF(ATH_DEBUG_RECV,("+HTCWaitforControlMessage \n")); 597 AR_DEBUG_PRINTF(ATH_DEBUG_RECV,("+HTCWaitforControlMessage \n"));
598 598
@@ -613,7 +613,7 @@ int HTCWaitforControlMessage(HTC_TARGET *target, HTC_PACKET **ppControlPacket)
613 ("HTCWaitforControlMessage : lookAhead : 0x%X \n", lookAhead)); 613 ("HTCWaitforControlMessage : lookAhead : 0x%X \n", lookAhead));
614 614
615 /* check the lookahead */ 615 /* check the lookahead */
616 pHdr = (HTC_FRAME_HDR *)&lookAhead; 616 pHdr = (struct htc_frame_hdr *)&lookAhead;
617 617
618 if (pHdr->EndpointID != ENDPOINT_0) { 618 if (pHdr->EndpointID != ENDPOINT_0) {
619 /* unexpected endpoint number, should be zero */ 619 /* unexpected endpoint number, should be zero */
@@ -694,7 +694,7 @@ static int AllocAndPrepareRxPackets(HTC_TARGET *target,
694{ 694{
695 int status = 0; 695 int status = 0;
696 HTC_PACKET *pPacket; 696 HTC_PACKET *pPacket;
697 HTC_FRAME_HDR *pHdr; 697 struct htc_frame_hdr *pHdr;
698 int i,j; 698 int i,j;
699 int numMessages; 699 int numMessages;
700 int fullLength; 700 int fullLength;
@@ -705,7 +705,7 @@ static int AllocAndPrepareRxPackets(HTC_TARGET *target,
705 705
706 for (i = 0; i < Messages; i++) { 706 for (i = 0; i < Messages; i++) {
707 707
708 pHdr = (HTC_FRAME_HDR *)&LookAheads[i]; 708 pHdr = (struct htc_frame_hdr *)&LookAheads[i];
709 709
710 if (pHdr->EndpointID >= ENDPOINT_MAX) { 710 if (pHdr->EndpointID >= ENDPOINT_MAX) {
711 AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("Invalid Endpoint in look-ahead: %d \n",pHdr->EndpointID)); 711 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,
751 ("HTC header indicates :%d messages can be fetched as a bundle \n",numMessages)); 751 ("HTC header indicates :%d messages can be fetched as a bundle \n",numMessages));
752 } 752 }
753 753
754 fullLength = DEV_CALC_RECV_PADDED_LEN(&target->Device,pHdr->PayloadLen + sizeof(HTC_FRAME_HDR)); 754 fullLength = DEV_CALC_RECV_PADDED_LEN(&target->Device,pHdr->PayloadLen + sizeof(struct htc_frame_hdr));
755 755
756 /* get packet buffers for each message, if there was a bundle detected in the header, 756 /* get packet buffers for each message, if there was a bundle detected in the header,
757 * use pHdr as a template to fetch all packets in the bundle */ 757 * use pHdr as a template to fetch all packets in the bundle */
@@ -1170,7 +1170,7 @@ int HTCRecvMessagePendingHandler(void *Context, u32 MsgLookAheads[], int NumLook
1170 } 1170 }
1171 1171
1172 /* first lookahead sets the expected endpoint IDs for all packets in a bundle */ 1172 /* first lookahead sets the expected endpoint IDs for all packets in a bundle */
1173 id = ((HTC_FRAME_HDR *)&lookAheads[0])->EndpointID; 1173 id = ((struct htc_frame_hdr *)&lookAheads[0])->EndpointID;
1174 pEndpoint = &target->EndPoint[id]; 1174 pEndpoint = &target->EndPoint[id];
1175 1175
1176 if (id >= ENDPOINT_MAX) { 1176 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 2cd43c46c14..5c40d8a2229 100644
--- a/drivers/staging/ath6kl/include/common/epping_test.h
+++ b/drivers/staging/ath6kl/include/common/epping_test.h
@@ -30,7 +30,7 @@
30#endif 30#endif
31 31
32 /* alignment to 4-bytes */ 32 /* alignment to 4-bytes */
33#define EPPING_ALIGNMENT_PAD (((sizeof(HTC_FRAME_HDR) + 3) & (~0x3)) - sizeof(HTC_FRAME_HDR)) 33#define EPPING_ALIGNMENT_PAD (((sizeof(struct htc_frame_hdr) + 3) & (~0x3)) - sizeof(struct htc_frame_hdr))
34 34
35#ifndef A_OFFSETOF 35#ifndef A_OFFSETOF
36#define A_OFFSETOF(type,field) (int)(&(((type *)NULL)->field)) 36#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 bed8e26abc3..b9d4495d432 100644
--- a/drivers/staging/ath6kl/include/common/htc.h
+++ b/drivers/staging/ath6kl/include/common/htc.h
@@ -66,7 +66,7 @@
66 */ 66 */
67 67
68/* HTC frame header */ 68/* HTC frame header */
69typedef PREPACK struct _HTC_FRAME_HDR{ 69PREPACK struct htc_frame_hdr {
70 /* do not remove or re-arrange these fields, these are minimally required 70 /* do not remove or re-arrange these fields, these are minimally required
71 * to take advantage of 4-byte lookaheads in some hardware implementations */ 71 * to take advantage of 4-byte lookaheads in some hardware implementations */
72 u8 EndpointID; 72 u8 EndpointID;
@@ -79,7 +79,7 @@ typedef PREPACK struct _HTC_FRAME_HDR{
79 79
80 /* message payload starts after the header */ 80 /* message payload starts after the header */
81 81
82} POSTPACK HTC_FRAME_HDR; 82} POSTPACK;
83 83
84/* frame header flags */ 84/* frame header flags */
85 85
@@ -94,9 +94,9 @@ typedef PREPACK struct _HTC_FRAME_HDR{
94#define HTC_FLAGS_RECV_BUNDLE_CNT_MASK (0xF0) /* bits 7..4 */ 94#define HTC_FLAGS_RECV_BUNDLE_CNT_MASK (0xF0) /* bits 7..4 */
95#define HTC_FLAGS_RECV_BUNDLE_CNT_SHIFT 4 95#define HTC_FLAGS_RECV_BUNDLE_CNT_SHIFT 4
96 96
97#define HTC_HDR_LENGTH (sizeof(HTC_FRAME_HDR)) 97#define HTC_HDR_LENGTH (sizeof(struct htc_frame_hdr))
98#define HTC_MAX_TRAILER_LENGTH 255 98#define HTC_MAX_TRAILER_LENGTH 255
99#define HTC_MAX_PAYLOAD_LENGTH (4096 - sizeof(HTC_FRAME_HDR)) 99#define HTC_MAX_PAYLOAD_LENGTH (4096 - sizeof(struct htc_frame_hdr))
100 100
101/* HTC control message IDs */ 101/* HTC control message IDs */
102 102