Skip to content

Commit

Permalink
dl2k: EEPROM CRC calculation wrong endianess on bigendian machine
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Daniel Hellstrom authored and David S. Miller committed Jun 11, 2011
1 parent f777737 commit 06866bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/dl2k.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 06866bf

Please sign in to comment.