From: Daniel Hellstrom Date: Fri, 10 Jun 2011 04:55:16 +0000 (+0000) Subject: dl2k: EEPROM CRC calculation wrong endianess on bigendian machine X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=06866bf5c5ad8989119a145fdb54a9fbcafa702d;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git dl2k: EEPROM CRC calculation wrong endianess on bigendian machine Signed-off-by: Daniel Hellstrom Signed-off-by: David S. Miller --- diff --git a/drivers/net/dl2k.c b/drivers/net/dl2k.c index c445457b66d5..23179dbcedd2 100644 --- a/drivers/net/dl2k.c +++ b/drivers/net/dl2k.c @@ -346,7 +346,7 @@ parse_eeprom (struct net_device *dev) if (np->pdev->vendor == PCI_VENDOR_ID_DLINK) { /* D-Link Only */ /* Check CRC */ crc = ~ether_crc_le (256 - 4, sromdata); - if (psrom->crc != crc) { + if (psrom->crc != cpu_to_le32(crc)) { printk (KERN_ERR "%s: EEPROM data CRC error.\n", dev->name); return -1;