diff options
author | Bin Meng <bmeng.cn@gmail.com> | 2015-03-20 09:12:18 (GMT) |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2015-03-25 03:22:37 (GMT) |
commit | a7c3d5e2a9f4d0feb1e21733434e6d29f5ac566b (patch) | |
tree | bd9b383da9a97783b1c60fcc99c9851c33ccdb50 /drivers/net | |
parent | e4ad6031a79fb3182613f95423ebcd771309679d (diff) | |
download | u-boot-a7c3d5e2a9f4d0feb1e21733434e6d29f5ac566b.tar.xz |
net: Add ethernet FCS length macro in net.h
Some ethernet drivers use their own version of ethernet FCS length
macro which is really common. We define ETH_FCS_LEN in net.h and
replace those custom versions in various places.
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/e1000.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/net/e1000.h b/drivers/net/e1000.h index 6d110eb..f3b77b1 100644 --- a/drivers/net/e1000.h +++ b/drivers/net/e1000.h @@ -430,12 +430,11 @@ struct e1000_phy_stats { #define ENET_HEADER_SIZE 14 #define MAXIMUM_ETHERNET_FRAME_SIZE 1518 /* With FCS */ #define MINIMUM_ETHERNET_FRAME_SIZE 64 /* With FCS */ -#define ETHERNET_FCS_SIZE 4 #define MAXIMUM_ETHERNET_PACKET_SIZE \ - (MAXIMUM_ETHERNET_FRAME_SIZE - ETHERNET_FCS_SIZE) + (MAXIMUM_ETHERNET_FRAME_SIZE - ETH_FCS_LEN) #define MINIMUM_ETHERNET_PACKET_SIZE \ - (MINIMUM_ETHERNET_FRAME_SIZE - ETHERNET_FCS_SIZE) -#define CRC_LENGTH ETHERNET_FCS_SIZE + (MINIMUM_ETHERNET_FRAME_SIZE - ETH_FCS_LEN) +#define CRC_LENGTH ETH_FCS_LEN #define MAX_JUMBO_FRAME_SIZE 0x3F00 /* 802.1q VLAN Packet Sizes */ |