These changes are the raw update to linux-4.4.6-rt14. Kernel sources
[kvmfornfv.git] / kernel / drivers / staging / vt6655 / desc.h
index 758eeb2..9fbc717 100644 (file)
  * leads error.
  */
 
-typedef struct tagDEVICE_RD_INFO {
+struct vnt_rd_info {
        struct sk_buff *skb;
        dma_addr_t  skb_dma;
-       dma_addr_t  curr_desc;
-} DEVICE_RD_INFO,   *PDEVICE_RD_INFO;
+};
 
+struct vnt_rdes0 {
+       volatile __le16 res_count;
 #ifdef __BIG_ENDIAN
-
-typedef struct tagRDES0 {
-       volatile unsigned short wResCount;
        union {
-               volatile u16    f15Reserved;
+               volatile u16 f15_reserved;
                struct {
-                       volatile u8 f8Reserved1;
-                       volatile u8 f1Owner:1;
-                       volatile u8 f7Reserved:7;
-               } __attribute__ ((__packed__));
-       } __attribute__ ((__packed__));
-} __attribute__ ((__packed__))
-SRDES0, *PSRDES0;
-
+                       volatile u8 f8_reserved1;
+                       volatile u8 owner:1;
+                       volatile u8 f7_reserved:7;
+               } __packed;
+       } __packed;
 #else
-
-typedef struct tagRDES0 {
-       unsigned short wResCount;
-       unsigned short f15Reserved:15;
-       unsigned short f1Owner:1;
-} __attribute__ ((__packed__))
-SRDES0;
-
+       u16 f15_reserved:15;
+       u16 owner:1;
 #endif
+} __packed;
 
-typedef struct tagRDES1 {
-       unsigned short wReqCount;
-       unsigned short wReserved;
-} __attribute__ ((__packed__))
-SRDES1;
+struct vnt_rdes1 {
+       __le16 req_count;
+       u16 reserved;
+} __packed;
 
 /* Rx descriptor*/
-typedef struct tagSRxDesc {
-       volatile SRDES0 m_rd0RD0;
-       volatile SRDES1 m_rd1RD1;
-       volatile u32    buff_addr;
-       volatile u32    next_desc;
-       struct tagSRxDesc *next __aligned(8);
-       volatile PDEVICE_RD_INFO pRDInfo __aligned(8);
-} __attribute__ ((__packed__))
-SRxDesc, *PSRxDesc;
-typedef const SRxDesc *PCSRxDesc;
+struct vnt_rx_desc {
+       volatile struct vnt_rdes0 rd0;
+       volatile struct vnt_rdes1 rd1;
+       volatile __le32 buff_addr;
+       volatile __le32 next_desc;
+       struct vnt_rx_desc *next __aligned(8);
+       struct vnt_rd_info *rd_info __aligned(8);
+} __packed;
 
+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 +260,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__ */