X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=drivers%2Fstaging%2Fvt6655%2Fdesc.h;h=3c9007e34c0ff30c644d923a2a040bcf146f456b;hb=e235727173626edf87c63b415d0363b411da299e;hp=758eeb2afd512a5e2d0e2928fdcbe3acf3f37145;hpb=7b05520160a3252577f9a258609499b73f3bdef1;p=linux-2.6-block.git diff --git a/drivers/staging/vt6655/desc.h b/drivers/staging/vt6655/desc.h index 758eeb2afd51..3c9007e34c0f 100644 --- a/drivers/staging/vt6655/desc.h +++ b/drivers/staging/vt6655/desc.h @@ -170,13 +170,12 @@ typedef struct tagDEVICE_RD_INFO { struct sk_buff *skb; dma_addr_t skb_dma; - dma_addr_t curr_desc; } DEVICE_RD_INFO, *PDEVICE_RD_INFO; #ifdef __BIG_ENDIAN typedef struct tagRDES0 { - volatile unsigned short wResCount; + volatile __le16 wResCount; union { volatile u16 f15Reserved; struct { @@ -191,7 +190,7 @@ SRDES0, *PSRDES0; #else typedef struct tagRDES0 { - unsigned short wResCount; + __le16 wResCount; unsigned short f15Reserved:15; unsigned short f1Owner:1; } __attribute__ ((__packed__)) @@ -200,7 +199,7 @@ SRDES0; #endif typedef struct tagRDES1 { - unsigned short wReqCount; + __le16 wReqCount; unsigned short wReserved; } __attribute__ ((__packed__)) SRDES1; @@ -209,93 +208,56 @@ SRDES1; typedef struct tagSRxDesc { volatile SRDES0 m_rd0RD0; volatile SRDES1 m_rd1RD1; - volatile u32 buff_addr; - volatile u32 next_desc; + volatile __le32 buff_addr; + volatile __le32 next_desc; struct tagSRxDesc *next __aligned(8); volatile PDEVICE_RD_INFO pRDInfo __aligned(8); } __attribute__ ((__packed__)) SRxDesc, *PSRxDesc; typedef const SRxDesc *PCSRxDesc; +struct vnt_tdes0 { + volatile u8 tsr0; + volatile u8 tsr1; #ifdef __BIG_ENDIAN - -typedef struct tagTDES0 { - volatile unsigned char byTSR0; - volatile unsigned char byTSR1; union { - volatile u16 f15Txtime; + volatile u16 f15_txtime; struct { - volatile u8 f8Reserved1; - volatile u8 f1Owner:1; - volatile u8 f7Reserved:7; - } __attribute__ ((__packed__)); - } __attribute__ ((__packed__)); -} __attribute__ ((__packed__)) -STDES0, PSTDES0; - + volatile u8 f8_reserved; + volatile u8 owner:1; + volatile u8 f7_reserved:7; + } __packed; + } __packed; #else - -typedef struct tagTDES0 { - volatile unsigned char byTSR0; - volatile unsigned char byTSR1; - volatile unsigned short f15Txtime:15; - volatile unsigned short f1Owner:1; -} __attribute__ ((__packed__)) -STDES0; - + volatile u16 f15_txtime:15; + volatile u16 owner:1; #endif +} __packed; -typedef struct tagTDES1 { - volatile unsigned short wReqCount; - volatile unsigned char byTCR; - volatile unsigned char byReserved; -} __attribute__ ((__packed__)) -STDES1; +struct vnt_tdes1 { + volatile __le16 req_count; + volatile u8 tcr; + volatile u8 reserved; +} __packed; -typedef struct tagDEVICE_TD_INFO { +struct vnt_td_info { void *mic_hdr; struct sk_buff *skb; unsigned char *buf; - dma_addr_t skb_dma; - dma_addr_t buf_dma; - dma_addr_t curr_desc; - unsigned long dwReqCount; - unsigned long dwHeaderLength; - unsigned char byFlags; -} DEVICE_TD_INFO, *PDEVICE_TD_INFO; + dma_addr_t buf_dma; + u16 req_count; + u8 flags; +}; /* transmit descriptor */ -typedef struct tagSTxDesc { - volatile STDES0 m_td0TD0; - volatile STDES1 m_td1TD1; - volatile u32 buff_addr; - volatile u32 next_desc; - struct tagSTxDesc *next __aligned(8); - volatile PDEVICE_TD_INFO pTDInfo __aligned(8); -} __attribute__ ((__packed__)) -STxDesc, *PSTxDesc; -typedef const STxDesc *PCSTxDesc; - -typedef struct tagSTxSyncDesc { - volatile STDES0 m_td0TD0; - volatile STDES1 m_td1TD1; - volatile u32 buff_addr; /* pointer to logical buffer */ - volatile u32 next_desc; /* pointer to next logical descriptor */ - volatile unsigned short m_wFIFOCtl; - volatile unsigned short m_wTimeStamp; - struct tagSTxSyncDesc *next __aligned(8); - volatile PDEVICE_TD_INFO pTDInfo __aligned(8); -} __attribute__ ((__packed__)) -STxSyncDesc, *PSTxSyncDesc; -typedef const STxSyncDesc *PCSTxSyncDesc; - -/* RsvTime buffer header */ -typedef struct tagSRrvTime_atim { - unsigned short wCTSTxRrvTime_ba; - unsigned short wTxRrvTime_a; -} __attribute__ ((__packed__)) -SRrvTime_atim, *PSRrvTime_atim; -typedef const SRrvTime_atim *PCSRrvTime_atim; +struct vnt_tx_desc { + volatile struct vnt_tdes0 td0; + volatile struct vnt_tdes1 td1; + volatile __le32 buff_addr; + volatile __le32 next_desc; + struct vnt_tx_desc *next __aligned(8); + struct vnt_td_info *td_info __aligned(8); +} __packed; /* Length, Service, and Signal fields of Phy for Tx */ struct vnt_phy_field { @@ -310,42 +272,4 @@ union vnt_phy_field_swap { u32 field_write; }; -/* Tx FIFO header */ -typedef struct tagSTxBufHead { - u32 adwTxKey[4]; - unsigned short wFIFOCtl; - unsigned short wTimeStamp; - unsigned short wFragCtl; - unsigned char byTxPower; - unsigned char wReserved; -} __attribute__ ((__packed__)) -STxBufHead, *PSTxBufHead; -typedef const STxBufHead *PCSTxBufHead; - -typedef struct tagSBEACONCtl { - u32 BufReady:1; - u32 TSF:15; - u32 BufLen:11; - u32 Reserved:5; -} __attribute__ ((__packed__)) -SBEACONCtl; - -typedef struct tagSSecretKey { - u32 dwLowDword; - unsigned char byHighByte; -} __attribute__ ((__packed__)) -SSecretKey; - -typedef struct tagSKeyEntry { - unsigned char abyAddrHi[2]; - unsigned short wKCTL; - unsigned char abyAddrLo[4]; - u32 dwKey0[4]; - u32 dwKey1[4]; - u32 dwKey2[4]; - u32 dwKey3[4]; - u32 dwKey4[4]; -} __attribute__ ((__packed__)) -SKeyEntry; - #endif /* __DESC_H__ */