diff options
author | Alan Cox <alan@linux.intel.com> | 2009-10-06 15:48:25 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-12-11 12:23:06 -0800 |
commit | fb70ed67107e04005d36f6f462bb048bf9cbe373 (patch) | |
tree | eaba6a119a7b2cb4fdc9a7ceb55c4ddf1b086978 /drivers/staging/et131x/et1310_tx.h | |
parent | b44207ab43e052aa26b47ea829d46d3a8520d2d2 (diff) | |
download | op-kernel-dev-fb70ed67107e04005d36f6f462bb048bf9cbe373.zip op-kernel-dev-fb70ed67107e04005d36f6f462bb048bf9cbe373.tar.gz |
Staging: et131x: clean up WORD2 usage
A little more complex but again move the structure and typedef into into the
documentation
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/et131x/et1310_tx.h')
-rw-r--r-- | drivers/staging/et131x/et1310_tx.h | 33 |
1 files changed, 9 insertions, 24 deletions
diff --git a/drivers/staging/et131x/et1310_tx.h b/drivers/staging/et131x/et1310_tx.h index 142b6ea..e2e1314 100644 --- a/drivers/staging/et131x/et1310_tx.h +++ b/drivers/staging/et131x/et1310_tx.h @@ -63,29 +63,14 @@ /* Typedefs for Tx Descriptor Ring */ /* - * TXDESC_WORD2_t structure holds part of the control bits in the Tx Descriptor - * ring for the ET-1310 - */ -typedef union _txdesc_word2_t { - u32 value; - struct { -#ifdef _BIT_FIELDS_HTOL - u32 vlan_prio:3; /* bits 29-31(VLAN priority) */ - u32 vlan_cfi:1; /* bit 28(cfi) */ - u32 vlan_tag:12; /* bits 16-27(VLAN tag) */ - u32 length_in_bytes:16; /* bits 0-15(packet length) */ -#else - u32 length_in_bytes:16; /* bits 0-15(packet length) */ - u32 vlan_tag:12; /* bits 16-27(VLAN tag) */ - u32 vlan_cfi:1; /* bit 28(cfi) */ - u32 vlan_prio:3; /* bits 29-31(VLAN priority) */ -#endif /* _BIT_FIELDS_HTOL */ - } bits; -} TXDESC_WORD2_t, *PTXDESC_WORD2_t; - -/* - * word 3 of the control bits in the Tx Descriptor ring for the - * ET-1310 + * word 2 of the control bits in the Tx Descriptor ring for the ET-1310 + * + * 0-15: length of packet + * 16-27: VLAN tag + * 28: VLAN CFI + * 29-31: VLAN priority + * + * word 3 of the control bits in the Tx Descriptor ring for the ET-1310 * * 0: last packet in the sequence * 1: first packet in the sequence @@ -108,7 +93,7 @@ typedef union _txdesc_word2_t { typedef struct _tx_desc_entry_t { u32 DataBufferPtrHigh; u32 DataBufferPtrLow; - TXDESC_WORD2_t word2; /* control words how to xmit the */ + u32 word2; /* control words how to xmit the */ u32 word3; /* data (detailed above) */ } TX_DESC_ENTRY_t, *PTX_DESC_ENTRY_t; |