diff options
Diffstat (limited to 'drivers/net/ax88796.c')
-rw-r--r-- | drivers/net/ax88796.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/drivers/net/ax88796.c b/drivers/net/ax88796.c index e7c9748437d4..62d9c9cc5671 100644 --- a/drivers/net/ax88796.c +++ b/drivers/net/ax88796.c | |||
@@ -733,12 +733,19 @@ static int ax_init_dev(struct net_device *dev, int first_init) | |||
733 | /* load the mac-address from the device if this is the | 733 | /* load the mac-address from the device if this is the |
734 | * first time we've initialised */ | 734 | * first time we've initialised */ |
735 | 735 | ||
736 | if (first_init && ax->plat->flags & AXFLG_MAC_FROMDEV) { | 736 | if (first_init) { |
737 | ei_outb(E8390_NODMA + E8390_PAGE1 + E8390_STOP, | 737 | if (ax->plat->flags & AXFLG_MAC_FROMDEV) { |
738 | ei_local->mem + E8390_CMD); /* 0x61 */ | 738 | ei_outb(E8390_NODMA + E8390_PAGE1 + E8390_STOP, |
739 | ei_local->mem + E8390_CMD); /* 0x61 */ | ||
740 | for (i = 0; i < ETHER_ADDR_LEN; i++) | ||
741 | dev->dev_addr[i] = | ||
742 | ei_inb(ioaddr + EN1_PHYS_SHIFT(i)); | ||
743 | } | ||
739 | 744 | ||
740 | for (i = 0 ; i < ETHER_ADDR_LEN ; i++) | 745 | if ((ax->plat->flags & AXFLG_MAC_FROMPLATFORM) && |
741 | dev->dev_addr[i] = ei_inb(ioaddr + EN1_PHYS_SHIFT(i)); | 746 | ax->plat->mac_addr) |
747 | memcpy(dev->dev_addr, ax->plat->mac_addr, | ||
748 | ETHER_ADDR_LEN); | ||
742 | } | 749 | } |
743 | 750 | ||
744 | ax_reset_8390(dev); | 751 | ax_reset_8390(dev); |