/* init state, all RD is chip's */
for (uu = 0; uu < pDevice->sOpts.nRxDescs0; uu++) {
pDesc = &(pDevice->aRD0Ring[uu]);
- pDesc->m_rd0RD0.wResCount = cpu_to_le16(pDevice->rx_buf_sz);
- pDesc->m_rd0RD0.f1Owner = OWNED_BY_NIC;
+ pDesc->rd0.res_count = cpu_to_le16(pDevice->rx_buf_sz);
+ pDesc->rd0.owner = OWNED_BY_NIC;
pDesc->m_rd1RD1.wReqCount = cpu_to_le16(pDevice->rx_buf_sz);
}
/* init state, all RD is chip's */
for (uu = 0; uu < pDevice->sOpts.nRxDescs1; uu++) {
pDesc = &(pDevice->aRD1Ring[uu]);
- pDesc->m_rd0RD0.wResCount = cpu_to_le16(pDevice->rx_buf_sz);
- pDesc->m_rd0RD0.f1Owner = OWNED_BY_NIC;
+ pDesc->rd0.res_count = cpu_to_le16(pDevice->rx_buf_sz);
+ pDesc->rd0.owner = OWNED_BY_NIC;
pDesc->m_rd1RD1.wReqCount = cpu_to_le16(pDevice->rx_buf_sz);
}
dma_addr_t skb_dma;
} DEVICE_RD_INFO, *PDEVICE_RD_INFO;
+struct vnt_rdes0 {
+ volatile __le16 res_count;
#ifdef __BIG_ENDIAN
-
-typedef struct tagRDES0 {
- volatile __le16 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 {
- __le16 wResCount;
- unsigned short f15Reserved:15;
- unsigned short f1Owner:1;
-} __attribute__ ((__packed__))
-SRDES0;
-
+ u16 f15_reserved:15;
+ u16 owner:1;
#endif
+} __packed;
typedef struct tagRDES1 {
__le16 wReqCount;
/* Rx descriptor*/
typedef struct tagSRxDesc {
- volatile SRDES0 m_rd0RD0;
+ volatile struct vnt_rdes0 rd0;
volatile SRDES1 m_rd1RD1;
volatile __le32 buff_addr;
volatile __le32 next_desc;
int works = 0;
for (pRD = pDevice->pCurrRD[uIdx];
- pRD->m_rd0RD0.f1Owner == OWNED_BY_HOST;
+ pRD->rd0.owner == OWNED_BY_HOST;
pRD = pRD->next) {
if (works++ > 15)
break;
break;
}
}
- pRD->m_rd0RD0.f1Owner = OWNED_BY_NIC;
+ pRD->rd0.owner = OWNED_BY_NIC;
}
pDevice->pCurrRD[uIdx] = pRD;
skb_put(pRDInfo->skb, skb_tailroom(pRDInfo->skb)),
pDevice->rx_buf_sz, DMA_FROM_DEVICE);
- *((unsigned int *)&(pRD->m_rd0RD0)) = 0; /* FIX cast */
+ *((unsigned int *)&pRD->rd0) = 0; /* FIX cast */
- pRD->m_rd0RD0.wResCount = cpu_to_le16(pDevice->rx_buf_sz);
- pRD->m_rd0RD0.f1Owner = OWNED_BY_NIC;
+ pRD->rd0.res_count = cpu_to_le16(pDevice->rx_buf_sz);
+ pRD->rd0.owner = OWNED_BY_NIC;
pRD->m_rd1RD1.wReqCount = cpu_to_le16(pDevice->rx_buf_sz);
pRD->buff_addr = cpu_to_le32(pRDInfo->skb_dma);
priv->rx_buf_sz, DMA_FROM_DEVICE);
frame_size = le16_to_cpu(curr_rd->m_rd1RD1.wReqCount)
- - le16_to_cpu(curr_rd->m_rd0RD0.wResCount);
+ - le16_to_cpu(curr_rd->rd0.res_count);
if ((frame_size > 2364) || (frame_size < 33)) {
/* Frame Size error drop this packet.*/