Skip to content
Snippets Groups Projects
Commit 06866bf5 authored by Daniel Hellstrom's avatar Daniel Hellstrom Committed by David S. Miller
Browse files

dl2k: EEPROM CRC calculation wrong endianess on bigendian machine

parent f7777378
No related branches found
No related tags found
No related merge requests found
...@@ -346,7 +346,7 @@ parse_eeprom (struct net_device *dev) ...@@ -346,7 +346,7 @@ parse_eeprom (struct net_device *dev)
if (np->pdev->vendor == PCI_VENDOR_ID_DLINK) { /* D-Link Only */ if (np->pdev->vendor == PCI_VENDOR_ID_DLINK) { /* D-Link Only */
/* Check CRC */ /* Check CRC */
crc = ~ether_crc_le (256 - 4, sromdata); 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", printk (KERN_ERR "%s: EEPROM data CRC error.\n",
dev->name); dev->name);
return -1; return -1;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment