diff options
author | Joe Perches <joe@perches.com> | 2007-10-03 20:59:30 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-10-10 19:51:42 -0400 |
commit | 0795af5729b18218767fab27c44b1384f72dc9ad (patch) | |
tree | 67c16df84aa6ec219340b8ea1b5cfb0e8150a216 /drivers/net/ewrk3.c | |
parent | 95ea36275f3c9a1d3d04c217b4b576c657c4e70e (diff) |
[NET]: Introduce and use print_mac() and DECLARE_MAC_BUF()
This is nicer than the MAC_FMT stuff.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ewrk3.c')
-rw-r--r-- | drivers/net/ewrk3.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/drivers/net/ewrk3.c b/drivers/net/ewrk3.c index 142aa225d89e..593a120e31b2 100644 --- a/drivers/net/ewrk3.c +++ b/drivers/net/ewrk3.c | |||
@@ -396,6 +396,7 @@ ewrk3_hw_init(struct net_device *dev, u_long iobase) | |||
396 | u_long mem_start, shmem_length; | 396 | u_long mem_start, shmem_length; |
397 | u_char cr, cmr, icr, nicsr, lemac, hard_strapped = 0; | 397 | u_char cr, cmr, icr, nicsr, lemac, hard_strapped = 0; |
398 | u_char eeprom_image[EEPROM_MAX], chksum, eisa_cr = 0; | 398 | u_char eeprom_image[EEPROM_MAX], chksum, eisa_cr = 0; |
399 | DECLARE_MAC_BUF(mac); | ||
399 | 400 | ||
400 | /* | 401 | /* |
401 | ** Stop the EWRK3. Enable the DBR ROM. Disable interrupts and remote boot. | 402 | ** Stop the EWRK3. Enable the DBR ROM. Disable interrupts and remote boot. |
@@ -460,10 +461,7 @@ ewrk3_hw_init(struct net_device *dev, u_long iobase) | |||
460 | if (lemac != LeMAC2) | 461 | if (lemac != LeMAC2) |
461 | DevicePresent(iobase); /* need after EWRK3_INIT */ | 462 | DevicePresent(iobase); /* need after EWRK3_INIT */ |
462 | status = get_hw_addr(dev, eeprom_image, lemac); | 463 | status = get_hw_addr(dev, eeprom_image, lemac); |
463 | for (i = 0; i < ETH_ALEN - 1; i++) { /* get the ethernet addr. */ | 464 | printk("%s\n", print_mac(mac, dev->dev_addr)); |
464 | printk("%2.2x:", dev->dev_addr[i]); | ||
465 | } | ||
466 | printk("%2.2x,\n", dev->dev_addr[i]); | ||
467 | 465 | ||
468 | if (status) { | 466 | if (status) { |
469 | printk(" which has an EEPROM CRC error.\n"); | 467 | printk(" which has an EEPROM CRC error.\n"); |
@@ -628,7 +626,7 @@ static int ewrk3_open(struct net_device *dev) | |||
628 | { | 626 | { |
629 | struct ewrk3_private *lp = netdev_priv(dev); | 627 | struct ewrk3_private *lp = netdev_priv(dev); |
630 | u_long iobase = dev->base_addr; | 628 | u_long iobase = dev->base_addr; |
631 | int i, status = 0; | 629 | int status = 0; |
632 | u_char icr, csr; | 630 | u_char icr, csr; |
633 | 631 | ||
634 | /* | 632 | /* |
@@ -648,12 +646,10 @@ static int ewrk3_open(struct net_device *dev) | |||
648 | ewrk3_init(dev); | 646 | ewrk3_init(dev); |
649 | 647 | ||
650 | if (ewrk3_debug > 1) { | 648 | if (ewrk3_debug > 1) { |
649 | DECLARE_MAC_BUF(mac); | ||
651 | printk("%s: ewrk3 open with irq %d\n", dev->name, dev->irq); | 650 | printk("%s: ewrk3 open with irq %d\n", dev->name, dev->irq); |
652 | printk(" physical address: "); | 651 | printk(" physical address: %s\n", |
653 | for (i = 0; i < 5; i++) { | 652 | print_mac(mac, dev->dev_addr)); |
654 | printk("%2.2x:", (u_char) dev->dev_addr[i]); | ||
655 | } | ||
656 | printk("%2.2x\n", (u_char) dev->dev_addr[i]); | ||
657 | if (lp->shmem_length == 0) { | 653 | if (lp->shmem_length == 0) { |
658 | printk(" no shared memory, I/O only mode\n"); | 654 | printk(" no shared memory, I/O only mode\n"); |
659 | } else { | 655 | } else { |