From 5d258b48efbd0e28d9d0b5dc31de21050608e351 Mon Sep 17 00:00:00 2001 From: Krzysztof Kozlowski Date: Tue, 17 Jul 2018 18:05:39 +0200 Subject: net: ethernet: Use existing define with polynomial Do not define again the polynomial but use header with existing define. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Herbert Xu --- drivers/net/ethernet/freescale/fs_enet/fec.h | 3 --- drivers/net/ethernet/freescale/fs_enet/mac-fec.c | 3 ++- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'drivers/net/ethernet/freescale/fs_enet') diff --git a/drivers/net/ethernet/freescale/fs_enet/fec.h b/drivers/net/ethernet/freescale/fs_enet/fec.h index 7832db71dcb9..1dbee5d898b3 100644 --- a/drivers/net/ethernet/freescale/fs_enet/fec.h +++ b/drivers/net/ethernet/freescale/fs_enet/fec.h @@ -2,9 +2,6 @@ #ifndef FS_ENET_FEC_H #define FS_ENET_FEC_H -/* CRC polynomium used by the FEC for the multicast group filtering */ -#define FEC_CRC_POLY 0x04C11DB7 - #define FEC_MAX_MULTICAST_ADDRS 64 /* Interrupt events/masks. diff --git a/drivers/net/ethernet/freescale/fs_enet/mac-fec.c b/drivers/net/ethernet/freescale/fs_enet/mac-fec.c index 1fc27c97e3b2..05093e5fc9dd 100644 --- a/drivers/net/ethernet/freescale/fs_enet/mac-fec.c +++ b/drivers/net/ethernet/freescale/fs_enet/mac-fec.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include @@ -187,7 +188,7 @@ static void set_multicast_one(struct net_device *dev, const u8 *mac) msb = crc >> 31; crc <<= 1; if (msb ^ (byte & 0x1)) - crc ^= FEC_CRC_POLY; + crc ^= CRC32_POLY_BE; byte >>= 1; } } -- cgit v1.2.3