summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/synopsys
diff options
context:
space:
mode:
authorKrzysztof Kozlowski <krzk@kernel.org>2018-07-17 18:05:39 +0200
committerHerbert Xu <herbert@gondor.apana.org.au>2018-07-27 19:16:37 +0800
commit5d258b48efbd0e28d9d0b5dc31de21050608e351 (patch)
tree3a1db84a2396477b7e07c0c598b0edeafd56e3a4 /drivers/net/ethernet/synopsys
parentf7aee87822fdb7c43b9510e196cb74cc1bb9bb1e (diff)
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/synopsys')
-rw-r--r--drivers/net/ethernet/synopsys/dwc-xlgmac-hw.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/synopsys/dwc-xlgmac-hw.c b/drivers/net/ethernet/synopsys/dwc-xlgmac-hw.c
index 458a7844260a..99d86e39ff54 100644
--- a/drivers/net/ethernet/synopsys/dwc-xlgmac-hw.c
+++ b/drivers/net/ethernet/synopsys/dwc-xlgmac-hw.c
@@ -20,6 +20,7 @@
#include <linux/clk.h>
#include <linux/bitrev.h>
#include <linux/crc32.h>
+#include <linux/crc32poly.h>
#include <linux/dcbnl.h>
#include "dwc-xlgmac.h"
@@ -193,7 +194,6 @@ static u32 xlgmac_vid_crc32_le(__le16 vid_le)
{
unsigned char *data = (unsigned char *)&vid_le;
unsigned char data_byte = 0;
- u32 poly = 0xedb88320;
u32 crc = ~0;
u32 temp = 0;
int i, bits;
@@ -208,7 +208,7 @@ static u32 xlgmac_vid_crc32_le(__le16 vid_le)
data_byte >>= 1;
if (temp)
- crc ^= poly;
+ crc ^= CRC32_POLY_LE;
}
return crc;