aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ne2.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/ne2.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/ne2.c')
-rw-r--r--drivers/net/ne2.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/drivers/net/ne2.c b/drivers/net/ne2.c
index f73073b1218a..f4cd8c7e81ba 100644
--- a/drivers/net/ne2.c
+++ b/drivers/net/ne2.c
@@ -302,6 +302,7 @@ out:
302static int ne2_procinfo(char *buf, int slot, struct net_device *dev) 302static int ne2_procinfo(char *buf, int slot, struct net_device *dev)
303{ 303{
304 int len=0; 304 int len=0;
305 DECLARE_MAC_BUF(mac);
305 306
306 len += sprintf(buf+len, "The NE/2 Ethernet Adapter\n" ); 307 len += sprintf(buf+len, "The NE/2 Ethernet Adapter\n" );
307 len += sprintf(buf+len, "Driver written by Wim Dumon "); 308 len += sprintf(buf+len, "Driver written by Wim Dumon ");
@@ -312,12 +313,7 @@ static int ne2_procinfo(char *buf, int slot, struct net_device *dev)
312 len += sprintf(buf+len, "Based on the original NE2000 drivers\n" ); 313 len += sprintf(buf+len, "Based on the original NE2000 drivers\n" );
313 len += sprintf(buf+len, "Base IO: %#x\n", (unsigned int)dev->base_addr); 314 len += sprintf(buf+len, "Base IO: %#x\n", (unsigned int)dev->base_addr);
314 len += sprintf(buf+len, "IRQ : %d\n", dev->irq); 315 len += sprintf(buf+len, "IRQ : %d\n", dev->irq);
315 316 len += sprintf(buf+len, "HW addr : %s\n", print_mac(mac, dev->dev_addr));
316#define HW_ADDR(i) dev->dev_addr[i]
317 len += sprintf(buf+len, "HW addr : %x:%x:%x:%x:%x:%x\n",
318 HW_ADDR(0), HW_ADDR(1), HW_ADDR(2),
319 HW_ADDR(3), HW_ADDR(4), HW_ADDR(5) );
320#undef HW_ADDR
321 317
322 return len; 318 return len;
323} 319}
@@ -330,6 +326,7 @@ static int __init ne2_probe1(struct net_device *dev, int slot)
330 const char *name = "NE/2"; 326 const char *name = "NE/2";
331 int start_page, stop_page; 327 int start_page, stop_page;
332 static unsigned version_printed; 328 static unsigned version_printed;
329 DECLARE_MAC_BUF(mac);
333 330
334 if (ei_debug && version_printed++ == 0) 331 if (ei_debug && version_printed++ == 0)
335 printk(version); 332 printk(version);
@@ -469,12 +466,12 @@ static int __init ne2_probe1(struct net_device *dev, int slot)
469 466
470 dev->base_addr = base_addr; 467 dev->base_addr = base_addr;
471 468
472 for(i = 0; i < ETHER_ADDR_LEN; i++) { 469 for(i = 0; i < ETHER_ADDR_LEN; i++)
473 printk(" %2.2x", SA_prom[i]);
474 dev->dev_addr[i] = SA_prom[i]; 470 dev->dev_addr[i] = SA_prom[i];
475 }
476 471
477 printk("\n%s: %s found at %#x, using IRQ %d.\n", 472 printk(" %s\n", print_mac(mac, dev->dev_addr));
473
474 printk("%s: %s found at %#x, using IRQ %d.\n",
478 dev->name, name, base_addr, dev->irq); 475 dev->name, name, base_addr, dev->irq);
479 476
480 mca_set_adapter_procfn(slot, (MCA_ProcFn) ne2_procinfo, dev); 477 mca_set_adapter_procfn(slot, (MCA_ProcFn) ne2_procinfo, dev);