diff options
author | Bin Meng <bmeng.cn@gmail.com> | 2015-03-20 17:12:18 +0800 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2015-03-24 21:22:37 -0600 |
commit | a7c3d5e2a9f4d0feb1e21733434e6d29f5ac566b (patch) | |
tree | bd9b383da9a97783b1c60fcc99c9851c33ccdb50 /include/net.h | |
parent | e4ad6031a79fb3182613f95423ebcd771309679d (diff) | |
download | u-boot-imx-a7c3d5e2a9f4d0feb1e21733434e6d29f5ac566b.zip u-boot-imx-a7c3d5e2a9f4d0feb1e21733434e6d29f5ac566b.tar.gz u-boot-imx-a7c3d5e2a9f4d0feb1e21733434e6d29f5ac566b.tar.bz2 |
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 'include/net.h')
-rw-r--r-- | include/net.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/net.h b/include/net.h index 43e3d28..237c932 100644 --- a/include/net.h +++ b/include/net.h @@ -191,6 +191,8 @@ struct ethernet_hdr { /* Ethernet header size */ #define ETHER_HDR_SIZE (sizeof(struct ethernet_hdr)) +#define ETH_FCS_LEN 4 /* Octets in the FCS */ + struct e802_hdr { uchar et_dest[6]; /* Destination node */ uchar et_src[6]; /* Source node */ |