diff options
author | Krzysztof Kozlowski <krzk@kernel.org> | 2018-07-17 18:05:39 +0200 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2018-07-27 19:16:37 +0800 |
commit | 5d258b48efbd0e28d9d0b5dc31de21050608e351 (patch) | |
tree | 3a1db84a2396477b7e07c0c598b0edeafd56e3a4 /drivers/net/ethernet/apple | |
parent | f7aee87822fdb7c43b9510e196cb74cc1bb9bb1e (diff) | |
download | linux-5d258b48efbd0e28d9d0b5dc31de21050608e351.tar.gz linux-5d258b48efbd0e28d9d0b5dc31de21050608e351.tar.bz2 linux-5d258b48efbd0e28d9d0b5dc31de21050608e351.zip |
net: ethernet: Use existing define with polynomial
Do not define again the polynomial but use header with existing define.
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/net/ethernet/apple')
-rw-r--r-- | drivers/net/ethernet/apple/bmac.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/net/ethernet/apple/bmac.c b/drivers/net/ethernet/apple/bmac.c index 5a655d289dd5..024998d6d8c6 100644 --- a/drivers/net/ethernet/apple/bmac.c +++ b/drivers/net/ethernet/apple/bmac.c @@ -19,6 +19,7 @@ #include <linux/init.h> #include <linux/spinlock.h> #include <linux/crc32.h> +#include <linux/crc32poly.h> #include <linux/bitrev.h> #include <linux/ethtool.h> #include <linux/slab.h> @@ -37,11 +38,6 @@ #define trunc_page(x) ((void *)(((unsigned long)(x)) & ~((unsigned long)(PAGE_SIZE - 1)))) #define round_page(x) trunc_page(((unsigned long)(x)) + ((unsigned long)(PAGE_SIZE - 1))) -/* - * CRC polynomial - used in working out multicast filter bits. - */ -#define ENET_CRCPOLY 0x04c11db7 - /* switch to use multicast code lifted from sunhme driver */ #define SUNHME_MULTICAST @@ -838,7 +834,7 @@ crc416(unsigned int curval, unsigned short nxtval) next = next >> 1; /* do the XOR */ - if (high_crc_set ^ low_data_set) cur = cur ^ ENET_CRCPOLY; + if (high_crc_set ^ low_data_set) cur = cur ^ CRC32_POLY_BE; } return cur; } |