aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/depca.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2007-10-03 20:59:30 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 19:51:42 -0400
commit0795af5729b18218767fab27c44b1384f72dc9ad (patch)
tree67c16df84aa6ec219340b8ea1b5cfb0e8150a216 /drivers/net/depca.c
parent95ea36275f3c9a1d3d04c217b4b576c657c4e70e (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/depca.c')
-rw-r--r--drivers/net/depca.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/net/depca.c b/drivers/net/depca.c
index 28fa2bdc8c79..ace39ec0a367 100644
--- a/drivers/net/depca.c
+++ b/drivers/net/depca.c
@@ -573,6 +573,7 @@ static int __init depca_hw_init (struct net_device *dev, struct device *device)
573 s16 nicsr; 573 s16 nicsr;
574 u_long ioaddr; 574 u_long ioaddr;
575 u_long mem_start; 575 u_long mem_start;
576 DECLARE_MAC_BUF(mac);
576 577
577 /* 578 /*
578 * We are now supposed to enter this function with the 579 * We are now supposed to enter this function with the
@@ -632,14 +633,11 @@ static int __init depca_hw_init (struct net_device *dev, struct device *device)
632 633
633 printk(", h/w address "); 634 printk(", h/w address ");
634 status = get_hw_addr(dev); 635 status = get_hw_addr(dev);
636 printk("%s", print_mac(mac, dev->dev_addr));
635 if (status != 0) { 637 if (status != 0) {
636 printk(" which has an Ethernet PROM CRC error.\n"); 638 printk(" which has an Ethernet PROM CRC error.\n");
637 return -ENXIO; 639 return -ENXIO;
638 } 640 }
639 for (i = 0; i < ETH_ALEN - 1; i++) { /* get the ethernet address */
640 printk("%2.2x:", dev->dev_addr[i]);
641 }
642 printk("%2.2x", dev->dev_addr[i]);
643 641
644 /* Set up the maximum amount of network RAM(kB) */ 642 /* Set up the maximum amount of network RAM(kB) */
645 netRAM = ((lp->adapter != DEPCA) ? 64 : 48); 643 netRAM = ((lp->adapter != DEPCA) ? 64 : 48);
@@ -1843,6 +1841,7 @@ static void depca_dbg_open(struct net_device *dev)
1843 u_long ioaddr = dev->base_addr; 1841 u_long ioaddr = dev->base_addr;
1844 struct depca_init *p = &lp->init_block; 1842 struct depca_init *p = &lp->init_block;
1845 int i; 1843 int i;
1844 DECLARE_MAC_BUF(mac);
1846 1845
1847 if (depca_debug > 1) { 1846 if (depca_debug > 1) {
1848 /* Do not copy the shadow init block into shared memory */ 1847 /* Do not copy the shadow init block into shared memory */
@@ -1881,11 +1880,7 @@ static void depca_dbg_open(struct net_device *dev)
1881 printk("...0x%8.8x\n", readl(&lp->tx_ring[i].base)); 1880 printk("...0x%8.8x\n", readl(&lp->tx_ring[i].base));
1882 printk("Initialisation block at 0x%8.8lx(Phys)\n", lp->mem_start); 1881 printk("Initialisation block at 0x%8.8lx(Phys)\n", lp->mem_start);
1883 printk(" mode: 0x%4.4x\n", p->mode); 1882 printk(" mode: 0x%4.4x\n", p->mode);
1884 printk(" physical address: "); 1883 printk(" physical address: %s\n", print_mac(mac, p->phys_addr));
1885 for (i = 0; i < ETH_ALEN - 1; i++) {
1886 printk("%2.2x:", p->phys_addr[i]);
1887 }
1888 printk("%2.2x\n", p->phys_addr[i]);
1889 printk(" multicast hash table: "); 1884 printk(" multicast hash table: ");
1890 for (i = 0; i < (HASH_TABLE_LEN >> 3) - 1; i++) { 1885 for (i = 0; i < (HASH_TABLE_LEN >> 3) - 1; i++) {
1891 printk("%2.2x:", p->mcast_table[i]); 1886 printk("%2.2x:", p->mcast_table[i]);