X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=drivers%2Fstaging%2Fvt6655%2Fdesc.h;h=00fa348f466926b2fa195315ad10f87b779d269c;hb=5235ff6a1df6fb0883f1a9020ab36e0db1c68064;hp=758eeb2afd512a5e2d0e2928fdcbe3acf3f37145;hpb=c533b8e60ab27e8f8782a1997f8417561140f7f8;p=firefly-linux-kernel-4.4.55.git diff --git a/drivers/staging/vt6655/desc.h b/drivers/staging/vt6655/desc.h index 758eeb2afd51..00fa348f4669 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,44 +208,34 @@ 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 __le16 wReqCount; volatile unsigned char byTCR; volatile unsigned char byReserved; } __attribute__ ((__packed__)) @@ -256,9 +245,7 @@ typedef struct tagDEVICE_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; @@ -266,37 +253,16 @@ typedef struct tagDEVICE_TD_INFO { /* transmit descriptor */ typedef struct tagSTxDesc { - volatile STDES0 m_td0TD0; + volatile struct vnt_tdes0 td0; volatile STDES1 m_td1TD1; - volatile u32 buff_addr; - volatile u32 next_desc; + volatile __le32 buff_addr; + volatile __le32 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; - /* Length, Service, and Signal fields of Phy for Tx */ struct vnt_phy_field { u8 signal; @@ -310,42 +276,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__ */