diff options
author | yongari <yongari@FreeBSD.org> | 2009-11-19 20:57:35 +0000 |
---|---|---|
committer | yongari <yongari@FreeBSD.org> | 2009-11-19 20:57:35 +0000 |
commit | 0e9ac8ec16c6dcb15bba4fa170a7315f5de9131a (patch) | |
tree | d9a3cec6b0502e089f264be9957b7449c0d00acc /sys/dev/et/if_etvar.h | |
parent | e98d19f3128514b8d65f4944e817a2822c608b6f (diff) | |
download | FreeBSD-src-0e9ac8ec16c6dcb15bba4fa170a7315f5de9131a.zip FreeBSD-src-0e9ac8ec16c6dcb15bba4fa170a7315f5de9131a.tar.gz |
Remove complex macros that were used to compute bits values.
Although these macros may have its own strength, its complex
definition make hard to read the code.
Approved by: delphij
Diffstat (limited to 'sys/dev/et/if_etvar.h')
-rw-r--r-- | sys/dev/et/if_etvar.h | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/sys/dev/et/if_etvar.h b/sys/dev/et/if_etvar.h index 9fdf775..2c092ab 100644 --- a/sys/dev/et/if_etvar.h +++ b/sys/dev/et/if_etvar.h @@ -106,11 +106,11 @@ struct et_txdesc { uint32_t td_ctrl2; /* ET_TDCTRL2_ */ } __packed; -#define ET_TDCTRL1_LEN __BITS(15, 0) +#define ET_TDCTRL1_LEN_MASK 0x0000FFFF -#define ET_TDCTRL2_LAST_FRAG __BIT(0) -#define ET_TDCTRL2_FIRST_FRAG __BIT(1) -#define ET_TDCTRL2_INTR __BIT(2) +#define ET_TDCTRL2_LAST_FRAG 0x00000001 +#define ET_TDCTRL2_FIRST_FRAG 0x00000002 +#define ET_TDCTRL2_INTR 0x00000004 struct et_rxdesc { uint32_t rd_addr_lo; @@ -118,24 +118,28 @@ struct et_rxdesc { uint32_t rd_ctrl; /* ET_RDCTRL_ */ } __packed; -#define ET_RDCTRL_BUFIDX __BITS(9, 0) +#define ET_RDCTRL_BUFIDX_MASK 0x000003FF struct et_rxstat { uint32_t rxst_info1; uint32_t rxst_info2; /* ET_RXST_INFO2_ */ } __packed; -#define ET_RXST_INFO2_LEN __BITS(15, 0) -#define ET_RXST_INFO2_BUFIDX __BITS(25, 16) -#define ET_RXST_INFO2_RINGIDX __BITS(27, 26) +#define ET_RXST_INFO2_LEN_MASK 0x0000FFFF +#define ET_RXST_INFO2_LEN_SHIFT 0 +#define ET_RXST_INFO2_BUFIDX_MASK 0x03FF0000 +#define ET_RXST_INFO2_BUFIDX_SHIFT 16 +#define ET_RXST_INFO2_RINGIDX_MASK 0x0C000000 +#define ET_RXST_INFO2_RINGIDX_SHIFT 26 struct et_rxstatus { uint32_t rxs_ring; uint32_t rxs_stat_ring; /* ET_RXS_STATRING_ */ } __packed; -#define ET_RXS_STATRING_INDEX __BITS(27, 16) -#define ET_RXS_STATRING_WRAP __BIT(28) +#define ET_RXS_STATRING_INDEX_MASK 0x0FFF0000 +#define ET_RXS_STATRING_INDEX_SHIFT 16 +#define ET_RXS_STATRING_WRAP 0x10000000 struct et_dmamap_ctx { int nsegs; |