diff options
-rw-r--r-- | drivers/net/tg3.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index 6a736dda3ee2..7a837c465960 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c | |||
@@ -12443,8 +12443,13 @@ static int __devinit tg3_get_device_address(struct tg3 *tp) | |||
12443 | /* Next, try NVRAM. */ | 12443 | /* Next, try NVRAM. */ |
12444 | if (!tg3_nvram_read_be32(tp, mac_offset + 0, &hi) && | 12444 | if (!tg3_nvram_read_be32(tp, mac_offset + 0, &hi) && |
12445 | !tg3_nvram_read_be32(tp, mac_offset + 4, &lo)) { | 12445 | !tg3_nvram_read_be32(tp, mac_offset + 4, &lo)) { |
12446 | memcpy(&dev->dev_addr[0], ((char *)&hi) + 2, 2); | 12446 | dev->dev_addr[0] = ((hi >> 16) & 0xff); |
12447 | memcpy(&dev->dev_addr[2], (char *)&lo, sizeof(lo)); | 12447 | dev->dev_addr[1] = ((hi >> 24) & 0xff); |
12448 | dev->dev_addr[2] = ((lo >> 0) & 0xff); | ||
12449 | dev->dev_addr[3] = ((lo >> 8) & 0xff); | ||
12450 | dev->dev_addr[4] = ((lo >> 16) & 0xff); | ||
12451 | dev->dev_addr[5] = ((lo >> 24) & 0xff); | ||
12452 | |||
12448 | } | 12453 | } |
12449 | /* Finally just fetch it out of the MAC control regs. */ | 12454 | /* Finally just fetch it out of the MAC control regs. */ |
12450 | else { | 12455 | else { |