aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/3c503.c4
-rw-r--r--drivers/net/3c505.c10
-rw-r--r--drivers/net/3c507.c6
-rw-r--r--drivers/net/3c509.c18
-rw-r--r--drivers/net/3c515.c4
-rw-r--r--drivers/net/3c523.c22
-rw-r--r--drivers/net/3c527.c7
-rw-r--r--drivers/net/3c59x.c7
-rw-r--r--drivers/net/8139cp.c8
-rw-r--r--drivers/net/8139too.c8
-rw-r--r--drivers/net/82596.c18
-rw-r--r--drivers/net/a2065.c6
-rw-r--r--drivers/net/ac3200.c8
-rw-r--r--drivers/net/acenic.c7
-rw-r--r--drivers/net/amd8111e.c12
-rw-r--r--drivers/net/apne.c9
-rw-r--r--drivers/net/ariadne.c44
-rw-r--r--drivers/net/arm/am79c961a.c8
-rw-r--r--drivers/net/arm/at91_ether.c18
-rw-r--r--drivers/net/arm/ether1.c8
-rw-r--r--drivers/net/arm/ether3.c8
-rw-r--r--drivers/net/arm/etherh.c8
-rw-r--r--drivers/net/at1700.c4
-rw-r--r--drivers/net/atarilance.c43
-rw-r--r--drivers/net/atp.c8
-rw-r--r--drivers/net/b44.c9
-rw-r--r--drivers/net/bmac.c6
-rw-r--r--drivers/net/bnx2.c12
-rw-r--r--drivers/net/bonding/bond_main.c34
-rw-r--r--drivers/net/bonding/bond_sysfs.c11
-rw-r--r--drivers/net/cassini.c11
-rw-r--r--drivers/net/cris/eth_v10.c8
-rw-r--r--drivers/net/cs89x0.c15
-rw-r--r--drivers/net/de600.c6
-rw-r--r--drivers/net/de620.c8
-rw-r--r--drivers/net/declance.c14
-rw-r--r--drivers/net/depca.c13
-rw-r--r--drivers/net/dgrs.c18
-rw-r--r--drivers/net/dl2k.c7
-rw-r--r--drivers/net/dm9000.c9
-rw-r--r--drivers/net/e100.c9
-rw-r--r--drivers/net/e1000/e1000_main.c5
-rw-r--r--drivers/net/eepro.c5
-rw-r--r--drivers/net/eepro100.c9
-rw-r--r--drivers/net/epic100.c9
-rw-r--r--drivers/net/es3210.c22
-rw-r--r--drivers/net/ewrk3.c16
-rw-r--r--drivers/net/fealnx.c9
-rw-r--r--drivers/net/fec.c7
-rw-r--r--drivers/net/forcedeth.c12
-rw-r--r--drivers/net/gianfar.c7
-rw-r--r--drivers/net/hamachi.c8
-rw-r--r--drivers/net/hamradio/bpqether.c23
-rw-r--r--drivers/net/hp-plus.c6
-rw-r--r--drivers/net/hp.c5
-rw-r--r--drivers/net/hp100.c6
-rw-r--r--drivers/net/hydra.c7
-rw-r--r--drivers/net/ibm_emac/ibm_emac_core.c14
-rw-r--r--drivers/net/ibmlana.c6
-rw-r--r--drivers/net/ibmveth.c9
-rw-r--r--drivers/net/ioc3-eth.c12
-rw-r--r--drivers/net/isa-skeleton.c5
-rw-r--r--drivers/net/jazzsonic.c10
-rw-r--r--drivers/net/lance.c6
-rw-r--r--drivers/net/lguest_net.c4
-rw-r--r--drivers/net/lib82596.c18
-rw-r--r--drivers/net/lne390.c9
-rw-r--r--drivers/net/mac89x0.c11
-rw-r--r--drivers/net/macb.c6
-rw-r--r--drivers/net/mace.c9
-rw-r--r--drivers/net/macmace.c6
-rw-r--r--drivers/net/macsonic.c21
-rw-r--r--drivers/net/meth.c6
-rw-r--r--drivers/net/mv643xx_eth.c5
-rw-r--r--drivers/net/mvme147.c11
-rw-r--r--drivers/net/myri10ge/myri10ge.c11
-rw-r--r--drivers/net/myri_sbus.c29
-rw-r--r--drivers/net/natsemi.c11
-rw-r--r--drivers/net/ne-h8300.c8
-rw-r--r--drivers/net/ne.c5
-rw-r--r--drivers/net/ne2.c17
-rw-r--r--drivers/net/ne2k-pci.c11
-rw-r--r--drivers/net/ne3210.c11
-rw-r--r--drivers/net/netconsole.c14
-rw-r--r--drivers/net/netxen/netxen_nic_main.c13
-rw-r--r--drivers/net/netxen/netxen_nic_niu.c14
-rw-r--r--drivers/net/ni5010.c4
-rw-r--r--drivers/net/ns83820.c7
-rw-r--r--drivers/net/pasemi_mac.c6
-rw-r--r--drivers/net/pci-skeleton.c9
-rw-r--r--drivers/net/pcmcia/3c574_cs.c9
-rw-r--r--drivers/net/pcmcia/3c589_cs.c10
-rw-r--r--drivers/net/pcmcia/axnet_cs.c9
-rw-r--r--drivers/net/pcmcia/fmvj18x_cs.c8
-rw-r--r--drivers/net/pcmcia/nmclan_cs.c9
-rw-r--r--drivers/net/pcmcia/pcnet_cs.c7
-rw-r--r--drivers/net/pcmcia/smc91c92_cs.c8
-rw-r--r--drivers/net/pcmcia/xirc2ps_cs.c9
-rw-r--r--drivers/net/pppoe.c8
-rw-r--r--drivers/net/ps3_gelic_net.c7
-rwxr-xr-xdrivers/net/qla3xxx.c7
-rw-r--r--drivers/net/rionet.c6
-rw-r--r--drivers/net/rrunner.c8
-rw-r--r--drivers/net/s2io.c11
-rw-r--r--drivers/net/sb1250-mac.c7
-rw-r--r--drivers/net/seeq8005.c4
-rw-r--r--drivers/net/sgiseeq.c6
-rw-r--r--drivers/net/sis190.c10
-rw-r--r--drivers/net/sis900.c9
-rw-r--r--drivers/net/skge.c7
-rw-r--r--drivers/net/sky2.c7
-rw-r--r--drivers/net/smc-mca.c8
-rw-r--r--drivers/net/smc-ultra.c8
-rw-r--r--drivers/net/smc-ultra32.c8
-rw-r--r--drivers/net/smc9194.c7
-rw-r--r--drivers/net/smc91x.c9
-rw-r--r--drivers/net/starfire.c26
-rw-r--r--drivers/net/sun3lance.c36
-rw-r--r--drivers/net/sunbmac.c8
-rw-r--r--drivers/net/sundance.c10
-rw-r--r--drivers/net/sungem.c12
-rw-r--r--drivers/net/sunhme.c12
-rw-r--r--drivers/net/sunlance.c9
-rw-r--r--drivers/net/tokenring/abyss.c12
-rw-r--r--drivers/net/tokenring/ibmtr.c26
-rw-r--r--drivers/net/tokenring/lanstreamer.c64
-rw-r--r--drivers/net/tokenring/madgemc.c19
-rw-r--r--drivers/net/tokenring/olympic.c138
-rw-r--r--drivers/net/tokenring/proteon.c8
-rw-r--r--drivers/net/tokenring/skisa.c8
-rw-r--r--drivers/net/tokenring/tmspci.c10
-rw-r--r--drivers/net/tsi108_eth.c7
-rw-r--r--drivers/net/tulip/de2104x.c9
-rw-r--r--drivers/net/tulip/de4x5.c33
-rw-r--r--drivers/net/tulip/dmfe.c15
-rw-r--r--drivers/net/tulip/tulip_core.c15
-rw-r--r--drivers/net/tulip/uli526x.c9
-rw-r--r--drivers/net/tulip/winbond-840.c29
-rw-r--r--drivers/net/tulip/xircom_cb.c7
-rw-r--r--drivers/net/tun.c33
-rw-r--r--drivers/net/typhoon.c10
-rw-r--r--drivers/net/usb/pegasus.c11
-rw-r--r--drivers/net/usb/usbnet.c8
-rw-r--r--drivers/net/via-rhine.c13
-rw-r--r--drivers/net/wd.c7
-rw-r--r--drivers/net/wireless/adm8211.c5
-rw-r--r--drivers/net/wireless/airo.c32
-rw-r--r--drivers/net/wireless/arlan-main.c23
-rw-r--r--drivers/net/wireless/atmel.c7
-rw-r--r--drivers/net/wireless/b43/main.c5
-rw-r--r--drivers/net/wireless/b43legacy/main.c3
-rw-r--r--drivers/net/wireless/bcm43xx/bcm43xx.h6
-rw-r--r--drivers/net/wireless/hostap/hostap_80211_rx.c49
-rw-r--r--drivers/net/wireless/hostap/hostap_80211_tx.c13
-rw-r--r--drivers/net/wireless/hostap/hostap_ap.c198
-rw-r--r--drivers/net/wireless/hostap/hostap_common.h3
-rw-r--r--drivers/net/wireless/hostap/hostap_hw.c11
-rw-r--r--drivers/net/wireless/hostap/hostap_info.c17
-rw-r--r--drivers/net/wireless/hostap/hostap_ioctl.c15
-rw-r--r--drivers/net/wireless/hostap/hostap_main.c30
-rw-r--r--drivers/net/wireless/hostap/hostap_proc.c15
-rw-r--r--drivers/net/wireless/ipw2100.c48
-rw-r--r--drivers/net/wireless/ipw2200.c207
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-3945-rs.c5
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-3945.c34
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-4965-rs.c17
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-4965.c73
-rw-r--r--drivers/net/wireless/iwlwifi/iwl3945-base.c65
-rw-r--r--drivers/net/wireless/iwlwifi/iwl4965-base.c59
-rw-r--r--drivers/net/wireless/libertas/assoc.c19
-rw-r--r--drivers/net/wireless/libertas/cmdresp.c5
-rw-r--r--drivers/net/wireless/libertas/debugfs.c5
-rw-r--r--drivers/net/wireless/libertas/join.c16
-rw-r--r--drivers/net/wireless/libertas/main.c12
-rw-r--r--drivers/net/wireless/libertas/scan.c14
-rw-r--r--drivers/net/wireless/libertas/wext.c5
-rw-r--r--drivers/net/wireless/netwave_cs.c14
-rw-r--r--drivers/net/wireless/orinoco.c7
-rw-r--r--drivers/net/wireless/prism54/isl_ioctl.c50
-rw-r--r--drivers/net/wireless/ray_cs.c13
-rw-r--r--drivers/net/wireless/rt2x00/rt2400pci.c4
-rw-r--r--drivers/net/wireless/rt2x00/rt2500pci.c5
-rw-r--r--drivers/net/wireless/rt2x00/rt2500usb.c4
-rw-r--r--drivers/net/wireless/rt2x00/rt61pci.c4
-rw-r--r--drivers/net/wireless/rt2x00/rt73usb.c4
-rw-r--r--drivers/net/wireless/rtl8187_dev.c5
-rw-r--r--drivers/net/wireless/wavelan.c53
-rw-r--r--drivers/net/wireless/wavelan_cs.c54
-rw-r--r--drivers/net/wireless/wl3501_cs.c22
-rw-r--r--drivers/net/wireless/zd1211rw/zd_chip.c3
-rw-r--r--drivers/net/wireless/zd1211rw/zd_mac.c8
-rw-r--r--drivers/net/yellowfin.c19
-rw-r--r--drivers/net/znet.c11
-rw-r--r--drivers/net/zorro8390.c15
194 files changed, 1486 insertions, 1622 deletions
diff --git a/drivers/net/3c503.c b/drivers/net/3c503.c
index f9e7ffbcb772..9c23336750e2 100644
--- a/drivers/net/3c503.c
+++ b/drivers/net/3c503.c
@@ -177,6 +177,7 @@ el2_probe1(struct net_device *dev, int ioaddr)
177 int i, iobase_reg, membase_reg, saved_406, wordlength, retval; 177 int i, iobase_reg, membase_reg, saved_406, wordlength, retval;
178 static unsigned version_printed; 178 static unsigned version_printed;
179 unsigned long vendor_id; 179 unsigned long vendor_id;
180 DECLARE_MAC_BUF(mac);
180 181
181 if (!request_region(ioaddr, EL2_IO_EXTENT, DRV_NAME)) 182 if (!request_region(ioaddr, EL2_IO_EXTENT, DRV_NAME))
182 return -EBUSY; 183 return -EBUSY;
@@ -226,7 +227,8 @@ el2_probe1(struct net_device *dev, int ioaddr)
226 227
227 /* Retrieve and print the ethernet address. */ 228 /* Retrieve and print the ethernet address. */
228 for (i = 0; i < 6; i++) 229 for (i = 0; i < 6; i++)
229 printk(" %2.2x", dev->dev_addr[i] = inb(ioaddr + i)); 230 dev->dev_addr[i] = inb(ioaddr + i);
231 printk("%s", print_mac(mac, dev->dev_addr));
230 232
231 /* Map the 8390 back into the window. */ 233 /* Map the 8390 back into the window. */
232 outb(ECNTRL_THIN, ioaddr + 0x406); 234 outb(ECNTRL_THIN, ioaddr + 0x406);
diff --git a/drivers/net/3c505.c b/drivers/net/3c505.c
index c05bb3fc57a2..9c6573419f5a 100644
--- a/drivers/net/3c505.c
+++ b/drivers/net/3c505.c
@@ -1386,6 +1386,7 @@ static int __init elplus_setup(struct net_device *dev)
1386 unsigned long timeout; 1386 unsigned long timeout;
1387 unsigned long cookie = 0; 1387 unsigned long cookie = 0;
1388 int err = -ENODEV; 1388 int err = -ENODEV;
1389 DECLARE_MAC_BUF(mac);
1389 1390
1390 /* 1391 /*
1391 * setup adapter structure 1392 * setup adapter structure
@@ -1521,11 +1522,10 @@ static int __init elplus_setup(struct net_device *dev)
1521 /* 1522 /*
1522 * print remainder of startup message 1523 * print remainder of startup message
1523 */ 1524 */
1524 printk(KERN_INFO "%s: 3c505 at %#lx, irq %d, dma %d, ", 1525 printk(KERN_INFO "%s: 3c505 at %#lx, irq %d, dma %d, "
1525 dev->name, dev->base_addr, dev->irq, dev->dma); 1526 "addr %s, ",
1526 printk("addr %02x:%02x:%02x:%02x:%02x:%02x, ", 1527 dev->name, dev->base_addr, dev->irq, dev->dma,
1527 dev->dev_addr[0], dev->dev_addr[1], dev->dev_addr[2], 1528 print_mac(mac, dev->dev_addr));
1528 dev->dev_addr[3], dev->dev_addr[4], dev->dev_addr[5]);
1529 1529
1530 /* 1530 /*
1531 * read more information from the adapter 1531 * read more information from the adapter
diff --git a/drivers/net/3c507.c b/drivers/net/3c507.c
index 3d06271c3a8b..964d31ac9449 100644
--- a/drivers/net/3c507.c
+++ b/drivers/net/3c507.c
@@ -357,6 +357,7 @@ static int __init el16_probe1(struct net_device *dev, int ioaddr)
357 static unsigned char init_ID_done, version_printed; 357 static unsigned char init_ID_done, version_printed;
358 int i, irq, irqval, retval; 358 int i, irq, irqval, retval;
359 struct net_local *lp; 359 struct net_local *lp;
360 DECLARE_MAC_BUF(mac);
360 361
361 if (init_ID_done == 0) { 362 if (init_ID_done == 0) {
362 ushort lrs_state = 0xff; 363 ushort lrs_state = 0xff;
@@ -402,10 +403,9 @@ static int __init el16_probe1(struct net_device *dev, int ioaddr)
402 dev->base_addr = ioaddr; 403 dev->base_addr = ioaddr;
403 404
404 outb(0x01, ioaddr + MISC_CTRL); 405 outb(0x01, ioaddr + MISC_CTRL);
405 for (i = 0; i < 6; i++) { 406 for (i = 0; i < 6; i++)
406 dev->dev_addr[i] = inb(ioaddr + i); 407 dev->dev_addr[i] = inb(ioaddr + i);
407 printk(" %02x", dev->dev_addr[i]); 408 printk(" %s", print_mac(mac, dev->dev_addr));
408 }
409 409
410 if (mem_start) 410 if (mem_start)
411 net_debug = mem_start & 7; 411 net_debug = mem_start & 7;
diff --git a/drivers/net/3c509.c b/drivers/net/3c509.c
index 7466987d8451..c576fe76d54f 100644
--- a/drivers/net/3c509.c
+++ b/drivers/net/3c509.c
@@ -313,8 +313,9 @@ static int nopnp;
313static int __init el3_common_init(struct net_device *dev) 313static int __init el3_common_init(struct net_device *dev)
314{ 314{
315 struct el3_private *lp = netdev_priv(dev); 315 struct el3_private *lp = netdev_priv(dev);
316 short i;
317 int err; 316 int err;
317 DECLARE_MAC_BUF(mac);
318 const char *if_names[] = {"10baseT", "AUI", "undefined", "BNC"};
318 319
319 spin_lock_init(&lp->lock); 320 spin_lock_init(&lp->lock);
320 321
@@ -346,17 +347,10 @@ static int __init el3_common_init(struct net_device *dev)
346 return err; 347 return err;
347 } 348 }
348 349
349 { 350 printk(KERN_INFO "%s: 3c5x9 found at %#3.3lx, %s port, "
350 const char *if_names[] = {"10baseT", "AUI", "undefined", "BNC"}; 351 "address %s, IRQ %d.\n",
351 printk("%s: 3c5x9 found at %#3.3lx, %s port, address ", 352 dev->name, dev->base_addr, if_names[(dev->if_port & 0x03)],
352 dev->name, dev->base_addr, 353 print_mac(mac, dev->dev_addr), dev->irq);
353 if_names[(dev->if_port & 0x03)]);
354 }
355
356 /* Read in the station address. */
357 for (i = 0; i < 6; i++)
358 printk(" %2.2x", dev->dev_addr[i]);
359 printk(", IRQ %d.\n", dev->irq);
360 354
361 if (el3_debug > 0) 355 if (el3_debug > 0)
362 printk(KERN_INFO "%s", version); 356 printk(KERN_INFO "%s", version);
diff --git a/drivers/net/3c515.c b/drivers/net/3c515.c
index 38a2ebea9b45..275e7510ebaf 100644
--- a/drivers/net/3c515.c
+++ b/drivers/net/3c515.c
@@ -569,6 +569,7 @@ static int corkscrew_setup(struct net_device *dev, int ioaddr,
569 unsigned int eeprom[0x40], checksum = 0; /* EEPROM contents */ 569 unsigned int eeprom[0x40], checksum = 0; /* EEPROM contents */
570 int i; 570 int i;
571 int irq; 571 int irq;
572 DECLARE_MAC_BUF(mac);
572 573
573 if (idev) { 574 if (idev) {
574 irq = pnp_irq(idev, 0); 575 irq = pnp_irq(idev, 0);
@@ -630,8 +631,7 @@ static int corkscrew_setup(struct net_device *dev, int ioaddr,
630 checksum = (checksum ^ (checksum >> 8)) & 0xff; 631 checksum = (checksum ^ (checksum >> 8)) & 0xff;
631 if (checksum != 0x00) 632 if (checksum != 0x00)
632 printk(" ***INVALID CHECKSUM %4.4x*** ", checksum); 633 printk(" ***INVALID CHECKSUM %4.4x*** ", checksum);
633 for (i = 0; i < 6; i++) 634 printk(" %s", print_mac(mac, dev->dev_addr));
634 printk("%c%2.2x", i ? ':' : ' ', dev->dev_addr[i]);
635 if (eeprom[16] == 0x11c7) { /* Corkscrew */ 635 if (eeprom[16] == 0x11c7) { /* Corkscrew */
636 if (request_dma(dev->dma, "3c515")) { 636 if (request_dma(dev->dma, "3c515")) {
637 printk(", DMA %d allocation failed", dev->dma); 637 printk(", DMA %d allocation failed", dev->dma);
diff --git a/drivers/net/3c523.c b/drivers/net/3c523.c
index 10852b2a40ab..239fc42fb8df 100644
--- a/drivers/net/3c523.c
+++ b/drivers/net/3c523.c
@@ -383,8 +383,8 @@ void alloc586(struct net_device *dev)
383static int elmc_getinfo(char *buf, int slot, void *d) 383static int elmc_getinfo(char *buf, int slot, void *d)
384{ 384{
385 int len = 0; 385 int len = 0;
386 struct net_device *dev = (struct net_device *) d; 386 struct net_device *dev = d;
387 int i; 387 DECLARE_MAC_BUF(mac);
388 388
389 if (dev == NULL) 389 if (dev == NULL)
390 return len; 390 return len;
@@ -399,12 +399,8 @@ static int elmc_getinfo(char *buf, int slot, void *d)
399 len += sprintf(buf + len, "Transceiver: %s\n", dev->if_port ? 399 len += sprintf(buf + len, "Transceiver: %s\n", dev->if_port ?
400 "External" : "Internal"); 400 "External" : "Internal");
401 len += sprintf(buf + len, "Device: %s\n", dev->name); 401 len += sprintf(buf + len, "Device: %s\n", dev->name);
402 len += sprintf(buf + len, "Hardware Address:"); 402 len += sprintf(buf + len, "Hardware Address: %s\n",
403 for (i = 0; i < 6; i++) { 403 print_mac(mac, dev->dev_addr));
404 len += sprintf(buf + len, " %02x", dev->dev_addr[i]);
405 }
406 buf[len++] = '\n';
407 buf[len] = 0;
408 404
409 return len; 405 return len;
410} /* elmc_getinfo() */ 406} /* elmc_getinfo() */
@@ -422,6 +418,7 @@ static int __init do_elmc_probe(struct net_device *dev)
422 unsigned int size = 0; 418 unsigned int size = 0;
423 int retval; 419 int retval;
424 struct priv *pr = dev->priv; 420 struct priv *pr = dev->priv;
421 DECLARE_MAC_BUF(mac);
425 422
426 if (MCA_bus == 0) { 423 if (MCA_bus == 0) {
427 return -ENODEV; 424 return -ENODEV;
@@ -544,12 +541,11 @@ static int __init do_elmc_probe(struct net_device *dev)
544 541
545 /* The hardware address for the 3c523 is stored in the first six 542 /* The hardware address for the 3c523 is stored in the first six
546 bytes of the IO address. */ 543 bytes of the IO address. */
547 printk(KERN_INFO "%s: hardware address ", dev->name); 544 for (i = 0; i < 6; i++)
548 for (i = 0; i < 6; i++) {
549 dev->dev_addr[i] = inb(dev->base_addr + i); 545 dev->dev_addr[i] = inb(dev->base_addr + i);
550 printk(" %02x", dev->dev_addr[i]); 546
551 } 547 printk(KERN_INFO "%s: hardware address %s\n",
552 printk("\n"); 548 dev->name, print_mac(mac, dev->dev_addr));
553 549
554 dev->open = &elmc_open; 550 dev->open = &elmc_open;
555 dev->stop = &elmc_close; 551 dev->stop = &elmc_close;
diff --git a/drivers/net/3c527.c b/drivers/net/3c527.c
index 5b5f44cdfc1d..b72b89d53ec8 100644
--- a/drivers/net/3c527.c
+++ b/drivers/net/3c527.c
@@ -336,6 +336,7 @@ static int __init mc32_probe1(struct net_device *dev, int slot)
336 "82586 initialisation failure", 336 "82586 initialisation failure",
337 "Adapter list configuration error" 337 "Adapter list configuration error"
338 }; 338 };
339 DECLARE_MAC_BUF(mac);
339 340
340 /* Time to play MCA games */ 341 /* Time to play MCA games */
341 342
@@ -396,17 +397,17 @@ static int __init mc32_probe1(struct net_device *dev, int slot)
396 * Go PROM browsing 397 * Go PROM browsing
397 */ 398 */
398 399
399 printk("%s: Address ", dev->name);
400
401 /* Retrieve and print the ethernet address. */ 400 /* Retrieve and print the ethernet address. */
402 for (i = 0; i < 6; i++) 401 for (i = 0; i < 6; i++)
403 { 402 {
404 mca_write_pos(slot, 6, i+12); 403 mca_write_pos(slot, 6, i+12);
405 mca_write_pos(slot, 7, 0); 404 mca_write_pos(slot, 7, 0);
406 405
407 printk(" %2.2x", dev->dev_addr[i] = mca_read_pos(slot,3)); 406 dev->dev_addr[i] = mca_read_pos(slot,3);
408 } 407 }
409 408
409 printk("%s: Address %s", dev->name, print_mac(mac, dev->dev_addr));
410
410 mca_write_pos(slot, 6, 0); 411 mca_write_pos(slot, 6, 0);
411 mca_write_pos(slot, 7, 0); 412 mca_write_pos(slot, 7, 0);
412 413
diff --git a/drivers/net/3c59x.c b/drivers/net/3c59x.c
index ad0f6a729d29..58311199e321 100644
--- a/drivers/net/3c59x.c
+++ b/drivers/net/3c59x.c
@@ -1014,6 +1014,7 @@ static int __devinit vortex_probe1(struct device *gendev,
1014 char *print_name = "3c59x"; 1014 char *print_name = "3c59x";
1015 struct pci_dev *pdev = NULL; 1015 struct pci_dev *pdev = NULL;
1016 struct eisa_device *edev = NULL; 1016 struct eisa_device *edev = NULL;
1017 DECLARE_MAC_BUF(mac);
1017 1018
1018 if (!printed_version) { 1019 if (!printed_version) {
1019 printk (version); 1020 printk (version);
@@ -1205,10 +1206,8 @@ static int __devinit vortex_probe1(struct device *gendev,
1205 for (i = 0; i < 3; i++) 1206 for (i = 0; i < 3; i++)
1206 ((u16 *)dev->dev_addr)[i] = htons(eeprom[i + 10]); 1207 ((u16 *)dev->dev_addr)[i] = htons(eeprom[i + 10]);
1207 memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len); 1208 memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len);
1208 if (print_info) { 1209 if (print_info)
1209 for (i = 0; i < 6; i++) 1210 printk(" %s", print_mac(mac, dev->dev_addr));
1210 printk("%c%2.2x", i ? ':' : ' ', dev->dev_addr[i]);
1211 }
1212 /* Unfortunately an all zero eeprom passes the checksum and this 1211 /* Unfortunately an all zero eeprom passes the checksum and this
1213 gets found in the wild in failure cases. Crypto is hard 8) */ 1212 gets found in the wild in failure cases. Crypto is hard 8) */
1214 if (!is_valid_ether_addr(dev->dev_addr)) { 1213 if (!is_valid_ether_addr(dev->dev_addr)) {
diff --git a/drivers/net/8139cp.c b/drivers/net/8139cp.c
index 58fad1b2f72e..7edd50cf7776 100644
--- a/drivers/net/8139cp.c
+++ b/drivers/net/8139cp.c
@@ -1823,6 +1823,7 @@ static int cp_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
1823 void __iomem *regs; 1823 void __iomem *regs;
1824 resource_size_t pciaddr; 1824 resource_size_t pciaddr;
1825 unsigned int addr_len, i, pci_using_dac; 1825 unsigned int addr_len, i, pci_using_dac;
1826 DECLARE_MAC_BUF(mac);
1826 1827
1827#ifndef MODULE 1828#ifndef MODULE
1828 static int version_printed; 1829 static int version_printed;
@@ -1964,13 +1965,10 @@ static int cp_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
1964 goto err_out_iomap; 1965 goto err_out_iomap;
1965 1966
1966 printk (KERN_INFO "%s: RTL-8139C+ at 0x%lx, " 1967 printk (KERN_INFO "%s: RTL-8139C+ at 0x%lx, "
1967 "%02x:%02x:%02x:%02x:%02x:%02x, " 1968 "%s, IRQ %d\n",
1968 "IRQ %d\n",
1969 dev->name, 1969 dev->name,
1970 dev->base_addr, 1970 dev->base_addr,
1971 dev->dev_addr[0], dev->dev_addr[1], 1971 print_mac(mac, dev->dev_addr),
1972 dev->dev_addr[2], dev->dev_addr[3],
1973 dev->dev_addr[4], dev->dev_addr[5],
1974 dev->irq); 1972 dev->irq);
1975 1973
1976 pci_set_drvdata(pdev, dev); 1974 pci_set_drvdata(pdev, dev);
diff --git a/drivers/net/8139too.c b/drivers/net/8139too.c
index 28c1aaf1fe1d..d3088a786e26 100644
--- a/drivers/net/8139too.c
+++ b/drivers/net/8139too.c
@@ -926,6 +926,7 @@ static int __devinit rtl8139_init_one (struct pci_dev *pdev,
926 int i, addr_len, option; 926 int i, addr_len, option;
927 void __iomem *ioaddr; 927 void __iomem *ioaddr;
928 static int board_idx = -1; 928 static int board_idx = -1;
929 DECLARE_MAC_BUF(mac);
929 930
930 assert (pdev != NULL); 931 assert (pdev != NULL);
931 assert (ent != NULL); 932 assert (ent != NULL);
@@ -1017,14 +1018,11 @@ static int __devinit rtl8139_init_one (struct pci_dev *pdev,
1017 pci_set_drvdata (pdev, dev); 1018 pci_set_drvdata (pdev, dev);
1018 1019
1019 printk (KERN_INFO "%s: %s at 0x%lx, " 1020 printk (KERN_INFO "%s: %s at 0x%lx, "
1020 "%2.2x:%2.2x:%2.2x:%2.2x:%2.2x:%2.2x, " 1021 "%s, IRQ %d\n",
1021 "IRQ %d\n",
1022 dev->name, 1022 dev->name,
1023 board_info[ent->driver_data].name, 1023 board_info[ent->driver_data].name,
1024 dev->base_addr, 1024 dev->base_addr,
1025 dev->dev_addr[0], dev->dev_addr[1], 1025 print_mac(mac, dev->dev_addr),
1026 dev->dev_addr[2], dev->dev_addr[3],
1027 dev->dev_addr[4], dev->dev_addr[5],
1028 dev->irq); 1026 dev->irq);
1029 1027
1030 printk (KERN_DEBUG "%s: Identified 8139 chip type '%s'\n", 1028 printk (KERN_DEBUG "%s: Identified 8139 chip type '%s'\n",
diff --git a/drivers/net/82596.c b/drivers/net/82596.c
index 6b03416731de..bb30d5be7824 100644
--- a/drivers/net/82596.c
+++ b/drivers/net/82596.c
@@ -1116,15 +1116,12 @@ static int i596_start_xmit(struct sk_buff *skb, struct net_device *dev)
1116 1116
1117static void print_eth(unsigned char *add, char *str) 1117static void print_eth(unsigned char *add, char *str)
1118{ 1118{
1119 int i; 1119 DECLARE_MAC_BUF(mac);
1120 DECLARE_MAC_BUF(mac2);
1120 1121
1121 printk(KERN_DEBUG "i596 0x%p, ", add); 1122 printk(KERN_DEBUG "i596 0x%p, %s --> %s %02X%02X, %s\n",
1122 for (i = 0; i < 6; i++) 1123 add, print_mac(mac, add + 6), print_mac(mac2, add),
1123 printk(" %02X", add[i + 6]); 1124 add[12], add[13], str);
1124 printk(" -->");
1125 for (i = 0; i < 6; i++)
1126 printk(" %02X", add[i]);
1127 printk(" %02X%02X, %s\n", add[12], add[13], str);
1128} 1125}
1129 1126
1130static int io = 0x300; 1127static int io = 0x300;
@@ -1539,6 +1536,7 @@ static void set_multicast_list(struct net_device *dev)
1539 struct dev_mc_list *dmi; 1536 struct dev_mc_list *dmi;
1540 unsigned char *cp; 1537 unsigned char *cp;
1541 struct mc_cmd *cmd; 1538 struct mc_cmd *cmd;
1539 DECLARE_MAC_BUF(mac);
1542 1540
1543 if (wait_cfg(dev, &lp->mc_cmd.cmd, 1000, "multicast list change request timed out")) 1541 if (wait_cfg(dev, &lp->mc_cmd.cmd, 1000, "multicast list change request timed out"))
1544 return; 1542 return;
@@ -1549,8 +1547,8 @@ static void set_multicast_list(struct net_device *dev)
1549 for (dmi = dev->mc_list; cnt && dmi != NULL; dmi = dmi->next, cnt--, cp += 6) { 1547 for (dmi = dev->mc_list; cnt && dmi != NULL; dmi = dmi->next, cnt--, cp += 6) {
1550 memcpy(cp, dmi->dmi_addr, 6); 1548 memcpy(cp, dmi->dmi_addr, 6);
1551 if (i596_debug > 1) 1549 if (i596_debug > 1)
1552 DEB(DEB_MULTI,printk(KERN_INFO "%s: Adding address %02x:%02x:%02x:%02x:%02x:%02x\n", 1550 DEB(DEB_MULTI,printk(KERN_INFO "%s: Adding address %s\n",
1553 dev->name, cp[0],cp[1],cp[2],cp[3],cp[4],cp[5])); 1551 dev->name, print_mac(mac, cp)));
1554 } 1552 }
1555 i596_add_cmd(dev, &cmd->cmd); 1553 i596_add_cmd(dev, &cmd->cmd);
1556 } 1554 }
diff --git a/drivers/net/a2065.c b/drivers/net/a2065.c
index 77773ce52eff..18f7f815f66e 100644
--- a/drivers/net/a2065.c
+++ b/drivers/net/a2065.c
@@ -716,6 +716,7 @@ static int __devinit a2065_init_one(struct zorro_dev *z,
716 unsigned long board, base_addr, mem_start; 716 unsigned long board, base_addr, mem_start;
717 struct resource *r1, *r2; 717 struct resource *r1, *r2;
718 int err; 718 int err;
719 DECLARE_MAC_BUF(mac);
719 720
720 board = z->resource.start; 721 board = z->resource.start;
721 base_addr = board+A2065_LANCE; 722 base_addr = board+A2065_LANCE;
@@ -792,9 +793,8 @@ static int __devinit a2065_init_one(struct zorro_dev *z,
792 zorro_set_drvdata(z, dev); 793 zorro_set_drvdata(z, dev);
793 794
794 printk(KERN_INFO "%s: A2065 at 0x%08lx, Ethernet Address " 795 printk(KERN_INFO "%s: A2065 at 0x%08lx, Ethernet Address "
795 "%02x:%02x:%02x:%02x:%02x:%02x\n", dev->name, board, 796 "%s\n", dev->name, board,
796 dev->dev_addr[0], dev->dev_addr[1], dev->dev_addr[2], 797 print_mac(mac, dev->dev_addr));
797 dev->dev_addr[3], dev->dev_addr[4], dev->dev_addr[5]);
798 798
799 return 0; 799 return 0;
800} 800}
diff --git a/drivers/net/ac3200.c b/drivers/net/ac3200.c
index 65b2de56ed22..5136d94923aa 100644
--- a/drivers/net/ac3200.c
+++ b/drivers/net/ac3200.c
@@ -146,6 +146,7 @@ out:
146static int __init ac_probe1(int ioaddr, struct net_device *dev) 146static int __init ac_probe1(int ioaddr, struct net_device *dev)
147{ 147{
148 int i, retval; 148 int i, retval;
149 DECLARE_MAC_BUF(mac);
149 150
150 if (!request_region(ioaddr, AC_IO_EXTENT, DRV_NAME)) 151 if (!request_region(ioaddr, AC_IO_EXTENT, DRV_NAME))
151 return -EBUSY; 152 return -EBUSY;
@@ -167,10 +168,11 @@ static int __init ac_probe1(int ioaddr, struct net_device *dev)
167 inb(ioaddr + AC_ID_PORT + 2), inb(ioaddr + AC_ID_PORT + 3)); 168 inb(ioaddr + AC_ID_PORT + 2), inb(ioaddr + AC_ID_PORT + 3));
168#endif 169#endif
169 170
170 printk("AC3200 in EISA slot %d, node", ioaddr/0x1000); 171 for (i = 0; i < 6; i++)
171 for(i = 0; i < 6; i++) 172 dev->dev_addr[i] = inb(ioaddr + AC_SA_PROM + i);
172 printk(" %02x", dev->dev_addr[i] = inb(ioaddr + AC_SA_PROM + i));
173 173
174 printk(KERN_DEBUG "AC3200 in EISA slot %d, node %s",
175 ioaddr/0x1000, print_mac(mac, dev->dev_addr));
174#if 0 176#if 0
175 /* Check the vendor ID/prefix. Redundant after checking the EISA ID */ 177 /* Check the vendor ID/prefix. Redundant after checking the EISA ID */
176 if (inb(ioaddr + AC_SA_PROM + 0) != AC_ADDR0 178 if (inb(ioaddr + AC_SA_PROM + 0) != AC_ADDR0
diff --git a/drivers/net/acenic.c b/drivers/net/acenic.c
index ca00f41e4d85..2c2ed6dc98bc 100644
--- a/drivers/net/acenic.c
+++ b/drivers/net/acenic.c
@@ -893,6 +893,7 @@ static int __devinit ace_init(struct net_device *dev)
893 int board_idx, ecode = 0; 893 int board_idx, ecode = 0;
894 short i; 894 short i;
895 unsigned char cache_size; 895 unsigned char cache_size;
896 DECLARE_MAC_BUF(mac);
896 897
897 ap = netdev_priv(dev); 898 ap = netdev_priv(dev);
898 regs = ap->regs; 899 regs = ap->regs;
@@ -1012,10 +1013,6 @@ static int __devinit ace_init(struct net_device *dev)
1012 writel(mac1, &regs->MacAddrHi); 1013 writel(mac1, &regs->MacAddrHi);
1013 writel(mac2, &regs->MacAddrLo); 1014 writel(mac2, &regs->MacAddrLo);
1014 1015
1015 printk("MAC: %02x:%02x:%02x:%02x:%02x:%02x\n",
1016 (mac1 >> 8) & 0xff, mac1 & 0xff, (mac2 >> 24) &0xff,
1017 (mac2 >> 16) & 0xff, (mac2 >> 8) & 0xff, mac2 & 0xff);
1018
1019 dev->dev_addr[0] = (mac1 >> 8) & 0xff; 1016 dev->dev_addr[0] = (mac1 >> 8) & 0xff;
1020 dev->dev_addr[1] = mac1 & 0xff; 1017 dev->dev_addr[1] = mac1 & 0xff;
1021 dev->dev_addr[2] = (mac2 >> 24) & 0xff; 1018 dev->dev_addr[2] = (mac2 >> 24) & 0xff;
@@ -1023,6 +1020,8 @@ static int __devinit ace_init(struct net_device *dev)
1023 dev->dev_addr[4] = (mac2 >> 8) & 0xff; 1020 dev->dev_addr[4] = (mac2 >> 8) & 0xff;
1024 dev->dev_addr[5] = mac2 & 0xff; 1021 dev->dev_addr[5] = mac2 & 0xff;
1025 1022
1023 printk("MAC: %s\n", print_mac(mac, dev->dev_addr));
1024
1026 /* 1025 /*
1027 * Looks like this is necessary to deal with on all architectures, 1026 * Looks like this is necessary to deal with on all architectures,
1028 * even this %$#%$# N440BX Intel based thing doesn't get it right. 1027 * even this %$#%$# N440BX Intel based thing doesn't get it right.
diff --git a/drivers/net/amd8111e.c b/drivers/net/amd8111e.c
index afb60a5927ae..73f40a45441a 100644
--- a/drivers/net/amd8111e.c
+++ b/drivers/net/amd8111e.c
@@ -1934,6 +1934,7 @@ static int __devinit amd8111e_probe_one(struct pci_dev *pdev,
1934 unsigned long reg_addr,reg_len; 1934 unsigned long reg_addr,reg_len;
1935 struct amd8111e_priv* lp; 1935 struct amd8111e_priv* lp;
1936 struct net_device* dev; 1936 struct net_device* dev;
1937 DECLARE_MAC_BUF(mac);
1937 1938
1938 err = pci_enable_device(pdev); 1939 err = pci_enable_device(pdev);
1939 if(err){ 1940 if(err){
@@ -2006,7 +2007,7 @@ static int __devinit amd8111e_probe_one(struct pci_dev *pdev,
2006 2007
2007 /* Initializing MAC address */ 2008 /* Initializing MAC address */
2008 for(i = 0; i < ETH_ADDR_LEN; i++) 2009 for(i = 0; i < ETH_ADDR_LEN; i++)
2009 dev->dev_addr[i] =readb(lp->mmio + PADR + i); 2010 dev->dev_addr[i] = readb(lp->mmio + PADR + i);
2010 2011
2011 /* Setting user defined parametrs */ 2012 /* Setting user defined parametrs */
2012 lp->ext_phy_option = speed_duplex[card_idx]; 2013 lp->ext_phy_option = speed_duplex[card_idx];
@@ -2075,11 +2076,10 @@ static int __devinit amd8111e_probe_one(struct pci_dev *pdev,
2075 /* display driver and device information */ 2076 /* display driver and device information */
2076 2077
2077 chip_version = (readl(lp->mmio + CHIPID) & 0xf0000000)>>28; 2078 chip_version = (readl(lp->mmio + CHIPID) & 0xf0000000)>>28;
2078 printk(KERN_INFO "%s: AMD-8111e Driver Version: %s\n", dev->name,MODULE_VERS); 2079 printk(KERN_INFO "%s: AMD-8111e Driver Version: %s\n",
2079 printk(KERN_INFO "%s: [ Rev %x ] PCI 10/100BaseT Ethernet ", dev->name, chip_version); 2080 dev->name,MODULE_VERS);
2080 for (i = 0; i < 6; i++) 2081 printk(KERN_INFO "%s: [ Rev %x ] PCI 10/100BaseT Ethernet %s\n",
2081 printk("%2.2x%c",dev->dev_addr[i],i == 5 ? ' ' : ':'); 2082 dev->name, chip_version, print_mac(mac, dev->dev_addr));
2082 printk( "\n");
2083 if (lp->ext_phy_id) 2083 if (lp->ext_phy_id)
2084 printk(KERN_INFO "%s: Found MII PHY ID 0x%08x at address 0x%02x\n", 2084 printk(KERN_INFO "%s: Found MII PHY ID 0x%08x at address 0x%02x\n",
2085 dev->name, lp->ext_phy_id, lp->ext_phy_addr); 2085 dev->name, lp->ext_phy_id, lp->ext_phy_addr);
diff --git a/drivers/net/apne.c b/drivers/net/apne.c
index b5a974a964c2..c12cbdf368b1 100644
--- a/drivers/net/apne.c
+++ b/drivers/net/apne.c
@@ -204,6 +204,7 @@ static int __init apne_probe1(struct net_device *dev, int ioaddr)
204 int neX000, ctron; 204 int neX000, ctron;
205#endif 205#endif
206 static unsigned version_printed; 206 static unsigned version_printed;
207 DECLARE_MAC_BUF(mac);
207 208
208 if (ei_debug && version_printed++ == 0) 209 if (ei_debug && version_printed++ == 0)
209 printk(version); 210 printk(version);
@@ -316,12 +317,12 @@ static int __init apne_probe1(struct net_device *dev, int ioaddr)
316 i = request_irq(dev->irq, apne_interrupt, IRQF_SHARED, DRV_NAME, dev); 317 i = request_irq(dev->irq, apne_interrupt, IRQF_SHARED, DRV_NAME, dev);
317 if (i) return i; 318 if (i) return i;
318 319
319 for(i = 0; i < ETHER_ADDR_LEN; i++) { 320 for(i = 0; i < ETHER_ADDR_LEN; i++)
320 printk(" %2.2x", SA_prom[i]);
321 dev->dev_addr[i] = SA_prom[i]; 321 dev->dev_addr[i] = SA_prom[i];
322 }
323 322
324 printk("\n%s: %s found.\n", dev->name, name); 323 printk(" %s\n", print_mac(mac, dev->dev_addr));
324
325 printk("%s: %s found.\n", dev->name, name);
325 326
326 ei_status.name = name; 327 ei_status.name = name;
327 ei_status.tx_start_page = start_page; 328 ei_status.tx_start_page = start_page;
diff --git a/drivers/net/ariadne.c b/drivers/net/ariadne.c
index 2c020a36177e..3fa3bccd1adb 100644
--- a/drivers/net/ariadne.c
+++ b/drivers/net/ariadne.c
@@ -166,6 +166,7 @@ static int __devinit ariadne_init_one(struct zorro_dev *z,
166 struct net_device *dev; 166 struct net_device *dev;
167 struct ariadne_private *priv; 167 struct ariadne_private *priv;
168 int err; 168 int err;
169 DECLARE_MAC_BUF(mac);
169 170
170 r1 = request_mem_region(base_addr, sizeof(struct Am79C960), "Am79C960"); 171 r1 = request_mem_region(base_addr, sizeof(struct Am79C960), "Am79C960");
171 if (!r1) 172 if (!r1)
@@ -216,9 +217,8 @@ static int __devinit ariadne_init_one(struct zorro_dev *z,
216 zorro_set_drvdata(z, dev); 217 zorro_set_drvdata(z, dev);
217 218
218 printk(KERN_INFO "%s: Ariadne at 0x%08lx, Ethernet Address " 219 printk(KERN_INFO "%s: Ariadne at 0x%08lx, Ethernet Address "
219 "%02x:%02x:%02x:%02x:%02x:%02x\n", dev->name, board, 220 "%s\n", dev->name, board,
220 dev->dev_addr[0], dev->dev_addr[1], dev->dev_addr[2], 221 print_mac(mac, dev->dev_addr));
221 dev->dev_addr[3], dev->dev_addr[4], dev->dev_addr[5]);
222 222
223 return 0; 223 return 0;
224} 224}
@@ -614,21 +614,17 @@ static int ariadne_start_xmit(struct sk_buff *skb, struct net_device *dev)
614 /* Fill in a Tx ring entry */ 614 /* Fill in a Tx ring entry */
615 615
616#if 0 616#if 0
617 printk(KERN_DEBUG "TX pkt type 0x%04x from ", ((u_short *)skb->data)[6]); 617{
618 { 618 DECLARE_MAC_BUF(mac);
619 int i; 619 DECLARE_MAC_BUF(mac2);
620 u_char *ptr = &((u_char *)skb->data)[6]; 620
621 for (i = 0; i < 6; i++) 621 printk(KERN_DEBUG "TX pkt type 0x%04x from %s to %s "
622 printk("%02x", ptr[i]); 622 " data 0x%08x len %d\n",
623 } 623 ((u_short *)skb->data)[6],
624 printk(" to "); 624 print_mac(mac, ((const u8 *)skb->data)+6),
625 { 625 print_mac(mac, (const u8 *)skb->data),
626 int i; 626 (int)skb->data, (int)skb->len);
627 u_char *ptr = (u_char *)skb->data; 627}
628 for (i = 0; i < 6; i++)
629 printk("%02x", ptr[i]);
630 }
631 printk(" data 0x%08x len %d\n", (int)skb->data, (int)skb->len);
632#endif 628#endif
633 629
634 local_irq_save(flags); 630 local_irq_save(flags);
@@ -748,22 +744,22 @@ static int ariadne_rx(struct net_device *dev)
748 skb_copy_to_linear_data(skb, (char *)priv->rx_buff[entry], pkt_len); 744 skb_copy_to_linear_data(skb, (char *)priv->rx_buff[entry], pkt_len);
749 skb->protocol=eth_type_trans(skb,dev); 745 skb->protocol=eth_type_trans(skb,dev);
750#if 0 746#if 0
747{
748 DECLARE_MAC_BUF(mac);
749
751 printk(KERN_DEBUG "RX pkt type 0x%04x from ", 750 printk(KERN_DEBUG "RX pkt type 0x%04x from ",
752 ((u_short *)skb->data)[6]); 751 ((u_short *)skb->data)[6]);
753 { 752 {
754 int i;
755 u_char *ptr = &((u_char *)skb->data)[6]; 753 u_char *ptr = &((u_char *)skb->data)[6];
756 for (i = 0; i < 6; i++) 754 printk("%s", print_mac(mac, ptr));
757 printk("%02x", ptr[i]);
758 } 755 }
759 printk(" to "); 756 printk(" to ");
760 { 757 {
761 int i;
762 u_char *ptr = (u_char *)skb->data; 758 u_char *ptr = (u_char *)skb->data;
763 for (i = 0; i < 6; i++) 759 printk("%s", print_mac(mac, ptr));
764 printk("%02x", ptr[i]);
765 } 760 }
766 printk(" data 0x%08x len %d\n", (int)skb->data, (int)skb->len); 761 printk(" data 0x%08x len %d\n", (int)skb->data, (int)skb->len);
762}
767#endif 763#endif
768 764
769 netif_rx(skb); 765 netif_rx(skb);
diff --git a/drivers/net/arm/am79c961a.c b/drivers/net/arm/am79c961a.c
index 77964556776e..ba6bd03a015f 100644
--- a/drivers/net/arm/am79c961a.c
+++ b/drivers/net/arm/am79c961a.c
@@ -741,12 +741,10 @@ static int __init am79c961_probe(struct platform_device *pdev)
741 741
742 ret = register_netdev(dev); 742 ret = register_netdev(dev);
743 if (ret == 0) { 743 if (ret == 0) {
744 printk(KERN_INFO "%s: ether address ", dev->name); 744 DECLARE_MAC_BUF(mac);
745
746 /* Retrive and print the ethernet address. */
747 for (i = 0; i < 6; i++)
748 printk (i == 5 ? "%02x\n" : "%02x:", dev->dev_addr[i]);
749 745
746 printk(KERN_INFO "%s: ether address %s\n",
747 dev->name, print_mac(mac, dev->dev_addr));
750 return 0; 748 return 0;
751 } 749 }
752 750
diff --git a/drivers/net/arm/at91_ether.c b/drivers/net/arm/at91_ether.c
index 619810a01e5b..25b114a4e2b1 100644
--- a/drivers/net/arm/at91_ether.c
+++ b/drivers/net/arm/at91_ether.c
@@ -485,6 +485,7 @@ static void update_mac_address(struct net_device *dev)
485static int set_mac_address(struct net_device *dev, void* addr) 485static int set_mac_address(struct net_device *dev, void* addr)
486{ 486{
487 struct sockaddr *address = addr; 487 struct sockaddr *address = addr;
488 DECLARE_MAC_BUF(mac);
488 489
489 if (!is_valid_ether_addr(address->sa_data)) 490 if (!is_valid_ether_addr(address->sa_data))
490 return -EADDRNOTAVAIL; 491 return -EADDRNOTAVAIL;
@@ -492,9 +493,8 @@ static int set_mac_address(struct net_device *dev, void* addr)
492 memcpy(dev->dev_addr, address->sa_data, dev->addr_len); 493 memcpy(dev->dev_addr, address->sa_data, dev->addr_len);
493 update_mac_address(dev); 494 update_mac_address(dev);
494 495
495 printk("%s: Setting MAC address to %02x:%02x:%02x:%02x:%02x:%02x\n", dev->name, 496 printk("%s: Setting MAC address to %s\n", dev->name,
496 dev->dev_addr[0], dev->dev_addr[1], dev->dev_addr[2], 497 print_mac(mac, dev->dev_addr));
497 dev->dev_addr[3], dev->dev_addr[4], dev->dev_addr[5]);
498 498
499 return 0; 499 return 0;
500} 500}
@@ -979,6 +979,7 @@ static int __init at91ether_setup(unsigned long phy_type, unsigned short phy_add
979 struct at91_private *lp; 979 struct at91_private *lp;
980 unsigned int val; 980 unsigned int val;
981 int res; 981 int res;
982 DECLARE_MAC_BUF(mac);
982 983
983 dev = alloc_etherdev(sizeof(struct at91_private)); 984 dev = alloc_etherdev(sizeof(struct at91_private));
984 if (!dev) 985 if (!dev)
@@ -1081,12 +1082,11 @@ static int __init at91ether_setup(unsigned long phy_type, unsigned short phy_add
1081 } 1082 }
1082 1083
1083 /* Display ethernet banner */ 1084 /* Display ethernet banner */
1084 printk(KERN_INFO "%s: AT91 ethernet at 0x%08x int=%d %s%s (%02x:%02x:%02x:%02x:%02x:%02x)\n", 1085 printk(KERN_INFO "%s: AT91 ethernet at 0x%08x int=%d %s%s (%s)\n",
1085 dev->name, (uint) dev->base_addr, dev->irq, 1086 dev->name, (uint) dev->base_addr, dev->irq,
1086 at91_emac_read(AT91_EMAC_CFG) & AT91_EMAC_SPD ? "100-" : "10-", 1087 at91_emac_read(AT91_EMAC_CFG) & AT91_EMAC_SPD ? "100-" : "10-",
1087 at91_emac_read(AT91_EMAC_CFG) & AT91_EMAC_FD ? "FullDuplex" : "HalfDuplex", 1088 at91_emac_read(AT91_EMAC_CFG) & AT91_EMAC_FD ? "FullDuplex" : "HalfDuplex",
1088 dev->dev_addr[0], dev->dev_addr[1], dev->dev_addr[2], 1089 print_mac(mac, dev->dev_addr));
1089 dev->dev_addr[3], dev->dev_addr[4], dev->dev_addr[5]);
1090 if ((phy_type == MII_DM9161_ID) || (lp->phy_type == MII_DM9161A_ID)) 1090 if ((phy_type == MII_DM9161_ID) || (lp->phy_type == MII_DM9161A_ID))
1091 printk(KERN_INFO "%s: Davicom 9161 PHY %s\n", dev->name, (lp->phy_media == PORT_FIBRE) ? "(Fiber)" : "(Copper)"); 1091 printk(KERN_INFO "%s: Davicom 9161 PHY %s\n", dev->name, (lp->phy_media == PORT_FIBRE) ? "(Fiber)" : "(Copper)");
1092 else if (phy_type == MII_LXT971A_ID) 1092 else if (phy_type == MII_LXT971A_ID)
diff --git a/drivers/net/arm/ether1.c b/drivers/net/arm/ether1.c
index 6ec8a587c1d2..3bb9e293e2ef 100644
--- a/drivers/net/arm/ether1.c
+++ b/drivers/net/arm/ether1.c
@@ -996,6 +996,7 @@ ether1_probe(struct expansion_card *ec, const struct ecard_id *id)
996{ 996{
997 struct net_device *dev; 997 struct net_device *dev;
998 int i, ret = 0; 998 int i, ret = 0;
999 DECLARE_MAC_BUF(mac);
999 1000
1000 ether1_banner(); 1001 ether1_banner();
1001 1002
@@ -1043,12 +1044,9 @@ ether1_probe(struct expansion_card *ec, const struct ecard_id *id)
1043 if (ret) 1044 if (ret)
1044 goto free; 1045 goto free;
1045 1046
1046 printk(KERN_INFO "%s: ether1 in slot %d, ", 1047 printk(KERN_INFO "%s: ether1 in slot %d, %s\n",
1047 dev->name, ec->slot_no); 1048 dev->name, ec->slot_no, print_mac(mac, dev->dev_addr));
1048 1049
1049 for (i = 0; i < 6; i++)
1050 printk ("%2.2x%c", dev->dev_addr[i], i == 5 ? '\n' : ':');
1051
1052 ecard_set_drvdata(ec, dev); 1050 ecard_set_drvdata(ec, dev);
1053 return 0; 1051 return 0;
1054 1052
diff --git a/drivers/net/arm/ether3.c b/drivers/net/arm/ether3.c
index 4a914748c0e4..67e96ae85035 100644
--- a/drivers/net/arm/ether3.c
+++ b/drivers/net/arm/ether3.c
@@ -775,7 +775,8 @@ ether3_probe(struct expansion_card *ec, const struct ecard_id *id)
775{ 775{
776 const struct ether3_data *data = id->data; 776 const struct ether3_data *data = id->data;
777 struct net_device *dev; 777 struct net_device *dev;
778 int i, bus_type, ret; 778 int bus_type, ret;
779 DECLARE_MAC_BUF(mac);
779 780
780 ether3_banner(); 781 ether3_banner();
781 782
@@ -858,9 +859,8 @@ ether3_probe(struct expansion_card *ec, const struct ecard_id *id)
858 if (ret) 859 if (ret)
859 goto free; 860 goto free;
860 861
861 printk("%s: %s in slot %d, ", dev->name, data->name, ec->slot_no); 862 printk("%s: %s in slot %d, %s\n",
862 for (i = 0; i < 6; i++) 863 dev->name, data->name, ec->slot_no, print_mac(mac, dev->dev_addr));
863 printk("%2.2x%c", dev->dev_addr[i], i == 5 ? '\n' : ':');
864 864
865 ecard_set_drvdata(ec, dev); 865 ecard_set_drvdata(ec, dev);
866 return 0; 866 return 0;
diff --git a/drivers/net/arm/etherh.c b/drivers/net/arm/etherh.c
index 5d093b3ddcd4..00081d2b9cd5 100644
--- a/drivers/net/arm/etherh.c
+++ b/drivers/net/arm/etherh.c
@@ -648,6 +648,7 @@ etherh_probe(struct expansion_card *ec, const struct ecard_id *id)
648 struct net_device *dev; 648 struct net_device *dev;
649 struct etherh_priv *eh; 649 struct etherh_priv *eh;
650 int i, ret; 650 int i, ret;
651 DECLARE_MAC_BUF(mac);
651 652
652 etherh_banner(); 653 etherh_banner();
653 654
@@ -745,11 +746,8 @@ etherh_probe(struct expansion_card *ec, const struct ecard_id *id)
745 if (ret) 746 if (ret)
746 goto free; 747 goto free;
747 748
748 printk(KERN_INFO "%s: %s in slot %d, ", 749 printk(KERN_INFO "%s: %s in slot %d, %s\n",
749 dev->name, data->name, ec->slot_no); 750 dev->name, data->name, ec->slot_no, print_mac(mac, dev->dev_addr));
750
751 for (i = 0; i < 6; i++)
752 printk("%2.2x%c", dev->dev_addr[i], i == 5 ? '\n' : ':');
753 751
754 ecard_set_drvdata(ec, dev); 752 ecard_set_drvdata(ec, dev);
755 753
diff --git a/drivers/net/at1700.c b/drivers/net/at1700.c
index a124fdb2bce6..b032c1bf492f 100644
--- a/drivers/net/at1700.c
+++ b/drivers/net/at1700.c
@@ -265,6 +265,7 @@ static int __init at1700_probe1(struct net_device *dev, int ioaddr)
265 unsigned int i, irq, is_fmv18x = 0, is_at1700 = 0; 265 unsigned int i, irq, is_fmv18x = 0, is_at1700 = 0;
266 int slot, ret = -ENODEV; 266 int slot, ret = -ENODEV;
267 struct net_local *lp = netdev_priv(dev); 267 struct net_local *lp = netdev_priv(dev);
268 DECLARE_MAC_BUF(mac);
268 269
269 if (!request_region(ioaddr, AT1700_IO_EXTENT, DRV_NAME)) 270 if (!request_region(ioaddr, AT1700_IO_EXTENT, DRV_NAME))
270 return -EBUSY; 271 return -EBUSY;
@@ -388,16 +389,15 @@ found:
388 if (is_at1700) { 389 if (is_at1700) {
389 for(i = 0; i < 3; i++) { 390 for(i = 0; i < 3; i++) {
390 unsigned short eeprom_val = read_eeprom(ioaddr, 4+i); 391 unsigned short eeprom_val = read_eeprom(ioaddr, 4+i);
391 printk("%04x", eeprom_val);
392 ((unsigned short *)dev->dev_addr)[i] = ntohs(eeprom_val); 392 ((unsigned short *)dev->dev_addr)[i] = ntohs(eeprom_val);
393 } 393 }
394 } else { 394 } else {
395 for(i = 0; i < 6; i++) { 395 for(i = 0; i < 6; i++) {
396 unsigned char val = inb(ioaddr + SAPROM + i); 396 unsigned char val = inb(ioaddr + SAPROM + i);
397 printk("%02x", val);
398 dev->dev_addr[i] = val; 397 dev->dev_addr[i] = val;
399 } 398 }
400 } 399 }
400 printk("%s", print_mac(mac, dev->dev_addr));
401 401
402 /* The EEPROM word 12 bit 0x0400 means use regular 100 ohm 10baseT signals, 402 /* The EEPROM word 12 bit 0x0400 means use regular 100 ohm 10baseT signals,
403 rather than 150 ohm shielded twisted pair compensation. 403 rather than 150 ohm shielded twisted pair compensation.
diff --git a/drivers/net/atarilance.c b/drivers/net/atarilance.c
index 8bf548e1cb4e..ebf1a3a88e15 100644
--- a/drivers/net/atarilance.c
+++ b/drivers/net/atarilance.c
@@ -467,6 +467,7 @@ static unsigned long __init lance_probe1( struct net_device *dev,
467 int i; 467 int i;
468 static int did_version; 468 static int did_version;
469 unsigned short save1, save2; 469 unsigned short save1, save2;
470 DECLARE_MAC_BUF(mac);
470 471
471 PROBE_PRINT(( "Probing for Lance card at mem %#lx io %#lx\n", 472 PROBE_PRINT(( "Probing for Lance card at mem %#lx io %#lx\n",
472 (long)memaddr, (long)ioaddr )); 473 (long)memaddr, (long)ioaddr ));
@@ -595,8 +596,7 @@ static unsigned long __init lance_probe1( struct net_device *dev,
595 i = IO->mem; 596 i = IO->mem;
596 break; 597 break;
597 } 598 }
598 for( i = 0; i < 6; ++i ) 599 printk("%s\n", print_mac(mac, dev->dev_addr));
599 printk( "%02x%s", dev->dev_addr[i], (i < 5) ? ":" : "\n" );
600 if (lp->cardtype == OLD_RIEBL) { 600 if (lp->cardtype == OLD_RIEBL) {
601 printk( "%s: Warning: This is a default ethernet address!\n", 601 printk( "%s: Warning: This is a default ethernet address!\n",
602 dev->name ); 602 dev->name );
@@ -779,6 +779,8 @@ static int lance_start_xmit( struct sk_buff *skb, struct net_device *dev )
779 int entry, len; 779 int entry, len;
780 struct lance_tx_head *head; 780 struct lance_tx_head *head;
781 unsigned long flags; 781 unsigned long flags;
782 DECLARE_MAC_BUF(mac);
783 DECLARE_MAC_BUF(mac2);
782 784
783 DPRINTK( 2, ( "%s: lance_start_xmit() called, csr0 %4.4x.\n", 785 DPRINTK( 2, ( "%s: lance_start_xmit() called, csr0 %4.4x.\n",
784 dev->name, DREG )); 786 dev->name, DREG ));
@@ -801,17 +803,13 @@ static int lance_start_xmit( struct sk_buff *skb, struct net_device *dev )
801 803
802 /* Fill in a Tx ring entry */ 804 /* Fill in a Tx ring entry */
803 if (lance_debug >= 3) { 805 if (lance_debug >= 3) {
804 u_char *p; 806 printk( "%s: TX pkt type 0x%04x from "
805 int i; 807 "%s to %s"
806 printk( "%s: TX pkt type 0x%04x from ", dev->name, 808 " data at 0x%08x len %d\n",
807 ((u_short *)skb->data)[6]); 809 dev->name, ((u_short *)skb->data)[6],
808 for( p = &((u_char *)skb->data)[6], i = 0; i < 6; i++ ) 810 print_mac(mac, &skb->data[6]),
809 printk("%02x%s", *p++, i != 5 ? ":" : "" ); 811 print_mac(mac2, skb->data),
810 printk(" to "); 812 (int)skb->data, (int)skb->len );
811 for( p = (u_char *)skb->data, i = 0; i < 6; i++ )
812 printk("%02x%s", *p++, i != 5 ? ":" : "" );
813 printk(" data at 0x%08x len %d\n", (int)skb->data,
814 (int)skb->len );
815 } 813 }
816 814
817 /* We're not prepared for the int until the last flags are set/reset. And 815 /* We're not prepared for the int until the last flags are set/reset. And
@@ -1021,19 +1019,18 @@ static int lance_rx( struct net_device *dev )
1021 } 1019 }
1022 1020
1023 if (lance_debug >= 3) { 1021 if (lance_debug >= 3) {
1024 u_char *data = PKTBUF_ADDR(head), *p; 1022 u_char *data = PKTBUF_ADDR(head);
1025 printk( "%s: RX pkt type 0x%04x from ", dev->name, 1023 DECLARE_MAC_BUF(mac);
1026 ((u_short *)data)[6]); 1024 DECLARE_MAC_BUF(mac2);
1027 for( p = &data[6], i = 0; i < 6; i++ ) 1025
1028 printk("%02x%s", *p++, i != 5 ? ":" : "" ); 1026 printk(KERN_DEBUG "%s: RX pkt type 0x%04x from %s to %s ",
1029 printk(" to "); 1027 "data %02x %02x %02x %02x %02x %02x %02x %02x "
1030 for( p = data, i = 0; i < 6; i++ )
1031 printk("%02x%s", *p++, i != 5 ? ":" : "" );
1032 printk(" data %02x %02x %02x %02x %02x %02x %02x %02x "
1033 "len %d\n", 1028 "len %d\n",
1029 dev->name, ((u_short *)data)[6],
1030 print_mac(mac, &data[6]), print_mac(mac2, data),
1034 data[15], data[16], data[17], data[18], 1031 data[15], data[16], data[17], data[18],
1035 data[19], data[20], data[21], data[22], 1032 data[19], data[20], data[21], data[22],
1036 pkt_len ); 1033 pkt_len);
1037 } 1034 }
1038 1035
1039 skb_reserve( skb, 2 ); /* 16 byte align */ 1036 skb_reserve( skb, 2 ); /* 16 byte align */
diff --git a/drivers/net/atp.c b/drivers/net/atp.c
index cec2e3672cd0..62f09e59d9c4 100644
--- a/drivers/net/atp.c
+++ b/drivers/net/atp.c
@@ -248,6 +248,7 @@ static int __init atp_probe1(long ioaddr)
248 struct net_local *lp; 248 struct net_local *lp;
249 int saved_ctrl_reg, status, i; 249 int saved_ctrl_reg, status, i;
250 int res; 250 int res;
251 DECLARE_MAC_BUF(mac);
251 252
252 outb(0xff, ioaddr + PAR_DATA); 253 outb(0xff, ioaddr + PAR_DATA);
253 /* Save the original value of the Control register, in case we guessed 254 /* Save the original value of the Control register, in case we guessed
@@ -322,10 +323,9 @@ static int __init atp_probe1(long ioaddr)
322 printk(KERN_INFO "%s", version); 323 printk(KERN_INFO "%s", version);
323#endif 324#endif
324 325
325 printk(KERN_NOTICE "%s: Pocket adapter found at %#3lx, IRQ %d, SAPROM " 326 printk(KERN_NOTICE "%s: Pocket adapter found at %#3lx, IRQ %d, "
326 "%02X:%02X:%02X:%02X:%02X:%02X.\n", dev->name, dev->base_addr, 327 "SAPROM %s.\n",
327 dev->irq, dev->dev_addr[0], dev->dev_addr[1], dev->dev_addr[2], 328 dev->name, dev->base_addr, dev->irq, print_mac(mac, dev->dev_addr));
328 dev->dev_addr[3], dev->dev_addr[4], dev->dev_addr[5]);
329 329
330 /* Reset the ethernet hardware and activate the printer pass-through. */ 330 /* Reset the ethernet hardware and activate the printer pass-through. */
331 write_reg_high(ioaddr, CMR1, CMR1h_RESET | CMR1h_MUX); 331 write_reg_high(ioaddr, CMR1, CMR1h_RESET | CMR1h_MUX);
diff --git a/drivers/net/b44.c b/drivers/net/b44.c
index 6d193705a3bc..40842a6aa994 100644
--- a/drivers/net/b44.c
+++ b/drivers/net/b44.c
@@ -2100,7 +2100,8 @@ static int __devinit b44_init_one(struct pci_dev *pdev,
2100 unsigned long b44reg_base, b44reg_len; 2100 unsigned long b44reg_base, b44reg_len;
2101 struct net_device *dev; 2101 struct net_device *dev;
2102 struct b44 *bp; 2102 struct b44 *bp;
2103 int err, i; 2103 int err;
2104 DECLARE_MAC_BUF(mac);
2104 2105
2105 if (b44_version_printed++ == 0) 2106 if (b44_version_printed++ == 0)
2106 printk(KERN_INFO "%s", version); 2107 printk(KERN_INFO "%s", version);
@@ -2229,10 +2230,8 @@ static int __devinit b44_init_one(struct pci_dev *pdev,
2229 */ 2230 */
2230 b44_chip_reset(bp); 2231 b44_chip_reset(bp);
2231 2232
2232 printk(KERN_INFO "%s: Broadcom 4400 10/100BaseT Ethernet ", dev->name); 2233 printk(KERN_INFO "%s: Broadcom 4400 10/100BaseT Ethernet %s\n",
2233 for (i = 0; i < 6; i++) 2234 dev->name, print_mac(mac, dev->dev_addr));
2234 printk("%2.2x%c", dev->dev_addr[i],
2235 i == 5 ? '\n' : ':');
2236 2235
2237 return 0; 2236 return 0;
2238 2237
diff --git a/drivers/net/bmac.c b/drivers/net/bmac.c
index 2761441f6644..a42bd19646d3 100644
--- a/drivers/net/bmac.c
+++ b/drivers/net/bmac.c
@@ -1258,6 +1258,7 @@ static int __devinit bmac_probe(struct macio_dev *mdev, const struct of_device_i
1258 unsigned char addr[6]; 1258 unsigned char addr[6];
1259 struct net_device *dev; 1259 struct net_device *dev;
1260 int is_bmac_plus = ((int)match->data) != 0; 1260 int is_bmac_plus = ((int)match->data) != 0;
1261 DECLARE_MAC_BUF(mac);
1261 1262
1262 if (macio_resource_count(mdev) != 3 || macio_irq_count(mdev) != 3) { 1263 if (macio_resource_count(mdev) != 3 || macio_irq_count(mdev) != 3) {
1263 printk(KERN_ERR "BMAC: can't use, need 3 addrs and 3 intrs\n"); 1264 printk(KERN_ERR "BMAC: can't use, need 3 addrs and 3 intrs\n");
@@ -1367,9 +1368,8 @@ static int __devinit bmac_probe(struct macio_dev *mdev, const struct of_device_i
1367 goto err_out_irq2; 1368 goto err_out_irq2;
1368 } 1369 }
1369 1370
1370 printk(KERN_INFO "%s: BMAC%s at", dev->name, (is_bmac_plus? "+": "")); 1371 printk(KERN_INFO "%s: BMAC%s at %s",
1371 for (j = 0; j < 6; ++j) 1372 dev->name, (is_bmac_plus ? "+" : ""), print_mac(mac, dev->dev_addr));
1372 printk("%c%.2x", (j? ':': ' '), dev->dev_addr[j]);
1373 XXDEBUG((", base_addr=%#0lx", dev->base_addr)); 1373 XXDEBUG((", base_addr=%#0lx", dev->base_addr));
1374 printk("\n"); 1374 printk("\n");
1375 1375
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c
index 5ee805b3e0e6..ee9aed3aa489 100644
--- a/drivers/net/bnx2.c
+++ b/drivers/net/bnx2.c
@@ -6821,8 +6821,9 @@ bnx2_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
6821 static int version_printed = 0; 6821 static int version_printed = 0;
6822 struct net_device *dev = NULL; 6822 struct net_device *dev = NULL;
6823 struct bnx2 *bp; 6823 struct bnx2 *bp;
6824 int rc, i; 6824 int rc;
6825 char str[40]; 6825 char str[40];
6826 DECLARE_MAC_BUF(mac);
6826 6827
6827 if (version_printed++ == 0) 6828 if (version_printed++ == 0)
6828 printk(KERN_INFO "%s", version); 6829 printk(KERN_INFO "%s", version);
@@ -6890,19 +6891,14 @@ bnx2_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
6890 } 6891 }
6891 6892
6892 printk(KERN_INFO "%s: %s (%c%d) %s found at mem %lx, " 6893 printk(KERN_INFO "%s: %s (%c%d) %s found at mem %lx, "
6893 "IRQ %d, ", 6894 "IRQ %d, node addr %s\n",
6894 dev->name, 6895 dev->name,
6895 bp->name, 6896 bp->name,
6896 ((CHIP_ID(bp) & 0xf000) >> 12) + 'A', 6897 ((CHIP_ID(bp) & 0xf000) >> 12) + 'A',
6897 ((CHIP_ID(bp) & 0x0ff0) >> 4), 6898 ((CHIP_ID(bp) & 0x0ff0) >> 4),
6898 bnx2_bus_string(bp, str), 6899 bnx2_bus_string(bp, str),
6899 dev->base_addr, 6900 dev->base_addr,
6900 bp->pdev->irq); 6901 bp->pdev->irq, print_mac(mac, dev->dev_addr));
6901
6902 printk("node addr ");
6903 for (i = 0; i < 6; i++)
6904 printk("%2.2x", dev->dev_addr[i]);
6905 printk("\n");
6906 6902
6907 return 0; 6903 return 0;
6908} 6904}
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index ea58144c220e..8f77db2112ce 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -1604,6 +1604,7 @@ int bond_release(struct net_device *bond_dev, struct net_device *slave_dev)
1604 struct slave *slave, *oldcurrent; 1604 struct slave *slave, *oldcurrent;
1605 struct sockaddr addr; 1605 struct sockaddr addr;
1606 int mac_addr_differ; 1606 int mac_addr_differ;
1607 DECLARE_MAC_BUF(mac);
1607 1608
1608 /* slave is not a slave or master is not master of this slave */ 1609 /* slave is not a slave or master is not master of this slave */
1609 if (!(slave_dev->flags & IFF_SLAVE) || 1610 if (!(slave_dev->flags & IFF_SLAVE) ||
@@ -1631,19 +1632,13 @@ int bond_release(struct net_device *bond_dev, struct net_device *slave_dev)
1631 ETH_ALEN); 1632 ETH_ALEN);
1632 if (!mac_addr_differ && (bond->slave_cnt > 1)) { 1633 if (!mac_addr_differ && (bond->slave_cnt > 1)) {
1633 printk(KERN_WARNING DRV_NAME 1634 printk(KERN_WARNING DRV_NAME
1634 ": %s: Warning: the permanent HWaddr of %s " 1635 ": %s: Warning: the permanent HWaddr of %s - "
1635 "- %02X:%02X:%02X:%02X:%02X:%02X - is " 1636 "%s - is still in use by %s. "
1636 "still in use by %s. Set the HWaddr of " 1637 "Set the HWaddr of %s to a different address "
1637 "%s to a different address to avoid " 1638 "to avoid conflicts.\n",
1638 "conflicts.\n",
1639 bond_dev->name, 1639 bond_dev->name,
1640 slave_dev->name, 1640 slave_dev->name,
1641 slave->perm_hwaddr[0], 1641 print_mac(mac, slave->perm_hwaddr),
1642 slave->perm_hwaddr[1],
1643 slave->perm_hwaddr[2],
1644 slave->perm_hwaddr[3],
1645 slave->perm_hwaddr[4],
1646 slave->perm_hwaddr[5],
1647 bond_dev->name, 1642 bond_dev->name,
1648 slave_dev->name); 1643 slave_dev->name);
1649 } 1644 }
@@ -3006,6 +3001,7 @@ static void bond_info_show_master(struct seq_file *seq)
3006 3001
3007 if (bond->params.mode == BOND_MODE_8023AD) { 3002 if (bond->params.mode == BOND_MODE_8023AD) {
3008 struct ad_info ad_info; 3003 struct ad_info ad_info;
3004 DECLARE_MAC_BUF(mac);
3009 3005
3010 seq_puts(seq, "\n802.3ad info\n"); 3006 seq_puts(seq, "\n802.3ad info\n");
3011 seq_printf(seq, "LACP rate: %s\n", 3007 seq_printf(seq, "LACP rate: %s\n",
@@ -3025,13 +3021,8 @@ static void bond_info_show_master(struct seq_file *seq)
3025 ad_info.actor_key); 3021 ad_info.actor_key);
3026 seq_printf(seq, "\tPartner Key: %d\n", 3022 seq_printf(seq, "\tPartner Key: %d\n",
3027 ad_info.partner_key); 3023 ad_info.partner_key);
3028 seq_printf(seq, "\tPartner Mac Address: %02x:%02x:%02x:%02x:%02x:%02x\n", 3024 seq_printf(seq, "\tPartner Mac Address: %s\n",
3029 ad_info.partner_system[0], 3025 print_mac(mac, ad_info.partner_system));
3030 ad_info.partner_system[1],
3031 ad_info.partner_system[2],
3032 ad_info.partner_system[3],
3033 ad_info.partner_system[4],
3034 ad_info.partner_system[5]);
3035 } 3026 }
3036 } 3027 }
3037} 3028}
@@ -3039,6 +3030,7 @@ static void bond_info_show_master(struct seq_file *seq)
3039static void bond_info_show_slave(struct seq_file *seq, const struct slave *slave) 3030static void bond_info_show_slave(struct seq_file *seq, const struct slave *slave)
3040{ 3031{
3041 struct bonding *bond = seq->private; 3032 struct bonding *bond = seq->private;
3033 DECLARE_MAC_BUF(mac);
3042 3034
3043 seq_printf(seq, "\nSlave Interface: %s\n", slave->dev->name); 3035 seq_printf(seq, "\nSlave Interface: %s\n", slave->dev->name);
3044 seq_printf(seq, "MII Status: %s\n", 3036 seq_printf(seq, "MII Status: %s\n",
@@ -3047,10 +3039,8 @@ static void bond_info_show_slave(struct seq_file *seq, const struct slave *slave
3047 slave->link_failure_count); 3039 slave->link_failure_count);
3048 3040
3049 seq_printf(seq, 3041 seq_printf(seq,
3050 "Permanent HW addr: %02x:%02x:%02x:%02x:%02x:%02x\n", 3042 "Permanent HW addr: %s\n",
3051 slave->perm_hwaddr[0], slave->perm_hwaddr[1], 3043 print_mac(mac, slave->perm_hwaddr));
3052 slave->perm_hwaddr[2], slave->perm_hwaddr[3],
3053 slave->perm_hwaddr[4], slave->perm_hwaddr[5]);
3054 3044
3055 if (bond->params.mode == BOND_MODE_8023AD) { 3045 if (bond->params.mode == BOND_MODE_8023AD) {
3056 const struct aggregator *agg 3046 const struct aggregator *agg
diff --git a/drivers/net/bonding/bond_sysfs.c b/drivers/net/bonding/bond_sysfs.c
index a771853219da..f10927639b5c 100644
--- a/drivers/net/bonding/bond_sysfs.c
+++ b/drivers/net/bonding/bond_sysfs.c
@@ -1361,17 +1361,14 @@ static ssize_t bonding_show_ad_partner_mac(struct device *d,
1361{ 1361{
1362 int count = 0; 1362 int count = 0;
1363 struct bonding *bond = to_bond(d); 1363 struct bonding *bond = to_bond(d);
1364 DECLARE_MAC_BUF(mac);
1364 1365
1365 if (bond->params.mode == BOND_MODE_8023AD) { 1366 if (bond->params.mode == BOND_MODE_8023AD) {
1366 struct ad_info ad_info; 1367 struct ad_info ad_info;
1367 if (!bond_3ad_get_active_agg_info(bond, &ad_info)) { 1368 if (!bond_3ad_get_active_agg_info(bond, &ad_info)) {
1368 count = sprintf(buf,"%02x:%02x:%02x:%02x:%02x:%02x\n", 1369 count = sprintf(buf,"%s\n",
1369 ad_info.partner_system[0], 1370 print_mac(mac, ad_info.partner_system))
1370 ad_info.partner_system[1], 1371 + 1;
1371 ad_info.partner_system[2],
1372 ad_info.partner_system[3],
1373 ad_info.partner_system[4],
1374 ad_info.partner_system[5]) + 1;
1375 } 1372 }
1376 } 1373 }
1377 else 1374 else
diff --git a/drivers/net/cassini.c b/drivers/net/cassini.c
index f44f3d2a4b4e..adc2e4d5a69e 100644
--- a/drivers/net/cassini.c
+++ b/drivers/net/cassini.c
@@ -4877,6 +4877,7 @@ static int __devinit cas_init_one(struct pci_dev *pdev,
4877 int i, err, pci_using_dac; 4877 int i, err, pci_using_dac;
4878 u16 pci_cmd; 4878 u16 pci_cmd;
4879 u8 orig_cacheline_size = 0, cas_cacheline_size = 0; 4879 u8 orig_cacheline_size = 0, cas_cacheline_size = 0;
4880 DECLARE_MAC_BUF(mac);
4880 4881
4881 if (cas_version_printed++ == 0) 4882 if (cas_version_printed++ == 0)
4882 printk(KERN_INFO "%s", version); 4883 printk(KERN_INFO "%s", version);
@@ -5084,16 +5085,12 @@ static int __devinit cas_init_one(struct pci_dev *pdev,
5084 5085
5085 i = readl(cp->regs + REG_BIM_CFG); 5086 i = readl(cp->regs + REG_BIM_CFG);
5086 printk(KERN_INFO "%s: Sun Cassini%s (%sbit/%sMHz PCI/%s) " 5087 printk(KERN_INFO "%s: Sun Cassini%s (%sbit/%sMHz PCI/%s) "
5087 "Ethernet[%d] ", dev->name, 5088 "Ethernet[%d] %s\n", dev->name,
5088 (cp->cas_flags & CAS_FLAG_REG_PLUS) ? "+" : "", 5089 (cp->cas_flags & CAS_FLAG_REG_PLUS) ? "+" : "",
5089 (i & BIM_CFG_32BIT) ? "32" : "64", 5090 (i & BIM_CFG_32BIT) ? "32" : "64",
5090 (i & BIM_CFG_66MHZ) ? "66" : "33", 5091 (i & BIM_CFG_66MHZ) ? "66" : "33",
5091 (cp->phy_type == CAS_PHY_SERDES) ? "Fi" : "Cu", pdev->irq); 5092 (cp->phy_type == CAS_PHY_SERDES) ? "Fi" : "Cu", pdev->irq,
5092 5093 print_mac(mac, dev->dev_addr));
5093 for (i = 0; i < 6; i++)
5094 printk("%2.2x%c", dev->dev_addr[i],
5095 i == 5 ? ' ' : ':');
5096 printk("\n");
5097 5094
5098 pci_set_drvdata(pdev, dev); 5095 pci_set_drvdata(pdev, dev);
5099 cp->hw_running = 1; 5096 cp->hw_running = 1;
diff --git a/drivers/net/cris/eth_v10.c b/drivers/net/cris/eth_v10.c
index 5bdf5ca85a65..314b2f68f78f 100644
--- a/drivers/net/cris/eth_v10.c
+++ b/drivers/net/cris/eth_v10.c
@@ -618,12 +618,8 @@ e100_set_mac_address(struct net_device *dev, void *p)
618 618
619 /* show it in the log as well */ 619 /* show it in the log as well */
620 620
621 printk(KERN_INFO "%s: changed MAC to ", dev->name); 621 printk(KERN_INFO "%s: changed MAC to %s\n",
622 622 dev->name, print_mac(mac, dev->dev_addr));
623 for (i = 0; i < 5; i++)
624 printk("%02X:", dev->dev_addr[i]);
625
626 printk("%02X\n", dev->dev_addr[i]);
627 623
628 spin_unlock(&np->lock); 624 spin_unlock(&np->lock);
629 625
diff --git a/drivers/net/cs89x0.c b/drivers/net/cs89x0.c
index 4cf82cf5ac10..571750975137 100644
--- a/drivers/net/cs89x0.c
+++ b/drivers/net/cs89x0.c
@@ -516,6 +516,7 @@ cs89x0_probe1(struct net_device *dev, int ioaddr, int modular)
516 unsigned rev_type = 0; 516 unsigned rev_type = 0;
517 int eeprom_buff[CHKSUM_LEN]; 517 int eeprom_buff[CHKSUM_LEN];
518 int retval; 518 int retval;
519 DECLARE_MAC_BUF(mac);
519 520
520 /* Initialize the device structure. */ 521 /* Initialize the device structure. */
521 if (!modular) { 522 if (!modular) {
@@ -840,11 +841,7 @@ cs89x0_probe1(struct net_device *dev, int ioaddr, int modular)
840 } 841 }
841 842
842 /* print the ethernet address. */ 843 /* print the ethernet address. */
843 printk(", MAC"); 844 printk(", MAC %s", print_mac(mac, dev->dev_addr));
844 for (i = 0; i < ETH_ALEN; i++)
845 {
846 printk("%c%02x", i ? ':' : ' ', dev->dev_addr[i]);
847 }
848 845
849 dev->open = net_open; 846 dev->open = net_open;
850 dev->stop = net_close; 847 dev->stop = net_close;
@@ -1806,17 +1803,15 @@ static int set_mac_address(struct net_device *dev, void *p)
1806 int i; 1803 int i;
1807 struct sockaddr *addr = p; 1804 struct sockaddr *addr = p;
1808 1805
1809
1810 if (netif_running(dev)) 1806 if (netif_running(dev))
1811 return -EBUSY; 1807 return -EBUSY;
1812 1808
1813 memcpy(dev->dev_addr, addr->sa_data, dev->addr_len); 1809 memcpy(dev->dev_addr, addr->sa_data, dev->addr_len);
1814 1810
1815 if (net_debug) { 1811 if (net_debug) {
1816 printk("%s: Setting MAC address to ", dev->name); 1812 DECLARE_MAC_BUF(mac);
1817 for (i = 0; i < dev->addr_len; i++) 1813 printk("%s: Setting MAC address to %s.\n",
1818 printk(" %2.2x", dev->dev_addr[i]); 1814 dev->name, print_mac(mac, dev->dev_addr));
1819 printk(".\n");
1820 } 1815 }
1821 /* set the Ethernet address */ 1816 /* set the Ethernet address */
1822 for (i=0; i < ETH_ALEN/2; i++) 1817 for (i=0; i < ETH_ALEN/2; i++)
diff --git a/drivers/net/de600.c b/drivers/net/de600.c
index 421c2ca49711..cb849b091f98 100644
--- a/drivers/net/de600.c
+++ b/drivers/net/de600.c
@@ -384,6 +384,7 @@ static struct net_device * __init de600_probe(void)
384 int i; 384 int i;
385 struct net_device *dev; 385 struct net_device *dev;
386 int err; 386 int err;
387 DECLARE_MAC_BUF(mac);
387 388
388 dev = alloc_etherdev(0); 389 dev = alloc_etherdev(0);
389 if (!dev) 390 if (!dev)
@@ -438,10 +439,7 @@ static struct net_device * __init de600_probe(void)
438 goto out1; 439 goto out1;
439 } 440 }
440 441
441 printk(", Ethernet Address: %02X", dev->dev_addr[0]); 442 printk(", Ethernet Address: %s\n", print_mac(mac, dev->dev_addr));
442 for (i = 1; i < ETH_ALEN; i++)
443 printk(":%02X",dev->dev_addr[i]);
444 printk("\n");
445 443
446 dev->open = de600_open; 444 dev->open = de600_open;
447 dev->stop = de600_close; 445 dev->stop = de600_close;
diff --git a/drivers/net/de620.c b/drivers/net/de620.c
index 4b93902906ba..3f5190c654cf 100644
--- a/drivers/net/de620.c
+++ b/drivers/net/de620.c
@@ -807,6 +807,7 @@ struct net_device * __init de620_probe(int unit)
807 struct net_device *dev; 807 struct net_device *dev;
808 int err = -ENOMEM; 808 int err = -ENOMEM;
809 int i; 809 int i;
810 DECLARE_MAC_BUF(mac);
810 811
811 dev = alloc_etherdev(0); 812 dev = alloc_etherdev(0);
812 if (!dev) 813 if (!dev)
@@ -853,13 +854,14 @@ struct net_device * __init de620_probe(int unit)
853 } 854 }
854 855
855 /* else, got it! */ 856 /* else, got it! */
856 printk(", Ethernet Address: %2.2X", 857 dev->dev_addr[0] = nic_data.NodeID[0];
857 dev->dev_addr[0] = nic_data.NodeID[0]);
858 for (i = 1; i < ETH_ALEN; i++) { 858 for (i = 1; i < ETH_ALEN; i++) {
859 printk(":%2.2X", dev->dev_addr[i] = nic_data.NodeID[i]); 859 dev->dev_addr[i] = nic_data.NodeID[i];
860 dev->broadcast[i] = 0xff; 860 dev->broadcast[i] = 0xff;
861 } 861 }
862 862
863 printk(", Ethernet Address: %s", print_mac(mac, dev->dev_addr));
864
863 printk(" (%dk RAM,", 865 printk(" (%dk RAM,",
864 (nic_data.RAM_Size) ? (nic_data.RAM_Size >> 2) : 64); 866 (nic_data.RAM_Size) ? (nic_data.RAM_Size >> 2) : 64);
865 867
diff --git a/drivers/net/declance.c b/drivers/net/declance.c
index 7e7ac3330e60..00e0194bfef0 100644
--- a/drivers/net/declance.c
+++ b/drivers/net/declance.c
@@ -1027,6 +1027,7 @@ static int __init dec_lance_probe(struct device *bdev, const int type)
1027 int i, ret; 1027 int i, ret;
1028 unsigned long esar_base; 1028 unsigned long esar_base;
1029 unsigned char *esar; 1029 unsigned char *esar;
1030 DECLARE_MAC_BUF(mac);
1030 1031
1031 if (dec_lance_debug && version_printed++ == 0) 1032 if (dec_lance_debug && version_printed++ == 0)
1032 printk(version); 1033 printk(version);
@@ -1214,21 +1215,20 @@ static int __init dec_lance_probe(struct device *bdev, const int type)
1214 */ 1215 */
1215 switch (type) { 1216 switch (type) {
1216 case ASIC_LANCE: 1217 case ASIC_LANCE:
1217 printk("%s: IOASIC onboard LANCE, addr = ", name); 1218 printk("%s: IOASIC onboard LANCE", name);
1218 break; 1219 break;
1219 case PMAD_LANCE: 1220 case PMAD_LANCE:
1220 printk("%s: PMAD-AA, addr = ", name); 1221 printk("%s: PMAD-AA", name);
1221 break; 1222 break;
1222 case PMAX_LANCE: 1223 case PMAX_LANCE:
1223 printk("%s: PMAX onboard LANCE, addr = ", name); 1224 printk("%s: PMAX onboard LANCE", name);
1224 break; 1225 break;
1225 } 1226 }
1226 for (i = 0; i < 6; i++) { 1227 for (i = 0; i < 6; i++)
1227 dev->dev_addr[i] = esar[i * 4]; 1228 dev->dev_addr[i] = esar[i * 4];
1228 printk("%2.2x%c", dev->dev_addr[i], i == 5 ? ',' : ':');
1229 }
1230 1229
1231 printk(" irq = %d\n", dev->irq); 1230 printk(", addr = %s, irq = %d\n",
1231 print_mac(mac, dev->dev_addr), dev->irq);
1232 1232
1233 dev->open = &lance_open; 1233 dev->open = &lance_open;
1234 dev->stop = &lance_close; 1234 dev->stop = &lance_close;
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]);
diff --git a/drivers/net/dgrs.c b/drivers/net/dgrs.c
index a9ef79da3dc7..054f2ba5f698 100644
--- a/drivers/net/dgrs.c
+++ b/drivers/net/dgrs.c
@@ -1139,6 +1139,7 @@ dgrs_probe1(struct net_device *dev)
1139 DGRS_PRIV *priv = (DGRS_PRIV *) dev->priv; 1139 DGRS_PRIV *priv = (DGRS_PRIV *) dev->priv;
1140 unsigned long i; 1140 unsigned long i;
1141 int rc; 1141 int rc;
1142 DECLARE_MAC_BUF(mac);
1142 1143
1143 printk("%s: Digi RightSwitch io=%lx mem=%lx irq=%d plx=%lx dma=%lx\n", 1144 printk("%s: Digi RightSwitch io=%lx mem=%lx irq=%d plx=%lx dma=%lx\n",
1144 dev->name, dev->base_addr, dev->mem_start, dev->irq, 1145 dev->name, dev->base_addr, dev->mem_start, dev->irq,
@@ -1154,11 +1155,9 @@ dgrs_probe1(struct net_device *dev)
1154 /* 1155 /*
1155 * Get ether address of board 1156 * Get ether address of board
1156 */ 1157 */
1157 printk("%s: Ethernet address", dev->name);
1158 memcpy(dev->dev_addr, priv->port->ethaddr, 6); 1158 memcpy(dev->dev_addr, priv->port->ethaddr, 6);
1159 for (i = 0; i < 6; ++i) 1159 printk("%s: Ethernet address %s\n",
1160 printk("%c%2.2x", i ? ':' : ' ', dev->dev_addr[i]); 1160 dev->name, print_mac(mac, dev->dev_addr));
1161 printk("\n");
1162 1161
1163 if (dev->dev_addr[0] & 1) 1162 if (dev->dev_addr[0] & 1)
1164 { 1163 {
@@ -1214,15 +1213,12 @@ static int __init
1214dgrs_initclone(struct net_device *dev) 1213dgrs_initclone(struct net_device *dev)
1215{ 1214{
1216 DGRS_PRIV *priv = (DGRS_PRIV *) dev->priv; 1215 DGRS_PRIV *priv = (DGRS_PRIV *) dev->priv;
1217 int i; 1216 DECLARE_MAC_BUF(mac);
1218 1217
1219 printk("%s: Digi RightSwitch port %d ", 1218 printk("%s: Digi RightSwitch port %d %s\n",
1220 dev->name, priv->chan); 1219 dev->name, priv->chan, print_mac(mac, dev->dev_addr));
1221 for (i = 0; i < 6; ++i)
1222 printk("%c%2.2x", i ? ':' : ' ', dev->dev_addr[i]);
1223 printk("\n");
1224 1220
1225 return (0); 1221 return 0;
1226} 1222}
1227 1223
1228static struct net_device * __init 1224static struct net_device * __init
diff --git a/drivers/net/dl2k.c b/drivers/net/dl2k.c
index 12486e13b85b..e91b7096838a 100644
--- a/drivers/net/dl2k.c
+++ b/drivers/net/dl2k.c
@@ -97,6 +97,7 @@ rio_probe1 (struct pci_dev *pdev, const struct pci_device_id *ent)
97 static int version_printed; 97 static int version_printed;
98 void *ring_space; 98 void *ring_space;
99 dma_addr_t ring_dma; 99 dma_addr_t ring_dma;
100 DECLARE_MAC_BUF(mac);
100 101
101 if (!version_printed++) 102 if (!version_printed++)
102 printk ("%s", version); 103 printk ("%s", version);
@@ -256,10 +257,8 @@ rio_probe1 (struct pci_dev *pdev, const struct pci_device_id *ent)
256 257
257 card_idx++; 258 card_idx++;
258 259
259 printk (KERN_INFO "%s: %s, %02x:%02x:%02x:%02x:%02x:%02x, IRQ %d\n", 260 printk (KERN_INFO "%s: %s, %s, IRQ %d\n",
260 dev->name, np->name, 261 dev->name, np->name, print_mac(mac, dev->dev_addr), irq);
261 dev->dev_addr[0], dev->dev_addr[1], dev->dev_addr[2],
262 dev->dev_addr[3], dev->dev_addr[4], dev->dev_addr[5], irq);
263 if (tx_coalesce > 1) 262 if (tx_coalesce > 1)
264 printk(KERN_INFO "tx_coalesce:\t%d packets\n", 263 printk(KERN_INFO "tx_coalesce:\t%d packets\n",
265 tx_coalesce); 264 tx_coalesce);
diff --git a/drivers/net/dm9000.c b/drivers/net/dm9000.c
index f691ef61b2d3..27ac010900ab 100644
--- a/drivers/net/dm9000.c
+++ b/drivers/net/dm9000.c
@@ -595,11 +595,10 @@ dm9000_probe(struct platform_device *pdev)
595 ret = register_netdev(ndev); 595 ret = register_netdev(ndev);
596 596
597 if (ret == 0) { 597 if (ret == 0) {
598 printk("%s: dm9000 at %p,%p IRQ %d MAC: ", 598 DECLARE_MAC_BUF(mac);
599 ndev->name, db->io_addr, db->io_data, ndev->irq); 599 printk("%s: dm9000 at %p,%p IRQ %d MAC: %s\n",
600 for (i = 0; i < 5; i++) 600 ndev->name, db->io_addr, db->io_data, ndev->irq,
601 printk("%02x:", ndev->dev_addr[i]); 601 print_mac(mac, ndev->dev_addr));
602 printk("%02x\n", ndev->dev_addr[5]);
603 } 602 }
604 return 0; 603 return 0;
605 604
diff --git a/drivers/net/e100.c b/drivers/net/e100.c
index 99126564f1a0..720994b1e13a 100644
--- a/drivers/net/e100.c
+++ b/drivers/net/e100.c
@@ -2548,6 +2548,7 @@ static int __devinit e100_probe(struct pci_dev *pdev,
2548 struct net_device *netdev; 2548 struct net_device *netdev;
2549 struct nic *nic; 2549 struct nic *nic;
2550 int err; 2550 int err;
2551 DECLARE_MAC_BUF(mac);
2551 2552
2552 if(!(netdev = alloc_etherdev(sizeof(struct nic)))) { 2553 if(!(netdev = alloc_etherdev(sizeof(struct nic)))) {
2553 if(((1 << debug) - 1) & NETIF_MSG_PROBE) 2554 if(((1 << debug) - 1) & NETIF_MSG_PROBE)
@@ -2679,11 +2680,9 @@ static int __devinit e100_probe(struct pci_dev *pdev,
2679 goto err_out_free; 2680 goto err_out_free;
2680 } 2681 }
2681 2682
2682 DPRINTK(PROBE, INFO, "addr 0x%llx, irq %d, " 2683 DPRINTK(PROBE, INFO, "addr 0x%llx, irq %d, MAC addr %s\n",
2683 "MAC addr %02X:%02X:%02X:%02X:%02X:%02X\n", 2684 (unsigned long long)pci_resource_start(pdev, use_io ? 1 : 0),
2684 (unsigned long long)pci_resource_start(pdev, use_io ? 1 : 0), pdev->irq, 2685 pdev->irq, print_mac(mac, netdev->dev_addr));
2685 netdev->dev_addr[0], netdev->dev_addr[1], netdev->dev_addr[2],
2686 netdev->dev_addr[3], netdev->dev_addr[4], netdev->dev_addr[5]);
2687 2686
2688 return 0; 2687 return 0;
2689 2688
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index 7befb706ad55..ad444c9a5d04 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -872,6 +872,8 @@ e1000_probe(struct pci_dev *pdev,
872 int i, err, pci_using_dac; 872 int i, err, pci_using_dac;
873 uint16_t eeprom_data = 0; 873 uint16_t eeprom_data = 0;
874 uint16_t eeprom_apme_mask = E1000_EEPROM_APME; 874 uint16_t eeprom_apme_mask = E1000_EEPROM_APME;
875 DECLARE_MAC_BUF(mac);
876
875 if ((err = pci_enable_device(pdev))) 877 if ((err = pci_enable_device(pdev)))
876 return err; 878 return err;
877 879
@@ -1132,8 +1134,7 @@ e1000_probe(struct pci_dev *pdev,
1132 "32-bit")); 1134 "32-bit"));
1133 } 1135 }
1134 1136
1135 for (i = 0; i < 6; i++) 1137 printk("%s\n", print_mac(mac, netdev->dev_addr));
1136 printk("%2.2x%c", netdev->dev_addr[i], i == 5 ? '\n' : ':');
1137 1138
1138 /* reset the hardware with the new settings */ 1139 /* reset the hardware with the new settings */
1139 e1000_reset(adapter); 1140 e1000_reset(adapter);
diff --git a/drivers/net/eepro.c b/drivers/net/eepro.c
index 54811f6f766d..83bda6ccde98 100644
--- a/drivers/net/eepro.c
+++ b/drivers/net/eepro.c
@@ -690,6 +690,7 @@ static void __init eepro_print_info (struct net_device *dev)
690 struct eepro_local * lp = netdev_priv(dev); 690 struct eepro_local * lp = netdev_priv(dev);
691 int i; 691 int i;
692 const char * ifmap[] = {"AUI", "10Base2", "10BaseT"}; 692 const char * ifmap[] = {"AUI", "10Base2", "10BaseT"};
693 DECLARE_MAC_BUF(mac);
693 694
694 i = inb(dev->base_addr + ID_REG); 695 i = inb(dev->base_addr + ID_REG);
695 printk(KERN_DEBUG " id: %#x ",i); 696 printk(KERN_DEBUG " id: %#x ",i);
@@ -711,10 +712,10 @@ static void __init eepro_print_info (struct net_device *dev)
711 case LAN595: 712 case LAN595:
712 printk("%s: Intel 82595-based lan card at %#x,", 713 printk("%s: Intel 82595-based lan card at %#x,",
713 dev->name, (unsigned)dev->base_addr); 714 dev->name, (unsigned)dev->base_addr);
715 break;
714 } 716 }
715 717
716 for (i=0; i < 6; i++) 718 printk(" %s", print_mac(mac, dev->dev_addr));
717 printk("%c%02x", i ? ':' : ' ', dev->dev_addr[i]);
718 719
719 if (net_debug > 3) 720 if (net_debug > 3)
720 printk(KERN_DEBUG ", %dK RCV buffer", 721 printk(KERN_DEBUG ", %dK RCV buffer",
diff --git a/drivers/net/eepro100.c b/drivers/net/eepro100.c
index f8b69ceb2be6..1548a80f917d 100644
--- a/drivers/net/eepro100.c
+++ b/drivers/net/eepro100.c
@@ -622,6 +622,7 @@ static int __devinit speedo_found1(struct pci_dev *pdev,
622 int size; 622 int size;
623 void *tx_ring_space; 623 void *tx_ring_space;
624 dma_addr_t tx_ring_dma; 624 dma_addr_t tx_ring_dma;
625 DECLARE_MAC_BUF(mac);
625 626
626 size = TX_RING_SIZE * sizeof(struct TxFD) + sizeof(struct speedo_stats); 627 size = TX_RING_SIZE * sizeof(struct TxFD) + sizeof(struct speedo_stats);
627 tx_ring_space = pci_alloc_consistent(pdev, size, &tx_ring_dma); 628 tx_ring_space = pci_alloc_consistent(pdev, size, &tx_ring_dma);
@@ -705,12 +706,8 @@ static int __devinit speedo_found1(struct pci_dev *pdev,
705 else 706 else
706 product = pci_name(pdev); 707 product = pci_name(pdev);
707 708
708 printk(KERN_INFO "%s: %s, ", dev->name, product); 709 printk(KERN_INFO "%s: %s, %s, IRQ %d.\n", dev->name, product,
709 710 print_mac(mac, dev->dev_addr), pdev->irq);
710 for (i = 0; i < 5; i++)
711 printk("%2.2X:", dev->dev_addr[i]);
712 printk("%2.2X, ", dev->dev_addr[i]);
713 printk("IRQ %d.\n", pdev->irq);
714 711
715 sp = netdev_priv(dev); 712 sp = netdev_priv(dev);
716 713
diff --git a/drivers/net/epic100.c b/drivers/net/epic100.c
index 5ac56f20003d..ecdd3fc8d70c 100644
--- a/drivers/net/epic100.c
+++ b/drivers/net/epic100.c
@@ -317,6 +317,7 @@ static int __devinit epic_init_one (struct pci_dev *pdev,
317 int i, ret, option = 0, duplex = 0; 317 int i, ret, option = 0, duplex = 0;
318 void *ring_space; 318 void *ring_space;
319 dma_addr_t ring_dma; 319 dma_addr_t ring_dma;
320 DECLARE_MAC_BUF(mac);
320 321
321/* when built into the kernel, we only print version if device is found */ 322/* when built into the kernel, we only print version if device is found */
322#ifndef MODULE 323#ifndef MODULE
@@ -493,11 +494,9 @@ static int __devinit epic_init_one (struct pci_dev *pdev,
493 if (ret < 0) 494 if (ret < 0)
494 goto err_out_unmap_rx; 495 goto err_out_unmap_rx;
495 496
496 printk(KERN_INFO "%s: %s at %#lx, IRQ %d, ", 497 printk(KERN_INFO "%s: %s at %#lx, IRQ %d, %s\n",
497 dev->name, pci_id_tbl[chip_idx].name, ioaddr, dev->irq); 498 dev->name, pci_id_tbl[chip_idx].name, ioaddr, dev->irq,
498 for (i = 0; i < 5; i++) 499 print_mac(mac, dev->dev_addr));
499 printk("%2.2x:", dev->dev_addr[i]);
500 printk("%2.2x.\n", dev->dev_addr[i]);
501 500
502out: 501out:
503 return ret; 502 return ret;
diff --git a/drivers/net/es3210.c b/drivers/net/es3210.c
index 238fa8aff02d..deefa51b8c31 100644
--- a/drivers/net/es3210.c
+++ b/drivers/net/es3210.c
@@ -179,6 +179,7 @@ static int __init es_probe1(struct net_device *dev, int ioaddr)
179{ 179{
180 int i, retval; 180 int i, retval;
181 unsigned long eisa_id; 181 unsigned long eisa_id;
182 DECLARE_MAC_BUF(mac);
182 183
183 if (!request_region(ioaddr + ES_SA_PROM, ES_IO_EXTENT, "es3210")) 184 if (!request_region(ioaddr + ES_SA_PROM, ES_IO_EXTENT, "es3210"))
184 return -ENODEV; 185 return -ENODEV;
@@ -190,7 +191,6 @@ static int __init es_probe1(struct net_device *dev, int ioaddr)
190 inb(ioaddr + ES_CFG4), inb(ioaddr + ES_CFG5), inb(ioaddr + ES_CFG6)); 191 inb(ioaddr + ES_CFG4), inb(ioaddr + ES_CFG5), inb(ioaddr + ES_CFG6));
191#endif 192#endif
192 193
193
194/* Check the EISA ID of the card. */ 194/* Check the EISA ID of the card. */
195 eisa_id = inl(ioaddr + ES_ID_PORT); 195 eisa_id = inl(ioaddr + ES_ID_PORT);
196 if ((eisa_id != ES_EISA_ID1) && (eisa_id != ES_EISA_ID2)) { 196 if ((eisa_id != ES_EISA_ID1) && (eisa_id != ES_EISA_ID2)) {
@@ -198,21 +198,21 @@ static int __init es_probe1(struct net_device *dev, int ioaddr)
198 goto out; 198 goto out;
199 } 199 }
200 200
201 for (i = 0; i < ETHER_ADDR_LEN ; i++)
202 dev->dev_addr[i] = inb(ioaddr + ES_SA_PROM + i);
203
201/* Check the Racal vendor ID as well. */ 204/* Check the Racal vendor ID as well. */
202 if (inb(ioaddr + ES_SA_PROM + 0) != ES_ADDR0 205 if (dev->dev_addr[0] != ES_ADDR0 ||
203 || inb(ioaddr + ES_SA_PROM + 1) != ES_ADDR1 206 dev->dev_addr[1] != ES_ADDR1 ||
204 || inb(ioaddr + ES_SA_PROM + 2) != ES_ADDR2 ) { 207 dev->dev_addr[2] != ES_ADDR2) {
205 printk("es3210.c: card not found"); 208 printk("es3210.c: card not found %s (invalid_prefix).\n",
206 for(i = 0; i < ETHER_ADDR_LEN; i++) 209 print_mac(mac, dev->dev_addr));
207 printk(" %02x", inb(ioaddr + ES_SA_PROM + i));
208 printk(" (invalid prefix).\n");
209 retval = -ENODEV; 210 retval = -ENODEV;
210 goto out; 211 goto out;
211 } 212 }
212 213
213 printk("es3210.c: ES3210 rev. %ld at %#x, node", eisa_id>>24, ioaddr); 214 printk("es3210.c: ES3210 rev. %ld at %#x, node %s",
214 for(i = 0; i < ETHER_ADDR_LEN; i++) 215 eisa_id>>24, ioaddr, print_mac(mac, dev->dev_addr));
215 printk(" %02x", (dev->dev_addr[i] = inb(ioaddr + ES_SA_PROM + i)));
216 216
217 /* Snarf the interrupt now. */ 217 /* Snarf the interrupt now. */
218 if (dev->irq == 0) { 218 if (dev->irq == 0) {
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 {
diff --git a/drivers/net/fealnx.c b/drivers/net/fealnx.c
index 402b071d8d53..43f7647ff246 100644
--- a/drivers/net/fealnx.c
+++ b/drivers/net/fealnx.c
@@ -486,6 +486,7 @@ static int __devinit fealnx_init_one(struct pci_dev *pdev,
486#else 486#else
487 int bar = 1; 487 int bar = 1;
488#endif 488#endif
489 DECLARE_MAC_BUF(mac);
489 490
490/* when built into the kernel, we only print version if device is found */ 491/* when built into the kernel, we only print version if device is found */
491#ifndef MODULE 492#ifndef MODULE
@@ -664,11 +665,9 @@ static int __devinit fealnx_init_one(struct pci_dev *pdev,
664 if (err) 665 if (err)
665 goto err_out_free_tx; 666 goto err_out_free_tx;
666 667
667 printk(KERN_INFO "%s: %s at %p, ", 668 printk(KERN_INFO "%s: %s at %p, %s, IRQ %d.\n",
668 dev->name, skel_netdrv_tbl[chip_id].chip_name, ioaddr); 669 dev->name, skel_netdrv_tbl[chip_id].chip_name, ioaddr,
669 for (i = 0; i < 5; i++) 670 print_mac(mac, dev->dev_addr), irq);
670 printk("%2.2x:", dev->dev_addr[i]);
671 printk("%2.2x, IRQ %d.\n", dev->dev_addr[i], irq);
672 671
673 return 0; 672 return 0;
674 673
diff --git a/drivers/net/fec.c b/drivers/net/fec.c
index 4419c3cee995..2b5782056dda 100644
--- a/drivers/net/fec.c
+++ b/drivers/net/fec.c
@@ -2635,6 +2635,7 @@ static int __init fec_enet_module_init(void)
2635{ 2635{
2636 struct net_device *dev; 2636 struct net_device *dev;
2637 int i, j, err; 2637 int i, j, err;
2638 DECLARE_MAC_BUF(mac);
2638 2639
2639 printk("FEC ENET Version 0.2\n"); 2640 printk("FEC ENET Version 0.2\n");
2640 2641
@@ -2653,10 +2654,8 @@ static int __init fec_enet_module_init(void)
2653 return -EIO; 2654 return -EIO;
2654 } 2655 }
2655 2656
2656 printk("%s: ethernet ", dev->name); 2657 printk("%s: ethernet %s\n",
2657 for (j = 0; (j < 5); j++) 2658 dev->name, print_mac(mac, dev->dev_addr));
2658 printk("%02x:", dev->dev_addr[j]);
2659 printk("%02x\n", dev->dev_addr[5]);
2660 } 2659 }
2661 return 0; 2660 return 0;
2662} 2661}
diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c
index be744573b1c2..f7354bc9b009 100644
--- a/drivers/net/forcedeth.c
+++ b/drivers/net/forcedeth.c
@@ -4991,6 +4991,7 @@ static int __devinit nv_probe(struct pci_dev *pci_dev, const struct pci_device_i
4991 u32 powerstate, txreg; 4991 u32 powerstate, txreg;
4992 u32 phystate_orig = 0, phystate; 4992 u32 phystate_orig = 0, phystate;
4993 int phyinitialized = 0; 4993 int phyinitialized = 0;
4994 DECLARE_MAC_BUF(mac);
4994 4995
4995 dev = alloc_etherdev(sizeof(struct fe_priv)); 4996 dev = alloc_etherdev(sizeof(struct fe_priv));
4996 err = -ENOMEM; 4997 err = -ENOMEM;
@@ -5205,10 +5206,8 @@ static int __devinit nv_probe(struct pci_dev *pci_dev, const struct pci_device_i
5205 * Bad mac address. At least one bios sets the mac address 5206 * Bad mac address. At least one bios sets the mac address
5206 * to 01:23:45:67:89:ab 5207 * to 01:23:45:67:89:ab
5207 */ 5208 */
5208 printk(KERN_ERR "%s: Invalid Mac address detected: %02x:%02x:%02x:%02x:%02x:%02x\n", 5209 printk(KERN_ERR "%s: Invalid Mac address detected: %s\n",
5209 pci_name(pci_dev), 5210 pci_name(pci_dev), print_mac(mac, dev->dev_addr));
5210 dev->dev_addr[0], dev->dev_addr[1], dev->dev_addr[2],
5211 dev->dev_addr[3], dev->dev_addr[4], dev->dev_addr[5]);
5212 printk(KERN_ERR "Please complain to your hardware vendor. Switching to a random MAC.\n"); 5211 printk(KERN_ERR "Please complain to your hardware vendor. Switching to a random MAC.\n");
5213 dev->dev_addr[0] = 0x00; 5212 dev->dev_addr[0] = 0x00;
5214 dev->dev_addr[1] = 0x00; 5213 dev->dev_addr[1] = 0x00;
@@ -5216,9 +5215,8 @@ static int __devinit nv_probe(struct pci_dev *pci_dev, const struct pci_device_i
5216 get_random_bytes(&dev->dev_addr[3], 3); 5215 get_random_bytes(&dev->dev_addr[3], 3);
5217 } 5216 }
5218 5217
5219 dprintk(KERN_DEBUG "%s: MAC Address %02x:%02x:%02x:%02x:%02x:%02x\n", pci_name(pci_dev), 5218 dprintk(KERN_DEBUG "%s: MAC Address %s\n",
5220 dev->dev_addr[0], dev->dev_addr[1], dev->dev_addr[2], 5219 pci_name(pci_dev), print_mac(mac, dev->dev_addr));
5221 dev->dev_addr[3], dev->dev_addr[4], dev->dev_addr[5]);
5222 5220
5223 /* set mac address */ 5221 /* set mac address */
5224 nv_copy_mac_to_hw(dev); 5222 nv_copy_mac_to_hw(dev);
diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c
index 5a1a1165b48c..0db5e6fabe73 100644
--- a/drivers/net/gianfar.c
+++ b/drivers/net/gianfar.c
@@ -170,6 +170,7 @@ static int gfar_probe(struct platform_device *pdev)
170 struct resource *r; 170 struct resource *r;
171 int idx; 171 int idx;
172 int err = 0; 172 int err = 0;
173 DECLARE_MAC_BUF(mac);
173 174
174 einfo = (struct gianfar_platform_data *) pdev->dev.platform_data; 175 einfo = (struct gianfar_platform_data *) pdev->dev.platform_data;
175 176
@@ -356,10 +357,8 @@ static int gfar_probe(struct platform_device *pdev)
356 gfar_init_sysfs(dev); 357 gfar_init_sysfs(dev);
357 358
358 /* Print out the device info */ 359 /* Print out the device info */
359 printk(KERN_INFO DEVICE_NAME, dev->name); 360 printk(KERN_INFO DEVICE_NAME "%s\n",
360 for (idx = 0; idx < 6; idx++) 361 dev->name, print_mac(mac, dev->dev_addr));
361 printk("%2.2x%c", dev->dev_addr[idx], idx == 5 ? ' ' : ':');
362 printk("\n");
363 362
364 /* Even more device info helps when determining which kernel */ 363 /* Even more device info helps when determining which kernel */
365 /* provided which set of benchmarks. */ 364 /* provided which set of benchmarks. */
diff --git a/drivers/net/hamachi.c b/drivers/net/hamachi.c
index da12b3db023f..015ed3a4057f 100644
--- a/drivers/net/hamachi.c
+++ b/drivers/net/hamachi.c
@@ -580,6 +580,7 @@ static int __devinit hamachi_init_one (struct pci_dev *pdev,
580 void *ring_space; 580 void *ring_space;
581 dma_addr_t ring_dma; 581 dma_addr_t ring_dma;
582 int ret = -ENOMEM; 582 int ret = -ENOMEM;
583 DECLARE_MAC_BUF(mac);
583 584
584/* when built into the kernel, we only print version if device is found */ 585/* when built into the kernel, we only print version if device is found */
585#ifndef MODULE 586#ifndef MODULE
@@ -741,12 +742,9 @@ static int __devinit hamachi_init_one (struct pci_dev *pdev,
741 goto err_out_unmap_rx; 742 goto err_out_unmap_rx;
742 } 743 }
743 744
744 printk(KERN_INFO "%s: %s type %x at %p, ", 745 printk(KERN_INFO "%s: %s type %x at %p, %s, IRQ %d.\n",
745 dev->name, chip_tbl[chip_id].name, readl(ioaddr + ChipRev), 746 dev->name, chip_tbl[chip_id].name, readl(ioaddr + ChipRev),
746 ioaddr); 747 ioaddr, print_mac(mac, dev->dev_addr), irq);
747 for (i = 0; i < 5; i++)
748 printk("%2.2x:", dev->dev_addr[i]);
749 printk("%2.2x, IRQ %d.\n", dev->dev_addr[i], irq);
750 i = readb(ioaddr + PCIClkMeas); 748 i = readb(ioaddr + PCIClkMeas);
751 printk(KERN_INFO "%s: %d-bit %d Mhz PCI bus (%d), Virtual Jumpers " 749 printk(KERN_INFO "%s: %d-bit %d Mhz PCI bus (%d), Virtual Jumpers "
752 "%2.2x, LPA %4.4x.\n", 750 "%2.2x, LPA %4.4x.\n",
diff --git a/drivers/net/hamradio/bpqether.c b/drivers/net/hamradio/bpqether.c
index df09210f7351..c05bc37df356 100644
--- a/drivers/net/hamradio/bpqether.c
+++ b/drivers/net/hamradio/bpqether.c
@@ -64,7 +64,7 @@
64#include <net/ax25.h> 64#include <net/ax25.h>
65#include <linux/inet.h> 65#include <linux/inet.h>
66#include <linux/netdevice.h> 66#include <linux/netdevice.h>
67#include <linux/if_ether.h> 67#include <linux/etherdevice.h>
68#include <linux/if_arp.h> 68#include <linux/if_arp.h>
69#include <linux/skbuff.h> 69#include <linux/skbuff.h>
70#include <net/sock.h> 70#include <net/sock.h>
@@ -95,7 +95,6 @@ static char bpq_eth_addr[6];
95 95
96static int bpq_rcv(struct sk_buff *, struct net_device *, struct packet_type *, struct net_device *); 96static int bpq_rcv(struct sk_buff *, struct net_device *, struct packet_type *, struct net_device *);
97static int bpq_device_event(struct notifier_block *, unsigned long, void *); 97static int bpq_device_event(struct notifier_block *, unsigned long, void *);
98static const char *bpq_print_ethaddr(const unsigned char *);
99 98
100static struct packet_type bpq_packet_type = { 99static struct packet_type bpq_packet_type = {
101 .type = __constant_htons(ETH_P_BPQ), 100 .type = __constant_htons(ETH_P_BPQ),
@@ -383,16 +382,6 @@ static int bpq_close(struct net_device *dev)
383/* 382/*
384 * Proc filesystem 383 * Proc filesystem
385 */ 384 */
386static const char * bpq_print_ethaddr(const unsigned char *e)
387{
388 static char buf[18];
389
390 sprintf(buf, "%2.2X:%2.2X:%2.2X:%2.2X:%2.2X:%2.2X",
391 e[0], e[1], e[2], e[3], e[4], e[5]);
392
393 return buf;
394}
395
396static void *bpq_seq_start(struct seq_file *seq, loff_t *pos) 385static void *bpq_seq_start(struct seq_file *seq, loff_t *pos)
397{ 386{
398 int i = 1; 387 int i = 1;
@@ -438,14 +427,16 @@ static int bpq_seq_show(struct seq_file *seq, void *v)
438 "dev ether destination accept from\n"); 427 "dev ether destination accept from\n");
439 else { 428 else {
440 const struct bpqdev *bpqdev = v; 429 const struct bpqdev *bpqdev = v;
430 DECLARE_MAC_BUF(mac);
441 431
442 seq_printf(seq, "%-5s %-10s %s ", 432 seq_printf(seq, "%-5s %-10s %s ",
443 bpqdev->axdev->name, bpqdev->ethdev->name, 433 bpqdev->axdev->name, bpqdev->ethdev->name,
444 bpq_print_ethaddr(bpqdev->dest_addr)); 434 print_mac(mac, bpqdev->dest_addr));
445 435
446 seq_printf(seq, "%s\n", 436 if (is_multicast_ether_addr(bpqdev->acpt_addr))
447 (bpqdev->acpt_addr[0] & 0x01) ? "*" 437 seq_printf(seq, "*\n");
448 : bpq_print_ethaddr(bpqdev->acpt_addr)); 438 else
439 seq_printf(seq, "%s\n", print_mac(mac, bpqdev->acpt_addr));
449 440
450 } 441 }
451 return 0; 442 return 0;
diff --git a/drivers/net/hp-plus.c b/drivers/net/hp-plus.c
index 8d4f810fa288..c2c4f49d7578 100644
--- a/drivers/net/hp-plus.c
+++ b/drivers/net/hp-plus.c
@@ -166,6 +166,7 @@ static int __init hpp_probe1(struct net_device *dev, int ioaddr)
166 const char name[] = "HP-PC-LAN+"; 166 const char name[] = "HP-PC-LAN+";
167 int mem_start; 167 int mem_start;
168 static unsigned version_printed; 168 static unsigned version_printed;
169 DECLARE_MAC_BUF(mac);
169 170
170 if (!request_region(ioaddr, HP_IO_EXTENT, DRV_NAME)) 171 if (!request_region(ioaddr, HP_IO_EXTENT, DRV_NAME))
171 return -EBUSY; 172 return -EBUSY;
@@ -180,7 +181,7 @@ static int __init hpp_probe1(struct net_device *dev, int ioaddr)
180 if (ei_debug && version_printed++ == 0) 181 if (ei_debug && version_printed++ == 0)
181 printk(version); 182 printk(version);
182 183
183 printk("%s: %s at %#3x,", dev->name, name, ioaddr); 184 printk("%s: %s at %#3x, ", dev->name, name, ioaddr);
184 185
185 /* Retrieve and checksum the station address. */ 186 /* Retrieve and checksum the station address. */
186 outw(MAC_Page, ioaddr + HP_PAGING); 187 outw(MAC_Page, ioaddr + HP_PAGING);
@@ -189,10 +190,11 @@ static int __init hpp_probe1(struct net_device *dev, int ioaddr)
189 unsigned char inval = inb(ioaddr + 8 + i); 190 unsigned char inval = inb(ioaddr + 8 + i);
190 dev->dev_addr[i] = inval; 191 dev->dev_addr[i] = inval;
191 checksum += inval; 192 checksum += inval;
192 printk(" %2.2x", inval);
193 } 193 }
194 checksum += inb(ioaddr + 14); 194 checksum += inb(ioaddr + 14);
195 195
196 printk("%s", print_mac(mac, dev->dev_addr));
197
196 if (checksum != 0xff) { 198 if (checksum != 0xff) {
197 printk(" bad checksum %2.2x.\n", checksum); 199 printk(" bad checksum %2.2x.\n", checksum);
198 retval = -ENODEV; 200 retval = -ENODEV;
diff --git a/drivers/net/hp.c b/drivers/net/hp.c
index 1f11126de354..c649a8019beb 100644
--- a/drivers/net/hp.c
+++ b/drivers/net/hp.c
@@ -127,6 +127,7 @@ static int __init hp_probe1(struct net_device *dev, int ioaddr)
127 int i, retval, board_id, wordmode; 127 int i, retval, board_id, wordmode;
128 const char *name; 128 const char *name;
129 static unsigned version_printed; 129 static unsigned version_printed;
130 DECLARE_MAC_BUF(mac);
130 131
131 if (!request_region(ioaddr, HP_IO_EXTENT, DRV_NAME)) 132 if (!request_region(ioaddr, HP_IO_EXTENT, DRV_NAME))
132 return -EBUSY; 133 return -EBUSY;
@@ -158,7 +159,9 @@ static int __init hp_probe1(struct net_device *dev, int ioaddr)
158 printk("%s: %s (ID %02x) at %#3x,", dev->name, name, board_id, ioaddr); 159 printk("%s: %s (ID %02x) at %#3x,", dev->name, name, board_id, ioaddr);
159 160
160 for(i = 0; i < ETHER_ADDR_LEN; i++) 161 for(i = 0; i < ETHER_ADDR_LEN; i++)
161 printk(" %2.2x", dev->dev_addr[i] = inb(ioaddr + i)); 162 dev->dev_addr[i] = inb(ioaddr + i);
163
164 printk(" %s", print_mac(mac, dev->dev_addr));
162 165
163 /* Snarf the interrupt now. Someday this could be moved to open(). */ 166 /* Snarf the interrupt now. Someday this could be moved to open(). */
164 if (dev->irq < 2) { 167 if (dev->irq < 2) {
diff --git a/drivers/net/hp100.c b/drivers/net/hp100.c
index 406d6525e222..e4fde17e2841 100644
--- a/drivers/net/hp100.c
+++ b/drivers/net/hp100.c
@@ -2093,9 +2093,9 @@ static void hp100_set_multicast_list(struct net_device *dev)
2093 addrs = dmi->dmi_addr; 2093 addrs = dmi->dmi_addr;
2094 if ((*addrs & 0x01) == 0x01) { /* multicast address? */ 2094 if ((*addrs & 0x01) == 0x01) { /* multicast address? */
2095#ifdef HP100_DEBUG 2095#ifdef HP100_DEBUG
2096 printk("hp100: %s: multicast = %02x:%02x:%02x:%02x:%02x:%02x, ", 2096 DECLARE_MAC_BUF(mac);
2097 dev->name, addrs[0], addrs[1], addrs[2], 2097 printk("hp100: %s: multicast = %s, ",
2098 addrs[3], addrs[4], addrs[5]); 2098 dev->name, print_mac(mac, addrs));
2099#endif 2099#endif
2100 for (j = idx = 0; j < 6; j++) { 2100 for (j = idx = 0; j < 6; j++) {
2101 idx ^= *addrs++ & 0x3f; 2101 idx ^= *addrs++ & 0x3f;
diff --git a/drivers/net/hydra.c b/drivers/net/hydra.c
index 31300a9dd965..b96cf2dcb109 100644
--- a/drivers/net/hydra.c
+++ b/drivers/net/hydra.c
@@ -103,6 +103,7 @@ static int __devinit hydra_init(struct zorro_dev *z)
103 int start_page, stop_page; 103 int start_page, stop_page;
104 int j; 104 int j;
105 int err; 105 int err;
106 DECLARE_MAC_BUF(mac);
106 107
107 static u32 hydra_offsets[16] = { 108 static u32 hydra_offsets[16] = {
108 0x00, 0x02, 0x04, 0x06, 0x08, 0x0a, 0x0c, 0x0e, 109 0x00, 0x02, 0x04, 0x06, 0x08, 0x0a, 0x0c, 0x0e,
@@ -162,10 +163,8 @@ static int __devinit hydra_init(struct zorro_dev *z)
162 zorro_set_drvdata(z, dev); 163 zorro_set_drvdata(z, dev);
163 164
164 printk(KERN_INFO "%s: Hydra at 0x%08lx, address " 165 printk(KERN_INFO "%s: Hydra at 0x%08lx, address "
165 "%02x:%02x:%02x:%02x:%02x:%02x (hydra.c " HYDRA_VERSION ")\n", 166 "%s (hydra.c " HYDRA_VERSION ")\n",
166 dev->name, z->resource.start, dev->dev_addr[0], dev->dev_addr[1], 167 dev->name, z->resource.start, print_mac(mac, dev->dev_addr));
167 dev->dev_addr[2], dev->dev_addr[3], dev->dev_addr[4],
168 dev->dev_addr[5]);
169 168
170 return 0; 169 return 0;
171} 170}
diff --git a/drivers/net/ibm_emac/ibm_emac_core.c b/drivers/net/ibm_emac/ibm_emac_core.c
index d7da56b105cb..7d4fa7644e4b 100644
--- a/drivers/net/ibm_emac/ibm_emac_core.c
+++ b/drivers/net/ibm_emac/ibm_emac_core.c
@@ -353,10 +353,9 @@ static void emac_hash_mc(struct ocp_enet_private *dev)
353 353
354 for (dmi = dev->ndev->mc_list; dmi; dmi = dmi->next) { 354 for (dmi = dev->ndev->mc_list; dmi; dmi = dmi->next) {
355 int bit; 355 int bit;
356 DBG2("%d: mc %02x:%02x:%02x:%02x:%02x:%02x" NL, 356 DECLARE_MAC_BUF(mac);
357 dev->def->index, 357 DBG2("%d: mc %s" NL,
358 dmi->dmi_addr[0], dmi->dmi_addr[1], dmi->dmi_addr[2], 358 dev->def->index, print_mac(mac, dmi->dmi_addr));
359 dmi->dmi_addr[3], dmi->dmi_addr[4], dmi->dmi_addr[5]);
360 359
361 bit = 63 - (ether_crc(ETH_ALEN, dmi->dmi_addr) >> 26); 360 bit = 63 - (ether_crc(ETH_ALEN, dmi->dmi_addr) >> 26);
362 gaht[bit >> 4] |= 0x8000 >> (bit & 0x0f); 361 gaht[bit >> 4] |= 0x8000 >> (bit & 0x0f);
@@ -1940,6 +1939,7 @@ static int __init emac_probe(struct ocp_device *ocpdev)
1940 struct ocp_device *maldev; 1939 struct ocp_device *maldev;
1941 struct ocp_enet_private *dev; 1940 struct ocp_enet_private *dev;
1942 int err, i; 1941 int err, i;
1942 DECLARE_MAC_BUF(mac);
1943 1943
1944 DBG("%d: probe" NL, ocpdev->def->index); 1944 DBG("%d: probe" NL, ocpdev->def->index);
1945 1945
@@ -2188,10 +2188,8 @@ static int __init emac_probe(struct ocp_device *ocpdev)
2188 2188
2189 ocp_set_drvdata(ocpdev, dev); 2189 ocp_set_drvdata(ocpdev, dev);
2190 2190
2191 printk("%s: emac%d, MAC %02x:%02x:%02x:%02x:%02x:%02x\n", 2191 printk("%s: emac%d, MAC %s\n",
2192 ndev->name, dev->def->index, 2192 ndev->name, dev->def->index, print_mac(mac, ndev->dev_addr));
2193 ndev->dev_addr[0], ndev->dev_addr[1], ndev->dev_addr[2],
2194 ndev->dev_addr[3], ndev->dev_addr[4], ndev->dev_addr[5]);
2195 2193
2196 if (dev->phy.address >= 0) 2194 if (dev->phy.address >= 0)
2197 printk("%s: found %s PHY (0x%02x)\n", ndev->name, 2195 printk("%s: found %s PHY (0x%02x)\n", ndev->name,
diff --git a/drivers/net/ibmlana.c b/drivers/net/ibmlana.c
index eebf39acf586..91d83aca6bc7 100644
--- a/drivers/net/ibmlana.c
+++ b/drivers/net/ibmlana.c
@@ -898,6 +898,7 @@ static int ibmlana_probe(struct net_device *dev)
898 int base = 0, irq = 0, iobase = 0, memlen = 0; 898 int base = 0, irq = 0, iobase = 0, memlen = 0;
899 ibmlana_priv *priv; 899 ibmlana_priv *priv;
900 ibmlana_medium medium; 900 ibmlana_medium medium;
901 DECLARE_MAC_BUF(mac);
901 902
902 /* can't work without an MCA bus ;-) */ 903 /* can't work without an MCA bus ;-) */
903 if (MCA_bus == 0) 904 if (MCA_bus == 0)
@@ -981,11 +982,10 @@ static int ibmlana_probe(struct net_device *dev)
981 /* print config */ 982 /* print config */
982 983
983 printk(KERN_INFO "%s: IRQ %d, I/O %#lx, memory %#lx-%#lx, " 984 printk(KERN_INFO "%s: IRQ %d, I/O %#lx, memory %#lx-%#lx, "
984 "MAC address %02x:%02x:%02x:%02x:%02x:%02x.\n", 985 "MAC address %s.\n",
985 dev->name, priv->realirq, dev->base_addr, 986 dev->name, priv->realirq, dev->base_addr,
986 dev->mem_start, dev->mem_end - 1, 987 dev->mem_start, dev->mem_end - 1,
987 dev->dev_addr[0], dev->dev_addr[1], dev->dev_addr[2], 988 print_mac(mac, dev->dev_addr));
988 dev->dev_addr[3], dev->dev_addr[4], dev->dev_addr[5]);
989 printk(KERN_INFO "%s: %s medium\n", dev->name, MediaNames[priv->medium]); 989 printk(KERN_INFO "%s: %s medium\n", dev->name, MediaNames[priv->medium]);
990 990
991 /* reset board */ 991 /* reset board */
diff --git a/drivers/net/ibmveth.c b/drivers/net/ibmveth.c
index 0636883449fc..228973484ed8 100644
--- a/drivers/net/ibmveth.c
+++ b/drivers/net/ibmveth.c
@@ -1276,16 +1276,13 @@ static int ibmveth_seq_show(struct seq_file *seq, void *v)
1276 struct ibmveth_adapter *adapter = seq->private; 1276 struct ibmveth_adapter *adapter = seq->private;
1277 char *current_mac = ((char*) &adapter->netdev->dev_addr); 1277 char *current_mac = ((char*) &adapter->netdev->dev_addr);
1278 char *firmware_mac = ((char*) &adapter->mac_addr) ; 1278 char *firmware_mac = ((char*) &adapter->mac_addr) ;
1279 DECLARE_MAC_BUF(mac);
1279 1280
1280 seq_printf(seq, "%s %s\n\n", ibmveth_driver_string, ibmveth_driver_version); 1281 seq_printf(seq, "%s %s\n\n", ibmveth_driver_string, ibmveth_driver_version);
1281 1282
1282 seq_printf(seq, "Unit Address: 0x%x\n", adapter->vdev->unit_address); 1283 seq_printf(seq, "Unit Address: 0x%x\n", adapter->vdev->unit_address);
1283 seq_printf(seq, "Current MAC: %02X:%02X:%02X:%02X:%02X:%02X\n", 1284 seq_printf(seq, "Current MAC: %s\n", print_mac(mac, current_mac));
1284 current_mac[0], current_mac[1], current_mac[2], 1285 seq_printf(seq, "Firmware MAC: %s\n", print_mac(mac, firmware_mac));
1285 current_mac[3], current_mac[4], current_mac[5]);
1286 seq_printf(seq, "Firmware MAC: %02X:%02X:%02X:%02X:%02X:%02X\n",
1287 firmware_mac[0], firmware_mac[1], firmware_mac[2],
1288 firmware_mac[3], firmware_mac[4], firmware_mac[5]);
1289 1286
1290 seq_printf(seq, "\nAdapter Statistics:\n"); 1287 seq_printf(seq, "\nAdapter Statistics:\n");
1291 seq_printf(seq, " TX: vio_map_single failres: %ld\n", adapter->tx_map_failed); 1288 seq_printf(seq, " TX: vio_map_single failres: %ld\n", adapter->tx_map_failed);
diff --git a/drivers/net/ioc3-eth.c b/drivers/net/ioc3-eth.c
index 05d2bc15144e..373f72cdbe8e 100644
--- a/drivers/net/ioc3-eth.c
+++ b/drivers/net/ioc3-eth.c
@@ -443,18 +443,12 @@ static void ioc3_get_eaddr_nic(struct ioc3_private *ip)
443 */ 443 */
444static void ioc3_get_eaddr(struct ioc3_private *ip) 444static void ioc3_get_eaddr(struct ioc3_private *ip)
445{ 445{
446 int i; 446 DECLARE_MAC_BUF(mac);
447
448 447
449 ioc3_get_eaddr_nic(ip); 448 ioc3_get_eaddr_nic(ip);
450 449
451 printk("Ethernet address is "); 450 printk("Ethernet address is %s.\n",
452 for (i = 0; i < 6; i++) { 451 print_mac(mac, priv_netdev(ip)->dev_addr));
453 printk("%02x", priv_netdev(ip)->dev_addr[i]);
454 if (i < 5)
455 printk(":");
456 }
457 printk(".\n");
458} 452}
459 453
460static void __ioc3_set_mac_address(struct net_device *dev) 454static void __ioc3_set_mac_address(struct net_device *dev)
diff --git a/drivers/net/isa-skeleton.c b/drivers/net/isa-skeleton.c
index 54178111eec5..d6ff26af37b3 100644
--- a/drivers/net/isa-skeleton.c
+++ b/drivers/net/isa-skeleton.c
@@ -192,6 +192,7 @@ static int __init netcard_probe1(struct net_device *dev, int ioaddr)
192 static unsigned version_printed; 192 static unsigned version_printed;
193 int i; 193 int i;
194 int err = -ENODEV; 194 int err = -ENODEV;
195 DECLARE_MAC_BUF(mac);
195 196
196 /* Grab the region so that no one else tries to probe our ioports. */ 197 /* Grab the region so that no one else tries to probe our ioports. */
197 if (!request_region(ioaddr, NETCARD_IO_EXTENT, cardname)) 198 if (!request_region(ioaddr, NETCARD_IO_EXTENT, cardname))
@@ -217,7 +218,9 @@ static int __init netcard_probe1(struct net_device *dev, int ioaddr)
217 218
218 /* Retrieve and print the ethernet address. */ 219 /* Retrieve and print the ethernet address. */
219 for (i = 0; i < 6; i++) 220 for (i = 0; i < 6; i++)
220 printk(" %2.2x", dev->dev_addr[i] = inb(ioaddr + i)); 221 dev->dev_addr[i] = inb(ioaddr + i);
222
223 printk("%s", print_mac(mac, dev->dev_addr));
221 224
222 err = -EAGAIN; 225 err = -EAGAIN;
223#ifdef jumpered_interrupts 226#ifdef jumpered_interrupts
diff --git a/drivers/net/jazzsonic.c b/drivers/net/jazzsonic.c
index 13847a3e43e5..d3825c8ee994 100644
--- a/drivers/net/jazzsonic.c
+++ b/drivers/net/jazzsonic.c
@@ -209,6 +209,7 @@ static int __init jazz_sonic_probe(struct platform_device *pdev)
209 struct resource *res; 209 struct resource *res;
210 int err = 0; 210 int err = 0;
211 int i; 211 int i;
212 DECLARE_MAC_BUF(mac);
212 213
213 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 214 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
214 if (!res) 215 if (!res)
@@ -233,13 +234,8 @@ static int __init jazz_sonic_probe(struct platform_device *pdev)
233 if (err) 234 if (err)
234 goto out1; 235 goto out1;
235 236
236 printk("%s: MAC ", dev->name); 237 printk("%s: MAC %s IRQ %d\n",
237 for (i = 0; i < 6; i++) { 238 dev->name, print_mac(mac, dev->dev_addr), dev->irq);
238 printk("%2.2x", dev->dev_addr[i]);
239 if (i < 5)
240 printk(":");
241 }
242 printk(" IRQ %d\n", dev->irq);
243 239
244 return 0; 240 return 0;
245 241
diff --git a/drivers/net/lance.c b/drivers/net/lance.c
index 7b17212d687e..977ed3401bb3 100644
--- a/drivers/net/lance.c
+++ b/drivers/net/lance.c
@@ -466,6 +466,7 @@ static int __init lance_probe1(struct net_device *dev, int ioaddr, int irq, int
466 unsigned long flags; 466 unsigned long flags;
467 int err = -ENOMEM; 467 int err = -ENOMEM;
468 void __iomem *bios; 468 void __iomem *bios;
469 DECLARE_MAC_BUF(mac);
469 470
470 /* First we look for special cases. 471 /* First we look for special cases.
471 Check for HP's on-board ethernet by looking for 'HP' in the BIOS. 472 Check for HP's on-board ethernet by looking for 'HP' in the BIOS.
@@ -522,12 +523,13 @@ static int __init lance_probe1(struct net_device *dev, int ioaddr, int irq, int
522 /* We can't allocate dev->priv from alloc_etherdev() because it must 523 /* We can't allocate dev->priv from alloc_etherdev() because it must
523 a ISA DMA-able region. */ 524 a ISA DMA-able region. */
524 chipname = chip_table[lance_version].name; 525 chipname = chip_table[lance_version].name;
525 printk("%s: %s at %#3x,", dev->name, chipname, ioaddr); 526 printk("%s: %s at %#3x, ", dev->name, chipname, ioaddr);
526 527
527 /* There is a 16 byte station address PROM at the base address. 528 /* There is a 16 byte station address PROM at the base address.
528 The first six bytes are the station address. */ 529 The first six bytes are the station address. */
529 for (i = 0; i < 6; i++) 530 for (i = 0; i < 6; i++)
530 printk(" %2.2x", dev->dev_addr[i] = inb(ioaddr + i)); 531 dev->dev_addr[i] = inb(ioaddr + i);
532 printk("%s", print_mac(mac, dev->dev_addr));
531 533
532 dev->base_addr = ioaddr; 534 dev->base_addr = ioaddr;
533 /* Make certain the data structures used by the LANCE are aligned and DMAble. */ 535 /* Make certain the data structures used by the LANCE are aligned and DMAble. */
diff --git a/drivers/net/lguest_net.c b/drivers/net/lguest_net.c
index 7f34c92bcd86..abce2ee8430a 100644
--- a/drivers/net/lguest_net.c
+++ b/drivers/net/lguest_net.c
@@ -235,9 +235,9 @@ static int lguestnet_start_xmit(struct sk_buff *skb, struct net_device *dev)
235 struct lguestnet_info *info = netdev_priv(dev); 235 struct lguestnet_info *info = netdev_priv(dev);
236 /* Extract the destination ethernet address from the packet. */ 236 /* Extract the destination ethernet address from the packet. */
237 const unsigned char *dest = ((struct ethhdr *)skb->data)->h_dest; 237 const unsigned char *dest = ((struct ethhdr *)skb->data)->h_dest;
238 DECLARE_MAC_BUF(mac);
238 239
239 pr_debug("%s: xmit %02x:%02x:%02x:%02x:%02x:%02x\n", 240 pr_debug("%s: xmit %s\n", dev->name, print_mac(mac, dest));
240 dev->name, dest[0],dest[1],dest[2],dest[3],dest[4],dest[5]);
241 241
242 /* If it's a multicast packet, we broadcast to everyone. That's not 242 /* If it's a multicast packet, we broadcast to everyone. That's not
243 * very efficient, but there are very few applications which actually 243 * very efficient, but there are very few applications which actually
diff --git a/drivers/net/lib82596.c b/drivers/net/lib82596.c
index afa4638052a2..ffaa14f2cd01 100644
--- a/drivers/net/lib82596.c
+++ b/drivers/net/lib82596.c
@@ -1034,15 +1034,12 @@ static int i596_start_xmit(struct sk_buff *skb, struct net_device *dev)
1034 1034
1035static void print_eth(unsigned char *add, char *str) 1035static void print_eth(unsigned char *add, char *str)
1036{ 1036{
1037 int i; 1037 DECLARE_MAC_BUF(mac);
1038 DECLARE_MAC_BUF(mac2);
1038 1039
1039 printk(KERN_DEBUG "i596 0x%p, ", add); 1040 printk(KERN_DEBUG "i596 0x%p, %s --> %s %02X%02X, %s\n",
1040 for (i = 0; i < 6; i++) 1041 add, print_mac(mac, add + 6), print_mac(mac2, add),
1041 printk(" %02X", add[i + 6]); 1042 add[12], add[13], str);
1042 printk(" -->");
1043 for (i = 0; i < 6; i++)
1044 printk(" %02X", add[i]);
1045 printk(" %02X%02X, %s\n", add[12], add[13], str);
1046} 1043}
1047 1044
1048static int __devinit i82596_probe(struct net_device *dev) 1045static int __devinit i82596_probe(struct net_device *dev)
@@ -1352,6 +1349,7 @@ static void set_multicast_list(struct net_device *dev)
1352 struct i596_private *lp = netdev_priv(dev); 1349 struct i596_private *lp = netdev_priv(dev);
1353 struct i596_dma *dma = lp->dma; 1350 struct i596_dma *dma = lp->dma;
1354 int config = 0, cnt; 1351 int config = 0, cnt;
1352 DECLARE_MAC_BUF(mac);
1355 1353
1356 DEB(DEB_MULTI, 1354 DEB(DEB_MULTI,
1357 printk(KERN_DEBUG 1355 printk(KERN_DEBUG
@@ -1415,8 +1413,8 @@ static void set_multicast_list(struct net_device *dev)
1415 if (i596_debug > 1) 1413 if (i596_debug > 1)
1416 DEB(DEB_MULTI, 1414 DEB(DEB_MULTI,
1417 printk(KERN_DEBUG 1415 printk(KERN_DEBUG
1418 "%s: Adding address %02x:%02x:%02x:%02x:%02x:%02x\n", 1416 "%s: Adding address %s\n",
1419 dev->name, cp[0], cp[1], cp[2], cp[3], cp[4], cp[5])); 1417 dev->name, print_mac(mac, cp)));
1420 } 1418 }
1421 DMA_WBACK_INV(dev, &dma->mc_cmd, sizeof(struct mc_cmd)); 1419 DMA_WBACK_INV(dev, &dma->mc_cmd, sizeof(struct mc_cmd));
1422 i596_add_cmd(dev, &cmd->cmd); 1420 i596_add_cmd(dev, &cmd->cmd);
diff --git a/drivers/net/lne390.c b/drivers/net/lne390.c
index 2dd396983213..b36989097883 100644
--- a/drivers/net/lne390.c
+++ b/drivers/net/lne390.c
@@ -169,6 +169,7 @@ static int __init lne390_probe1(struct net_device *dev, int ioaddr)
169{ 169{
170 int i, revision, ret; 170 int i, revision, ret;
171 unsigned long eisa_id; 171 unsigned long eisa_id;
172 DECLARE_MAC_BUF(mac);
172 173
173 if (inb_p(ioaddr + LNE390_ID_PORT) == 0xff) return -ENODEV; 174 if (inb_p(ioaddr + LNE390_ID_PORT) == 0xff) return -ENODEV;
174 175
@@ -200,10 +201,12 @@ static int __init lne390_probe1(struct net_device *dev, int ioaddr)
200 } 201 }
201#endif 202#endif
202 203
203 printk("lne390.c: LNE390%X in EISA slot %d, address", 0xa+revision, ioaddr/0x1000);
204 for(i = 0; i < ETHER_ADDR_LEN; i++) 204 for(i = 0; i < ETHER_ADDR_LEN; i++)
205 printk(" %02x", (dev->dev_addr[i] = inb(ioaddr + LNE390_SA_PROM + i))); 205 dev->dev_addr[i] = inb(ioaddr + LNE390_SA_PROM + i);
206 printk(".\nlne390.c: "); 206 printk("lne390.c: LNE390%X in EISA slot %d, address %s.\n",
207 0xa+revision, ioaddr/0x1000, print_mac(mac, dev->dev_addr));
208
209 printk("lne390.c: ");
207 210
208 /* Snarf the interrupt now. CFG file has them all listed as `edge' with share=NO */ 211 /* Snarf the interrupt now. CFG file has them all listed as `edge' with share=NO */
209 if (dev->irq == 0) { 212 if (dev->irq == 0) {
diff --git a/drivers/net/mac89x0.c b/drivers/net/mac89x0.c
index f6f3fdfe41db..30854f094965 100644
--- a/drivers/net/mac89x0.c
+++ b/drivers/net/mac89x0.c
@@ -181,6 +181,7 @@ struct net_device * __init mac89x0_probe(int unit)
181 unsigned long ioaddr; 181 unsigned long ioaddr;
182 unsigned short sig; 182 unsigned short sig;
183 int err = -ENODEV; 183 int err = -ENODEV;
184 DECLARE_MAC_BUF(mac);
184 185
185 dev = alloc_etherdev(sizeof(struct net_local)); 186 dev = alloc_etherdev(sizeof(struct net_local));
186 if (!dev) 187 if (!dev)
@@ -272,13 +273,11 @@ struct net_device * __init mac89x0_probe(int unit)
272 } 273 }
273 274
274 dev->irq = SLOT2IRQ(slot); 275 dev->irq = SLOT2IRQ(slot);
275 printk(" IRQ %d ADDR ", dev->irq);
276 276
277 /* print the ethernet address. */ 277 /* print the IRQ and ethernet address. */
278 for (i = 0; i < ETH_ALEN; i++) 278
279 printk("%2.2x%s", dev->dev_addr[i], 279 printk(" IRQ %d ADDR %s\n",
280 ((i < ETH_ALEN-1) ? ":" : "")); 280 dev->irq, print_mac(mac, dev->dev_addr));
281 printk("\n");
282 281
283 dev->open = net_open; 282 dev->open = net_open;
284 dev->stop = net_close; 283 dev->stop = net_close;
diff --git a/drivers/net/macb.c b/drivers/net/macb.c
index c6707580c305..047ea7be4850 100644
--- a/drivers/net/macb.c
+++ b/drivers/net/macb.c
@@ -1071,6 +1071,7 @@ static int __devinit macb_probe(struct platform_device *pdev)
1071 unsigned long pclk_hz; 1071 unsigned long pclk_hz;
1072 u32 config; 1072 u32 config;
1073 int err = -ENXIO; 1073 int err = -ENXIO;
1074 DECLARE_MAC_BUF(mac);
1074 1075
1075 regs = platform_get_resource(pdev, IORESOURCE_MEM, 0); 1076 regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);
1076 if (!regs) { 1077 if (!regs) {
@@ -1190,10 +1191,9 @@ static int __devinit macb_probe(struct platform_device *pdev)
1190 platform_set_drvdata(pdev, dev); 1191 platform_set_drvdata(pdev, dev);
1191 1192
1192 printk(KERN_INFO "%s: Atmel MACB at 0x%08lx irq %d " 1193 printk(KERN_INFO "%s: Atmel MACB at 0x%08lx irq %d "
1193 "(%02x:%02x:%02x:%02x:%02x:%02x)\n", 1194 "(%s)\n",
1194 dev->name, dev->base_addr, dev->irq, 1195 dev->name, dev->base_addr, dev->irq,
1195 dev->dev_addr[0], dev->dev_addr[1], dev->dev_addr[2], 1196 print_mac(mac, dev->dev_addr));
1196 dev->dev_addr[3], dev->dev_addr[4], dev->dev_addr[5]);
1197 1197
1198 phydev = bp->phy_dev; 1198 phydev = bp->phy_dev;
1199 printk(KERN_INFO "%s: attached PHY driver [%s] " 1199 printk(KERN_INFO "%s: attached PHY driver [%s] "
diff --git a/drivers/net/mace.c b/drivers/net/mace.c
index ee132b1e09b0..95ebe72f320f 100644
--- a/drivers/net/mace.c
+++ b/drivers/net/mace.c
@@ -101,6 +101,7 @@ static int __devinit mace_probe(struct macio_dev *mdev, const struct of_device_i
101 struct mace_data *mp; 101 struct mace_data *mp;
102 const unsigned char *addr; 102 const unsigned char *addr;
103 int j, rev, rc = -EBUSY; 103 int j, rev, rc = -EBUSY;
104 DECLARE_MAC_BUF(mac);
104 105
105 if (macio_resource_count(mdev) != 3 || macio_irq_count(mdev) != 3) { 106 if (macio_resource_count(mdev) != 3 || macio_irq_count(mdev) != 3) {
106 printk(KERN_ERR "can't use MACE %s: need 3 addrs and 3 irqs\n", 107 printk(KERN_ERR "can't use MACE %s: need 3 addrs and 3 irqs\n",
@@ -240,11 +241,9 @@ static int __devinit mace_probe(struct macio_dev *mdev, const struct of_device_i
240 goto err_free_rx_irq; 241 goto err_free_rx_irq;
241 } 242 }
242 243
243 printk(KERN_INFO "%s: MACE at", dev->name); 244 printk(KERN_INFO "%s: MACE at %s, chip revision %d.%d\n",
244 for (j = 0; j < 6; ++j) { 245 dev->name, print_mac(mac, dev->dev_addr),
245 printk("%c%.2x", (j? ':': ' '), dev->dev_addr[j]); 246 mp->chipid >> 8, mp->chipid & 0xff);
246 }
247 printk(", chip revision %d.%d\n", mp->chipid >> 8, mp->chipid & 0xff);
248 247
249 return 0; 248 return 0;
250 249
diff --git a/drivers/net/macmace.c b/drivers/net/macmace.c
index 57f7c1a2c1d7..6589239b79ee 100644
--- a/drivers/net/macmace.c
+++ b/drivers/net/macmace.c
@@ -194,6 +194,7 @@ static int __devinit mace_probe(struct platform_device *pdev)
194 unsigned char checksum = 0; 194 unsigned char checksum = 0;
195 static int found = 0; 195 static int found = 0;
196 int err; 196 int err;
197 DECLARE_MAC_BUF(mac);
197 198
198 if (found || macintosh_config->ether_type != MAC_ETHER_MACE) 199 if (found || macintosh_config->ether_type != MAC_ETHER_MACE)
199 return -ENODEV; 200 return -ENODEV;
@@ -248,9 +249,8 @@ static int __devinit mace_probe(struct platform_device *pdev)
248 dev->set_multicast_list = mace_set_multicast; 249 dev->set_multicast_list = mace_set_multicast;
249 dev->set_mac_address = mace_set_address; 250 dev->set_mac_address = mace_set_address;
250 251
251 printk(KERN_INFO "%s: 68K MACE, hardware address %.2X", dev->name, dev->dev_addr[0]); 252 printk(KERN_INFO "%s: 68K MACE, hardware address %s\n",
252 for (j = 1 ; j < 6 ; j++) printk(":%.2X", dev->dev_addr[j]); 253 dev->name, print_mac(mac, dev->dev_addr));
253 printk("\n");
254 254
255 err = register_netdev(dev); 255 err = register_netdev(dev);
256 if (!err) 256 if (!err)
diff --git a/drivers/net/macsonic.c b/drivers/net/macsonic.c
index a55a8399344c..b267161418ea 100644
--- a/drivers/net/macsonic.c
+++ b/drivers/net/macsonic.c
@@ -223,6 +223,7 @@ int __init mac_onboard_sonic_ethernet_addr(struct net_device* dev)
223 struct sonic_local *lp = netdev_priv(dev); 223 struct sonic_local *lp = netdev_priv(dev);
224 const int prom_addr = ONBOARD_SONIC_PROM_BASE; 224 const int prom_addr = ONBOARD_SONIC_PROM_BASE;
225 int i; 225 int i;
226 DECLARE_MAC_BUF(mac);
226 227
227 /* On NuBus boards we can sometimes look in the ROM resources. 228 /* On NuBus boards we can sometimes look in the ROM resources.
228 No such luck for comm-slot/onboard. */ 229 No such luck for comm-slot/onboard. */
@@ -266,13 +267,8 @@ int __init mac_onboard_sonic_ethernet_addr(struct net_device* dev)
266 dev->dev_addr[1] = val >> 8; 267 dev->dev_addr[1] = val >> 8;
267 dev->dev_addr[0] = val & 0xff; 268 dev->dev_addr[0] = val & 0xff;
268 269
269 printk(KERN_INFO "HW Address from CAM 15: "); 270 printk(KERN_INFO "HW Address from CAM 15: %s\n",
270 for (i = 0; i < 6; i++) { 271 print_mac(mac, dev->dev_addr));
271 printk("%2.2x", dev->dev_addr[i]);
272 if (i < 5)
273 printk(":");
274 }
275 printk("\n");
276 } else return 0; 272 } else return 0;
277 273
278 if (memcmp(dev->dev_addr, "\x08\x00\x07", 3) && 274 if (memcmp(dev->dev_addr, "\x08\x00\x07", 3) &&
@@ -567,7 +563,7 @@ static int __init mac_sonic_probe(struct platform_device *pdev)
567 struct net_device *dev; 563 struct net_device *dev;
568 struct sonic_local *lp; 564 struct sonic_local *lp;
569 int err; 565 int err;
570 int i; 566 DECLARE_MAC_BUF(mac);
571 567
572 dev = alloc_etherdev(sizeof(struct sonic_local)); 568 dev = alloc_etherdev(sizeof(struct sonic_local));
573 if (!dev) 569 if (!dev)
@@ -591,13 +587,8 @@ found:
591 if (err) 587 if (err)
592 goto out; 588 goto out;
593 589
594 printk("%s: MAC ", dev->name); 590 printk("%s: MAC %s IRQ %d\n",
595 for (i = 0; i < 6; i++) { 591 dev->name, print_mac(mac, dev->dev_addr), dev->irq);
596 printk("%2.2x", dev->dev_addr[i]);
597 if (i < 5)
598 printk(":");
599 }
600 printk(" IRQ %d\n", dev->irq);
601 592
602 return 0; 593 return 0;
603 594
diff --git a/drivers/net/meth.c b/drivers/net/meth.c
index fe5b6c372072..e25dbab67363 100644
--- a/drivers/net/meth.c
+++ b/drivers/net/meth.c
@@ -95,11 +95,11 @@ char o2meth_eaddr[8]={0,0,0,0,0,0,0,0};
95static inline void load_eaddr(struct net_device *dev) 95static inline void load_eaddr(struct net_device *dev)
96{ 96{
97 int i; 97 int i;
98 DPRINTK("Loading MAC Address: %02x:%02x:%02x:%02x:%02x:%02x\n", 98 DECLARE_MAC_BUF(mac);
99 (int)o2meth_eaddr[0]&0xFF,(int)o2meth_eaddr[1]&0xFF,(int)o2meth_eaddr[2]&0xFF, 99
100 (int)o2meth_eaddr[3]&0xFF,(int)o2meth_eaddr[4]&0xFF,(int)o2meth_eaddr[5]&0xFF);
101 for (i = 0; i < 6; i++) 100 for (i = 0; i < 6; i++)
102 dev->dev_addr[i] = o2meth_eaddr[i]; 101 dev->dev_addr[i] = o2meth_eaddr[i];
102 DPRINTK("Loading MAC Address: %s\n", print_mac(mac, dev->dev_addr));
103 mace->eth.mac_addr = (*(unsigned long*)o2meth_eaddr) >> 16; 103 mace->eth.mac_addr = (*(unsigned long*)o2meth_eaddr) >> 16;
104} 104}
105 105
diff --git a/drivers/net/mv643xx_eth.c b/drivers/net/mv643xx_eth.c
index 34df02cfdbe7..e379165d8375 100644
--- a/drivers/net/mv643xx_eth.c
+++ b/drivers/net/mv643xx_eth.c
@@ -784,6 +784,7 @@ static int mv643xx_eth_open(struct net_device *dev)
784 unsigned int port_num = mp->port_num; 784 unsigned int port_num = mp->port_num;
785 unsigned int size; 785 unsigned int size;
786 int err; 786 int err;
787 DECLARE_MAC_BUF(mac);
787 788
788 /* Clear any pending ethernet port interrupts */ 789 /* Clear any pending ethernet port interrupts */
789 mv_write(MV643XX_ETH_INTERRUPT_CAUSE_REG(port_num), 0); 790 mv_write(MV643XX_ETH_INTERRUPT_CAUSE_REG(port_num), 0);
@@ -1413,8 +1414,8 @@ static int mv643xx_eth_probe(struct platform_device *pdev)
1413 1414
1414 p = dev->dev_addr; 1415 p = dev->dev_addr;
1415 printk(KERN_NOTICE 1416 printk(KERN_NOTICE
1416 "%s: port %d with MAC address %02x:%02x:%02x:%02x:%02x:%02x\n", 1417 "%s: port %d with MAC address %s\n",
1417 dev->name, port_num, p[0], p[1], p[2], p[3], p[4], p[5]); 1418 dev->name, port_num, print_mac(mac, p));
1418 1419
1419 if (dev->features & NETIF_F_SG) 1420 if (dev->features & NETIF_F_SG)
1420 printk(KERN_NOTICE "%s: Scatter Gather Enabled\n", dev->name); 1421 printk(KERN_NOTICE "%s: Scatter Gather Enabled\n", dev->name);
diff --git a/drivers/net/mvme147.c b/drivers/net/mvme147.c
index 837ad0f2b05d..86c9c06433cb 100644
--- a/drivers/net/mvme147.c
+++ b/drivers/net/mvme147.c
@@ -67,6 +67,7 @@ struct net_device * __init mvme147lance_probe(int unit)
67 u_long *addr; 67 u_long *addr;
68 u_long address; 68 u_long address;
69 int err; 69 int err;
70 DECLARE_MAC_BUF(mac);
70 71
71 if (!MACH_IS_MVME147 || called) 72 if (!MACH_IS_MVME147 || called)
72 return ERR_PTR(-ENODEV); 73 return ERR_PTR(-ENODEV);
@@ -101,12 +102,10 @@ struct net_device * __init mvme147lance_probe(int unit)
101 address=address>>8; 102 address=address>>8;
102 dev->dev_addr[3]=address&0xff; 103 dev->dev_addr[3]=address&0xff;
103 104
104 printk("%s: MVME147 at 0x%08lx, irq %d, Hardware Address %02x:%02x:%02x:%02x:%02x:%02x\n", 105 printk("%s: MVME147 at 0x%08lx, irq %d, "
105 dev->name, dev->base_addr, MVME147_LANCE_IRQ, 106 "Hardware Address %s\n",
106 dev->dev_addr[0], 107 dev->name, dev->base_addr, MVME147_LANCE_IRQ,
107 dev->dev_addr[1], dev->dev_addr[2], 108 print_mac(mac, dev->dev_addr));
108 dev->dev_addr[3], dev->dev_addr[4],
109 dev->dev_addr[5]);
110 109
111 lp = (struct m147lance_private *)dev->priv; 110 lp = (struct m147lance_private *)dev->priv;
112 lp->ram = __get_dma_pages(GFP_ATOMIC, 3); /* 16K */ 111 lp->ram = __get_dma_pages(GFP_ATOMIC, 3); /* 16K */
diff --git a/drivers/net/myri10ge/myri10ge.c b/drivers/net/myri10ge/myri10ge.c
index 2f8864e70ca9..38b03f538e95 100644
--- a/drivers/net/myri10ge/myri10ge.c
+++ b/drivers/net/myri10ge/myri10ge.c
@@ -2395,6 +2395,7 @@ static void myri10ge_set_multicast_list(struct net_device *dev)
2395 struct dev_mc_list *mc_list; 2395 struct dev_mc_list *mc_list;
2396 __be32 data[2] = { 0, 0 }; 2396 __be32 data[2] = { 0, 0 };
2397 int err; 2397 int err;
2398 DECLARE_MAC_BUF(mac);
2398 2399
2399 mgp = netdev_priv(dev); 2400 mgp = netdev_priv(dev);
2400 /* can be called from atomic contexts, 2401 /* can be called from atomic contexts,
@@ -2442,14 +2443,8 @@ static void myri10ge_set_multicast_list(struct net_device *dev)
2442 printk(KERN_ERR "myri10ge: %s: Failed " 2443 printk(KERN_ERR "myri10ge: %s: Failed "
2443 "MXGEFW_JOIN_MULTICAST_GROUP, error status:" 2444 "MXGEFW_JOIN_MULTICAST_GROUP, error status:"
2444 "%d\t", dev->name, err); 2445 "%d\t", dev->name, err);
2445 printk(KERN_ERR "MAC %02x:%02x:%02x:%02x:%02x:%02x\n", 2446 printk(KERN_ERR "MAC %s\n",
2446 ((unsigned char *)&mc_list->dmi_addr)[0], 2447 print_mac(mac, mc_list->dmi_addr));
2447 ((unsigned char *)&mc_list->dmi_addr)[1],
2448 ((unsigned char *)&mc_list->dmi_addr)[2],
2449 ((unsigned char *)&mc_list->dmi_addr)[3],
2450 ((unsigned char *)&mc_list->dmi_addr)[4],
2451 ((unsigned char *)&mc_list->dmi_addr)[5]
2452 );
2453 goto abort; 2448 goto abort;
2454 } 2449 }
2455 } 2450 }
diff --git a/drivers/net/myri_sbus.c b/drivers/net/myri_sbus.c
index 35c4c598c8d2..d68ee51c095f 100644
--- a/drivers/net/myri_sbus.c
+++ b/drivers/net/myri_sbus.c
@@ -311,12 +311,12 @@ static void myri_is_not_so_happy(struct myri_eth *mp)
311#ifdef DEBUG_HEADER 311#ifdef DEBUG_HEADER
312static void dump_ehdr(struct ethhdr *ehdr) 312static void dump_ehdr(struct ethhdr *ehdr)
313{ 313{
314 printk("ehdr[h_dst(%02x:%02x:%02x:%02x:%02x:%02x)" 314 DECLARE_MAC_BUF(mac);
315 "h_source(%02x:%02x:%02x:%02x:%02x:%02x)h_proto(%04x)]\n", 315 DECLARE_MAC_BUF(mac2);
316 ehdr->h_dest[0], ehdr->h_dest[1], ehdr->h_dest[2], 316 printk("ehdr[h_dst(%s)"
317 ehdr->h_dest[3], ehdr->h_dest[4], ehdr->h_dest[4], 317 "h_source(%s)"
318 ehdr->h_source[0], ehdr->h_source[1], ehdr->h_source[2], 318 "h_proto(%04x)]\n",
319 ehdr->h_source[3], ehdr->h_source[4], ehdr->h_source[4], 319 print_mac(mac, ehdr->h_dest), print_mac(mac2, ehdr->h_source),
320 ehdr->h_proto); 320 ehdr->h_proto);
321} 321}
322 322
@@ -325,13 +325,7 @@ static void dump_ehdr_and_myripad(unsigned char *stuff)
325 struct ethhdr *ehdr = (struct ethhdr *) (stuff + 2); 325 struct ethhdr *ehdr = (struct ethhdr *) (stuff + 2);
326 326
327 printk("pad[%02x:%02x]", stuff[0], stuff[1]); 327 printk("pad[%02x:%02x]", stuff[0], stuff[1]);
328 printk("ehdr[h_dst(%02x:%02x:%02x:%02x:%02x:%02x)" 328 dump_ehdr(ehdr);
329 "h_source(%02x:%02x:%02x:%02x:%02x:%02x)h_proto(%04x)]\n",
330 ehdr->h_dest[0], ehdr->h_dest[1], ehdr->h_dest[2],
331 ehdr->h_dest[3], ehdr->h_dest[4], ehdr->h_dest[4],
332 ehdr->h_source[0], ehdr->h_source[1], ehdr->h_source[2],
333 ehdr->h_source[3], ehdr->h_source[4], ehdr->h_source[4],
334 ehdr->h_proto);
335} 329}
336#endif 330#endif
337 331
@@ -895,6 +889,7 @@ static int __devinit myri_ether_init(struct sbus_dev *sdev)
895 struct myri_eth *mp; 889 struct myri_eth *mp;
896 unsigned char prop_buf[32]; 890 unsigned char prop_buf[32];
897 int i; 891 int i;
892 DECLARE_MAC_BUF(mac);
898 893
899 DET(("myri_ether_init(%p,%d):\n", sdev, num)); 894 DET(("myri_ether_init(%p,%d):\n", sdev, num));
900 dev = alloc_etherdev(sizeof(struct myri_eth)); 895 dev = alloc_etherdev(sizeof(struct myri_eth));
@@ -1089,12 +1084,8 @@ static int __devinit myri_ether_init(struct sbus_dev *sdev)
1089 1084
1090 num++; 1085 num++;
1091 1086
1092 printk("%s: MyriCOM MyriNET Ethernet ", dev->name); 1087 printk("%s: MyriCOM MyriNET Ethernet %s\n",
1093 1088 dev->name, print_mac(mac, dev->dev_addr));
1094 for (i = 0; i < 6; i++)
1095 printk("%2.2x%c", dev->dev_addr[i],
1096 i == 5 ? ' ' : ':');
1097 printk("\n");
1098 1089
1099 return 0; 1090 return 0;
1100 1091
diff --git a/drivers/net/natsemi.c b/drivers/net/natsemi.c
index 5ee4e8795d23..ea38da6d31ff 100644
--- a/drivers/net/natsemi.c
+++ b/drivers/net/natsemi.c
@@ -805,6 +805,7 @@ static int __devinit natsemi_probe1 (struct pci_dev *pdev,
805 const int pcibar = 1; /* PCI base address register */ 805 const int pcibar = 1; /* PCI base address register */
806 int prev_eedata; 806 int prev_eedata;
807 u32 tmp; 807 u32 tmp;
808 DECLARE_MAC_BUF(mac);
808 809
809/* when built into the kernel, we only print version if device is found */ 810/* when built into the kernel, we only print version if device is found */
810#ifndef MODULE 811#ifndef MODULE
@@ -958,12 +959,10 @@ static int __devinit natsemi_probe1 (struct pci_dev *pdev,
958 goto err_create_file; 959 goto err_create_file;
959 960
960 if (netif_msg_drv(np)) { 961 if (netif_msg_drv(np)) {
961 printk(KERN_INFO "natsemi %s: %s at %#08lx (%s), ", 962 printk(KERN_INFO "natsemi %s: %s at %#08lx "
962 dev->name, natsemi_pci_info[chip_idx].name, iostart, 963 "(%s), %s, IRQ %d",
963 pci_name(np->pci_dev)); 964 dev->name, natsemi_pci_info[chip_idx].name, iostart,
964 for (i = 0; i < ETH_ALEN-1; i++) 965 pci_name(np->pci_dev), print_mac(mac, dev->dev_addr), irq);
965 printk("%02x:", dev->dev_addr[i]);
966 printk("%02x, IRQ %d", dev->dev_addr[i], irq);
967 if (dev->if_port == PORT_TP) 966 if (dev->if_port == PORT_TP)
968 printk(", port TP.\n"); 967 printk(", port TP.\n");
969 else if (np->ignore_phy) 968 else if (np->ignore_phy)
diff --git a/drivers/net/ne-h8300.c b/drivers/net/ne-h8300.c
index 2b85d1b53344..368f2560856d 100644
--- a/drivers/net/ne-h8300.c
+++ b/drivers/net/ne-h8300.c
@@ -204,6 +204,7 @@ static int __init ne_probe1(struct net_device *dev, int ioaddr)
204 static unsigned version_printed; 204 static unsigned version_printed;
205 struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev); 205 struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev);
206 unsigned char bus_width; 206 unsigned char bus_width;
207 DECLARE_MAC_BUF(mac);
207 208
208 if (!request_region(ioaddr, NE_IO_EXTENT, DRV_NAME)) 209 if (!request_region(ioaddr, NE_IO_EXTENT, DRV_NAME))
209 return -EBUSY; 210 return -EBUSY;
@@ -296,12 +297,11 @@ static int __init ne_probe1(struct net_device *dev, int ioaddr)
296 297
297 dev->base_addr = ioaddr; 298 dev->base_addr = ioaddr;
298 299
299 for(i = 0; i < ETHER_ADDR_LEN; i++) { 300 for(i = 0; i < ETHER_ADDR_LEN; i++)
300 printk(" %2.2x", SA_prom[i]);
301 dev->dev_addr[i] = SA_prom[i]; 301 dev->dev_addr[i] = SA_prom[i];
302 } 302 printk(" %s\n", print_mac(mac, dev->dev_addr));
303 303
304 printk("\n%s: %s found at %#x, using IRQ %d.\n", 304 printk("%s: %s found at %#x, using IRQ %d.\n",
305 dev->name, name, ioaddr, dev->irq); 305 dev->name, name, ioaddr, dev->irq);
306 306
307 ei_status.name = name; 307 ei_status.name = name;
diff --git a/drivers/net/ne.c b/drivers/net/ne.c
index 27d87985bb63..874d291cbaed 100644
--- a/drivers/net/ne.c
+++ b/drivers/net/ne.c
@@ -291,6 +291,7 @@ static int __init ne_probe1(struct net_device *dev, unsigned long ioaddr)
291 int neX000, ctron, copam, bad_card; 291 int neX000, ctron, copam, bad_card;
292 int reg0, ret; 292 int reg0, ret;
293 static unsigned version_printed; 293 static unsigned version_printed;
294 DECLARE_MAC_BUF(mac);
294 295
295 if (!request_region(ioaddr, NE_IO_EXTENT, DRV_NAME)) 296 if (!request_region(ioaddr, NE_IO_EXTENT, DRV_NAME))
296 return -EBUSY; 297 return -EBUSY;
@@ -503,16 +504,14 @@ static int __init ne_probe1(struct net_device *dev, unsigned long ioaddr)
503 for (i = 0 ; i < ETHER_ADDR_LEN ; i++) { 504 for (i = 0 ; i < ETHER_ADDR_LEN ; i++) {
504 dev->dev_addr[i] = SA_prom[i] 505 dev->dev_addr[i] = SA_prom[i]
505 = inb_p(ioaddr + EN1_PHYS_SHIFT(i)); 506 = inb_p(ioaddr + EN1_PHYS_SHIFT(i));
506 printk(" %2.2x", SA_prom[i]);
507 } 507 }
508#else 508#else
509 for(i = 0; i < ETHER_ADDR_LEN; i++) { 509 for(i = 0; i < ETHER_ADDR_LEN; i++) {
510 printk(" %2.2x", SA_prom[i]);
511 dev->dev_addr[i] = SA_prom[i]; 510 dev->dev_addr[i] = SA_prom[i];
512 } 511 }
513#endif 512#endif
514 513
515 printk("\n"); 514 printk("%s\n", print_mac(mac, dev->dev_addr));
516 515
517 ei_status.name = name; 516 ei_status.name = name;
518 ei_status.tx_start_page = start_page; 517 ei_status.tx_start_page = start_page;
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);
diff --git a/drivers/net/ne2k-pci.c b/drivers/net/ne2k-pci.c
index a5879672903e..b569c90da4ba 100644
--- a/drivers/net/ne2k-pci.c
+++ b/drivers/net/ne2k-pci.c
@@ -212,6 +212,7 @@ static int __devinit ne2k_pci_init_one (struct pci_dev *pdev,
212 static unsigned int fnd_cnt; 212 static unsigned int fnd_cnt;
213 long ioaddr; 213 long ioaddr;
214 int flags = pci_clone_list[chip_idx].flags; 214 int flags = pci_clone_list[chip_idx].flags;
215 DECLARE_MAC_BUF(mac);
215 216
216/* when built into the kernel, we only print version if device is found */ 217/* when built into the kernel, we only print version if device is found */
217#ifndef MODULE 218#ifndef MODULE
@@ -365,12 +366,12 @@ static int __devinit ne2k_pci_init_one (struct pci_dev *pdev,
365 if (i) 366 if (i)
366 goto err_out_free_netdev; 367 goto err_out_free_netdev;
367 368
368 printk("%s: %s found at %#lx, IRQ %d, ", 369 for(i = 0; i < 6; i++)
369 dev->name, pci_clone_list[chip_idx].name, ioaddr, dev->irq);
370 for(i = 0; i < 6; i++) {
371 printk("%2.2X%s", SA_prom[i], i == 5 ? ".\n": ":");
372 dev->dev_addr[i] = SA_prom[i]; 370 dev->dev_addr[i] = SA_prom[i];
373 } 371 printk("%s: %s found at %#lx, IRQ %d, %s.\n",
372 dev->name, pci_clone_list[chip_idx].name, ioaddr, dev->irq,
373 print_mac(mac, dev->dev_addr));
374
374 memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len); 375 memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len);
375 376
376 return 0; 377 return 0;
diff --git a/drivers/net/ne3210.c b/drivers/net/ne3210.c
index b1bf8331e872..425043a88db9 100644
--- a/drivers/net/ne3210.c
+++ b/drivers/net/ne3210.c
@@ -99,6 +99,7 @@ static int __init ne3210_eisa_probe (struct device *device)
99 int i, retval, port_index; 99 int i, retval, port_index;
100 struct eisa_device *edev = to_eisa_device (device); 100 struct eisa_device *edev = to_eisa_device (device);
101 struct net_device *dev; 101 struct net_device *dev;
102 DECLARE_MAC_BUF(mac);
102 103
103 /* Allocate dev->priv and fill in 8390 specific dev fields. */ 104 /* Allocate dev->priv and fill in 8390 specific dev fields. */
104 if (!(dev = alloc_ei_netdev ())) { 105 if (!(dev = alloc_ei_netdev ())) {
@@ -127,17 +128,15 @@ static int __init ne3210_eisa_probe (struct device *device)
127 inb(ioaddr + NE3210_CFG1), inb(ioaddr + NE3210_CFG2)); 128 inb(ioaddr + NE3210_CFG1), inb(ioaddr + NE3210_CFG2));
128#endif 129#endif
129 130
130
131 port_index = inb(ioaddr + NE3210_CFG2) >> 6; 131 port_index = inb(ioaddr + NE3210_CFG2) >> 6;
132 printk("ne3210.c: NE3210 in EISA slot %d, media: %s, addr:",
133 edev->slot, ifmap[port_index]);
134 for(i = 0; i < ETHER_ADDR_LEN; i++) 132 for(i = 0; i < ETHER_ADDR_LEN; i++)
135 printk(" %02x", (dev->dev_addr[i] = inb(ioaddr + NE3210_SA_PROM + i))); 133 dev->dev_addr[i] = inb(ioaddr + NE3210_SA_PROM + i);
136 134 printk("ne3210.c: NE3210 in EISA slot %d, media: %s, addr: %s.\n",
135 edev->slot, ifmap[port_index], print_mac(mac, dev->dev_addr));
137 136
138 /* Snarf the interrupt now. CFG file has them all listed as `edge' with share=NO */ 137 /* Snarf the interrupt now. CFG file has them all listed as `edge' with share=NO */
139 dev->irq = irq_map[(inb(ioaddr + NE3210_CFG2) >> 3) & 0x07]; 138 dev->irq = irq_map[(inb(ioaddr + NE3210_CFG2) >> 3) & 0x07];
140 printk(".\nne3210.c: using IRQ %d, ", dev->irq); 139 printk("ne3210.c: using IRQ %d, ", dev->irq);
141 140
142 retval = request_irq(dev->irq, ei_interrupt, 0, DRV_NAME, dev); 141 retval = request_irq(dev->irq, ei_interrupt, 0, DRV_NAME, dev);
143 if (retval) { 142 if (retval) {
diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c
index 69ef1eb03bea..5ffbb8891647 100644
--- a/drivers/net/netconsole.c
+++ b/drivers/net/netconsole.c
@@ -306,18 +306,16 @@ static ssize_t show_remote_ip(struct netconsole_target *nt, char *buf)
306 306
307static ssize_t show_local_mac(struct netconsole_target *nt, char *buf) 307static ssize_t show_local_mac(struct netconsole_target *nt, char *buf)
308{ 308{
309 return snprintf(buf, PAGE_SIZE, "%02x:%02x:%02x:%02x:%02x:%02x\n", 309 DECLARE_MAC_BUF(mac);
310 nt->np.local_mac[0], nt->np.local_mac[1], 310 return snprintf(buf, PAGE_SIZE, "%s\n",
311 nt->np.local_mac[2], nt->np.local_mac[3], 311 print_mac(mac, nt->np.local_mac));
312 nt->np.local_mac[4], nt->np.local_mac[5]);
313} 312}
314 313
315static ssize_t show_remote_mac(struct netconsole_target *nt, char *buf) 314static ssize_t show_remote_mac(struct netconsole_target *nt, char *buf)
316{ 315{
317 return snprintf(buf, PAGE_SIZE, "%02x:%02x:%02x:%02x:%02x:%02x\n", 316 DECLARE_MAC_BUF(mac);
318 nt->np.remote_mac[0], nt->np.remote_mac[1], 317 return snprintf(buf, PAGE_SIZE, "%s\n",
319 nt->np.remote_mac[2], nt->np.remote_mac[3], 318 print_mac(mac, nt->np.remote_mac));
320 nt->np.remote_mac[4], nt->np.remote_mac[5]);
321} 319}
322 320
323/* 321/*
diff --git a/drivers/net/netxen/netxen_nic_main.c b/drivers/net/netxen/netxen_nic_main.c
index 1b165a8c74f3..b9cde65e7f31 100644
--- a/drivers/net/netxen/netxen_nic_main.c
+++ b/drivers/net/netxen/netxen_nic_main.c
@@ -285,6 +285,7 @@ netxen_nic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
285 int valid_mac = 0; 285 int valid_mac = 0;
286 u32 val; 286 u32 val;
287 int pci_func_id = PCI_FUNC(pdev->devfn); 287 int pci_func_id = PCI_FUNC(pdev->devfn);
288 DECLARE_MAC_BUF(mac);
288 289
289 printk(KERN_INFO "%s \n", netxen_nic_driver_string); 290 printk(KERN_INFO "%s \n", netxen_nic_driver_string);
290 291
@@ -573,15 +574,9 @@ netxen_nic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
573 memcpy(netdev->perm_addr, netdev->dev_addr, 574 memcpy(netdev->perm_addr, netdev->dev_addr,
574 netdev->addr_len); 575 netdev->addr_len);
575 if (!is_valid_ether_addr(netdev->perm_addr)) { 576 if (!is_valid_ether_addr(netdev->perm_addr)) {
576 printk(KERN_ERR "%s: Bad MAC address " 577 printk(KERN_ERR "%s: Bad MAC address %s.\n",
577 "%02x:%02x:%02x:%02x:%02x:%02x.\n", 578 netxen_nic_driver_name,
578 netxen_nic_driver_name, 579 print_mac(mac, netdev->dev_addr));
579 netdev->dev_addr[0],
580 netdev->dev_addr[1],
581 netdev->dev_addr[2],
582 netdev->dev_addr[3],
583 netdev->dev_addr[4],
584 netdev->dev_addr[5]);
585 } else { 580 } else {
586 if (adapter->macaddr_set) 581 if (adapter->macaddr_set)
587 adapter->macaddr_set(adapter, 582 adapter->macaddr_set(adapter,
diff --git a/drivers/net/netxen/netxen_nic_niu.c b/drivers/net/netxen/netxen_nic_niu.c
index 05e0577a0e10..5b9e1b300fab 100644
--- a/drivers/net/netxen/netxen_nic_niu.c
+++ b/drivers/net/netxen/netxen_nic_niu.c
@@ -603,6 +603,7 @@ int netxen_niu_macaddr_set(struct netxen_adapter *adapter,
603 int phy = physical_port[adapter->portnum]; 603 int phy = physical_port[adapter->portnum];
604 unsigned char mac_addr[6]; 604 unsigned char mac_addr[6];
605 int i; 605 int i;
606 DECLARE_MAC_BUF(mac);
606 607
607 for (i = 0; i < 10; i++) { 608 for (i = 0; i < 10; i++) {
608 temp[0] = temp[1] = 0; 609 temp[0] = temp[1] = 0;
@@ -627,15 +628,10 @@ int netxen_niu_macaddr_set(struct netxen_adapter *adapter,
627 if (i == 10) { 628 if (i == 10) {
628 printk(KERN_ERR "%s: cannot set Mac addr for %s\n", 629 printk(KERN_ERR "%s: cannot set Mac addr for %s\n",
629 netxen_nic_driver_name, adapter->netdev->name); 630 netxen_nic_driver_name, adapter->netdev->name);
630 printk(KERN_ERR "MAC address set: " 631 printk(KERN_ERR "MAC address set: %s.\n",
631 "%02x:%02x:%02x:%02x:%02x:%02x.\n", 632 print_mac(mac, addr));
632 addr[0], addr[1], addr[2], addr[3], addr[4], addr[5]); 633 printk(KERN_ERR "MAC address get: %s.\n",
633 634 print_mac(mac, mac_addr));
634 printk(KERN_ERR "MAC address get: "
635 "%02x:%02x:%02x:%02x:%02x:%02x.\n",
636 mac_addr[0],
637 mac_addr[1],
638 mac_addr[2], mac_addr[3], mac_addr[4], mac_addr[5]);
639 } 635 }
640 return 0; 636 return 0;
641} 637}
diff --git a/drivers/net/ni5010.c b/drivers/net/ni5010.c
index 1dc74a78afa6..14a768fbce2e 100644
--- a/drivers/net/ni5010.c
+++ b/drivers/net/ni5010.c
@@ -203,6 +203,7 @@ static int __init ni5010_probe1(struct net_device *dev, int ioaddr)
203 unsigned int data = 0; 203 unsigned int data = 0;
204 int boguscount = 40; 204 int boguscount = 40;
205 int err = -ENODEV; 205 int err = -ENODEV;
206 DECLARE_MAC_BUF(mac);
206 207
207 dev->base_addr = ioaddr; 208 dev->base_addr = ioaddr;
208 dev->irq = irq; 209 dev->irq = irq;
@@ -268,8 +269,9 @@ static int __init ni5010_probe1(struct net_device *dev, int ioaddr)
268 269
269 for (i=0; i<6; i++) { 270 for (i=0; i<6; i++) {
270 outw(i, IE_GP); 271 outw(i, IE_GP);
271 printk("%2.2x ", dev->dev_addr[i] = inb(IE_SAPROM)); 272 dev->dev_addr[i] = inb(IE_SAPROM);
272 } 273 }
274 printk("%s ", print_mac(mac, dev->dev_addr));
273 275
274 PRINTK2((KERN_DEBUG "%s: I/O #4 passed!\n", dev->name)); 276 PRINTK2((KERN_DEBUG "%s: I/O #4 passed!\n", dev->name));
275 277
diff --git a/drivers/net/ns83820.c b/drivers/net/ns83820.c
index de495b697294..ea71f6d82661 100644
--- a/drivers/net/ns83820.c
+++ b/drivers/net/ns83820.c
@@ -1962,6 +1962,7 @@ static int __devinit ns83820_init_one(struct pci_dev *pci_dev, const struct pci_
1962 long addr; 1962 long addr;
1963 int err; 1963 int err;
1964 int using_dac = 0; 1964 int using_dac = 0;
1965 DECLARE_MAC_BUF(mac);
1965 1966
1966 /* See if we can set the dma mask early on; failure is fatal. */ 1967 /* See if we can set the dma mask early on; failure is fatal. */
1967 if (sizeof(dma_addr_t) == 8 && 1968 if (sizeof(dma_addr_t) == 8 &&
@@ -2226,13 +2227,11 @@ static int __devinit ns83820_init_one(struct pci_dev *pci_dev, const struct pci_
2226 ndev->features |= NETIF_F_HIGHDMA; 2227 ndev->features |= NETIF_F_HIGHDMA;
2227 } 2228 }
2228 2229
2229 printk(KERN_INFO "%s: ns83820 v" VERSION ": DP83820 v%u.%u: %02x:%02x:%02x:%02x:%02x:%02x io=0x%08lx irq=%d f=%s\n", 2230 printk(KERN_INFO "%s: ns83820 v" VERSION ": DP83820 v%u.%u: %s io=0x%08lx irq=%d f=%s\n",
2230 ndev->name, 2231 ndev->name,
2231 (unsigned)readl(dev->base + SRR) >> 8, 2232 (unsigned)readl(dev->base + SRR) >> 8,
2232 (unsigned)readl(dev->base + SRR) & 0xff, 2233 (unsigned)readl(dev->base + SRR) & 0xff,
2233 ndev->dev_addr[0], ndev->dev_addr[1], 2234 print_mac(mac, ndev->dev_addr),
2234 ndev->dev_addr[2], ndev->dev_addr[3],
2235 ndev->dev_addr[4], ndev->dev_addr[5],
2236 addr, pci_dev->irq, 2235 addr, pci_dev->irq,
2237 (ndev->features & NETIF_F_HIGHDMA) ? "h,sg" : "sg" 2236 (ndev->features & NETIF_F_HIGHDMA) ? "h,sg" : "sg"
2238 ); 2237 );
diff --git a/drivers/net/pasemi_mac.c b/drivers/net/pasemi_mac.c
index f310d94443a0..4d87cd65626f 100644
--- a/drivers/net/pasemi_mac.c
+++ b/drivers/net/pasemi_mac.c
@@ -1155,6 +1155,7 @@ pasemi_mac_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
1155 struct net_device *dev; 1155 struct net_device *dev;
1156 struct pasemi_mac *mac; 1156 struct pasemi_mac *mac;
1157 int err; 1157 int err;
1158 DECLARE_MAC_BUF(mac_buf);
1158 1159
1159 err = pci_enable_device(pdev); 1160 err = pci_enable_device(pdev);
1160 if (err) 1161 if (err)
@@ -1237,11 +1238,10 @@ pasemi_mac_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
1237 goto out; 1238 goto out;
1238 } else 1239 } else
1239 printk(KERN_INFO "%s: PA Semi %s: intf %d, txch %d, rxch %d, " 1240 printk(KERN_INFO "%s: PA Semi %s: intf %d, txch %d, rxch %d, "
1240 "hw addr %02x:%02x:%02x:%02x:%02x:%02x\n", 1241 "hw addr %s\n",
1241 dev->name, mac->type == MAC_TYPE_GMAC ? "GMAC" : "XAUI", 1242 dev->name, mac->type == MAC_TYPE_GMAC ? "GMAC" : "XAUI",
1242 mac->dma_if, mac->dma_txch, mac->dma_rxch, 1243 mac->dma_if, mac->dma_txch, mac->dma_rxch,
1243 dev->dev_addr[0], dev->dev_addr[1], dev->dev_addr[2], 1244 print_mac(mac_buf, dev->dev_addr));
1244 dev->dev_addr[3], dev->dev_addr[4], dev->dev_addr[5]);
1245 1245
1246 return err; 1246 return err;
1247 1247
diff --git a/drivers/net/pci-skeleton.c b/drivers/net/pci-skeleton.c
index 7dace63fb6e6..ed402e00e730 100644
--- a/drivers/net/pci-skeleton.c
+++ b/drivers/net/pci-skeleton.c
@@ -737,6 +737,7 @@ static int __devinit netdrv_init_one (struct pci_dev *pdev,
737 int i, addr_len, option; 737 int i, addr_len, option;
738 void *ioaddr = NULL; 738 void *ioaddr = NULL;
739 static int board_idx = -1; 739 static int board_idx = -1;
740 DECLARE_MAC_BUF(mac);
740 741
741/* when built into the kernel, we only print version if device is found */ 742/* when built into the kernel, we only print version if device is found */
742#ifndef MODULE 743#ifndef MODULE
@@ -796,15 +797,11 @@ static int __devinit netdrv_init_one (struct pci_dev *pdev,
796 797
797 tp->phys[0] = 32; 798 tp->phys[0] = 32;
798 799
799 printk (KERN_INFO "%s: %s at 0x%lx, " 800 printk (KERN_INFO "%s: %s at 0x%lx, %sIRQ %d\n",
800 "%2.2x:%2.2x:%2.2x:%2.2x:%2.2x:%2.2x, "
801 "IRQ %d\n",
802 dev->name, 801 dev->name,
803 board_info[ent->driver_data].name, 802 board_info[ent->driver_data].name,
804 dev->base_addr, 803 dev->base_addr,
805 dev->dev_addr[0], dev->dev_addr[1], 804 print_mac(mac, dev->dev_addr),
806 dev->dev_addr[2], dev->dev_addr[3],
807 dev->dev_addr[4], dev->dev_addr[5],
808 dev->irq); 805 dev->irq);
809 806
810 printk (KERN_DEBUG "%s: Identified 8139 chip type '%s'\n", 807 printk (KERN_DEBUG "%s: Identified 8139 chip type '%s'\n",
diff --git a/drivers/net/pcmcia/3c574_cs.c b/drivers/net/pcmcia/3c574_cs.c
index 2b395ee21f75..73dcbb7296da 100644
--- a/drivers/net/pcmcia/3c574_cs.c
+++ b/drivers/net/pcmcia/3c574_cs.c
@@ -343,6 +343,7 @@ static int tc574_config(struct pcmcia_device *link)
343 u16 *phys_addr; 343 u16 *phys_addr;
344 char *cardname; 344 char *cardname;
345 union wn3_config config; 345 union wn3_config config;
346 DECLARE_MAC_BUF(mac);
346 347
347 phys_addr = (u16 *)dev->dev_addr; 348 phys_addr = (u16 *)dev->dev_addr;
348 349
@@ -458,10 +459,10 @@ static int tc574_config(struct pcmcia_device *link)
458 459
459 strcpy(lp->node.dev_name, dev->name); 460 strcpy(lp->node.dev_name, dev->name);
460 461
461 printk(KERN_INFO "%s: %s at io %#3lx, irq %d, hw_addr ", 462 printk(KERN_INFO "%s: %s at io %#3lx, irq %d, "
462 dev->name, cardname, dev->base_addr, dev->irq); 463 "hw_addr %s.\n",
463 for (i = 0; i < 6; i++) 464 dev->name, cardname, dev->base_addr, dev->irq,
464 printk("%02X%s", dev->dev_addr[i], ((i<5) ? ":" : ".\n")); 465 print_mac(mac, dev->dev_addr));
465 printk(" %dK FIFO split %s Rx:Tx, %sMII interface.\n", 466 printk(" %dK FIFO split %s Rx:Tx, %sMII interface.\n",
466 8 << config.u.ram_size, ram_split[config.u.ram_split], 467 8 << config.u.ram_size, ram_split[config.u.ram_split],
467 config.u.autoselect ? "autoselect " : ""); 468 config.u.autoselect ? "autoselect " : "");
diff --git a/drivers/net/pcmcia/3c589_cs.c b/drivers/net/pcmcia/3c589_cs.c
index 2136c80c0581..32076ca6a9e1 100644
--- a/drivers/net/pcmcia/3c589_cs.c
+++ b/drivers/net/pcmcia/3c589_cs.c
@@ -255,6 +255,7 @@ static int tc589_config(struct pcmcia_device *link)
255 int last_fn, last_ret, i, j, multi = 0, fifo; 255 int last_fn, last_ret, i, j, multi = 0, fifo;
256 kio_addr_t ioaddr; 256 kio_addr_t ioaddr;
257 char *ram_split[] = {"5:3", "3:1", "1:1", "3:5"}; 257 char *ram_split[] = {"5:3", "3:1", "1:1", "3:5"};
258 DECLARE_MAC_BUF(mac);
258 259
259 DEBUG(0, "3c589_config(0x%p)\n", link); 260 DEBUG(0, "3c589_config(0x%p)\n", link);
260 261
@@ -330,11 +331,10 @@ static int tc589_config(struct pcmcia_device *link)
330 331
331 strcpy(lp->node.dev_name, dev->name); 332 strcpy(lp->node.dev_name, dev->name);
332 333
333 printk(KERN_INFO "%s: 3Com 3c%s, io %#3lx, irq %d, hw_addr ", 334 printk(KERN_INFO "%s: 3Com 3c%s, io %#3lx, irq %d, "
334 dev->name, (multi ? "562" : "589"), dev->base_addr, 335 "hw_addr %s\n",
335 dev->irq); 336 dev->name, (multi ? "562" : "589"), dev->base_addr, dev->irq,
336 for (i = 0; i < 6; i++) 337 print_mac(mac, dev->dev_addr));
337 printk("%02X%s", dev->dev_addr[i], ((i<5) ? ":" : "\n"));
338 printk(KERN_INFO " %dK FIFO split %s Rx:Tx, %s xcvr\n", 338 printk(KERN_INFO " %dK FIFO split %s Rx:Tx, %s xcvr\n",
339 (fifo & 7) ? 32 : 8, ram_split[(fifo >> 16) & 3], 339 (fifo & 7) ? 32 : 8, ram_split[(fifo >> 16) & 3],
340 if_names[dev->if_port]); 340 if_names[dev->if_port]);
diff --git a/drivers/net/pcmcia/axnet_cs.c b/drivers/net/pcmcia/axnet_cs.c
index 28eea206766d..de59313d10f5 100644
--- a/drivers/net/pcmcia/axnet_cs.c
+++ b/drivers/net/pcmcia/axnet_cs.c
@@ -292,6 +292,7 @@ static int axnet_config(struct pcmcia_device *link)
292 cisparse_t parse; 292 cisparse_t parse;
293 int i, j, last_ret, last_fn; 293 int i, j, last_ret, last_fn;
294 u_short buf[64]; 294 u_short buf[64];
295 DECLARE_MAC_BUF(mac);
295 296
296 DEBUG(0, "axnet_config(0x%p)\n", link); 297 DEBUG(0, "axnet_config(0x%p)\n", link);
297 298
@@ -403,11 +404,11 @@ static int axnet_config(struct pcmcia_device *link)
403 404
404 strcpy(info->node.dev_name, dev->name); 405 strcpy(info->node.dev_name, dev->name);
405 406
406 printk(KERN_INFO "%s: Asix AX88%d90: io %#3lx, irq %d, hw_addr ", 407 printk(KERN_INFO "%s: Asix AX88%d90: io %#3lx, irq %d, "
408 "hw_addr %s\n",
407 dev->name, ((info->flags & IS_AX88790) ? 7 : 1), 409 dev->name, ((info->flags & IS_AX88790) ? 7 : 1),
408 dev->base_addr, dev->irq); 410 dev->base_addr, dev->irq,
409 for (i = 0; i < 6; i++) 411 print_mac(mac, dev->dev_addr));
410 printk("%02X%s", dev->dev_addr[i], ((i<5) ? ":" : "\n"));
411 if (info->phy_id != -1) { 412 if (info->phy_id != -1) {
412 DEBUG(0, " MII transceiver at index %d, status %x.\n", info->phy_id, j); 413 DEBUG(0, " MII transceiver at index %d, status %x.\n", info->phy_id, j);
413 } else { 414 } else {
diff --git a/drivers/net/pcmcia/fmvj18x_cs.c b/drivers/net/pcmcia/fmvj18x_cs.c
index 7f29e95a0644..62844677c784 100644
--- a/drivers/net/pcmcia/fmvj18x_cs.c
+++ b/drivers/net/pcmcia/fmvj18x_cs.c
@@ -346,6 +346,7 @@ static int fmvj18x_config(struct pcmcia_device *link)
346 cardtype_t cardtype; 346 cardtype_t cardtype;
347 char *card_name = "unknown"; 347 char *card_name = "unknown";
348 u_char *node_id; 348 u_char *node_id;
349 DECLARE_MAC_BUF(mac);
349 350
350 DEBUG(0, "fmvj18x_config(0x%p)\n", link); 351 DEBUG(0, "fmvj18x_config(0x%p)\n", link);
351 352
@@ -533,11 +534,10 @@ static int fmvj18x_config(struct pcmcia_device *link)
533 strcpy(lp->node.dev_name, dev->name); 534 strcpy(lp->node.dev_name, dev->name);
534 535
535 /* print current configuration */ 536 /* print current configuration */
536 printk(KERN_INFO "%s: %s, sram %s, port %#3lx, irq %d, hw_addr ", 537 printk(KERN_INFO "%s: %s, sram %s, port %#3lx, irq %d, "
538 "hw_addr %s\n",
537 dev->name, card_name, sram_config == 0 ? "4K TX*2" : "8K TX*2", 539 dev->name, card_name, sram_config == 0 ? "4K TX*2" : "8K TX*2",
538 dev->base_addr, dev->irq); 540 dev->base_addr, dev->irq, print_mac(mac, dev->dev_addr));
539 for (i = 0; i < 6; i++)
540 printk("%02X%s", dev->dev_addr[i], ((i<5) ? ":" : "\n"));
541 541
542 return 0; 542 return 0;
543 543
diff --git a/drivers/net/pcmcia/nmclan_cs.c b/drivers/net/pcmcia/nmclan_cs.c
index 1bb2ffa294de..a355a93b908b 100644
--- a/drivers/net/pcmcia/nmclan_cs.c
+++ b/drivers/net/pcmcia/nmclan_cs.c
@@ -658,6 +658,7 @@ static int nmclan_config(struct pcmcia_device *link)
658 u_char buf[64]; 658 u_char buf[64];
659 int i, last_ret, last_fn; 659 int i, last_ret, last_fn;
660 kio_addr_t ioaddr; 660 kio_addr_t ioaddr;
661 DECLARE_MAC_BUF(mac);
661 662
662 DEBUG(0, "nmclan_config(0x%p)\n", link); 663 DEBUG(0, "nmclan_config(0x%p)\n", link);
663 664
@@ -716,10 +717,10 @@ static int nmclan_config(struct pcmcia_device *link)
716 717
717 strcpy(lp->node.dev_name, dev->name); 718 strcpy(lp->node.dev_name, dev->name);
718 719
719 printk(KERN_INFO "%s: nmclan: port %#3lx, irq %d, %s port, hw_addr ", 720 printk(KERN_INFO "%s: nmclan: port %#3lx, irq %d, %s port,"
720 dev->name, dev->base_addr, dev->irq, if_names[dev->if_port]); 721 " hw_addr %s\n",
721 for (i = 0; i < 6; i++) 722 dev->name, dev->base_addr, dev->irq, if_names[dev->if_port],
722 printk("%02X%s", dev->dev_addr[i], ((i<5) ? ":" : "\n")); 723 print_mac(mac, dev->dev_addr));
723 return 0; 724 return 0;
724 725
725cs_failed: 726cs_failed:
diff --git a/drivers/net/pcmcia/pcnet_cs.c b/drivers/net/pcmcia/pcnet_cs.c
index 8ce251cd3209..6a647516c380 100644
--- a/drivers/net/pcmcia/pcnet_cs.c
+++ b/drivers/net/pcmcia/pcnet_cs.c
@@ -38,7 +38,7 @@
38#include <linux/delay.h> 38#include <linux/delay.h>
39#include <linux/ethtool.h> 39#include <linux/ethtool.h>
40#include <linux/netdevice.h> 40#include <linux/netdevice.h>
41#include <../drivers/net/8390.h> 41#include "../8390.h"
42 42
43#include <pcmcia/cs_types.h> 43#include <pcmcia/cs_types.h>
44#include <pcmcia/cs.h> 44#include <pcmcia/cs.h>
@@ -521,6 +521,7 @@ static int pcnet_config(struct pcmcia_device *link)
521 int has_shmem = 0; 521 int has_shmem = 0;
522 u_short buf[64]; 522 u_short buf[64];
523 hw_info_t *hw_info; 523 hw_info_t *hw_info;
524 DECLARE_MAC_BUF(mac);
524 525
525 DEBUG(0, "pcnet_config(0x%p)\n", link); 526 DEBUG(0, "pcnet_config(0x%p)\n", link);
526 527
@@ -670,9 +671,7 @@ static int pcnet_config(struct pcmcia_device *link)
670 printk (" mem %#5lx,", dev->mem_start); 671 printk (" mem %#5lx,", dev->mem_start);
671 if (info->flags & HAS_MISC_REG) 672 if (info->flags & HAS_MISC_REG)
672 printk(" %s xcvr,", if_names[dev->if_port]); 673 printk(" %s xcvr,", if_names[dev->if_port]);
673 printk(" hw_addr "); 674 printk(" hw_addr %s\n", print_mac(mac, dev->dev_addr));
674 for (i = 0; i < 6; i++)
675 printk("%02X%s", dev->dev_addr[i], ((i<5) ? ":" : "\n"));
676 return 0; 675 return 0;
677 676
678cs_failed: 677cs_failed:
diff --git a/drivers/net/pcmcia/smc91c92_cs.c b/drivers/net/pcmcia/smc91c92_cs.c
index b25f1985d03e..58d716fd17cf 100644
--- a/drivers/net/pcmcia/smc91c92_cs.c
+++ b/drivers/net/pcmcia/smc91c92_cs.c
@@ -962,6 +962,7 @@ static int smc91c92_config(struct pcmcia_device *link)
962 int i, j, rev; 962 int i, j, rev;
963 kio_addr_t ioaddr; 963 kio_addr_t ioaddr;
964 u_long mir; 964 u_long mir;
965 DECLARE_MAC_BUF(mac);
965 966
966 DEBUG(0, "smc91c92_config(0x%p)\n", link); 967 DEBUG(0, "smc91c92_config(0x%p)\n", link);
967 968
@@ -1074,10 +1075,9 @@ static int smc91c92_config(struct pcmcia_device *link)
1074 strcpy(smc->node.dev_name, dev->name); 1075 strcpy(smc->node.dev_name, dev->name);
1075 1076
1076 printk(KERN_INFO "%s: smc91c%s rev %d: io %#3lx, irq %d, " 1077 printk(KERN_INFO "%s: smc91c%s rev %d: io %#3lx, irq %d, "
1077 "hw_addr ", dev->name, name, (rev & 0x0f), dev->base_addr, 1078 "hw_addr %s\n",
1078 dev->irq); 1079 dev->name, name, (rev & 0x0f), dev->base_addr, dev->irq,
1079 for (i = 0; i < 6; i++) 1080 print_mac(mac, dev->dev_addr));
1080 printk("%02X%s", dev->dev_addr[i], ((i<5) ? ":" : "\n"));
1081 1081
1082 if (rev > 0) { 1082 if (rev > 0) {
1083 if (mir & 0x3ff) 1083 if (mir & 0x3ff)
diff --git a/drivers/net/pcmcia/xirc2ps_cs.c b/drivers/net/pcmcia/xirc2ps_cs.c
index d5c2d2c8c852..c3b69602e275 100644
--- a/drivers/net/pcmcia/xirc2ps_cs.c
+++ b/drivers/net/pcmcia/xirc2ps_cs.c
@@ -731,6 +731,7 @@ xirc2ps_config(struct pcmcia_device * link)
731 u_char buf[64]; 731 u_char buf[64];
732 cistpl_lan_node_id_t *node_id = (cistpl_lan_node_id_t*)parse.funce.data; 732 cistpl_lan_node_id_t *node_id = (cistpl_lan_node_id_t*)parse.funce.data;
733 cistpl_cftable_entry_t *cf = &parse.cftable_entry; 733 cistpl_cftable_entry_t *cf = &parse.cftable_entry;
734 DECLARE_MAC_BUF(mac);
734 735
735 local->dingo_ccr = NULL; 736 local->dingo_ccr = NULL;
736 737
@@ -1032,11 +1033,9 @@ xirc2ps_config(struct pcmcia_device * link)
1032 strcpy(local->node.dev_name, dev->name); 1033 strcpy(local->node.dev_name, dev->name);
1033 1034
1034 /* give some infos about the hardware */ 1035 /* give some infos about the hardware */
1035 printk(KERN_INFO "%s: %s: port %#3lx, irq %d, hwaddr", 1036 printk(KERN_INFO "%s: %s: port %#3lx, irq %d, hwaddr %s\n",
1036 dev->name, local->manf_str,(u_long)dev->base_addr, (int)dev->irq); 1037 dev->name, local->manf_str,(u_long)dev->base_addr, (int)dev->irq,
1037 for (i = 0; i < 6; i++) 1038 print_mac(mac, dev->dev_addr));
1038 printk("%c%02X", i?':':' ', dev->dev_addr[i]);
1039 printk("\n");
1040 1039
1041 return 0; 1040 return 0;
1042 1041
diff --git a/drivers/net/pppoe.c b/drivers/net/pppoe.c
index 2f130e06b6dc..ba2eb04aac9f 100644
--- a/drivers/net/pppoe.c
+++ b/drivers/net/pppoe.c
@@ -955,6 +955,7 @@ static int pppoe_seq_show(struct seq_file *seq, void *v)
955{ 955{
956 struct pppox_sock *po; 956 struct pppox_sock *po;
957 char *dev_name; 957 char *dev_name;
958 DECLARE_MAC_BUF(mac);
958 959
959 if (v == SEQ_START_TOKEN) { 960 if (v == SEQ_START_TOKEN) {
960 seq_puts(seq, "Id Address Device\n"); 961 seq_puts(seq, "Id Address Device\n");
@@ -964,11 +965,8 @@ static int pppoe_seq_show(struct seq_file *seq, void *v)
964 po = v; 965 po = v;
965 dev_name = po->pppoe_pa.dev; 966 dev_name = po->pppoe_pa.dev;
966 967
967 seq_printf(seq, "%08X %02X:%02X:%02X:%02X:%02X:%02X %8s\n", 968 seq_printf(seq, "%08X %s %8s\n",
968 po->pppoe_pa.sid, 969 po->pppoe_pa.sid, print_mac(mac, po->pppoe_pa.remote), dev_name);
969 po->pppoe_pa.remote[0], po->pppoe_pa.remote[1],
970 po->pppoe_pa.remote[2], po->pppoe_pa.remote[3],
971 po->pppoe_pa.remote[4], po->pppoe_pa.remote[5], dev_name);
972out: 970out:
973 return 0; 971 return 0;
974} 972}
diff --git a/drivers/net/ps3_gelic_net.c b/drivers/net/ps3_gelic_net.c
index f375bbbd6604..0a42bf517465 100644
--- a/drivers/net/ps3_gelic_net.c
+++ b/drivers/net/ps3_gelic_net.c
@@ -1348,6 +1348,7 @@ static int gelic_net_setup_netdev(struct gelic_net_card *card)
1348 unsigned int i; 1348 unsigned int i;
1349 int status; 1349 int status;
1350 u64 v1, v2; 1350 u64 v1, v2;
1351 DECLARE_MAC_BUF(mac);
1351 1352
1352 SET_NETDEV_DEV(netdev, &card->dev->core); 1353 SET_NETDEV_DEV(netdev, &card->dev->core);
1353 spin_lock_init(&card->tx_dma_lock); 1354 spin_lock_init(&card->tx_dma_lock);
@@ -1373,10 +1374,8 @@ static int gelic_net_setup_netdev(struct gelic_net_card *card)
1373 v1 <<= 16; 1374 v1 <<= 16;
1374 memcpy(addr.sa_data, &v1, ETH_ALEN); 1375 memcpy(addr.sa_data, &v1, ETH_ALEN);
1375 memcpy(netdev->dev_addr, addr.sa_data, ETH_ALEN); 1376 memcpy(netdev->dev_addr, addr.sa_data, ETH_ALEN);
1376 dev_info(ctodev(card), "MAC addr %02x:%02x:%02x:%02x:%02x:%02x\n", 1377 dev_info(ctodev(card), "MAC addr %s\n",
1377 netdev->dev_addr[0], netdev->dev_addr[1], 1378 print_mac(mac, netdev->dev_addr));
1378 netdev->dev_addr[2], netdev->dev_addr[3],
1379 netdev->dev_addr[4], netdev->dev_addr[5]);
1380 1379
1381 card->vlan_index = -1; /* no vlan */ 1380 card->vlan_index = -1; /* no vlan */
1382 for (i = 0; i < GELIC_NET_VLAN_MAX; i++) { 1381 for (i = 0; i < GELIC_NET_VLAN_MAX; i++) {
diff --git a/drivers/net/qla3xxx.c b/drivers/net/qla3xxx.c
index 97c6ed07dd15..ed79aa820df2 100755
--- a/drivers/net/qla3xxx.c
+++ b/drivers/net/qla3xxx.c
@@ -3557,6 +3557,7 @@ static void ql_display_dev_info(struct net_device *ndev)
3557{ 3557{
3558 struct ql3_adapter *qdev = (struct ql3_adapter *)netdev_priv(ndev); 3558 struct ql3_adapter *qdev = (struct ql3_adapter *)netdev_priv(ndev);
3559 struct pci_dev *pdev = qdev->pdev; 3559 struct pci_dev *pdev = qdev->pdev;
3560 DECLARE_MAC_BUF(mac);
3560 3561
3561 printk(KERN_INFO PFX 3562 printk(KERN_INFO PFX
3562 "\n%s Adapter %d RevisionID %d found %s on PCI slot %d.\n", 3563 "\n%s Adapter %d RevisionID %d found %s on PCI slot %d.\n",
@@ -3582,10 +3583,8 @@ static void ql_display_dev_info(struct net_device *ndev)
3582 3583
3583 if (netif_msg_probe(qdev)) 3584 if (netif_msg_probe(qdev))
3584 printk(KERN_INFO PFX 3585 printk(KERN_INFO PFX
3585 "%s: MAC address %02x:%02x:%02x:%02x:%02x:%02x\n", 3586 "%s: MAC address %s\n",
3586 ndev->name, ndev->dev_addr[0], ndev->dev_addr[1], 3587 ndev->name, print_mac(mac, ndev->dev_addr));
3587 ndev->dev_addr[2], ndev->dev_addr[3], ndev->dev_addr[4],
3588 ndev->dev_addr[5]);
3589} 3588}
3590 3589
3591static int ql_adapter_down(struct ql3_adapter *qdev, int do_reset) 3590static int ql_adapter_down(struct ql3_adapter *qdev, int do_reset)
diff --git a/drivers/net/rionet.c b/drivers/net/rionet.c
index d43dcf3ed5a9..e7fd08adbbac 100644
--- a/drivers/net/rionet.c
+++ b/drivers/net/rionet.c
@@ -432,6 +432,7 @@ static int rionet_setup_netdev(struct rio_mport *mport)
432 struct net_device *ndev = NULL; 432 struct net_device *ndev = NULL;
433 struct rionet_private *rnet; 433 struct rionet_private *rnet;
434 u16 device_id; 434 u16 device_id;
435 DECLARE_MAC_BUF(mac);
435 436
436 /* Allocate our net_device structure */ 437 /* Allocate our net_device structure */
437 ndev = alloc_etherdev(sizeof(struct rionet_private)); 438 ndev = alloc_etherdev(sizeof(struct rionet_private));
@@ -472,13 +473,12 @@ static int rionet_setup_netdev(struct rio_mport *mport)
472 if (rc != 0) 473 if (rc != 0)
473 goto out; 474 goto out;
474 475
475 printk("%s: %s %s Version %s, MAC %02x:%02x:%02x:%02x:%02x:%02x\n", 476 printk("%s: %s %s Version %s, MAC %s\n",
476 ndev->name, 477 ndev->name,
477 DRV_NAME, 478 DRV_NAME,
478 DRV_DESC, 479 DRV_DESC,
479 DRV_VERSION, 480 DRV_VERSION,
480 ndev->dev_addr[0], ndev->dev_addr[1], ndev->dev_addr[2], 481 print_mac(mac, ndev->dev_addr));
481 ndev->dev_addr[3], ndev->dev_addr[4], ndev->dev_addr[5]);
482 482
483 out: 483 out:
484 return rc; 484 return rc;
diff --git a/drivers/net/rrunner.c b/drivers/net/rrunner.c
index 03facba05259..19152f54ef2b 100644
--- a/drivers/net/rrunner.c
+++ b/drivers/net/rrunner.c
@@ -520,7 +520,7 @@ static int __devinit rr_init(struct net_device *dev)
520 struct rr_regs __iomem *regs; 520 struct rr_regs __iomem *regs;
521 struct eeprom *hw = NULL; 521 struct eeprom *hw = NULL;
522 u32 sram_size, rev; 522 u32 sram_size, rev;
523 int i; 523 DECLARE_MAC_BUF(mac);
524 524
525 rrpriv = netdev_priv(dev); 525 rrpriv = netdev_priv(dev);
526 regs = rrpriv->regs; 526 regs = rrpriv->regs;
@@ -558,11 +558,7 @@ static int __devinit rr_init(struct net_device *dev)
558 *(u32 *)(dev->dev_addr+2) = 558 *(u32 *)(dev->dev_addr+2) =
559 htonl(rr_read_eeprom_word(rrpriv, &hw->manf.BoardULA[4])); 559 htonl(rr_read_eeprom_word(rrpriv, &hw->manf.BoardULA[4]));
560 560
561 printk(" MAC: "); 561 printk(" MAC: %s\n", print_mac(mac, dev->dev_addr));
562
563 for (i = 0; i < 5; i++)
564 printk("%2.2x:", dev->dev_addr[i]);
565 printk("%2.2x\n", dev->dev_addr[i]);
566 562
567 sram_size = rr_read_eeprom_word(rrpriv, (void *)8); 563 sram_size = rr_read_eeprom_word(rrpriv, (void *)8);
568 printk(" SRAM size 0x%06x\n", sram_size); 564 printk(" SRAM size 0x%06x\n", sram_size);
diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c
index a285dd734a03..26895de3e264 100644
--- a/drivers/net/s2io.c
+++ b/drivers/net/s2io.c
@@ -7417,6 +7417,7 @@ s2io_init_nic(struct pci_dev *pdev, const struct pci_device_id *pre)
7417 struct config_param *config; 7417 struct config_param *config;
7418 int mode; 7418 int mode;
7419 u8 dev_intr_type = intr_type; 7419 u8 dev_intr_type = intr_type;
7420 DECLARE_MAC_BUF(mac);
7420 7421
7421 if ((ret = s2io_verify_parm(pdev, &dev_intr_type))) 7422 if ((ret = s2io_verify_parm(pdev, &dev_intr_type)))
7422 return ret; 7423 return ret;
@@ -7720,14 +7721,8 @@ s2io_init_nic(struct pci_dev *pdev, const struct pci_device_id *pre)
7720 sp->product_name, pdev->revision); 7721 sp->product_name, pdev->revision);
7721 DBG_PRINT(ERR_DBG, "%s: Driver version %s\n", dev->name, 7722 DBG_PRINT(ERR_DBG, "%s: Driver version %s\n", dev->name,
7722 s2io_driver_version); 7723 s2io_driver_version);
7723 DBG_PRINT(ERR_DBG, "%s: MAC ADDR: " 7724 DBG_PRINT(ERR_DBG, "%s: MAC ADDR: %s\n",
7724 "%02x:%02x:%02x:%02x:%02x:%02x", dev->name, 7725 dev->name, print_mac(mac, dev->dev_addr));
7725 sp->def_mac_addr[0].mac_addr[0],
7726 sp->def_mac_addr[0].mac_addr[1],
7727 sp->def_mac_addr[0].mac_addr[2],
7728 sp->def_mac_addr[0].mac_addr[3],
7729 sp->def_mac_addr[0].mac_addr[4],
7730 sp->def_mac_addr[0].mac_addr[5]);
7731 DBG_PRINT(ERR_DBG, "SERIAL NUMBER: %s\n", sp->serial_num); 7726 DBG_PRINT(ERR_DBG, "SERIAL NUMBER: %s\n", sp->serial_num);
7732 if (sp->device_type & XFRAME_II_DEVICE) { 7727 if (sp->device_type & XFRAME_II_DEVICE) {
7733 mode = s2io_print_pci_mode(sp); 7728 mode = s2io_print_pci_mode(sp);
diff --git a/drivers/net/sb1250-mac.c b/drivers/net/sb1250-mac.c
index 76e7ee9a6cbc..6001ab47fba0 100644
--- a/drivers/net/sb1250-mac.c
+++ b/drivers/net/sb1250-mac.c
@@ -2407,6 +2407,7 @@ static int sbmac_init(struct net_device *dev, int idx)
2407 uint64_t ea_reg; 2407 uint64_t ea_reg;
2408 int i; 2408 int i;
2409 int err; 2409 int err;
2410 DECLARE_MAC_BUF(mac);
2410 2411
2411 sc = netdev_priv(dev); 2412 sc = netdev_priv(dev);
2412 2413
@@ -2487,10 +2488,8 @@ static int sbmac_init(struct net_device *dev, int idx)
2487 * was being displayed) 2488 * was being displayed)
2488 */ 2489 */
2489 printk(KERN_INFO 2490 printk(KERN_INFO
2490 "%s: SiByte Ethernet at 0x%08lX, address: %02X:%02X:%02X:%02X:%02X:%02X\n", 2491 "%s: SiByte Ethernet at 0x%08lX, address: %s\n",
2491 dev->name, dev->base_addr, 2492 dev->name, dev->base_addr, print_mac(mac, eaddr));
2492 eaddr[0],eaddr[1],eaddr[2],eaddr[3],eaddr[4],eaddr[5]);
2493
2494 2493
2495 return 0; 2494 return 0;
2496 2495
diff --git a/drivers/net/seeq8005.c b/drivers/net/seeq8005.c
index 8ef94028cba5..48c64fb20eec 100644
--- a/drivers/net/seeq8005.c
+++ b/drivers/net/seeq8005.c
@@ -158,6 +158,7 @@ static int __init seeq8005_probe1(struct net_device *dev, int ioaddr)
158 int old_dmaar; 158 int old_dmaar;
159 int old_rear; 159 int old_rear;
160 int retval; 160 int retval;
161 DECLARE_MAC_BUF(mac);
161 162
162 if (!request_region(ioaddr, SEEQ8005_IO_EXTENT, "seeq8005")) 163 if (!request_region(ioaddr, SEEQ8005_IO_EXTENT, "seeq8005"))
163 return -ENODEV; 164 return -ENODEV;
@@ -301,7 +302,8 @@ static int __init seeq8005_probe1(struct net_device *dev, int ioaddr)
301 302
302 /* Retrieve and print the ethernet address. */ 303 /* Retrieve and print the ethernet address. */
303 for (i = 0; i < 6; i++) 304 for (i = 0; i < 6; i++)
304 printk(" %2.2x", dev->dev_addr[i] = SA_prom[i+6]); 305 dev->dev_addr[i] = SA_prom[i+6];
306 printk("%s", print_mac(mac, dev->dev_addr));
305 307
306 if (dev->irq == 0xff) 308 if (dev->irq == 0xff)
307 ; /* Do nothing: a user-level program will set it. */ 309 ; /* Do nothing: a user-level program will set it. */
diff --git a/drivers/net/sgiseeq.c b/drivers/net/sgiseeq.c
index 5189ef066884..ff4056310356 100644
--- a/drivers/net/sgiseeq.c
+++ b/drivers/net/sgiseeq.c
@@ -622,6 +622,7 @@ static int __init sgiseeq_probe(struct platform_device *pdev)
622 struct sgiseeq_private *sp; 622 struct sgiseeq_private *sp;
623 struct net_device *dev; 623 struct net_device *dev;
624 int err, i; 624 int err, i;
625 DECLARE_MAC_BUF(mac);
625 626
626 dev = alloc_etherdev(sizeof (struct sgiseeq_private)); 627 dev = alloc_etherdev(sizeof (struct sgiseeq_private));
627 if (!dev) { 628 if (!dev) {
@@ -695,9 +696,8 @@ static int __init sgiseeq_probe(struct platform_device *pdev)
695 goto err_out_free_page; 696 goto err_out_free_page;
696 } 697 }
697 698
698 printk(KERN_INFO "%s: %s ", dev->name, sgiseeqstr); 699 printk(KERN_INFO "%s: %s %s\n",
699 for (i = 0; i < 6; i++) 700 dev->name, sgiseeqstr, print_mac(mac, dev->dev_addr));
700 printk("%2.2x%c", dev->dev_addr[i], i == 5 ? '\n' : ':');
701 701
702 return 0; 702 return 0;
703 703
diff --git a/drivers/net/sis190.c b/drivers/net/sis190.c
index 808141b46585..720088396bb9 100644
--- a/drivers/net/sis190.c
+++ b/drivers/net/sis190.c
@@ -1759,6 +1759,7 @@ static int __devinit sis190_init_one(struct pci_dev *pdev,
1759 struct net_device *dev; 1759 struct net_device *dev;
1760 void __iomem *ioaddr; 1760 void __iomem *ioaddr;
1761 int rc; 1761 int rc;
1762 DECLARE_MAC_BUF(mac);
1762 1763
1763 if (!printed_version) { 1764 if (!printed_version) {
1764 net_drv(&debug, KERN_INFO SIS190_DRIVER_NAME " loaded.\n"); 1765 net_drv(&debug, KERN_INFO SIS190_DRIVER_NAME " loaded.\n");
@@ -1809,12 +1810,9 @@ static int __devinit sis190_init_one(struct pci_dev *pdev,
1809 goto err_remove_mii; 1810 goto err_remove_mii;
1810 1811
1811 net_probe(tp, KERN_INFO "%s: %s at %p (IRQ: %d), " 1812 net_probe(tp, KERN_INFO "%s: %s at %p (IRQ: %d), "
1812 "%2.2x:%2.2x:%2.2x:%2.2x:%2.2x:%2.2x\n", 1813 "%s\n",
1813 pci_name(pdev), sis_chip_info[ent->driver_data].name, 1814 pci_name(pdev), sis_chip_info[ent->driver_data].name,
1814 ioaddr, dev->irq, 1815 ioaddr, dev->irq, print_mac(mac, dev->dev_addr));
1815 dev->dev_addr[0], dev->dev_addr[1],
1816 dev->dev_addr[2], dev->dev_addr[3],
1817 dev->dev_addr[4], dev->dev_addr[5]);
1818 1816
1819 net_probe(tp, KERN_INFO "%s: %s mode.\n", dev->name, 1817 net_probe(tp, KERN_INFO "%s: %s mode.\n", dev->name,
1820 (tp->features & F_HAS_RGMII) ? "RGMII" : "GMII"); 1818 (tp->features & F_HAS_RGMII) ? "RGMII" : "GMII");
diff --git a/drivers/net/sis900.c b/drivers/net/sis900.c
index 5da8e671324d..0857d2c88aa0 100644
--- a/drivers/net/sis900.c
+++ b/drivers/net/sis900.c
@@ -404,6 +404,7 @@ static int __devinit sis900_probe(struct pci_dev *pci_dev,
404 int i, ret; 404 int i, ret;
405 const char *card_name = card_names[pci_id->driver_data]; 405 const char *card_name = card_names[pci_id->driver_data];
406 const char *dev_name = pci_name(pci_dev); 406 const char *dev_name = pci_name(pci_dev);
407 DECLARE_MAC_BUF(mac);
407 408
408/* when built into the kernel, we only print version if device is found */ 409/* when built into the kernel, we only print version if device is found */
409#ifndef MODULE 410#ifndef MODULE
@@ -533,11 +534,9 @@ static int __devinit sis900_probe(struct pci_dev *pci_dev,
533 goto err_unmap_rx; 534 goto err_unmap_rx;
534 535
535 /* print some information about our NIC */ 536 /* print some information about our NIC */
536 printk(KERN_INFO "%s: %s at %#lx, IRQ %d, ", net_dev->name, 537 printk(KERN_INFO "%s: %s at %#lx, IRQ %d, %s\n",
537 card_name, ioaddr, net_dev->irq); 538 net_dev->name, card_name, ioaddr, net_dev->irq,
538 for (i = 0; i < 5; i++) 539 print_mac(mac, net_dev->dev_addr));
539 printk("%2.2x:", (u8)net_dev->dev_addr[i]);
540 printk("%2.2x.\n", net_dev->dev_addr[i]);
541 540
542 /* Detect Wake on Lan support */ 541 /* Detect Wake on Lan support */
543 ret = (inl(net_dev->base_addr + CFGPMC) & PMESP) >> 27; 542 ret = (inl(net_dev->base_addr + CFGPMC) & PMESP) >> 27;
diff --git a/drivers/net/skge.c b/drivers/net/skge.c
index cac499f84131..ec1acfddf350 100644
--- a/drivers/net/skge.c
+++ b/drivers/net/skge.c
@@ -3616,12 +3616,11 @@ static struct net_device *skge_devinit(struct skge_hw *hw, int port,
3616static void __devinit skge_show_addr(struct net_device *dev) 3616static void __devinit skge_show_addr(struct net_device *dev)
3617{ 3617{
3618 const struct skge_port *skge = netdev_priv(dev); 3618 const struct skge_port *skge = netdev_priv(dev);
3619 DECLARE_MAC_BUF(mac);
3619 3620
3620 if (netif_msg_probe(skge)) 3621 if (netif_msg_probe(skge))
3621 printk(KERN_INFO PFX "%s: addr %02x:%02x:%02x:%02x:%02x:%02x\n", 3622 printk(KERN_INFO PFX "%s: addr %s\n",
3622 dev->name, 3623 dev->name, print_mac(mac, dev->dev_addr));
3623 dev->dev_addr[0], dev->dev_addr[1], dev->dev_addr[2],
3624 dev->dev_addr[3], dev->dev_addr[4], dev->dev_addr[5]);
3625} 3624}
3626 3625
3627static int __devinit skge_probe(struct pci_dev *pdev, 3626static int __devinit skge_probe(struct pci_dev *pdev,
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c
index b8c15f881eba..a70bcbcf8a16 100644
--- a/drivers/net/sky2.c
+++ b/drivers/net/sky2.c
@@ -3984,12 +3984,11 @@ static __devinit struct net_device *sky2_init_netdev(struct sky2_hw *hw,
3984static void __devinit sky2_show_addr(struct net_device *dev) 3984static void __devinit sky2_show_addr(struct net_device *dev)
3985{ 3985{
3986 const struct sky2_port *sky2 = netdev_priv(dev); 3986 const struct sky2_port *sky2 = netdev_priv(dev);
3987 DECLARE_MAC_BUF(mac);
3987 3988
3988 if (netif_msg_probe(sky2)) 3989 if (netif_msg_probe(sky2))
3989 printk(KERN_INFO PFX "%s: addr %02x:%02x:%02x:%02x:%02x:%02x\n", 3990 printk(KERN_INFO PFX "%s: addr %s\n",
3990 dev->name, 3991 dev->name, print_mac(mac, dev->dev_addr));
3991 dev->dev_addr[0], dev->dev_addr[1], dev->dev_addr[2],
3992 dev->dev_addr[3], dev->dev_addr[4], dev->dev_addr[5]);
3993} 3992}
3994 3993
3995/* Handle software interrupt used during MSI test */ 3994/* Handle software interrupt used during MSI test */
diff --git a/drivers/net/smc-mca.c b/drivers/net/smc-mca.c
index 3b43fa8fd088..d6abb68e6e2f 100644
--- a/drivers/net/smc-mca.c
+++ b/drivers/net/smc-mca.c
@@ -196,6 +196,7 @@ static int __init ultramca_probe(struct device *gen_dev)
196 int tirq = 0; 196 int tirq = 0;
197 int base_addr = ultra_io[ultra_found]; 197 int base_addr = ultra_io[ultra_found];
198 int irq = ultra_irq[ultra_found]; 198 int irq = ultra_irq[ultra_found];
199 DECLARE_MAC_BUF(mac);
199 200
200 if (base_addr || irq) { 201 if (base_addr || irq) {
201 printk(KERN_INFO "Probing for SMC MCA adapter"); 202 printk(KERN_INFO "Probing for SMC MCA adapter");
@@ -330,10 +331,11 @@ static int __init ultramca_probe(struct device *gen_dev)
330 reg4 = inb(ioaddr + 4) & 0x7f; 331 reg4 = inb(ioaddr + 4) & 0x7f;
331 outb(reg4, ioaddr + 4); 332 outb(reg4, ioaddr + 4);
332 333
333 printk(KERN_INFO "smc_mca[%d]: Parameters: %#3x,", slot + 1, ioaddr);
334
335 for (i = 0; i < 6; i++) 334 for (i = 0; i < 6; i++)
336 printk(" %2.2X", dev->dev_addr[i] = inb(ioaddr + 8 + i)); 335 dev->dev_addr[i] = inb(ioaddr + 8 + i);
336
337 printk(KERN_INFO "smc_mca[%d]: Parameters: %#3x, %s",
338 slot + 1, ioaddr, print_mac(mac, dev->dev_addr));
337 339
338 /* Switch from the station address to the alternate register set 340 /* Switch from the station address to the alternate register set
339 * and read the useful registers there. 341 * and read the useful registers there.
diff --git a/drivers/net/smc-ultra.c b/drivers/net/smc-ultra.c
index d02bd7bc1bae..00d6cf1af484 100644
--- a/drivers/net/smc-ultra.c
+++ b/drivers/net/smc-ultra.c
@@ -198,6 +198,7 @@ static int __init ultra_probe1(struct net_device *dev, int ioaddr)
198 unsigned char num_pages, irqreg, addr, piomode; 198 unsigned char num_pages, irqreg, addr, piomode;
199 unsigned char idreg = inb(ioaddr + 7); 199 unsigned char idreg = inb(ioaddr + 7);
200 unsigned char reg4 = inb(ioaddr + 4) & 0x7f; 200 unsigned char reg4 = inb(ioaddr + 4) & 0x7f;
201 DECLARE_MAC_BUF(mac);
201 202
202 if (!request_region(ioaddr, ULTRA_IO_EXTENT, DRV_NAME)) 203 if (!request_region(ioaddr, ULTRA_IO_EXTENT, DRV_NAME))
203 return -EBUSY; 204 return -EBUSY;
@@ -224,10 +225,11 @@ static int __init ultra_probe1(struct net_device *dev, int ioaddr)
224 225
225 model_name = (idreg & 0xF0) == 0x20 ? "SMC Ultra" : "SMC EtherEZ"; 226 model_name = (idreg & 0xF0) == 0x20 ? "SMC Ultra" : "SMC EtherEZ";
226 227
227 printk("%s: %s at %#3x,", dev->name, model_name, ioaddr);
228
229 for (i = 0; i < 6; i++) 228 for (i = 0; i < 6; i++)
230 printk(" %2.2X", dev->dev_addr[i] = inb(ioaddr + 8 + i)); 229 dev->dev_addr[i] = inb(ioaddr + 8 + i);
230
231 printk("%s: %s at %#3x, %s", dev->name, model_name,
232 ioaddr, print_mac(mac, dev->dev_addr));
231 233
232 /* Switch from the station address to the alternate register set and 234 /* Switch from the station address to the alternate register set and
233 read the useful registers there. */ 235 read the useful registers there. */
diff --git a/drivers/net/smc-ultra32.c b/drivers/net/smc-ultra32.c
index 043a5002029c..a5a91ace28cc 100644
--- a/drivers/net/smc-ultra32.c
+++ b/drivers/net/smc-ultra32.c
@@ -163,6 +163,7 @@ static int __init ultra32_probe1(struct net_device *dev, int ioaddr)
163 unsigned char idreg; 163 unsigned char idreg;
164 unsigned char reg4; 164 unsigned char reg4;
165 const char *ifmap[] = {"UTP No Link", "", "UTP/AUI", "UTP/BNC"}; 165 const char *ifmap[] = {"UTP No Link", "", "UTP/AUI", "UTP/BNC"};
166 DECLARE_MAC_BUF(mac);
166 167
167 if (!request_region(ioaddr, ULTRA32_IO_EXTENT, DRV_NAME)) 168 if (!request_region(ioaddr, ULTRA32_IO_EXTENT, DRV_NAME))
168 return -EBUSY; 169 return -EBUSY;
@@ -203,10 +204,11 @@ static int __init ultra32_probe1(struct net_device *dev, int ioaddr)
203 204
204 model_name = "SMC Ultra32"; 205 model_name = "SMC Ultra32";
205 206
206 printk("%s: %s at 0x%X,", dev->name, model_name, ioaddr);
207
208 for (i = 0; i < 6; i++) 207 for (i = 0; i < 6; i++)
209 printk(" %2.2X", dev->dev_addr[i] = inb(ioaddr + 8 + i)); 208 dev->dev_addr[i] = inb(ioaddr + 8 + i);
209
210 printk("%s: %s at 0x%X, %s",
211 dev->name, model_name, ioaddr, print_mac(mac, dev->dev_addr));
210 212
211 /* Switch from the station address to the alternate register set and 213 /* Switch from the station address to the alternate register set and
212 read the useful registers there. */ 214 read the useful registers there. */
diff --git a/drivers/net/smc9194.c b/drivers/net/smc9194.c
index 5b6748e3ea0e..cb2698de5190 100644
--- a/drivers/net/smc9194.c
+++ b/drivers/net/smc9194.c
@@ -876,6 +876,8 @@ static int __init smc_probe(struct net_device *dev, int ioaddr)
876 word memory_info_register; 876 word memory_info_register;
877 word memory_cfg_register; 877 word memory_cfg_register;
878 878
879 DECLARE_MAC_BUF(mac);
880
879 /* Grab the region so that no one else tries to probe our ioports. */ 881 /* Grab the region so that no one else tries to probe our ioports. */
880 if (!request_region(ioaddr, SMC_IO_EXTENT, DRV_NAME)) 882 if (!request_region(ioaddr, SMC_IO_EXTENT, DRV_NAME))
881 return -EBUSY; 883 return -EBUSY;
@@ -1031,10 +1033,7 @@ static int __init smc_probe(struct net_device *dev, int ioaddr)
1031 /* 1033 /*
1032 . Print the Ethernet address 1034 . Print the Ethernet address
1033 */ 1035 */
1034 printk("ADDR: "); 1036 printk("ADDR: %s\n", print_mac(mac, dev->dev_addr));
1035 for (i = 0; i < 5; i++)
1036 printk("%2.2x:", dev->dev_addr[i] );
1037 printk("%2.2x \n", dev->dev_addr[5] );
1038 1037
1039 /* set the private data to zero by default */ 1038 /* set the private data to zero by default */
1040 memset(dev->priv, 0, sizeof(struct smc_local)); 1039 memset(dev->priv, 0, sizeof(struct smc_local));
diff --git a/drivers/net/smc91x.c b/drivers/net/smc91x.c
index fe28d277f21a..24e610e711e8 100644
--- a/drivers/net/smc91x.c
+++ b/drivers/net/smc91x.c
@@ -1822,9 +1822,10 @@ static int __init smc_probe(struct net_device *dev, void __iomem *ioaddr)
1822{ 1822{
1823 struct smc_local *lp = netdev_priv(dev); 1823 struct smc_local *lp = netdev_priv(dev);
1824 static int version_printed = 0; 1824 static int version_printed = 0;
1825 int i, retval; 1825 int retval;
1826 unsigned int val, revision_register; 1826 unsigned int val, revision_register;
1827 const char *version_string; 1827 const char *version_string;
1828 DECLARE_MAC_BUF(mac);
1828 1829
1829 DBG(2, "%s: %s\n", CARDNAME, __FUNCTION__); 1830 DBG(2, "%s: %s\n", CARDNAME, __FUNCTION__);
1830 1831
@@ -2014,10 +2015,8 @@ static int __init smc_probe(struct net_device *dev, void __iomem *ioaddr)
2014 "set using ifconfig\n", dev->name); 2015 "set using ifconfig\n", dev->name);
2015 } else { 2016 } else {
2016 /* Print the Ethernet address */ 2017 /* Print the Ethernet address */
2017 printk("%s: Ethernet addr: ", dev->name); 2018 printk("%s: Ethernet addr: %s\n",
2018 for (i = 0; i < 5; i++) 2019 dev->name, print_mac(mac, dev->dev_addr));
2019 printk("%2.2x:", dev->dev_addr[i]);
2020 printk("%2.2x\n", dev->dev_addr[5]);
2021 } 2020 }
2022 2021
2023 if (lp->phy_type == 0) { 2022 if (lp->phy_type == 0) {
diff --git a/drivers/net/starfire.c b/drivers/net/starfire.c
index 5785429ca0e2..ea253754763a 100644
--- a/drivers/net/starfire.c
+++ b/drivers/net/starfire.c
@@ -694,6 +694,7 @@ static int __devinit starfire_init_one(struct pci_dev *pdev,
694 void __iomem *base; 694 void __iomem *base;
695 int drv_flags, io_size; 695 int drv_flags, io_size;
696 int boguscnt; 696 int boguscnt;
697 DECLARE_MAC_BUF(mac);
697 698
698/* when built into the kernel, we only print version if device is found */ 699/* when built into the kernel, we only print version if device is found */
699#ifndef MODULE 700#ifndef MODULE
@@ -863,11 +864,9 @@ static int __devinit starfire_init_one(struct pci_dev *pdev,
863 if (register_netdev(dev)) 864 if (register_netdev(dev))
864 goto err_out_cleardev; 865 goto err_out_cleardev;
865 866
866 printk(KERN_INFO "%s: %s at %p, ", 867 printk(KERN_INFO "%s: %s at %p, %s, IRQ %d.\n",
867 dev->name, netdrv_tbl[chip_idx].name, base); 868 dev->name, netdrv_tbl[chip_idx].name, base,
868 for (i = 0; i < 5; i++) 869 print_mac(mac, dev->dev_addr), irq);
869 printk("%2.2x:", dev->dev_addr[i]);
870 printk("%2.2x, IRQ %d.\n", dev->dev_addr[i], irq);
871 870
872 if (drv_flags & CanHaveMII) { 871 if (drv_flags & CanHaveMII) {
873 int phy, phy_idx = 0; 872 int phy, phy_idx = 0;
@@ -1472,13 +1471,16 @@ static int __netdev_rx(struct net_device *dev, int *quota)
1472 } 1471 }
1473#ifndef final_version /* Remove after testing. */ 1472#ifndef final_version /* Remove after testing. */
1474 /* You will want this info for the initial debug. */ 1473 /* You will want this info for the initial debug. */
1475 if (debug > 5) 1474 if (debug > 5) {
1476 printk(KERN_DEBUG " Rx data %2.2x:%2.2x:%2.2x:%2.2x:%2.2x:" 1475 DECLARE_MAC_BUF(mac);
1477 "%2.2x %2.2x:%2.2x:%2.2x:%2.2x:%2.2x:%2.2x %2.2x%2.2x.\n", 1476 DECLARE_MAC_BUF(mac2);
1478 skb->data[0], skb->data[1], skb->data[2], skb->data[3], 1477
1479 skb->data[4], skb->data[5], skb->data[6], skb->data[7], 1478 printk(KERN_DEBUG " Rx data %s %s"
1480 skb->data[8], skb->data[9], skb->data[10], 1479 " %2.2x%2.2x.\n",
1481 skb->data[11], skb->data[12], skb->data[13]); 1480 print_mac(mac, &skb->data[0]),
1481 print_mac(mac2, &skb->data[6]),
1482 skb->data[12], skb->data[13]);
1483 }
1482#endif 1484#endif
1483 1485
1484 skb->protocol = eth_type_trans(skb, dev); 1486 skb->protocol = eth_type_trans(skb, dev);
diff --git a/drivers/net/sun3lance.c b/drivers/net/sun3lance.c
index f8fbc0492706..f8d46134daca 100644
--- a/drivers/net/sun3lance.c
+++ b/drivers/net/sun3lance.c
@@ -300,6 +300,7 @@ static int __init lance_probe( struct net_device *dev)
300 static int did_version; 300 static int did_version;
301 volatile unsigned short *ioaddr_probe; 301 volatile unsigned short *ioaddr_probe;
302 unsigned short tmp1, tmp2; 302 unsigned short tmp1, tmp2;
303 DECLARE_MAC_BUF(mac);
303 304
304#ifdef CONFIG_SUN3 305#ifdef CONFIG_SUN3
305 ioaddr = (unsigned long)ioremap(LANCE_OBIO, PAGE_SIZE); 306 ioaddr = (unsigned long)ioremap(LANCE_OBIO, PAGE_SIZE);
@@ -375,8 +376,7 @@ static int __init lance_probe( struct net_device *dev)
375 MEM->init.hwaddr[4] = dev->dev_addr[5]; 376 MEM->init.hwaddr[4] = dev->dev_addr[5];
376 MEM->init.hwaddr[5] = dev->dev_addr[4]; 377 MEM->init.hwaddr[5] = dev->dev_addr[4];
377 378
378 for( i = 0; i < 6; ++i ) 379 printk("%s\n", print_mac(mac, dev->dev_addr));
379 printk( "%02x%s", dev->dev_addr[i], (i < 5) ? ":" : "\n" );
380 380
381 MEM->init.mode = 0x0000; 381 MEM->init.mode = 0x0000;
382 MEM->init.filter[0] = 0x00000000; 382 MEM->init.filter[0] = 0x00000000;
@@ -590,17 +590,12 @@ static int lance_start_xmit( struct sk_buff *skb, struct net_device *dev )
590 /* Fill in a Tx ring entry */ 590 /* Fill in a Tx ring entry */
591#if 0 591#if 0
592 if (lance_debug >= 2) { 592 if (lance_debug >= 2) {
593 u_char *p; 593 printk( "%s: TX pkt %d type 0x%04x"
594 int i; 594 " from %s to %s"
595 printk( "%s: TX pkt %d type 0x%04x from ", dev->name, 595 " data at 0x%08x len %d\n",
596 lp->new_tx, ((u_short *)skb->data)[6]); 596 dev->name, lp->new_tx, ((u_short *)skb->data)[6],
597 for( p = &((u_char *)skb->data)[6], i = 0; i < 6; i++ ) 597 DEV_ADDR(&skb->data[6]), DEV_ADDR(skb->data),
598 printk("%02x%s", *p++, i != 5 ? ":" : "" ); 598 (int)skb->data, (int)skb->len );
599 printk(" to ");
600 for( p = (u_char *)skb->data, i = 0; i < 6; i++ )
601 printk("%02x%s", *p++, i != 5 ? ":" : "" );
602 printk(" data at 0x%08x len %d\n", (int)skb->data,
603 (int)skb->len );
604 } 599 }
605#endif 600#endif
606 /* We're not prepared for the int until the last flags are set/reset. 601 /* We're not prepared for the int until the last flags are set/reset.
@@ -825,13 +820,14 @@ static int lance_rx( struct net_device *dev )
825 820
826#if 0 821#if 0
827 if (lance_debug >= 3) { 822 if (lance_debug >= 3) {
828 u_char *data = PKTBUF_ADDR(head), *p; 823 u_char *data = PKTBUF_ADDR(head);
829 printk( "%s: RX pkt %d type 0x%04x from ", dev->name, entry, ((u_short *)data)[6]); 824 DECLARE_MAC_BUF(mac);
830 for( p = &data[6], i = 0; i < 6; i++ ) 825 DECLARE_MAC_BUF(mac2)
831 printk("%02x%s", *p++, i != 5 ? ":" : "" ); 826 printk("%s: RX pkt %d type 0x%04x"
832 printk(" to "); 827 " from %s to %s",
833 for( p = data, i = 0; i < 6; i++ ) 828 dev->name, lp->new_tx, ((u_short *)data)[6],
834 printk("%02x%s", *p++, i != 5 ? ":" : "" ); 829 print_mac(mac, &data[6]), print_mac(mac2, data));
830
835 printk(" data %02x %02x %02x %02x %02x %02x %02x %02x " 831 printk(" data %02x %02x %02x %02x %02x %02x %02x %02x "
836 "len %d at %08x\n", 832 "len %d at %08x\n",
837 data[15], data[16], data[17], data[18], 833 data[15], data[16], data[17], data[18],
diff --git a/drivers/net/sunbmac.c b/drivers/net/sunbmac.c
index 4ba3e4857e90..fe3ac6f9ae89 100644
--- a/drivers/net/sunbmac.c
+++ b/drivers/net/sunbmac.c
@@ -1082,6 +1082,7 @@ static int __init bigmac_ether_init(struct sbus_dev *qec_sdev)
1082 struct bigmac *bp; 1082 struct bigmac *bp;
1083 u8 bsizes, bsizes_more; 1083 u8 bsizes, bsizes_more;
1084 int i; 1084 int i;
1085 DECLARE_MAC_BUF(mac);
1085 1086
1086 /* Get a new device struct for this interface. */ 1087 /* Get a new device struct for this interface. */
1087 dev = alloc_etherdev(sizeof(struct bigmac)); 1088 dev = alloc_etherdev(sizeof(struct bigmac));
@@ -1226,11 +1227,8 @@ static int __init bigmac_ether_init(struct sbus_dev *qec_sdev)
1226 1227
1227 dev_set_drvdata(&bp->bigmac_sdev->ofdev.dev, bp); 1228 dev_set_drvdata(&bp->bigmac_sdev->ofdev.dev, bp);
1228 1229
1229 printk(KERN_INFO "%s: BigMAC 100baseT Ethernet ", dev->name); 1230 printk(KERN_INFO "%s: BigMAC 100baseT Ethernet %s\n",
1230 for (i = 0; i < 6; i++) 1231 dev->name, print_mac(mac, dev->dev_addr));
1231 printk("%2.2x%c", dev->dev_addr[i],
1232 i == 5 ? ' ' : ':');
1233 printk("\n");
1234 1232
1235 return 0; 1233 return 0;
1236 1234
diff --git a/drivers/net/sundance.c b/drivers/net/sundance.c
index 3c553dcc2b9d..a37637ec9b77 100644
--- a/drivers/net/sundance.c
+++ b/drivers/net/sundance.c
@@ -467,7 +467,7 @@ static int __devinit sundance_probe1 (struct pci_dev *pdev,
467 int bar = 1; 467 int bar = 1;
468#endif 468#endif
469 int phy, phy_idx = 0; 469 int phy, phy_idx = 0;
470 470 DECLARE_MAC_BUF(mac);
471 471
472/* when built into the kernel, we only print version if device is found */ 472/* when built into the kernel, we only print version if device is found */
473#ifndef MODULE 473#ifndef MODULE
@@ -546,11 +546,9 @@ static int __devinit sundance_probe1 (struct pci_dev *pdev,
546 if (i) 546 if (i)
547 goto err_out_unmap_rx; 547 goto err_out_unmap_rx;
548 548
549 printk(KERN_INFO "%s: %s at %p, ", 549 printk(KERN_INFO "%s: %s at %p, %s, IRQ %d.\n",
550 dev->name, pci_id_tbl[chip_idx].name, ioaddr); 550 dev->name, pci_id_tbl[chip_idx].name, ioaddr,
551 for (i = 0; i < 5; i++) 551 print_mac(mac, dev->dev_addr), irq);
552 printk("%2.2x:", dev->dev_addr[i]);
553 printk("%2.2x, IRQ %d.\n", dev->dev_addr[i], irq);
554 552
555 np->phys[0] = 1; /* Default setting */ 553 np->phys[0] = 1; /* Default setting */
556 np->mii_preamble_required++; 554 np->mii_preamble_required++;
diff --git a/drivers/net/sungem.c b/drivers/net/sungem.c
index 869ac44c51f3..53b8344a68ef 100644
--- a/drivers/net/sungem.c
+++ b/drivers/net/sungem.c
@@ -2965,7 +2965,8 @@ static int __devinit gem_init_one(struct pci_dev *pdev,
2965 unsigned long gemreg_base, gemreg_len; 2965 unsigned long gemreg_base, gemreg_len;
2966 struct net_device *dev; 2966 struct net_device *dev;
2967 struct gem *gp; 2967 struct gem *gp;
2968 int i, err, pci_using_dac; 2968 int err, pci_using_dac;
2969 DECLARE_MAC_BUF(mac);
2969 2970
2970 if (gem_version_printed++ == 0) 2971 if (gem_version_printed++ == 0)
2971 printk(KERN_INFO "%s", version); 2972 printk(KERN_INFO "%s", version);
@@ -3149,12 +3150,9 @@ static int __devinit gem_init_one(struct pci_dev *pdev,
3149 goto err_out_free_consistent; 3150 goto err_out_free_consistent;
3150 } 3151 }
3151 3152
3152 printk(KERN_INFO "%s: Sun GEM (PCI) 10/100/1000BaseT Ethernet ", 3153 printk(KERN_INFO "%s: Sun GEM (PCI) 10/100/1000BaseT Ethernet "
3153 dev->name); 3154 "%s\n",
3154 for (i = 0; i < 6; i++) 3155 dev->name, print_mac(mac, dev->dev_addr));
3155 printk("%2.2x%c", dev->dev_addr[i],
3156 i == 5 ? ' ' : ':');
3157 printk("\n");
3158 3156
3159 if (gp->phy_type == phy_mii_mdio0 || 3157 if (gp->phy_type == phy_mii_mdio0 ||
3160 gp->phy_type == phy_mii_mdio1) 3158 gp->phy_type == phy_mii_mdio1)
diff --git a/drivers/net/sunhme.c b/drivers/net/sunhme.c
index 170580c13127..120c8affe83d 100644
--- a/drivers/net/sunhme.c
+++ b/drivers/net/sunhme.c
@@ -2664,6 +2664,7 @@ static int __devinit happy_meal_sbus_probe_one(struct sbus_dev *sdev, int is_qfe
2664 struct net_device *dev; 2664 struct net_device *dev;
2665 int i, qfe_slot = -1; 2665 int i, qfe_slot = -1;
2666 int err = -ENODEV; 2666 int err = -ENODEV;
2667 DECLARE_MAC_BUF(mac);
2667 2668
2668 if (is_qfe) { 2669 if (is_qfe) {
2669 qp = quattro_sbus_find(sdev); 2670 qp = quattro_sbus_find(sdev);
@@ -2850,10 +2851,7 @@ static int __devinit happy_meal_sbus_probe_one(struct sbus_dev *sdev, int is_qfe
2850 printk(KERN_INFO "%s: HAPPY MEAL (SBUS) 10/100baseT Ethernet ", 2851 printk(KERN_INFO "%s: HAPPY MEAL (SBUS) 10/100baseT Ethernet ",
2851 dev->name); 2852 dev->name);
2852 2853
2853 for (i = 0; i < 6; i++) 2854 printk("%s\n", print_mac(mac, dev->dev_addr));
2854 printk("%2.2x%c",
2855 dev->dev_addr[i], i == 5 ? ' ' : ':');
2856 printk("\n");
2857 2855
2858 return 0; 2856 return 0;
2859 2857
@@ -2988,6 +2986,7 @@ static int __devinit happy_meal_pci_probe(struct pci_dev *pdev,
2988 int i, qfe_slot = -1; 2986 int i, qfe_slot = -1;
2989 char prom_name[64]; 2987 char prom_name[64];
2990 int err; 2988 int err;
2989 DECLARE_MAC_BUF(mac);
2991 2990
2992 /* Now make sure pci_dev cookie is there. */ 2991 /* Now make sure pci_dev cookie is there. */
2993#ifdef CONFIG_SPARC 2992#ifdef CONFIG_SPARC
@@ -3201,10 +3200,7 @@ static int __devinit happy_meal_pci_probe(struct pci_dev *pdev,
3201 printk(KERN_INFO "%s: HAPPY MEAL (PCI/CheerIO) 10/100BaseT Ethernet ", 3200 printk(KERN_INFO "%s: HAPPY MEAL (PCI/CheerIO) 10/100BaseT Ethernet ",
3202 dev->name); 3201 dev->name);
3203 3202
3204 for (i = 0; i < 6; i++) 3203 printk("%s\n", print_mac(mac, dev->dev_addr));
3205 printk("%2.2x%c", dev->dev_addr[i], i == 5 ? ' ' : ':');
3206
3207 printk("\n");
3208 3204
3209 return 0; 3205 return 0;
3210 3206
diff --git a/drivers/net/sunlance.c b/drivers/net/sunlance.c
index 7bf5c90b7749..26ade68aeabf 100644
--- a/drivers/net/sunlance.c
+++ b/drivers/net/sunlance.c
@@ -1321,6 +1321,7 @@ static int __devinit sparc_lance_probe_one(struct sbus_dev *sdev,
1321 struct net_device *dev; 1321 struct net_device *dev;
1322 struct lance_private *lp; 1322 struct lance_private *lp;
1323 int i; 1323 int i;
1324 DECLARE_MAC_BUF(mac);
1324 1325
1325 dev = alloc_etherdev(sizeof(struct lance_private) + 8); 1326 dev = alloc_etherdev(sizeof(struct lance_private) + 8);
1326 if (!dev) 1327 if (!dev)
@@ -1478,12 +1479,8 @@ no_link_test:
1478 1479
1479 dev_set_drvdata(&sdev->ofdev.dev, lp); 1480 dev_set_drvdata(&sdev->ofdev.dev, lp);
1480 1481
1481 printk(KERN_INFO "%s: LANCE ", dev->name); 1482 printk(KERN_INFO "%s: LANCE %s\n",
1482 1483 dev->name, print_mac(mac, dev->dev_addr));
1483 for (i = 0; i < 6; i++)
1484 printk("%2.2x%c", dev->dev_addr[i],
1485 i == 5 ? ' ': ':');
1486 printk("\n");
1487 1484
1488 return 0; 1485 return 0;
1489 1486
diff --git a/drivers/net/tokenring/abyss.c b/drivers/net/tokenring/abyss.c
index 22fad5112406..124cfd4fbcf4 100644
--- a/drivers/net/tokenring/abyss.c
+++ b/drivers/net/tokenring/abyss.c
@@ -97,8 +97,9 @@ static int __devinit abyss_attach(struct pci_dev *pdev, const struct pci_device_
97 static int versionprinted; 97 static int versionprinted;
98 struct net_device *dev; 98 struct net_device *dev;
99 struct net_local *tp; 99 struct net_local *tp;
100 int i, ret, pci_irq_line; 100 int ret, pci_irq_line;
101 unsigned long pci_ioaddr; 101 unsigned long pci_ioaddr;
102 DECLARE_MAC_BUF(mac);
102 103
103 if (versionprinted++ == 0) 104 if (versionprinted++ == 0)
104 printk("%s", version); 105 printk("%s", version);
@@ -145,12 +146,9 @@ static int __devinit abyss_attach(struct pci_dev *pdev, const struct pci_device_
145 } 146 }
146 147
147 abyss_read_eeprom(dev); 148 abyss_read_eeprom(dev);
148 149
149 printk("%s: Ring Station Address: ", dev->name); 150 printk("%s: Ring Station Address: %s\n",
150 printk("%2.2x", dev->dev_addr[0]); 151 dev->name, print_mac(mac, dev->dev_addr));
151 for (i = 1; i < 6; i++)
152 printk(":%2.2x", dev->dev_addr[i]);
153 printk("\n");
154 152
155 tp = netdev_priv(dev); 153 tp = netdev_priv(dev);
156 tp->setnselout = abyss_setnselout_pins; 154 tp->setnselout = abyss_setnselout_pins;
diff --git a/drivers/net/tokenring/ibmtr.c b/drivers/net/tokenring/ibmtr.c
index 65e21eb7e685..e494c63bfbd9 100644
--- a/drivers/net/tokenring/ibmtr.c
+++ b/drivers/net/tokenring/ibmtr.c
@@ -389,6 +389,7 @@ static int __devinit ibmtr_probe1(struct net_device *dev, int PIOaddr)
389 unsigned long timeout; 389 unsigned long timeout;
390 static int version_printed; 390 static int version_printed;
391#endif 391#endif
392 DECLARE_MAC_BUF(mac);
392 393
393 /* Query the adapter PIO base port which will return 394 /* Query the adapter PIO base port which will return
394 * indication of where MMIO was placed. We also have a 395 * indication of where MMIO was placed. We also have a
@@ -702,9 +703,8 @@ static int __devinit ibmtr_probe1(struct net_device *dev, int PIOaddr)
702 channel_def[cardpresent - 1], adapter_def(ti->adapter_type)); 703 channel_def[cardpresent - 1], adapter_def(ti->adapter_type));
703 DPRINTK("using irq %d, PIOaddr %hx, %dK shared RAM.\n", 704 DPRINTK("using irq %d, PIOaddr %hx, %dK shared RAM.\n",
704 irq, PIOaddr, ti->mapped_ram_size / 2); 705 irq, PIOaddr, ti->mapped_ram_size / 2);
705 DPRINTK("Hardware address : %02X:%02X:%02X:%02X:%02X:%02X\n", 706 DPRINTK("Hardware address : %s\n",
706 dev->dev_addr[0], dev->dev_addr[1], dev->dev_addr[2], 707 print_mac(mac, dev->dev_addr));
707 dev->dev_addr[3], dev->dev_addr[4], dev->dev_addr[5]);
708 if (ti->page_mask) 708 if (ti->page_mask)
709 DPRINTK("Shared RAM paging enabled. " 709 DPRINTK("Shared RAM paging enabled. "
710 "Page size: %uK Shared Ram size %dK\n", 710 "Page size: %uK Shared Ram size %dK\n",
@@ -1739,18 +1739,20 @@ static void tr_rx(struct net_device *dev)
1739 if (!IPv4_p) { 1739 if (!IPv4_p) {
1740 1740
1741 void __iomem *trhhdr = rbuf + offsetof(struct rec_buf, data); 1741 void __iomem *trhhdr = rbuf + offsetof(struct rec_buf, data);
1742 1742 u8 saddr[6];
1743 u8 daddr[6];
1744 DECLARE_MAC_BUF(mac);
1745 DECLARE_MAC_BUF(mac2);
1746 int i;
1747 for (i = 0 ; i < 6 ; i++)
1748 saddr[i] = readb(trhhdr + SADDR_OFST + i);
1749 for (i = 0 ; i < 6 ; i++)
1750 daddr[i] = readb(trhhdr + DADDR_OFST + i);
1743 DPRINTK("Probably non-IP frame received.\n"); 1751 DPRINTK("Probably non-IP frame received.\n");
1744 DPRINTK("ssap: %02X dsap: %02X " 1752 DPRINTK("ssap: %02X dsap: %02X "
1745 "saddr: %02X:%02X:%02X:%02X:%02X:%02X " 1753 "saddr: %s daddr: %$s\n",
1746 "daddr: %02X:%02X:%02X:%02X:%02X:%02X\n",
1747 readb(llc + SSAP_OFST), readb(llc + DSAP_OFST), 1754 readb(llc + SSAP_OFST), readb(llc + DSAP_OFST),
1748 readb(trhhdr+SADDR_OFST), readb(trhhdr+ SADDR_OFST+1), 1755 print_mac(mac, saddr), print_mac(mac2, daddr));
1749 readb(trhhdr+SADDR_OFST+2), readb(trhhdr+SADDR_OFST+3),
1750 readb(trhhdr+SADDR_OFST+4), readb(trhhdr+SADDR_OFST+5),
1751 readb(trhhdr+DADDR_OFST), readb(trhhdr+DADDR_OFST + 1),
1752 readb(trhhdr+DADDR_OFST+2), readb(trhhdr+DADDR_OFST+3),
1753 readb(trhhdr+DADDR_OFST+4), readb(trhhdr+DADDR_OFST+5));
1754 } 1756 }
1755#endif 1757#endif
1756 1758
diff --git a/drivers/net/tokenring/lanstreamer.c b/drivers/net/tokenring/lanstreamer.c
index f114fb729f54..47d84cd28097 100644
--- a/drivers/net/tokenring/lanstreamer.c
+++ b/drivers/net/tokenring/lanstreamer.c
@@ -447,6 +447,9 @@ static int streamer_reset(struct net_device *dev)
447 unsigned int uaa_addr; 447 unsigned int uaa_addr;
448 struct sk_buff *skb = NULL; 448 struct sk_buff *skb = NULL;
449 __u16 misr; 449 __u16 misr;
450#if STREAMER_DEBUG
451 DECLARE_MAC_BUF(mac);
452#endif
450 453
451 streamer_priv = netdev_priv(dev); 454 streamer_priv = netdev_priv(dev);
452 streamer_mmio = streamer_priv->streamer_mmio; 455 streamer_mmio = streamer_priv->streamer_mmio;
@@ -575,11 +578,8 @@ static int streamer_reset(struct net_device *dev)
575 dev->dev_addr[i+1]= addr & 0xff; 578 dev->dev_addr[i+1]= addr & 0xff;
576 } 579 }
577#if STREAMER_DEBUG 580#if STREAMER_DEBUG
578 printk("Adapter address: "); 581 printk("Adapter address: %s\n",
579 for (i = 0; i < 6; i++) { 582 print_mac(mac, dev->dev_addr));
580 printk("%02x:", dev->dev_addr[i]);
581 }
582 printk("\n");
583#endif 583#endif
584 } 584 }
585 return 0; 585 return 0;
@@ -1539,6 +1539,7 @@ static void streamer_arb_cmd(struct net_device *dev)
1539 1539
1540#if STREAMER_NETWORK_MONITOR 1540#if STREAMER_NETWORK_MONITOR
1541 struct trh_hdr *mac_hdr; 1541 struct trh_hdr *mac_hdr;
1542 DECLARE_MAC_BUF(mac);
1542#endif 1543#endif
1543 1544
1544 writew(streamer_priv->arb, streamer_mmio + LAPA); 1545 writew(streamer_priv->arb, streamer_mmio + LAPA);
@@ -1611,15 +1612,11 @@ static void streamer_arb_cmd(struct net_device *dev)
1611 dev->name); 1612 dev->name);
1612 mac_hdr = tr_hdr(mac_frame); 1613 mac_hdr = tr_hdr(mac_frame);
1613 printk(KERN_WARNING 1614 printk(KERN_WARNING
1614 "%s: MAC Frame Dest. Addr: %02x:%02x:%02x:%02x:%02x:%02x \n", 1615 "%s: MAC Frame Dest. Addr: %s\n",
1615 dev->name, mac_hdr->daddr[0], mac_hdr->daddr[1], 1616 dev->name, print_mac(mac, mac_hdr->daddr));
1616 mac_hdr->daddr[2], mac_hdr->daddr[3],
1617 mac_hdr->daddr[4], mac_hdr->daddr[5]);
1618 printk(KERN_WARNING 1617 printk(KERN_WARNING
1619 "%s: MAC Frame Srce. Addr: %02x:%02x:%02x:%02x:%02x:%02x \n", 1618 "%s: MAC Frame Srce. Addr: %s\n",
1620 dev->name, mac_hdr->saddr[0], mac_hdr->saddr[1], 1619 dev->name, DEV->ADDR6(mac_hdr->saddr));
1621 mac_hdr->saddr[2], mac_hdr->saddr[3],
1622 mac_hdr->saddr[4], mac_hdr->saddr[5]);
1623#endif 1620#endif
1624 netif_rx(mac_frame); 1621 netif_rx(mac_frame);
1625 1622
@@ -1854,6 +1851,8 @@ static int sprintf_info(char *buffer, struct net_device *dev)
1854 struct streamer_parameters_table spt; 1851 struct streamer_parameters_table spt;
1855 int size = 0; 1852 int size = 0;
1856 int i; 1853 int i;
1854 DECLARE_MAC_BUF(mac);
1855 DECLARE_MAC_BUF(mac2);
1857 1856
1858 writew(streamer_priv->streamer_addr_table_addr, streamer_mmio + LAPA); 1857 writew(streamer_priv->streamer_addr_table_addr, streamer_mmio + LAPA);
1859 for (i = 0; i < 14; i += 2) { 1858 for (i = 0; i < 14; i += 2) {
@@ -1875,37 +1874,30 @@ static int sprintf_info(char *buffer, struct net_device *dev)
1875 size = sprintf(buffer, "\n%6s: Adapter Address : Node Address : Functional Addr\n", dev->name); 1874 size = sprintf(buffer, "\n%6s: Adapter Address : Node Address : Functional Addr\n", dev->name);
1876 1875
1877 size += sprintf(buffer + size, 1876 size += sprintf(buffer + size,
1878 "%6s: %02x:%02x:%02x:%02x:%02x:%02x : %02x:%02x:%02x:%02x:%02x:%02x : %02x:%02x:%02x:%02x\n", 1877 "%6s: %s : %s : %02x:%02x:%02x:%02x\n",
1879 dev->name, dev->dev_addr[0], dev->dev_addr[1], 1878 dev->name, print_mac(mac, dev->dev_addr),
1880 dev->dev_addr[2], dev->dev_addr[3], dev->dev_addr[4], 1879 print_mac(mac2, sat.node_addr),
1881 dev->dev_addr[5], sat.node_addr[0], sat.node_addr[1], 1880 sat.func_addr[0], sat.func_addr[1],
1882 sat.node_addr[2], sat.node_addr[3], sat.node_addr[4], 1881 sat.func_addr[2], sat.func_addr[3]);
1883 sat.node_addr[5], sat.func_addr[0], sat.func_addr[1],
1884 sat.func_addr[2], sat.func_addr[3]);
1885 1882
1886 size += sprintf(buffer + size, "\n%6s: Token Ring Parameters Table:\n", dev->name); 1883 size += sprintf(buffer + size, "\n%6s: Token Ring Parameters Table:\n", dev->name);
1887 1884
1888 size += sprintf(buffer + size, "%6s: Physical Addr : Up Node Address : Poll Address : AccPri : Auth Src : Att Code :\n", dev->name); 1885 size += sprintf(buffer + size, "%6s: Physical Addr : Up Node Address : Poll Address : AccPri : Auth Src : Att Code :\n", dev->name);
1889 1886
1890 size += sprintf(buffer + size, 1887 size += sprintf(buffer + size,
1891 "%6s: %02x:%02x:%02x:%02x : %02x:%02x:%02x:%02x:%02x:%02x : %02x:%02x:%02x:%02x:%02x:%02x : %04x : %04x : %04x :\n", 1888 "%6s: %02x:%02x:%02x:%02x : %s : %s : %04x : %04x : %04x :\n",
1892 dev->name, spt.phys_addr[0], spt.phys_addr[1], 1889 dev->name, spt.phys_addr[0], spt.phys_addr[1],
1893 spt.phys_addr[2], spt.phys_addr[3], 1890 spt.phys_addr[2], spt.phys_addr[3],
1894 spt.up_node_addr[0], spt.up_node_addr[1], 1891 print_mac(mac, spt.up_node_addr),
1895 spt.up_node_addr[2], spt.up_node_addr[3], 1892 print_mac(mac2, spt.poll_addr),
1896 spt.up_node_addr[4], spt.up_node_addr[4],
1897 spt.poll_addr[0], spt.poll_addr[1], spt.poll_addr[2],
1898 spt.poll_addr[3], spt.poll_addr[4], spt.poll_addr[5],
1899 ntohs(spt.acc_priority), ntohs(spt.auth_source_class), 1893 ntohs(spt.acc_priority), ntohs(spt.auth_source_class),
1900 ntohs(spt.att_code)); 1894 ntohs(spt.att_code));
1901 1895
1902 size += sprintf(buffer + size, "%6s: Source Address : Bcn T : Maj. V : Lan St : Lcl Rg : Mon Err : Frame Correl : \n", dev->name); 1896 size += sprintf(buffer + size, "%6s: Source Address : Bcn T : Maj. V : Lan St : Lcl Rg : Mon Err : Frame Correl : \n", dev->name);
1903 1897
1904 size += sprintf(buffer + size, 1898 size += sprintf(buffer + size,
1905 "%6s: %02x:%02x:%02x:%02x:%02x:%02x : %04x : %04x : %04x : %04x : %04x : %04x : \n", 1899 "%6s: %s : %04x : %04x : %04x : %04x : %04x : %04x : \n",
1906 dev->name, spt.source_addr[0], spt.source_addr[1], 1900 dev->name, print_mac(mac, spt.source_addr),
1907 spt.source_addr[2], spt.source_addr[3],
1908 spt.source_addr[4], spt.source_addr[5],
1909 ntohs(spt.beacon_type), ntohs(spt.major_vector), 1901 ntohs(spt.beacon_type), ntohs(spt.major_vector),
1910 ntohs(spt.lan_status), ntohs(spt.local_ring), 1902 ntohs(spt.lan_status), ntohs(spt.local_ring),
1911 ntohs(spt.mon_error), ntohs(spt.frame_correl)); 1903 ntohs(spt.mon_error), ntohs(spt.frame_correl));
@@ -1914,14 +1906,12 @@ static int sprintf_info(char *buffer, struct net_device *dev)
1914 dev->name); 1906 dev->name);
1915 1907
1916 size += sprintf(buffer + size, 1908 size += sprintf(buffer + size,
1917 "%6s: : %02x : %02x : %02x:%02x:%02x:%02x:%02x:%02x : %02x:%02x:%02x:%02x : \n", 1909 "%6s: : %02x : %02x : %s : %02x:%02x:%02x:%02x : \n",
1918 dev->name, ntohs(spt.beacon_transmit), 1910 dev->name, ntohs(spt.beacon_transmit),
1919 ntohs(spt.beacon_receive), spt.beacon_naun[0], 1911 ntohs(spt.beacon_receive),
1920 spt.beacon_naun[1], spt.beacon_naun[2], 1912 print_mac(mac, spt.beacon_naun),
1921 spt.beacon_naun[3], spt.beacon_naun[4], 1913 spt.beacon_phys[0], spt.beacon_phys[1],
1922 spt.beacon_naun[5], spt.beacon_phys[0], 1914 spt.beacon_phys[2], spt.beacon_phys[3]);
1923 spt.beacon_phys[1], spt.beacon_phys[2],
1924 spt.beacon_phys[3]);
1925 return size; 1915 return size;
1926} 1916}
1927#endif 1917#endif
diff --git a/drivers/net/tokenring/madgemc.c b/drivers/net/tokenring/madgemc.c
index d0ce2ce675d5..5a4151362fc0 100644
--- a/drivers/net/tokenring/madgemc.c
+++ b/drivers/net/tokenring/madgemc.c
@@ -151,7 +151,8 @@ static int __devinit madgemc_probe(struct device *device)
151 struct net_local *tp; 151 struct net_local *tp;
152 struct card_info *card; 152 struct card_info *card;
153 struct mca_device *mdev = to_mca_device(device); 153 struct mca_device *mdev = to_mca_device(device);
154 int ret = 0, i = 0; 154 int ret = 0;
155 DECLARE_MAC_BUF(mac);
155 156
156 if (versionprinted++ == 0) 157 if (versionprinted++ == 0)
157 printk("%s", version); 158 printk("%s", version);
@@ -322,11 +323,8 @@ static int __devinit madgemc_probe(struct device *device)
322 mca_device_set_name(mdev, (card->cardtype == 0x08)?MADGEMC16_CARDNAME:MADGEMC32_CARDNAME); 323 mca_device_set_name(mdev, (card->cardtype == 0x08)?MADGEMC16_CARDNAME:MADGEMC32_CARDNAME);
323 mca_set_adapter_procfn(mdev->slot, madgemc_mcaproc, dev); 324 mca_set_adapter_procfn(mdev->slot, madgemc_mcaproc, dev);
324 325
325 printk("%s: Ring Station Address: ", dev->name); 326 printk("%s: Ring Station Address: %s\n",
326 printk("%2.2x", dev->dev_addr[0]); 327 dev->name, print_mac(mac, dev->dev_addr));
327 for (i = 1; i < 6; i++)
328 printk(":%2.2x", dev->dev_addr[i]);
329 printk("\n");
330 328
331 if (tmsdev_init(dev, device)) { 329 if (tmsdev_init(dev, device)) {
332 printk("%s: unable to get memory for dev->priv.\n", 330 printk("%s: unable to get memory for dev->priv.\n",
@@ -692,11 +690,11 @@ static int madgemc_mcaproc(char *buf, int slot, void *d)
692 struct net_local *tp = netdev_priv(dev); 690 struct net_local *tp = netdev_priv(dev);
693 struct card_info *curcard = tp->tmspriv; 691 struct card_info *curcard = tp->tmspriv;
694 int len = 0; 692 int len = 0;
693 DECLARE_MAC_BUF(mac);
695 694
696 len += sprintf(buf+len, "-------\n"); 695 len += sprintf(buf+len, "-------\n");
697 if (curcard) { 696 if (curcard) {
698 struct net_local *tp = netdev_priv(dev); 697 struct net_local *tp = netdev_priv(dev);
699 int i;
700 698
701 len += sprintf(buf+len, "Card Revision: %d\n", curcard->cardrev); 699 len += sprintf(buf+len, "Card Revision: %d\n", curcard->cardrev);
702 len += sprintf(buf+len, "RAM Size: %dkb\n", curcard->ramsize); 700 len += sprintf(buf+len, "RAM Size: %dkb\n", curcard->ramsize);
@@ -716,11 +714,8 @@ static int madgemc_mcaproc(char *buf, int slot, void *d)
716 } 714 }
717 len += sprintf(buf+len, " (%s)\n", (curcard->fairness)?"Unfair":"Fair"); 715 len += sprintf(buf+len, " (%s)\n", (curcard->fairness)?"Unfair":"Fair");
718 716
719 len += sprintf(buf+len, "Ring Station Address: "); 717 len += sprintf(buf+len, "Ring Station Address: %s\n",
720 len += sprintf(buf+len, "%2.2x", dev->dev_addr[0]); 718 print_mac(mac, dev->dev_addr));
721 for (i = 1; i < 6; i++)
722 len += sprintf(buf+len, " %2.2x", dev->dev_addr[i]);
723 len += sprintf(buf+len, "\n");
724 } else 719 } else
725 len += sprintf(buf+len, "Card not configured\n"); 720 len += sprintf(buf+len, "Card not configured\n");
726 721
diff --git a/drivers/net/tokenring/olympic.c b/drivers/net/tokenring/olympic.c
index a149d5e2965c..74c1f0f189f5 100644
--- a/drivers/net/tokenring/olympic.c
+++ b/drivers/net/tokenring/olympic.c
@@ -418,14 +418,15 @@ static int __devinit olympic_init(struct net_device *dev)
418 writel(uaa_addr,olympic_mmio+LAPA); 418 writel(uaa_addr,olympic_mmio+LAPA);
419 adapter_addr=olympic_priv->olympic_lap + (uaa_addr & (~0xf800)); 419 adapter_addr=olympic_priv->olympic_lap + (uaa_addr & (~0xf800));
420 420
421 memcpy_fromio(&dev->dev_addr[0], adapter_addr,6);
422
421#if OLYMPIC_DEBUG 423#if OLYMPIC_DEBUG
422 printk("adapter address: %02x:%02x:%02x:%02x:%02x:%02x\n", 424 {
423 readb(adapter_addr), readb(adapter_addr+1),readb(adapter_addr+2), 425 DECLARE_MAC_BUF(mac);
424 readb(adapter_addr+3),readb(adapter_addr+4),readb(adapter_addr+5)); 426 printk("adapter address: %s\n", print_mac(mac, dev->dev_addr));
427 }
425#endif 428#endif
426 429
427 memcpy_fromio(&dev->dev_addr[0], adapter_addr,6);
428
429 olympic_priv->olympic_addr_table_addr = swab16(readw(init_srb + 12)); 430 olympic_priv->olympic_addr_table_addr = swab16(readw(init_srb + 12));
430 olympic_priv->olympic_parms_addr = swab16(readw(init_srb + 14)); 431 olympic_priv->olympic_parms_addr = swab16(readw(init_srb + 14));
431 432
@@ -440,6 +441,7 @@ static int olympic_open(struct net_device *dev)
440 unsigned long flags, t; 441 unsigned long flags, t;
441 int i, open_finished = 1 ; 442 int i, open_finished = 1 ;
442 u8 resp, err; 443 u8 resp, err;
444 DECLARE_MAC_BUF(mac);
443 445
444 DECLARE_WAITQUEUE(wait,current) ; 446 DECLARE_WAITQUEUE(wait,current) ;
445 447
@@ -567,14 +569,8 @@ static int olympic_open(struct net_device *dev)
567 goto out; 569 goto out;
568 570
569 case 0x32: 571 case 0x32:
570 printk(KERN_WARNING "%s: Invalid LAA: %02x:%02x:%02x:%02x:%02x:%02x\n", 572 printk(KERN_WARNING "%s: Invalid LAA: %s\n",
571 dev->name, 573 dev->name, print_mac(mac, olympic_priv->olympic_laa));
572 olympic_priv->olympic_laa[0],
573 olympic_priv->olympic_laa[1],
574 olympic_priv->olympic_laa[2],
575 olympic_priv->olympic_laa[3],
576 olympic_priv->olympic_laa[4],
577 olympic_priv->olympic_laa[5]) ;
578 goto out; 574 goto out;
579 575
580 default: 576 default:
@@ -704,30 +700,26 @@ static int olympic_open(struct net_device *dev)
704#endif 700#endif
705 701
706 if (olympic_priv->olympic_network_monitor) { 702 if (olympic_priv->olympic_network_monitor) {
707 u8 __iomem *oat ; 703 u8 __iomem *oat;
708 u8 __iomem *opt ; 704 u8 __iomem *opt;
709 oat = (olympic_priv->olympic_lap + olympic_priv->olympic_addr_table_addr) ; 705 int i;
710 opt = (olympic_priv->olympic_lap + olympic_priv->olympic_parms_addr) ; 706 u8 addr[6];
711 707 DECLARE_MAC_BUF(mac);
712 printk("%s: Node Address: %02x:%02x:%02x:%02x:%02x:%02x\n",dev->name, 708 oat = (olympic_priv->olympic_lap + olympic_priv->olympic_addr_table_addr);
713 readb(oat+offsetof(struct olympic_adapter_addr_table,node_addr)), 709 opt = (olympic_priv->olympic_lap + olympic_priv->olympic_parms_addr);
714 readb(oat+offsetof(struct olympic_adapter_addr_table,node_addr)+1), 710
715 readb(oat+offsetof(struct olympic_adapter_addr_table,node_addr)+2), 711 for (i = 0; i < 6; i++)
716 readb(oat+offsetof(struct olympic_adapter_addr_table,node_addr)+3), 712 addr[i] = readb(oat+offsetof(struct olympic_adapter_addr_table,node_addr)+i);
717 readb(oat+offsetof(struct olympic_adapter_addr_table,node_addr)+4), 713 printk("%s: Node Address: %s\n",dev->name, print_mac(mac, addr));
718 readb(oat+offsetof(struct olympic_adapter_addr_table,node_addr)+5));
719 printk("%s: Functional Address: %02x:%02x:%02x:%02x\n",dev->name, 714 printk("%s: Functional Address: %02x:%02x:%02x:%02x\n",dev->name,
720 readb(oat+offsetof(struct olympic_adapter_addr_table,func_addr)), 715 readb(oat+offsetof(struct olympic_adapter_addr_table,func_addr)),
721 readb(oat+offsetof(struct olympic_adapter_addr_table,func_addr)+1), 716 readb(oat+offsetof(struct olympic_adapter_addr_table,func_addr)+1),
722 readb(oat+offsetof(struct olympic_adapter_addr_table,func_addr)+2), 717 readb(oat+offsetof(struct olympic_adapter_addr_table,func_addr)+2),
723 readb(oat+offsetof(struct olympic_adapter_addr_table,func_addr)+3)); 718 readb(oat+offsetof(struct olympic_adapter_addr_table,func_addr)+3));
724 printk("%s: NAUN Address: %02x:%02x:%02x:%02x:%02x:%02x\n",dev->name, 719
725 readb(opt+offsetof(struct olympic_parameters_table, up_node_addr)), 720 for (i = 0; i < 6; i++)
726 readb(opt+offsetof(struct olympic_parameters_table, up_node_addr)+1), 721 addr[i] = readb(opt+offsetof(struct olympic_parameters_table, up_node_addr)+i);
727 readb(opt+offsetof(struct olympic_parameters_table, up_node_addr)+2), 722 printk("%s: NAUN Address: %s\n",dev->name, print_mac(mac, addr));
728 readb(opt+offsetof(struct olympic_parameters_table, up_node_addr)+3),
729 readb(opt+offsetof(struct olympic_parameters_table, up_node_addr)+4),
730 readb(opt+offsetof(struct olympic_parameters_table, up_node_addr)+5));
731 } 723 }
732 724
733 netif_start_queue(dev); 725 netif_start_queue(dev);
@@ -1445,11 +1437,14 @@ static void olympic_arb_cmd(struct net_device *dev)
1445 mac_frame->protocol = tr_type_trans(mac_frame, dev); 1437 mac_frame->protocol = tr_type_trans(mac_frame, dev);
1446 1438
1447 if (olympic_priv->olympic_network_monitor) { 1439 if (olympic_priv->olympic_network_monitor) {
1448 struct trh_hdr *mac_hdr ; 1440 struct trh_hdr *mac_hdr;
1449 printk(KERN_WARNING "%s: Received MAC Frame, details: \n",dev->name) ; 1441 DECLARE_MAC_BUF(mac);
1442 printk(KERN_WARNING "%s: Received MAC Frame, details: \n",dev->name);
1450 mac_hdr = tr_hdr(mac_frame); 1443 mac_hdr = tr_hdr(mac_frame);
1451 printk(KERN_WARNING "%s: MAC Frame Dest. Addr: %02x:%02x:%02x:%02x:%02x:%02x \n", dev->name , mac_hdr->daddr[0], mac_hdr->daddr[1], mac_hdr->daddr[2], mac_hdr->daddr[3], mac_hdr->daddr[4], mac_hdr->daddr[5]) ; 1444 printk(KERN_WARNING "%s: MAC Frame Dest. Addr: %s\n",
1452 printk(KERN_WARNING "%s: MAC Frame Srce. Addr: %02x:%02x:%02x:%02x:%02x:%02x \n", dev->name , mac_hdr->saddr[0], mac_hdr->saddr[1], mac_hdr->saddr[2], mac_hdr->saddr[3], mac_hdr->saddr[4], mac_hdr->saddr[5]) ; 1445 dev->name, print_mac(mac, mac_hdr->daddr));
1446 printk(KERN_WARNING "%s: MAC Frame Srce. Addr: %s\n",
1447 dev->name, print_mac(mac, mac_hdr->saddr));
1453 } 1448 }
1454 netif_rx(mac_frame); 1449 netif_rx(mac_frame);
1455 dev->last_rx = jiffies; 1450 dev->last_rx = jiffies;
@@ -1644,26 +1639,24 @@ static int olympic_proc_info(char *buffer, char **start, off_t offset, int lengt
1644 int len=0; 1639 int len=0;
1645 off_t begin=0; 1640 off_t begin=0;
1646 off_t pos=0; 1641 off_t pos=0;
1647 1642 u8 addr[6];
1643 u8 addr2[6];
1644 int i;
1645 DECLARE_MAC_BUF(mac);
1646 DECLARE_MAC_BUF(mac2);
1647
1648 size = sprintf(buffer, 1648 size = sprintf(buffer,
1649 "IBM Pit/Pit-Phy/Olympic Chipset Token Ring Adapter %s\n",dev->name); 1649 "IBM Pit/Pit-Phy/Olympic Chipset Token Ring Adapter %s\n",dev->name);
1650 size += sprintf(buffer+size, "\n%6s: Adapter Address : Node Address : Functional Addr\n", 1650 size += sprintf(buffer+size, "\n%6s: Adapter Address : Node Address : Functional Addr\n",
1651 dev->name); 1651 dev->name);
1652 1652
1653 size += sprintf(buffer+size, "%6s: %02x:%02x:%02x:%02x:%02x:%02x : %02x:%02x:%02x:%02x:%02x:%02x : %02x:%02x:%02x:%02x\n", 1653 for (i = 0 ; i < 6 ; i++)
1654 addr[i] = readb(oat+offsetof(struct olympic_adapter_addr_table,node_addr) + i);
1655
1656 size += sprintf(buffer+size, "%6s: %s : %s : %02x:%02x:%02x:%02x\n",
1654 dev->name, 1657 dev->name,
1655 dev->dev_addr[0], 1658 print_mac(mac, dev->dev_addr),
1656 dev->dev_addr[1], 1659 print_mac(mac2, addr),
1657 dev->dev_addr[2],
1658 dev->dev_addr[3],
1659 dev->dev_addr[4],
1660 dev->dev_addr[5],
1661 readb(oat+offsetof(struct olympic_adapter_addr_table,node_addr)),
1662 readb(oat+offsetof(struct olympic_adapter_addr_table,node_addr)+1),
1663 readb(oat+offsetof(struct olympic_adapter_addr_table,node_addr)+2),
1664 readb(oat+offsetof(struct olympic_adapter_addr_table,node_addr)+3),
1665 readb(oat+offsetof(struct olympic_adapter_addr_table,node_addr)+4),
1666 readb(oat+offsetof(struct olympic_adapter_addr_table,node_addr)+5),
1667 readb(oat+offsetof(struct olympic_adapter_addr_table,func_addr)), 1660 readb(oat+offsetof(struct olympic_adapter_addr_table,func_addr)),
1668 readb(oat+offsetof(struct olympic_adapter_addr_table,func_addr)+1), 1661 readb(oat+offsetof(struct olympic_adapter_addr_table,func_addr)+1),
1669 readb(oat+offsetof(struct olympic_adapter_addr_table,func_addr)+2), 1662 readb(oat+offsetof(struct olympic_adapter_addr_table,func_addr)+2),
@@ -1673,25 +1666,20 @@ static int olympic_proc_info(char *buffer, char **start, off_t offset, int lengt
1673 1666
1674 size += sprintf(buffer+size, "%6s: Physical Addr : Up Node Address : Poll Address : AccPri : Auth Src : Att Code :\n", 1667 size += sprintf(buffer+size, "%6s: Physical Addr : Up Node Address : Poll Address : AccPri : Auth Src : Att Code :\n",
1675 dev->name) ; 1668 dev->name) ;
1676 1669
1677 size += sprintf(buffer+size, "%6s: %02x:%02x:%02x:%02x : %02x:%02x:%02x:%02x:%02x:%02x : %02x:%02x:%02x:%02x:%02x:%02x : %04x : %04x : %04x :\n", 1670 for (i = 0 ; i < 6 ; i++)
1671 addr[i] = readb(opt+offsetof(struct olympic_parameters_table, up_node_addr) + i);
1672 for (i = 0 ; i < 6 ; i++)
1673 addr2[i] = readb(opt+offsetof(struct olympic_parameters_table, poll_addr) + i);
1674
1675 size += sprintf(buffer+size, "%6s: %02x:%02x:%02x:%02x : %s : %s : %04x : %04x : %04x :\n",
1678 dev->name, 1676 dev->name,
1679 readb(opt+offsetof(struct olympic_parameters_table, phys_addr)), 1677 readb(opt+offsetof(struct olympic_parameters_table, phys_addr)),
1680 readb(opt+offsetof(struct olympic_parameters_table, phys_addr)+1), 1678 readb(opt+offsetof(struct olympic_parameters_table, phys_addr)+1),
1681 readb(opt+offsetof(struct olympic_parameters_table, phys_addr)+2), 1679 readb(opt+offsetof(struct olympic_parameters_table, phys_addr)+2),
1682 readb(opt+offsetof(struct olympic_parameters_table, phys_addr)+3), 1680 readb(opt+offsetof(struct olympic_parameters_table, phys_addr)+3),
1683 readb(opt+offsetof(struct olympic_parameters_table, up_node_addr)), 1681 print_mac(mac, addr),
1684 readb(opt+offsetof(struct olympic_parameters_table, up_node_addr)+1), 1682 print_mac(mac2, addr2),
1685 readb(opt+offsetof(struct olympic_parameters_table, up_node_addr)+2),
1686 readb(opt+offsetof(struct olympic_parameters_table, up_node_addr)+3),
1687 readb(opt+offsetof(struct olympic_parameters_table, up_node_addr)+4),
1688 readb(opt+offsetof(struct olympic_parameters_table, up_node_addr)+5),
1689 readb(opt+offsetof(struct olympic_parameters_table, poll_addr)),
1690 readb(opt+offsetof(struct olympic_parameters_table, poll_addr)+1),
1691 readb(opt+offsetof(struct olympic_parameters_table, poll_addr)+2),
1692 readb(opt+offsetof(struct olympic_parameters_table, poll_addr)+3),
1693 readb(opt+offsetof(struct olympic_parameters_table, poll_addr)+4),
1694 readb(opt+offsetof(struct olympic_parameters_table, poll_addr)+5),
1695 swab16(readw(opt+offsetof(struct olympic_parameters_table, acc_priority))), 1683 swab16(readw(opt+offsetof(struct olympic_parameters_table, acc_priority))),
1696 swab16(readw(opt+offsetof(struct olympic_parameters_table, auth_source_class))), 1684 swab16(readw(opt+offsetof(struct olympic_parameters_table, auth_source_class))),
1697 swab16(readw(opt+offsetof(struct olympic_parameters_table, att_code)))); 1685 swab16(readw(opt+offsetof(struct olympic_parameters_table, att_code))));
@@ -1699,14 +1687,11 @@ static int olympic_proc_info(char *buffer, char **start, off_t offset, int lengt
1699 size += sprintf(buffer+size, "%6s: Source Address : Bcn T : Maj. V : Lan St : Lcl Rg : Mon Err : Frame Correl : \n", 1687 size += sprintf(buffer+size, "%6s: Source Address : Bcn T : Maj. V : Lan St : Lcl Rg : Mon Err : Frame Correl : \n",
1700 dev->name) ; 1688 dev->name) ;
1701 1689
1702 size += sprintf(buffer+size, "%6s: %02x:%02x:%02x:%02x:%02x:%02x : %04x : %04x : %04x : %04x : %04x : %04x : \n", 1690 for (i = 0 ; i < 6 ; i++)
1691 addr[i] = readb(opt+offsetof(struct olympic_parameters_table, source_addr) + i);
1692 size += sprintf(buffer+size, "%6s: %s : %04x : %04x : %04x : %04x : %04x : %04x : \n",
1703 dev->name, 1693 dev->name,
1704 readb(opt+offsetof(struct olympic_parameters_table, source_addr)), 1694 print_mac(mac, addr),
1705 readb(opt+offsetof(struct olympic_parameters_table, source_addr)+1),
1706 readb(opt+offsetof(struct olympic_parameters_table, source_addr)+2),
1707 readb(opt+offsetof(struct olympic_parameters_table, source_addr)+3),
1708 readb(opt+offsetof(struct olympic_parameters_table, source_addr)+4),
1709 readb(opt+offsetof(struct olympic_parameters_table, source_addr)+5),
1710 swab16(readw(opt+offsetof(struct olympic_parameters_table, beacon_type))), 1695 swab16(readw(opt+offsetof(struct olympic_parameters_table, beacon_type))),
1711 swab16(readw(opt+offsetof(struct olympic_parameters_table, major_vector))), 1696 swab16(readw(opt+offsetof(struct olympic_parameters_table, major_vector))),
1712 swab16(readw(opt+offsetof(struct olympic_parameters_table, lan_status))), 1697 swab16(readw(opt+offsetof(struct olympic_parameters_table, lan_status))),
@@ -1717,16 +1702,13 @@ static int olympic_proc_info(char *buffer, char **start, off_t offset, int lengt
1717 size += sprintf(buffer+size, "%6s: Beacon Details : Tx : Rx : NAUN Node Address : NAUN Node Phys : \n", 1702 size += sprintf(buffer+size, "%6s: Beacon Details : Tx : Rx : NAUN Node Address : NAUN Node Phys : \n",
1718 dev->name) ; 1703 dev->name) ;
1719 1704
1720 size += sprintf(buffer+size, "%6s: : %02x : %02x : %02x:%02x:%02x:%02x:%02x:%02x : %02x:%02x:%02x:%02x : \n", 1705 for (i = 0 ; i < 6 ; i++)
1706 addr[i] = readb(opt+offsetof(struct olympic_parameters_table, beacon_naun) + i);
1707 size += sprintf(buffer+size, "%6s: : %02x : %02x : %s : %02x:%02x:%02x:%02x : \n",
1721 dev->name, 1708 dev->name,
1722 swab16(readw(opt+offsetof(struct olympic_parameters_table, beacon_transmit))), 1709 swab16(readw(opt+offsetof(struct olympic_parameters_table, beacon_transmit))),
1723 swab16(readw(opt+offsetof(struct olympic_parameters_table, beacon_receive))), 1710 swab16(readw(opt+offsetof(struct olympic_parameters_table, beacon_receive))),
1724 readb(opt+offsetof(struct olympic_parameters_table, beacon_naun)), 1711 print_mac(mac, addr),
1725 readb(opt+offsetof(struct olympic_parameters_table, beacon_naun)+1),
1726 readb(opt+offsetof(struct olympic_parameters_table, beacon_naun)+2),
1727 readb(opt+offsetof(struct olympic_parameters_table, beacon_naun)+3),
1728 readb(opt+offsetof(struct olympic_parameters_table, beacon_naun)+4),
1729 readb(opt+offsetof(struct olympic_parameters_table, beacon_naun)+5),
1730 readb(opt+offsetof(struct olympic_parameters_table, beacon_phys)), 1712 readb(opt+offsetof(struct olympic_parameters_table, beacon_phys)),
1731 readb(opt+offsetof(struct olympic_parameters_table, beacon_phys)+1), 1713 readb(opt+offsetof(struct olympic_parameters_table, beacon_phys)+1),
1732 readb(opt+offsetof(struct olympic_parameters_table, beacon_phys)+2), 1714 readb(opt+offsetof(struct olympic_parameters_table, beacon_phys)+2),
diff --git a/drivers/net/tokenring/proteon.c b/drivers/net/tokenring/proteon.c
index 85d156dea033..ca6b65919b3d 100644
--- a/drivers/net/tokenring/proteon.c
+++ b/drivers/net/tokenring/proteon.c
@@ -122,6 +122,7 @@ static int __init setup_card(struct net_device *dev, struct device *pdev)
122 static int versionprinted; 122 static int versionprinted;
123 const unsigned *port; 123 const unsigned *port;
124 int j,err = 0; 124 int j,err = 0;
125 DECLARE_MAC_BUF(mac);
125 126
126 if (!dev) 127 if (!dev)
127 return -ENOMEM; 128 return -ENOMEM;
@@ -152,11 +153,8 @@ static int __init setup_card(struct net_device *dev, struct device *pdev)
152 153
153 proteon_read_eeprom(dev); 154 proteon_read_eeprom(dev);
154 155
155 printk(KERN_DEBUG "proteon.c: Ring Station Address: "); 156 printk(KERN_DEBUG "proteon.c: Ring Station Address: %s\n",
156 printk("%2.2x", dev->dev_addr[0]); 157 print_mac(mac, dev->dev_addr));
157 for (j = 1; j < 6; j++)
158 printk(":%2.2x", dev->dev_addr[j]);
159 printk("\n");
160 158
161 tp = netdev_priv(dev); 159 tp = netdev_priv(dev);
162 tp->setnselout = proteon_setnselout_pins; 160 tp->setnselout = proteon_setnselout_pins;
diff --git a/drivers/net/tokenring/skisa.c b/drivers/net/tokenring/skisa.c
index ecbddc80a2a5..32e8d5a9f958 100644
--- a/drivers/net/tokenring/skisa.c
+++ b/drivers/net/tokenring/skisa.c
@@ -139,6 +139,7 @@ static int __init setup_card(struct net_device *dev, struct device *pdev)
139 static int versionprinted; 139 static int versionprinted;
140 const unsigned *port; 140 const unsigned *port;
141 int j, err = 0; 141 int j, err = 0;
142 DECLARE_MAC_BUF(mac);
142 143
143 if (!dev) 144 if (!dev)
144 return -ENOMEM; 145 return -ENOMEM;
@@ -169,11 +170,8 @@ static int __init setup_card(struct net_device *dev, struct device *pdev)
169 170
170 sk_isa_read_eeprom(dev); 171 sk_isa_read_eeprom(dev);
171 172
172 printk(KERN_DEBUG "skisa.c: Ring Station Address: "); 173 printk(KERN_DEBUG "skisa.c: Ring Station Address: %s\n",
173 printk("%2.2x", dev->dev_addr[0]); 174 print_mac(mac, dev->dev_addr));
174 for (j = 1; j < 6; j++)
175 printk(":%2.2x", dev->dev_addr[j]);
176 printk("\n");
177 175
178 tp = netdev_priv(dev); 176 tp = netdev_priv(dev);
179 tp->setnselout = sk_isa_setnselout_pins; 177 tp->setnselout = sk_isa_setnselout_pins;
diff --git a/drivers/net/tokenring/tmspci.c b/drivers/net/tokenring/tmspci.c
index ecdd8511a67b..1c18f782f522 100644
--- a/drivers/net/tokenring/tmspci.c
+++ b/drivers/net/tokenring/tmspci.c
@@ -96,10 +96,11 @@ static int __devinit tms_pci_attach(struct pci_dev *pdev, const struct pci_devic
96 static int versionprinted; 96 static int versionprinted;
97 struct net_device *dev; 97 struct net_device *dev;
98 struct net_local *tp; 98 struct net_local *tp;
99 int i, ret; 99 int ret;
100 unsigned int pci_irq_line; 100 unsigned int pci_irq_line;
101 unsigned long pci_ioaddr; 101 unsigned long pci_ioaddr;
102 struct card_info *cardinfo = &card_info_table[ent->driver_data]; 102 struct card_info *cardinfo = &card_info_table[ent->driver_data];
103 DECLARE_MAC_BUF(mac);
103 104
104 if (versionprinted++ == 0) 105 if (versionprinted++ == 0)
105 printk("%s", version); 106 printk("%s", version);
@@ -136,11 +137,8 @@ static int __devinit tms_pci_attach(struct pci_dev *pdev, const struct pci_devic
136 137
137 tms_pci_read_eeprom(dev); 138 tms_pci_read_eeprom(dev);
138 139
139 printk("%s: Ring Station Address: ", dev->name); 140 printk("%s: Ring Station Address: %s\n",
140 printk("%2.2x", dev->dev_addr[0]); 141 dev->name, print_mac(mac, dev->dev_addr));
141 for (i = 1; i < 6; i++)
142 printk(":%2.2x", dev->dev_addr[i]);
143 printk("\n");
144 142
145 ret = tmsdev_init(dev, &pdev->dev); 143 ret = tmsdev_init(dev, &pdev->dev);
146 if (ret) { 144 if (ret) {
diff --git a/drivers/net/tsi108_eth.c b/drivers/net/tsi108_eth.c
index fe3225df0d32..df10af7df7b8 100644
--- a/drivers/net/tsi108_eth.c
+++ b/drivers/net/tsi108_eth.c
@@ -1540,6 +1540,7 @@ tsi108_init_one(struct platform_device *pdev)
1540 struct tsi108_prv_data *data = NULL; 1540 struct tsi108_prv_data *data = NULL;
1541 hw_info *einfo; 1541 hw_info *einfo;
1542 int err = 0; 1542 int err = 0;
1543 DECLARE_MAC_BUF(mac);
1543 1544
1544 einfo = pdev->dev.platform_data; 1545 einfo = pdev->dev.platform_data;
1545 1546
@@ -1628,10 +1629,8 @@ tsi108_init_one(struct platform_device *pdev)
1628 goto register_fail; 1629 goto register_fail;
1629 } 1630 }
1630 1631
1631 printk(KERN_INFO "%s: Tsi108 Gigabit Ethernet, MAC: " 1632 printk(KERN_INFO "%s: Tsi108 Gigabit Ethernet, MAC: %s\n"
1632 "%02x:%02x:%02x:%02x:%02x:%02x\n", dev->name, 1633 dev->name, print_mac(mac, dev->dev_addr));
1633 dev->dev_addr[0], dev->dev_addr[1], dev->dev_addr[2],
1634 dev->dev_addr[3], dev->dev_addr[4], dev->dev_addr[5]);
1635#ifdef DEBUG 1634#ifdef DEBUG
1636 data->msg_enable = DEBUG; 1635 data->msg_enable = DEBUG;
1637 dump_eth_one(dev); 1636 dump_eth_one(dev);
diff --git a/drivers/net/tulip/de2104x.c b/drivers/net/tulip/de2104x.c
index ba3d0e5574a4..f12e33a17363 100644
--- a/drivers/net/tulip/de2104x.c
+++ b/drivers/net/tulip/de2104x.c
@@ -1929,6 +1929,7 @@ static int __devinit de_init_one (struct pci_dev *pdev,
1929 void __iomem *regs; 1929 void __iomem *regs;
1930 unsigned long pciaddr; 1930 unsigned long pciaddr;
1931 static int board_idx = -1; 1931 static int board_idx = -1;
1932 DECLARE_MAC_BUF(mac);
1932 1933
1933 board_idx++; 1934 board_idx++;
1934 1935
@@ -2042,15 +2043,11 @@ static int __devinit de_init_one (struct pci_dev *pdev,
2042 goto err_out_iomap; 2043 goto err_out_iomap;
2043 2044
2044 /* print info about board and interface just registered */ 2045 /* print info about board and interface just registered */
2045 printk (KERN_INFO "%s: %s at 0x%lx, " 2046 printk (KERN_INFO "%s: %s at 0x%lx, %s, IRQ %d\n",
2046 "%02x:%02x:%02x:%02x:%02x:%02x, "
2047 "IRQ %d\n",
2048 dev->name, 2047 dev->name,
2049 de->de21040 ? "21040" : "21041", 2048 de->de21040 ? "21040" : "21041",
2050 dev->base_addr, 2049 dev->base_addr,
2051 dev->dev_addr[0], dev->dev_addr[1], 2050 print_mac(mac, dev->dev_addr),
2052 dev->dev_addr[2], dev->dev_addr[3],
2053 dev->dev_addr[4], dev->dev_addr[5],
2054 dev->irq); 2051 dev->irq);
2055 2052
2056 pci_set_drvdata(pdev, dev); 2053 pci_set_drvdata(pdev, dev);
diff --git a/drivers/net/tulip/de4x5.c b/drivers/net/tulip/de4x5.c
index ee4215ca63f0..4633cc6dd412 100644
--- a/drivers/net/tulip/de4x5.c
+++ b/drivers/net/tulip/de4x5.c
@@ -1088,6 +1088,7 @@ de4x5_hw_init(struct net_device *dev, u_long iobase, struct device *gendev)
1088 struct de4x5_private *lp = netdev_priv(dev); 1088 struct de4x5_private *lp = netdev_priv(dev);
1089 struct pci_dev *pdev = NULL; 1089 struct pci_dev *pdev = NULL;
1090 int i, status=0; 1090 int i, status=0;
1091 DECLARE_MAC_BUF(mac);
1091 1092
1092 gendev->driver_data = dev; 1093 gendev->driver_data = dev;
1093 1094
@@ -1123,12 +1124,8 @@ de4x5_hw_init(struct net_device *dev, u_long iobase, struct device *gendev)
1123 dev->base_addr = iobase; 1124 dev->base_addr = iobase;
1124 printk ("%s: %s at 0x%04lx", gendev->bus_id, name, iobase); 1125 printk ("%s: %s at 0x%04lx", gendev->bus_id, name, iobase);
1125 1126
1126 printk(", h/w address ");
1127 status = get_hw_addr(dev); 1127 status = get_hw_addr(dev);
1128 for (i = 0; i < ETH_ALEN - 1; i++) { /* get the ethernet addr. */ 1128 printk(", h/w address %s\n", print_mac(mac, dev->dev_addr));
1129 printk("%2.2x:", dev->dev_addr[i]);
1130 }
1131 printk("%2.2x,\n", dev->dev_addr[i]);
1132 1129
1133 if (status != 0) { 1130 if (status != 0) {
1134 printk(" which has an Ethernet PROM CRC error.\n"); 1131 printk(" which has an Ethernet PROM CRC error.\n");
@@ -5468,19 +5465,16 @@ static void
5468de4x5_dbg_srom(struct de4x5_srom *p) 5465de4x5_dbg_srom(struct de4x5_srom *p)
5469{ 5466{
5470 int i; 5467 int i;
5468 DECLARE_MAC_BUF(mac);
5471 5469
5472 if (de4x5_debug & DEBUG_SROM) { 5470 if (de4x5_debug & DEBUG_SROM) {
5473 printk("Sub-system Vendor ID: %04x\n", *((u_short *)p->sub_vendor_id)); 5471 printk("Sub-system Vendor ID: %04x\n", *((u_short *)p->sub_vendor_id));
5474 printk("Sub-system ID: %04x\n", *((u_short *)p->sub_system_id)); 5472 printk("Sub-system ID: %04x\n", *((u_short *)p->sub_system_id));
5475 printk("ID Block CRC: %02x\n", (u_char)(p->id_block_crc)); 5473 printk("ID Block CRC: %02x\n", (u_char)(p->id_block_crc));
5476 printk("SROM version: %02x\n", (u_char)(p->version)); 5474 printk("SROM version: %02x\n", (u_char)(p->version));
5477 printk("# controllers: %02x\n", (u_char)(p->num_controllers)); 5475 printk("# controllers: %02x\n", (u_char)(p->num_controllers));
5478 5476
5479 printk("Hardware Address: "); 5477 printk("Hardware Address: %s\n", print_mac(mac, p->ieee_addr));
5480 for (i=0;i<ETH_ALEN-1;i++) {
5481 printk("%02x:", (u_char)*(p->ieee_addr+i));
5482 }
5483 printk("%02x\n", (u_char)*(p->ieee_addr+i));
5484 printk("CRC checksum: %04x\n", (u_short)(p->chksum)); 5478 printk("CRC checksum: %04x\n", (u_short)(p->chksum));
5485 for (i=0; i<64; i++) { 5479 for (i=0; i<64; i++) {
5486 printk("%3d %04x\n", i<<1, (u_short)*((u_short *)p+i)); 5480 printk("%3d %04x\n", i<<1, (u_short)*((u_short *)p+i));
@@ -5494,21 +5488,12 @@ static void
5494de4x5_dbg_rx(struct sk_buff *skb, int len) 5488de4x5_dbg_rx(struct sk_buff *skb, int len)
5495{ 5489{
5496 int i, j; 5490 int i, j;
5491 DECLARE_MAC_BUF(mac);
5492 DECLARE_MAC_BUF(mac2);
5497 5493
5498 if (de4x5_debug & DEBUG_RX) { 5494 if (de4x5_debug & DEBUG_RX) {
5499 printk("R: %02x:%02x:%02x:%02x:%02x:%02x <- %02x:%02x:%02x:%02x:%02x:%02x len/SAP:%02x%02x [%d]\n", 5495 printk("R: %s <- %s len/SAP:%02x%02x [%d]\n",
5500 (u_char)skb->data[0], 5496 print_mac(mac, skb->data), print_mac(mac2, &skb->data[6]),
5501 (u_char)skb->data[1],
5502 (u_char)skb->data[2],
5503 (u_char)skb->data[3],
5504 (u_char)skb->data[4],
5505 (u_char)skb->data[5],
5506 (u_char)skb->data[6],
5507 (u_char)skb->data[7],
5508 (u_char)skb->data[8],
5509 (u_char)skb->data[9],
5510 (u_char)skb->data[10],
5511 (u_char)skb->data[11],
5512 (u_char)skb->data[12], 5497 (u_char)skb->data[12],
5513 (u_char)skb->data[13], 5498 (u_char)skb->data[13],
5514 len); 5499 len);
diff --git a/drivers/net/tulip/dmfe.c b/drivers/net/tulip/dmfe.c
index e2596e9ab1d7..ca90566d5bcd 100644
--- a/drivers/net/tulip/dmfe.c
+++ b/drivers/net/tulip/dmfe.c
@@ -362,6 +362,7 @@ static int __devinit dmfe_init_one (struct pci_dev *pdev,
362 struct net_device *dev; 362 struct net_device *dev;
363 u32 pci_pmr; 363 u32 pci_pmr;
364 int i, err; 364 int i, err;
365 DECLARE_MAC_BUF(mac);
365 366
366 DMFE_DBUG(0, "dmfe_init_one()", 0); 367 DMFE_DBUG(0, "dmfe_init_one()", 0);
367 368
@@ -470,13 +471,13 @@ static int __devinit dmfe_init_one (struct pci_dev *pdev,
470 if (err) 471 if (err)
471 goto err_out_res; 472 goto err_out_res;
472 473
473 printk(KERN_INFO "%s: Davicom DM%04lx at pci%s,", 474 printk(KERN_INFO "%s: Davicom DM%04lx at pci%s, "
474 dev->name, 475 "%s, irq %d.\n",
475 ent->driver_data >> 16, 476 dev->name,
476 pci_name(pdev)); 477 ent->driver_data >> 16,
477 for (i = 0; i < 6; i++) 478 pci_name(pdev),
478 printk("%c%02x", i ? ':' : ' ', dev->dev_addr[i]); 479 print_mac(mac, dev->dev_addr),
479 printk(", irq %d.\n", dev->irq); 480 dev->irq);
480 481
481 pci_set_master(pdev); 482 pci_set_master(pdev);
482 483
diff --git a/drivers/net/tulip/tulip_core.c b/drivers/net/tulip/tulip_core.c
index 66977aaa7176..80fee2292531 100644
--- a/drivers/net/tulip/tulip_core.c
+++ b/drivers/net/tulip/tulip_core.c
@@ -1051,12 +1051,11 @@ static void set_rx_mode(struct net_device *dev)
1051 filterbit &= 0x3f; 1051 filterbit &= 0x3f;
1052 mc_filter[filterbit >> 5] |= 1 << (filterbit & 31); 1052 mc_filter[filterbit >> 5] |= 1 << (filterbit & 31);
1053 if (tulip_debug > 2) { 1053 if (tulip_debug > 2) {
1054 printk(KERN_INFO "%s: Added filter for %2.2x:%2.2x:%2.2x:" 1054 DECLARE_MAC_BUF(mac);
1055 "%2.2x:%2.2x:%2.2x %8.8x bit %d.\n", dev->name, 1055 printk(KERN_INFO "%s: Added filter for %s"
1056 mclist->dmi_addr[0], mclist->dmi_addr[1], 1056 " %8.8x bit %d.\n",
1057 mclist->dmi_addr[2], mclist->dmi_addr[3], 1057 dev->name, print_mac(mac, mclist->dmi_addr),
1058 mclist->dmi_addr[4], mclist->dmi_addr[5], 1058 ether_crc(ETH_ALEN, mclist->dmi_addr), filterbit);
1059 ether_crc(ETH_ALEN, mclist->dmi_addr), filterbit);
1060 } 1059 }
1061 } 1060 }
1062 if (mc_filter[0] == tp->mc_filter[0] && 1061 if (mc_filter[0] == tp->mc_filter[0] &&
@@ -1256,6 +1255,7 @@ static int __devinit tulip_init_one (struct pci_dev *pdev,
1256 const char *chip_name = tulip_tbl[chip_idx].chip_name; 1255 const char *chip_name = tulip_tbl[chip_idx].chip_name;
1257 unsigned int eeprom_missing = 0; 1256 unsigned int eeprom_missing = 0;
1258 unsigned int force_csr0 = 0; 1257 unsigned int force_csr0 = 0;
1258 DECLARE_MAC_BUF(mac);
1259 1259
1260#ifndef MODULE 1260#ifndef MODULE
1261 static int did_version; /* Already printed version info. */ 1261 static int did_version; /* Already printed version info. */
@@ -1639,8 +1639,7 @@ static int __devinit tulip_init_one (struct pci_dev *pdev,
1639 1639
1640 if (eeprom_missing) 1640 if (eeprom_missing)
1641 printk(" EEPROM not present,"); 1641 printk(" EEPROM not present,");
1642 for (i = 0; i < 6; i++) 1642 printk(" %s", print_mac(mac, dev->dev_addr));
1643 printk("%c%2.2X", i ? ':' : ' ', dev->dev_addr[i]);
1644 printk(", IRQ %d.\n", irq); 1643 printk(", IRQ %d.\n", irq);
1645 1644
1646 if (tp->chip_id == PNIC2) 1645 if (tp->chip_id == PNIC2)
diff --git a/drivers/net/tulip/uli526x.c b/drivers/net/tulip/uli526x.c
index 2b7257d97c32..a4fd782bcd27 100644
--- a/drivers/net/tulip/uli526x.c
+++ b/drivers/net/tulip/uli526x.c
@@ -258,6 +258,7 @@ static int __devinit uli526x_init_one (struct pci_dev *pdev,
258 struct uli526x_board_info *db; /* board information structure */ 258 struct uli526x_board_info *db; /* board information structure */
259 struct net_device *dev; 259 struct net_device *dev;
260 int i, err; 260 int i, err;
261 DECLARE_MAC_BUF(mac);
261 262
262 ULI526X_DBUG(0, "uli526x_init_one()", 0); 263 ULI526X_DBUG(0, "uli526x_init_one()", 0);
263 264
@@ -372,11 +373,9 @@ static int __devinit uli526x_init_one (struct pci_dev *pdev,
372 if (err) 373 if (err)
373 goto err_out_res; 374 goto err_out_res;
374 375
375 printk(KERN_INFO "%s: ULi M%04lx at pci%s,",dev->name,ent->driver_data >> 16,pci_name(pdev)); 376 printk(KERN_INFO "%s: ULi M%04lx at pci%s, %s, irq %d.\n",
376 377 dev->name,ent->driver_data >> 16,pci_name(pdev),
377 for (i = 0; i < 6; i++) 378 print_mac(mac, dev->dev_addr), dev->irq);
378 printk("%c%02x", i ? ':' : ' ', dev->dev_addr[i]);
379 printk(", irq %d.\n", dev->irq);
380 379
381 pci_set_master(pdev); 380 pci_set_master(pdev);
382 381
diff --git a/drivers/net/tulip/winbond-840.c b/drivers/net/tulip/winbond-840.c
index e00833fadc0b..3c40dd6e1a2f 100644
--- a/drivers/net/tulip/winbond-840.c
+++ b/drivers/net/tulip/winbond-840.c
@@ -354,6 +354,7 @@ static int __devinit w840_probe1 (struct pci_dev *pdev,
354 int irq; 354 int irq;
355 int i, option = find_cnt < MAX_UNITS ? options[find_cnt] : 0; 355 int i, option = find_cnt < MAX_UNITS ? options[find_cnt] : 0;
356 void __iomem *ioaddr; 356 void __iomem *ioaddr;
357 DECLARE_MAC_BUF(mac);
357 358
358 i = pci_enable_device(pdev); 359 i = pci_enable_device(pdev);
359 if (i) return i; 360 if (i) return i;
@@ -433,11 +434,9 @@ static int __devinit w840_probe1 (struct pci_dev *pdev,
433 if (i) 434 if (i)
434 goto err_out_cleardev; 435 goto err_out_cleardev;
435 436
436 printk(KERN_INFO "%s: %s at %p, ", 437 printk(KERN_INFO "%s: %s at %p, %s, IRQ %d.\n",
437 dev->name, pci_id_tbl[chip_idx].name, ioaddr); 438 dev->name, pci_id_tbl[chip_idx].name, ioaddr,
438 for (i = 0; i < 5; i++) 439 print_mac(mac, dev->dev_addr), irq);
439 printk("%2.2x:", dev->dev_addr[i]);
440 printk("%2.2x, IRQ %d.\n", dev->dev_addr[i], irq);
441 440
442 if (np->drv_flags & CanHaveMII) { 441 if (np->drv_flags & CanHaveMII) {
443 int phy, phy_idx = 0; 442 int phy, phy_idx = 0;
@@ -1245,16 +1244,16 @@ static int netdev_rx(struct net_device *dev)
1245 } 1244 }
1246#ifndef final_version /* Remove after testing. */ 1245#ifndef final_version /* Remove after testing. */
1247 /* You will want this info for the initial debug. */ 1246 /* You will want this info for the initial debug. */
1248 if (debug > 5) 1247 if (debug > 5) {
1249 printk(KERN_DEBUG " Rx data %2.2x:%2.2x:%2.2x:%2.2x:%2.2x:" 1248 DECLARE_MAC_BUF(mac);
1250 "%2.2x %2.2x:%2.2x:%2.2x:%2.2x:%2.2x:%2.2x %2.2x%2.2x " 1249 DECLARE_MAC_BUF(mac2);
1251 "%d.%d.%d.%d.\n", 1250
1252 skb->data[0], skb->data[1], skb->data[2], skb->data[3], 1251 printk(KERN_DEBUG " Rx data %s %s"
1253 skb->data[4], skb->data[5], skb->data[6], skb->data[7], 1252 " %2.2x%2.2x %d.%d.%d.%d.\n",
1254 skb->data[8], skb->data[9], skb->data[10], 1253 print_mac(mac, &skb->data[0]), print_mac(mac2, &skb->data[6]),
1255 skb->data[11], skb->data[12], skb->data[13], 1254 skb->data[12], skb->data[13],
1256 skb->data[14], skb->data[15], skb->data[16], 1255 skb->data[14], skb->data[15], skb->data[16], skb->data[17]);
1257 skb->data[17]); 1256 }
1258#endif 1257#endif
1259 skb->protocol = eth_type_trans(skb, dev); 1258 skb->protocol = eth_type_trans(skb, dev);
1260 netif_rx(skb); 1259 netif_rx(skb);
diff --git a/drivers/net/tulip/xircom_cb.c b/drivers/net/tulip/xircom_cb.c
index de8c92083e92..70befe33e454 100644
--- a/drivers/net/tulip/xircom_cb.c
+++ b/drivers/net/tulip/xircom_cb.c
@@ -1074,6 +1074,7 @@ static void read_mac_address(struct xircom_private *card)
1074 unsigned char j, tuple, link, data_id, data_count; 1074 unsigned char j, tuple, link, data_id, data_count;
1075 unsigned long flags; 1075 unsigned long flags;
1076 int i; 1076 int i;
1077 DECLARE_MAC_BUF(mac);
1077 1078
1078 enter("read_mac_address"); 1079 enter("read_mac_address");
1079 1080
@@ -1103,11 +1104,7 @@ static void read_mac_address(struct xircom_private *card)
1103 } 1104 }
1104 } 1105 }
1105 spin_unlock_irqrestore(&card->lock, flags); 1106 spin_unlock_irqrestore(&card->lock, flags);
1106#ifdef DEBUG 1107 pr_debug(" %s\n", print_mac(mac, card->dev->dev_addr));
1107 for (i = 0; i < 6; i++)
1108 printk("%c%2.2X", i ? ':' : ' ', card->dev->dev_addr[i]);
1109 printk("\n");
1110#endif
1111 leave("read_mac_address"); 1108 leave("read_mac_address");
1112} 1109}
1113 1110
diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index d8b8e68ef70b..1f7644695976 100644
--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
@@ -159,16 +159,15 @@ tun_net_mclist(struct net_device *dev)
159 struct tun_struct *tun = netdev_priv(dev); 159 struct tun_struct *tun = netdev_priv(dev);
160 const struct dev_mc_list *mclist; 160 const struct dev_mc_list *mclist;
161 int i; 161 int i;
162 DECLARE_MAC_BUF(mac);
162 DBG(KERN_DEBUG "%s: tun_net_mclist: mc_count %d\n", 163 DBG(KERN_DEBUG "%s: tun_net_mclist: mc_count %d\n",
163 dev->name, dev->mc_count); 164 dev->name, dev->mc_count);
164 memset(tun->chr_filter, 0, sizeof tun->chr_filter); 165 memset(tun->chr_filter, 0, sizeof tun->chr_filter);
165 for (i = 0, mclist = dev->mc_list; i < dev->mc_count && mclist != NULL; 166 for (i = 0, mclist = dev->mc_list; i < dev->mc_count && mclist != NULL;
166 i++, mclist = mclist->next) { 167 i++, mclist = mclist->next) {
167 add_multi(tun->net_filter, mclist->dmi_addr); 168 add_multi(tun->net_filter, mclist->dmi_addr);
168 DBG(KERN_DEBUG "%s: tun_net_mclist: %x:%x:%x:%x:%x:%x\n", 169 DBG(KERN_DEBUG "%s: tun_net_mclist: %s\n",
169 dev->name, 170 dev->name, print_mac(mac, mclist->dmi_addr));
170 mclist->dmi_addr[0], mclist->dmi_addr[1], mclist->dmi_addr[2],
171 mclist->dmi_addr[3], mclist->dmi_addr[4], mclist->dmi_addr[5]);
172 } 171 }
173} 172}
174 173
@@ -358,6 +357,7 @@ static ssize_t tun_chr_aio_read(struct kiocb *iocb, const struct iovec *iv,
358 DECLARE_WAITQUEUE(wait, current); 357 DECLARE_WAITQUEUE(wait, current);
359 struct sk_buff *skb; 358 struct sk_buff *skb;
360 ssize_t len, ret = 0; 359 ssize_t len, ret = 0;
360 DECLARE_MAC_BUF(mac);
361 361
362 if (!tun) 362 if (!tun)
363 return -EBADFD; 363 return -EBADFD;
@@ -412,16 +412,14 @@ static ssize_t tun_chr_aio_read(struct kiocb *iocb, const struct iovec *iv,
412 (addr[0] == 0x33 && addr[1] == 0x33)) && 412 (addr[0] == 0x33 && addr[1] == 0x33)) &&
413 ((tun->if_flags & IFF_ALLMULTI) || 413 ((tun->if_flags & IFF_ALLMULTI) ||
414 (tun->chr_filter[bit_nr >> 5] & (1 << (bit_nr & 31)))))) { 414 (tun->chr_filter[bit_nr >> 5] & (1 << (bit_nr & 31)))))) {
415 DBG(KERN_DEBUG "%s: tun_chr_readv: accepted: %x:%x:%x:%x:%x:%x\n", 415 DBG(KERN_DEBUG "%s: tun_chr_readv: accepted: %s\n",
416 tun->dev->name, addr[0], addr[1], addr[2], 416 tun->dev->name, print_mac(mac, addr));
417 addr[3], addr[4], addr[5]);
418 ret = tun_put_user(tun, skb, (struct iovec *) iv, len); 417 ret = tun_put_user(tun, skb, (struct iovec *) iv, len);
419 kfree_skb(skb); 418 kfree_skb(skb);
420 break; 419 break;
421 } else { 420 } else {
422 DBG(KERN_DEBUG "%s: tun_chr_readv: rejected: %x:%x:%x:%x:%x:%x\n", 421 DBG(KERN_DEBUG "%s: tun_chr_readv: rejected: %s\n",
423 tun->dev->name, addr[0], addr[1], addr[2], 422 tun->dev->name, print_mac(mac, addr));
424 addr[3], addr[4], addr[5]);
425 kfree_skb(skb); 423 kfree_skb(skb);
426 continue; 424 continue;
427 } 425 }
@@ -564,6 +562,7 @@ static int tun_chr_ioctl(struct inode *inode, struct file *file,
564 struct tun_struct *tun = file->private_data; 562 struct tun_struct *tun = file->private_data;
565 void __user* argp = (void __user*)arg; 563 void __user* argp = (void __user*)arg;
566 struct ifreq ifr; 564 struct ifreq ifr;
565 DECLARE_MAC_BUF(mac);
567 566
568 if (cmd == TUNSETIFF || _IOC_TYPE(cmd) == 0x89) 567 if (cmd == TUNSETIFF || _IOC_TYPE(cmd) == 0x89)
569 if (copy_from_user(&ifr, argp, sizeof ifr)) 568 if (copy_from_user(&ifr, argp, sizeof ifr))
@@ -692,22 +691,16 @@ static int tun_chr_ioctl(struct inode *inode, struct file *file,
692 /** Add the specified group to the character device's multicast filter 691 /** Add the specified group to the character device's multicast filter
693 * list. */ 692 * list. */
694 add_multi(tun->chr_filter, ifr.ifr_hwaddr.sa_data); 693 add_multi(tun->chr_filter, ifr.ifr_hwaddr.sa_data);
695 DBG(KERN_DEBUG "%s: add multi: %x:%x:%x:%x:%x:%x\n", 694 DBG(KERN_DEBUG "%s: add multi: %s\n",
696 tun->dev->name, 695 tun->dev->name, print_mac(mac, ifr.ifr_hwaddr.sa_data));
697 (u8)ifr.ifr_hwaddr.sa_data[0], (u8)ifr.ifr_hwaddr.sa_data[1],
698 (u8)ifr.ifr_hwaddr.sa_data[2], (u8)ifr.ifr_hwaddr.sa_data[3],
699 (u8)ifr.ifr_hwaddr.sa_data[4], (u8)ifr.ifr_hwaddr.sa_data[5]);
700 return 0; 696 return 0;
701 697
702 case SIOCDELMULTI: 698 case SIOCDELMULTI:
703 /** Remove the specified group from the character device's multicast 699 /** Remove the specified group from the character device's multicast
704 * filter list. */ 700 * filter list. */
705 del_multi(tun->chr_filter, ifr.ifr_hwaddr.sa_data); 701 del_multi(tun->chr_filter, ifr.ifr_hwaddr.sa_data);
706 DBG(KERN_DEBUG "%s: del multi: %x:%x:%x:%x:%x:%x\n", 702 DBG(KERN_DEBUG "%s: del multi: %s\n",
707 tun->dev->name, 703 tun->dev->name, print_mac(mac, ifr.ifr_hwaddr.sa_data));
708 (u8)ifr.ifr_hwaddr.sa_data[0], (u8)ifr.ifr_hwaddr.sa_data[1],
709 (u8)ifr.ifr_hwaddr.sa_data[2], (u8)ifr.ifr_hwaddr.sa_data[3],
710 (u8)ifr.ifr_hwaddr.sa_data[4], (u8)ifr.ifr_hwaddr.sa_data[5]);
711 return 0; 704 return 0;
712 705
713 default: 706 default:
diff --git a/drivers/net/typhoon.c b/drivers/net/typhoon.c
index c6d8513ecad6..43894e95fcb3 100644
--- a/drivers/net/typhoon.c
+++ b/drivers/net/typhoon.c
@@ -2316,8 +2316,8 @@ typhoon_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
2316 dma_addr_t shared_dma; 2316 dma_addr_t shared_dma;
2317 struct cmd_desc xp_cmd; 2317 struct cmd_desc xp_cmd;
2318 struct resp_desc xp_resp[3]; 2318 struct resp_desc xp_resp[3];
2319 int i;
2320 int err = 0; 2319 int err = 0;
2320 DECLARE_MAC_BUF(mac);
2321 2321
2322 if(!did_version++) 2322 if(!did_version++)
2323 printk(KERN_INFO "%s", version); 2323 printk(KERN_INFO "%s", version);
@@ -2532,13 +2532,11 @@ typhoon_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
2532 2532
2533 pci_set_drvdata(pdev, dev); 2533 pci_set_drvdata(pdev, dev);
2534 2534
2535 printk(KERN_INFO "%s: %s at %s 0x%llx, ", 2535 printk(KERN_INFO "%s: %s at %s 0x%llx, %s\n",
2536 dev->name, typhoon_card_info[card_id].name, 2536 dev->name, typhoon_card_info[card_id].name,
2537 use_mmio ? "MMIO" : "IO", 2537 use_mmio ? "MMIO" : "IO",
2538 (unsigned long long)pci_resource_start(pdev, use_mmio)); 2538 (unsigned long long)pci_resource_start(pdev, use_mmio),
2539 for(i = 0; i < 5; i++) 2539 print_mac(mac, dev->dev_addr));
2540 printk("%2.2x:", dev->dev_addr[i]);
2541 printk("%2.2x\n", dev->dev_addr[i]);
2542 2540
2543 /* xp_resp still contains the response to the READ_VERSIONS command. 2541 /* xp_resp still contains the response to the READ_VERSIONS command.
2544 * For debugging, let the user know what version he has. 2542 * For debugging, let the user know what version he has.
diff --git a/drivers/net/usb/pegasus.c b/drivers/net/usb/pegasus.c
index 432a2f054468..d1ed68a11e70 100644
--- a/drivers/net/usb/pegasus.c
+++ b/drivers/net/usb/pegasus.c
@@ -1297,6 +1297,7 @@ static int pegasus_probe(struct usb_interface *intf,
1297 pegasus_t *pegasus; 1297 pegasus_t *pegasus;
1298 int dev_index = id - pegasus_ids; 1298 int dev_index = id - pegasus_ids;
1299 int res = -ENOMEM; 1299 int res = -ENOMEM;
1300 DECLARE_MAC_BUF(mac);
1300 1301
1301 usb_get_dev(dev); 1302 usb_get_dev(dev);
1302 net = alloc_etherdev(sizeof(struct pegasus)); 1303 net = alloc_etherdev(sizeof(struct pegasus));
@@ -1367,12 +1368,10 @@ static int pegasus_probe(struct usb_interface *intf,
1367 queue_delayed_work(pegasus_workqueue, &pegasus->carrier_check, 1368 queue_delayed_work(pegasus_workqueue, &pegasus->carrier_check,
1368 CARRIER_CHECK_DELAY); 1369 CARRIER_CHECK_DELAY);
1369 1370
1370 dev_info(&intf->dev, "%s, %s, %02x:%02x:%02x:%02x:%02x:%02x\n", 1371 dev_info(&intf->dev, "%s, %s, %s\n",
1371 net->name, 1372 net->name,
1372 usb_dev_id[dev_index].name, 1373 usb_dev_id[dev_index].name,
1373 net->dev_addr [0], net->dev_addr [1], 1374 print_mac(mac, net->dev_addr));
1374 net->dev_addr [2], net->dev_addr [3],
1375 net->dev_addr [4], net->dev_addr [5]);
1376 return 0; 1375 return 0;
1377 1376
1378out3: 1377out3:
diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c
index 3542ca5fb0fa..acd5f1c0e63a 100644
--- a/drivers/net/usb/usbnet.c
+++ b/drivers/net/usb/usbnet.c
@@ -1134,6 +1134,7 @@ usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod)
1134 struct usb_device *xdev; 1134 struct usb_device *xdev;
1135 int status; 1135 int status;
1136 const char *name; 1136 const char *name;
1137 DECLARE_MAC_BUF(mac);
1137 1138
1138 name = udev->dev.driver->name; 1139 name = udev->dev.driver->name;
1139 info = (struct driver_info *) prod->driver_info; 1140 info = (struct driver_info *) prod->driver_info;
@@ -1241,14 +1242,11 @@ usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod)
1241 if (status) 1242 if (status)
1242 goto out3; 1243 goto out3;
1243 if (netif_msg_probe (dev)) 1244 if (netif_msg_probe (dev))
1244 devinfo (dev, "register '%s' at usb-%s-%s, %s, " 1245 devinfo (dev, "register '%s' at usb-%s-%s, %s, %s",
1245 "%02x:%02x:%02x:%02x:%02x:%02x",
1246 udev->dev.driver->name, 1246 udev->dev.driver->name,
1247 xdev->bus->bus_name, xdev->devpath, 1247 xdev->bus->bus_name, xdev->devpath,
1248 dev->driver_info->description, 1248 dev->driver_info->description,
1249 net->dev_addr [0], net->dev_addr [1], 1249 print_mac(mac, net->dev_addr));
1250 net->dev_addr [2], net->dev_addr [3],
1251 net->dev_addr [4], net->dev_addr [5]);
1252 1250
1253 // ok, it's ready to go. 1251 // ok, it's ready to go.
1254 usb_set_intfdata (udev, dev); 1252 usb_set_intfdata (udev, dev);
diff --git a/drivers/net/via-rhine.c b/drivers/net/via-rhine.c
index d55c4fdff489..9669bce0fd07 100644
--- a/drivers/net/via-rhine.c
+++ b/drivers/net/via-rhine.c
@@ -638,6 +638,7 @@ static int __devinit rhine_init_one(struct pci_dev *pdev,
638#else 638#else
639 int bar = 0; 639 int bar = 0;
640#endif 640#endif
641 DECLARE_MAC_BUF(mac);
641 642
642/* when built into the kernel, we only print version if device is found */ 643/* when built into the kernel, we only print version if device is found */
643#ifndef MODULE 644#ifndef MODULE
@@ -794,18 +795,14 @@ static int __devinit rhine_init_one(struct pci_dev *pdev,
794 if (rc) 795 if (rc)
795 goto err_out_unmap; 796 goto err_out_unmap;
796 797
797 printk(KERN_INFO "%s: VIA %s at 0x%lx, ", 798 printk(KERN_INFO "%s: VIA %s at 0x%lx, %s, IRQ %d.\n",
798 dev->name, name, 799 dev->name, name,
799#ifdef USE_MMIO 800#ifdef USE_MMIO
800 memaddr 801 memaddr,
801#else 802#else
802 (long)ioaddr 803 (long)ioaddr,
803#endif 804#endif
804 ); 805 print_mac(mac, dev->dev_addr), pdev->irq);
805
806 for (i = 0; i < 5; i++)
807 printk("%2.2x:", dev->dev_addr[i]);
808 printk("%2.2x, IRQ %d.\n", dev->dev_addr[i], pdev->irq);
809 806
810 pci_set_drvdata(pdev, dev); 807 pci_set_drvdata(pdev, dev);
811 808
diff --git a/drivers/net/wd.c b/drivers/net/wd.c
index cef365881ac2..fa14255282af 100644
--- a/drivers/net/wd.c
+++ b/drivers/net/wd.c
@@ -156,6 +156,7 @@ static int __init wd_probe1(struct net_device *dev, int ioaddr)
156 int word16 = 0; /* 0 = 8 bit, 1 = 16 bit */ 156 int word16 = 0; /* 0 = 8 bit, 1 = 16 bit */
157 const char *model_name; 157 const char *model_name;
158 static unsigned version_printed; 158 static unsigned version_printed;
159 DECLARE_MAC_BUF(mac);
159 160
160 for (i = 0; i < 8; i++) 161 for (i = 0; i < 8; i++)
161 checksum += inb(ioaddr + 8 + i); 162 checksum += inb(ioaddr + 8 + i);
@@ -174,9 +175,11 @@ static int __init wd_probe1(struct net_device *dev, int ioaddr)
174 if (ei_debug && version_printed++ == 0) 175 if (ei_debug && version_printed++ == 0)
175 printk(version); 176 printk(version);
176 177
177 printk("%s: WD80x3 at %#3x,", dev->name, ioaddr);
178 for (i = 0; i < 6; i++) 178 for (i = 0; i < 6; i++)
179 printk(" %2.2X", dev->dev_addr[i] = inb(ioaddr + 8 + i)); 179 dev->dev_addr[i] = inb(ioaddr + 8 + i);
180
181 printk("%s: WD80x3 at %#3x, %s",
182 dev->name, ioaddr, print_mac(mac, dev->dev_addr));
180 183
181 /* The following PureData probe code was contributed by 184 /* The following PureData probe code was contributed by
182 Mike Jagdis <jaggy@purplet.demon.co.uk>. Puredata does software 185 Mike Jagdis <jaggy@purplet.demon.co.uk>. Puredata does software
diff --git a/drivers/net/wireless/adm8211.c b/drivers/net/wireless/adm8211.c
index eec01fc15282..ac2ea237019d 100644
--- a/drivers/net/wireless/adm8211.c
+++ b/drivers/net/wireless/adm8211.c
@@ -1787,6 +1787,7 @@ static int __devinit adm8211_probe(struct pci_dev *pdev,
1787 int err; 1787 int err;
1788 u32 reg; 1788 u32 reg;
1789 u8 perm_addr[ETH_ALEN]; 1789 u8 perm_addr[ETH_ALEN];
1790 DECLARE_MAC_BUF(mac);
1790 1791
1791#ifndef MODULE 1792#ifndef MODULE
1792 static unsigned int cardidx; 1793 static unsigned int cardidx;
@@ -1938,8 +1939,8 @@ static int __devinit adm8211_probe(struct pci_dev *pdev,
1938 goto err_free_desc; 1939 goto err_free_desc;
1939 } 1940 }
1940 1941
1941 printk(KERN_INFO "%s: hwaddr " MAC_FMT ", Rev 0x%02x\n", 1942 printk(KERN_INFO "%s: hwaddr %s, Rev 0x%02x\n",
1942 wiphy_name(dev->wiphy), MAC_ARG(dev->wiphy->perm_addr), 1943 wiphy_name(dev->wiphy), print_mac(mac, dev->wiphy->perm_addr),
1943 priv->revid); 1944 priv->revid);
1944 1945
1945 return 0; 1946 return 0;
diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c
index 7d717c4d9845..95d3cd1c49a7 100644
--- a/drivers/net/wireless/airo.c
+++ b/drivers/net/wireless/airo.c
@@ -2821,6 +2821,7 @@ static struct net_device *_init_airo_card( unsigned short irq, int port,
2821 struct net_device *dev; 2821 struct net_device *dev;
2822 struct airo_info *ai; 2822 struct airo_info *ai;
2823 int i, rc; 2823 int i, rc;
2824 DECLARE_MAC_BUF(mac);
2824 2825
2825 /* Create the network device object. */ 2826 /* Create the network device object. */
2826 dev = alloc_netdev(sizeof(*ai), "", ether_setup); 2827 dev = alloc_netdev(sizeof(*ai), "", ether_setup);
@@ -2923,9 +2924,8 @@ static struct net_device *_init_airo_card( unsigned short irq, int port,
2923 goto err_out_reg; 2924 goto err_out_reg;
2924 2925
2925 set_bit(FLAG_REGISTERED,&ai->flags); 2926 set_bit(FLAG_REGISTERED,&ai->flags);
2926 airo_print_info(dev->name, "MAC enabled %x:%x:%x:%x:%x:%x", 2927 airo_print_info(dev->name, "MAC enabled %s",
2927 dev->dev_addr[0], dev->dev_addr[1], dev->dev_addr[2], 2928 print_mac(mac, dev->dev_addr));
2928 dev->dev_addr[3], dev->dev_addr[4], dev->dev_addr[5] );
2929 2929
2930 /* Allocate the transmit buffers */ 2930 /* Allocate the transmit buffers */
2931 if (probe && !test_bit(FLAG_MPI,&ai->flags)) 2931 if (probe && !test_bit(FLAG_MPI,&ai->flags))
@@ -2982,6 +2982,7 @@ int reset_airo_card( struct net_device *dev )
2982{ 2982{
2983 int i; 2983 int i;
2984 struct airo_info *ai = dev->priv; 2984 struct airo_info *ai = dev->priv;
2985 DECLARE_MAC_BUF(mac);
2985 2986
2986 if (reset_card (dev, 1)) 2987 if (reset_card (dev, 1))
2987 return -1; 2988 return -1;
@@ -2990,9 +2991,8 @@ int reset_airo_card( struct net_device *dev )
2990 airo_print_err(dev->name, "MAC could not be enabled"); 2991 airo_print_err(dev->name, "MAC could not be enabled");
2991 return -1; 2992 return -1;
2992 } 2993 }
2993 airo_print_info(dev->name, "MAC enabled %x:%x:%x:%x:%x:%x", 2994 airo_print_info(dev->name, "MAC enabled %s",
2994 dev->dev_addr[0], dev->dev_addr[1], dev->dev_addr[2], 2995 print_mac(mac, dev->dev_addr));
2995 dev->dev_addr[3], dev->dev_addr[4], dev->dev_addr[5]);
2996 /* Allocate the transmit buffers if needed */ 2996 /* Allocate the transmit buffers if needed */
2997 if (!test_bit(FLAG_MPI,&ai->flags)) 2997 if (!test_bit(FLAG_MPI,&ai->flags))
2998 for( i = 0; i < MAX_FIDS; i++ ) 2998 for( i = 0; i < MAX_FIDS; i++ )
@@ -5426,6 +5426,7 @@ static int proc_APList_open( struct inode *inode, struct file *file ) {
5426 int i; 5426 int i;
5427 char *ptr; 5427 char *ptr;
5428 APListRid APList_rid; 5428 APListRid APList_rid;
5429 DECLARE_MAC_BUF(mac);
5429 5430
5430 if ((file->private_data = kzalloc(sizeof(struct proc_data ), GFP_KERNEL)) == NULL) 5431 if ((file->private_data = kzalloc(sizeof(struct proc_data ), GFP_KERNEL)) == NULL)
5431 return -ENOMEM; 5432 return -ENOMEM;
@@ -5449,13 +5450,8 @@ static int proc_APList_open( struct inode *inode, struct file *file ) {
5449// We end when we find a zero MAC 5450// We end when we find a zero MAC
5450 if ( !*(int*)APList_rid.ap[i] && 5451 if ( !*(int*)APList_rid.ap[i] &&
5451 !*(int*)&APList_rid.ap[i][2]) break; 5452 !*(int*)&APList_rid.ap[i][2]) break;
5452 ptr += sprintf(ptr, "%02x:%02x:%02x:%02x:%02x:%02x\n", 5453 ptr += sprintf(ptr, "%s\n",
5453 (int)APList_rid.ap[i][0], 5454 print_mac(mac, APList_rid.ap[i]));
5454 (int)APList_rid.ap[i][1],
5455 (int)APList_rid.ap[i][2],
5456 (int)APList_rid.ap[i][3],
5457 (int)APList_rid.ap[i][4],
5458 (int)APList_rid.ap[i][5]);
5459 } 5455 }
5460 if (i==0) ptr += sprintf(ptr, "Not using specific APs\n"); 5456 if (i==0) ptr += sprintf(ptr, "Not using specific APs\n");
5461 5457
@@ -5474,6 +5470,7 @@ static int proc_BSSList_open( struct inode *inode, struct file *file ) {
5474 int rc; 5470 int rc;
5475 /* If doLoseSync is not 1, we won't do a Lose Sync */ 5471 /* If doLoseSync is not 1, we won't do a Lose Sync */
5476 int doLoseSync = -1; 5472 int doLoseSync = -1;
5473 DECLARE_MAC_BUF(mac);
5477 5474
5478 if ((file->private_data = kzalloc(sizeof(struct proc_data ), GFP_KERNEL)) == NULL) 5475 if ((file->private_data = kzalloc(sizeof(struct proc_data ), GFP_KERNEL)) == NULL)
5479 return -ENOMEM; 5476 return -ENOMEM;
@@ -5510,13 +5507,8 @@ static int proc_BSSList_open( struct inode *inode, struct file *file ) {
5510 we have to add a spin lock... */ 5507 we have to add a spin lock... */
5511 rc = readBSSListRid(ai, doLoseSync, &BSSList_rid); 5508 rc = readBSSListRid(ai, doLoseSync, &BSSList_rid);
5512 while(rc == 0 && BSSList_rid.index != 0xffff) { 5509 while(rc == 0 && BSSList_rid.index != 0xffff) {
5513 ptr += sprintf(ptr, "%02x:%02x:%02x:%02x:%02x:%02x %*s rssi = %d", 5510 ptr += sprintf(ptr, "%s %*s rssi = %d",
5514 (int)BSSList_rid.bssid[0], 5511 print_mac(mac, BSSList_rid.bssid),
5515 (int)BSSList_rid.bssid[1],
5516 (int)BSSList_rid.bssid[2],
5517 (int)BSSList_rid.bssid[3],
5518 (int)BSSList_rid.bssid[4],
5519 (int)BSSList_rid.bssid[5],
5520 (int)BSSList_rid.ssidLen, 5512 (int)BSSList_rid.ssidLen,
5521 BSSList_rid.ssid, 5513 BSSList_rid.ssid,
5522 (int)BSSList_rid.dBm); 5514 (int)BSSList_rid.dBm);
diff --git a/drivers/net/wireless/arlan-main.c b/drivers/net/wireless/arlan-main.c
index 3eaaab0ba0cc..dbdfc9e39d20 100644
--- a/drivers/net/wireless/arlan-main.c
+++ b/drivers/net/wireless/arlan-main.c
@@ -1469,10 +1469,10 @@ static void arlan_rx_interrupt(struct net_device *dev, u_char rxStatus, u_short
1469 while (dmi) 1469 while (dmi)
1470 { if (dmi->dmi_addrlen == 6) 1470 { if (dmi->dmi_addrlen == 6)
1471 { 1471 {
1472 DECLARE_MAC_BUF(mac);
1472 if (arlan_debug & ARLAN_DEBUG_HEADER_DUMP) 1473 if (arlan_debug & ARLAN_DEBUG_HEADER_DUMP)
1473 printk(KERN_ERR "%s mcl %2x:%2x:%2x:%2x:%2x:%2x \n", dev->name, 1474 printk(KERN_ERR "%s mcl %s\n",
1474 dmi->dmi_addr[0], dmi->dmi_addr[1], dmi->dmi_addr[2], 1475 dev->name, print_mac(mac, dmi->dmi_addr));
1475 dmi->dmi_addr[3], dmi->dmi_addr[4], dmi->dmi_addr[5]);
1476 for (i = 0; i < 6; i++) 1476 for (i = 0; i < 6; i++)
1477 if (dmi->dmi_addr[i] != hw_dst_addr[i]) 1477 if (dmi->dmi_addr[i] != hw_dst_addr[i])
1478 break; 1478 break;
@@ -1512,17 +1512,18 @@ static void arlan_rx_interrupt(struct net_device *dev, u_char rxStatus, u_short
1512 { 1512 {
1513 char immedDestAddress[6]; 1513 char immedDestAddress[6];
1514 char immedSrcAddress[6]; 1514 char immedSrcAddress[6];
1515 DECLARE_MAC_BUF(mac);
1516 DECLARE_MAC_BUF(mac2);
1517 DECLARE_MAC_BUF(mac3);
1518 DECLARE_MAC_BUF(mac4);
1515 memcpy_fromio(immedDestAddress, arlan->immedDestAddress, 6); 1519 memcpy_fromio(immedDestAddress, arlan->immedDestAddress, 6);
1516 memcpy_fromio(immedSrcAddress, arlan->immedSrcAddress, 6); 1520 memcpy_fromio(immedSrcAddress, arlan->immedSrcAddress, 6);
1517 1521
1518 printk(KERN_WARNING "%s t %2x:%2x:%2x:%2x:%2x:%2x f %2x:%2x:%2x:%2x:%2x:%2x imd %2x:%2x:%2x:%2x:%2x:%2x ims %2x:%2x:%2x:%2x:%2x:%2x\n", dev->name, 1522 printk(KERN_WARNING "%s t %s f %s imd %s ims %s\n",
1519 (unsigned char) skbtmp[0], (unsigned char) skbtmp[1], (unsigned char) skbtmp[2], (unsigned char) skbtmp[3], 1523 dev->name, print_mac(mac, skbtmp),
1520 (unsigned char) skbtmp[4], (unsigned char) skbtmp[5], (unsigned char) skbtmp[6], (unsigned char) skbtmp[7], 1524 print_mac(mac2, &skbtmp[6]),
1521 (unsigned char) skbtmp[8], (unsigned char) skbtmp[9], (unsigned char) skbtmp[10], (unsigned char) skbtmp[11], 1525 print_mac(mac3, immedDestAddress),
1522 immedDestAddress[0], immedDestAddress[1], immedDestAddress[2], 1526 print_mac(mac4, immedSrcAddress));
1523 immedDestAddress[3], immedDestAddress[4], immedDestAddress[5],
1524 immedSrcAddress[0], immedSrcAddress[1], immedSrcAddress[2],
1525 immedSrcAddress[3], immedSrcAddress[4], immedSrcAddress[5]);
1526 } 1527 }
1527 skb->protocol = eth_type_trans(skb, dev); 1528 skb->protocol = eth_type_trans(skb, dev);
1528 IFDEBUG(ARLAN_DEBUG_HEADER_DUMP) 1529 IFDEBUG(ARLAN_DEBUG_HEADER_DUMP)
diff --git a/drivers/net/wireless/atmel.c b/drivers/net/wireless/atmel.c
index 47dbdf95ea6f..059ce3f07dba 100644
--- a/drivers/net/wireless/atmel.c
+++ b/drivers/net/wireless/atmel.c
@@ -1484,6 +1484,7 @@ struct net_device *init_atmel_card(unsigned short irq, unsigned long port,
1484 struct net_device *dev; 1484 struct net_device *dev;
1485 struct atmel_private *priv; 1485 struct atmel_private *priv;
1486 int rc; 1486 int rc;
1487 DECLARE_MAC_BUF(mac);
1487 1488
1488 /* Create the network device object. */ 1489 /* Create the network device object. */
1489 dev = alloc_etherdev(sizeof(*priv)); 1490 dev = alloc_etherdev(sizeof(*priv));
@@ -1598,10 +1599,8 @@ struct net_device *init_atmel_card(unsigned short irq, unsigned long port,
1598 if (!ent) 1599 if (!ent)
1599 printk(KERN_WARNING "atmel: unable to create /proc entry.\n"); 1600 printk(KERN_WARNING "atmel: unable to create /proc entry.\n");
1600 1601
1601 printk(KERN_INFO "%s: Atmel at76c50x. Version %d.%d. MAC %.2x:%.2x:%.2x:%.2x:%.2x:%.2x\n", 1602 printk(KERN_INFO "%s: Atmel at76c50x. Version %d.%d. MAC %s\n",
1602 dev->name, DRIVER_MAJOR, DRIVER_MINOR, 1603 dev->name, DRIVER_MAJOR, DRIVER_MINOR, print_mac(mac, dev->dev_addr));
1603 dev->dev_addr[0], dev->dev_addr[1], dev->dev_addr[2],
1604 dev->dev_addr[3], dev->dev_addr[4], dev->dev_addr[5] );
1605 1604
1606 return dev; 1605 return dev;
1607 1606
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
index 184ebe3ed738..fd4ef27fcf25 100644
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -2883,6 +2883,7 @@ static int b43_dev_set_key(struct ieee80211_hw *hw,
2883 u8 algorithm; 2883 u8 algorithm;
2884 u8 index; 2884 u8 index;
2885 int err = -EINVAL; 2885 int err = -EINVAL;
2886 DECLARE_MAC_BUF(mac);
2886 2887
2887 if (modparam_nohwcrypt) 2888 if (modparam_nohwcrypt)
2888 return -ENOSPC; /* User disabled HW-crypto */ 2889 return -ENOSPC; /* User disabled HW-crypto */
@@ -2969,9 +2970,9 @@ out_unlock:
2969out: 2970out:
2970 if (!err) { 2971 if (!err) {
2971 b43dbg(wl, "%s hardware based encryption for keyidx: %d, " 2972 b43dbg(wl, "%s hardware based encryption for keyidx: %d, "
2972 "mac: " MAC_FMT "\n", 2973 "mac: %s\n",
2973 cmd == SET_KEY ? "Using" : "Disabling", key->keyidx, 2974 cmd == SET_KEY ? "Using" : "Disabling", key->keyidx,
2974 MAC_ARG(addr)); 2975 print_mac(mac, addr));
2975 } 2976 }
2976 return err; 2977 return err;
2977} 2978}
diff --git a/drivers/net/wireless/b43legacy/main.c b/drivers/net/wireless/b43legacy/main.c
index ac4831adb574..61b94218094b 100644
--- a/drivers/net/wireless/b43legacy/main.c
+++ b/drivers/net/wireless/b43legacy/main.c
@@ -2679,6 +2679,7 @@ static int b43legacy_dev_set_key(struct ieee80211_hw *hw,
2679 struct b43legacy_wldev *dev = wl->current_dev; 2679 struct b43legacy_wldev *dev = wl->current_dev;
2680 unsigned long flags; 2680 unsigned long flags;
2681 int err = -EOPNOTSUPP; 2681 int err = -EOPNOTSUPP;
2682 DECLARE_MAC_BUF(mac);
2682 2683
2683 if (!dev) 2684 if (!dev)
2684 return -ENODEV; 2685 return -ENODEV;
@@ -2691,7 +2692,7 @@ static int b43legacy_dev_set_key(struct ieee80211_hw *hw,
2691 spin_unlock_irqrestore(&wl->irq_lock, flags); 2692 spin_unlock_irqrestore(&wl->irq_lock, flags);
2692 mutex_unlock(&wl->mutex); 2693 mutex_unlock(&wl->mutex);
2693 b43legacydbg(wl, "Using software based encryption for " 2694 b43legacydbg(wl, "Using software based encryption for "
2694 "mac: " MAC_FMT "\n", MAC_ARG(addr)); 2695 "mac: %s\n", print_mac(mac, addr));
2695 return err; 2696 return err;
2696} 2697}
2697 2698
diff --git a/drivers/net/wireless/bcm43xx/bcm43xx.h b/drivers/net/wireless/bcm43xx/bcm43xx.h
index 10e07e865426..5fdbf24d2443 100644
--- a/drivers/net/wireless/bcm43xx/bcm43xx.h
+++ b/drivers/net/wireless/bcm43xx/bcm43xx.h
@@ -994,10 +994,4 @@ int bcm43xx_pci_write_config32(struct bcm43xx_private *bcm, int offset, u32 valu
994 __value; \ 994 __value; \
995 }) 995 })
996 996
997/** Helpers to print MAC addresses. */
998#define BCM43xx_MACFMT "%02x:%02x:%02x:%02x:%02x:%02x"
999#define BCM43xx_MACARG(x) ((u8*)(x))[0], ((u8*)(x))[1], \
1000 ((u8*)(x))[2], ((u8*)(x))[3], \
1001 ((u8*)(x))[4], ((u8*)(x))[5]
1002
1003#endif /* BCM43xx_H_ */ 997#endif /* BCM43xx_H_ */
diff --git a/drivers/net/wireless/hostap/hostap_80211_rx.c b/drivers/net/wireless/hostap/hostap_80211_rx.c
index cbedc9ee740a..ef084df3d48e 100644
--- a/drivers/net/wireless/hostap/hostap_80211_rx.c
+++ b/drivers/net/wireless/hostap/hostap_80211_rx.c
@@ -19,6 +19,7 @@ void hostap_dump_rx_80211(const char *name, struct sk_buff *skb,
19{ 19{
20 struct ieee80211_hdr_4addr *hdr; 20 struct ieee80211_hdr_4addr *hdr;
21 u16 fc; 21 u16 fc;
22 DECLARE_MAC_BUF(mac);
22 23
23 hdr = (struct ieee80211_hdr_4addr *) skb->data; 24 hdr = (struct ieee80211_hdr_4addr *) skb->data;
24 25
@@ -44,10 +45,11 @@ void hostap_dump_rx_80211(const char *name, struct sk_buff *skb,
44 printk(" dur=0x%04x seq=0x%04x\n", le16_to_cpu(hdr->duration_id), 45 printk(" dur=0x%04x seq=0x%04x\n", le16_to_cpu(hdr->duration_id),
45 le16_to_cpu(hdr->seq_ctl)); 46 le16_to_cpu(hdr->seq_ctl));
46 47
47 printk(KERN_DEBUG " A1=" MACSTR " A2=" MACSTR " A3=" MACSTR, 48 printk(KERN_DEBUG " A1=%s", print_mac(mac, hdr->addr1));
48 MAC2STR(hdr->addr1), MAC2STR(hdr->addr2), MAC2STR(hdr->addr3)); 49 printk(" A2=%s", print_mac(mac, hdr->addr2));
50 printk(" A3=%s", print_mac(mac, hdr->addr3));
49 if (skb->len >= 30) 51 if (skb->len >= 30)
50 printk(" A4=" MACSTR, MAC2STR(hdr->addr4)); 52 printk(" A4=%s", print_mac(mac, hdr->addr4));
51 printk("\n"); 53 printk("\n");
52} 54}
53 55
@@ -534,6 +536,7 @@ static int
534hostap_rx_frame_wds(local_info_t *local, struct ieee80211_hdr_4addr *hdr, 536hostap_rx_frame_wds(local_info_t *local, struct ieee80211_hdr_4addr *hdr,
535 u16 fc, struct net_device **wds) 537 u16 fc, struct net_device **wds)
536{ 538{
539 DECLARE_MAC_BUF(mac);
537 /* FIX: is this really supposed to accept WDS frames only in Master 540 /* FIX: is this really supposed to accept WDS frames only in Master
538 * mode? What about Repeater or Managed with WDS frames? */ 541 * mode? What about Repeater or Managed with WDS frames? */
539 if ((fc & (IEEE80211_FCTL_TODS | IEEE80211_FCTL_FROMDS)) != 542 if ((fc & (IEEE80211_FCTL_TODS | IEEE80211_FCTL_FROMDS)) !=
@@ -549,10 +552,10 @@ hostap_rx_frame_wds(local_info_t *local, struct ieee80211_hdr_4addr *hdr,
549 hdr->addr1[4] != 0xff || hdr->addr1[5] != 0xff)) { 552 hdr->addr1[4] != 0xff || hdr->addr1[5] != 0xff)) {
550 /* RA (or BSSID) is not ours - drop */ 553 /* RA (or BSSID) is not ours - drop */
551 PDEBUG(DEBUG_EXTRA, "%s: received WDS frame with " 554 PDEBUG(DEBUG_EXTRA, "%s: received WDS frame with "
552 "not own or broadcast %s=" MACSTR "\n", 555 "not own or broadcast %s=%s\n",
553 local->dev->name, 556 local->dev->name,
554 fc & IEEE80211_FCTL_FROMDS ? "RA" : "BSSID", 557 fc & IEEE80211_FCTL_FROMDS ? "RA" : "BSSID",
555 MAC2STR(hdr->addr1)); 558 print_mac(mac, hdr->addr1));
556 return -1; 559 return -1;
557 } 560 }
558 561
@@ -565,8 +568,8 @@ hostap_rx_frame_wds(local_info_t *local, struct ieee80211_hdr_4addr *hdr,
565 /* require that WDS link has been registered with TA or the 568 /* require that WDS link has been registered with TA or the
566 * frame is from current AP when using 'AP client mode' */ 569 * frame is from current AP when using 'AP client mode' */
567 PDEBUG(DEBUG_EXTRA, "%s: received WDS[4 addr] frame " 570 PDEBUG(DEBUG_EXTRA, "%s: received WDS[4 addr] frame "
568 "from unknown TA=" MACSTR "\n", 571 "from unknown TA=%s\n",
569 local->dev->name, MAC2STR(hdr->addr2)); 572 local->dev->name, print_mac(mac, hdr->addr2));
570 if (local->ap && local->ap->autom_ap_wds) 573 if (local->ap && local->ap->autom_ap_wds)
571 hostap_wds_link_oper(local, hdr->addr2, WDS_ADD); 574 hostap_wds_link_oper(local, hdr->addr2, WDS_ADD);
572 return -1; 575 return -1;
@@ -632,6 +635,7 @@ hostap_rx_frame_decrypt(local_info_t *local, struct sk_buff *skb,
632{ 635{
633 struct ieee80211_hdr_4addr *hdr; 636 struct ieee80211_hdr_4addr *hdr;
634 int res, hdrlen; 637 int res, hdrlen;
638 DECLARE_MAC_BUF(mac);
635 639
636 if (crypt == NULL || crypt->ops->decrypt_mpdu == NULL) 640 if (crypt == NULL || crypt->ops->decrypt_mpdu == NULL)
637 return 0; 641 return 0;
@@ -643,8 +647,8 @@ hostap_rx_frame_decrypt(local_info_t *local, struct sk_buff *skb,
643 strcmp(crypt->ops->name, "TKIP") == 0) { 647 strcmp(crypt->ops->name, "TKIP") == 0) {
644 if (net_ratelimit()) { 648 if (net_ratelimit()) {
645 printk(KERN_DEBUG "%s: TKIP countermeasures: dropped " 649 printk(KERN_DEBUG "%s: TKIP countermeasures: dropped "
646 "received packet from " MACSTR "\n", 650 "received packet from %s\n",
647 local->dev->name, MAC2STR(hdr->addr2)); 651 local->dev->name, print_mac(mac, hdr->addr2));
648 } 652 }
649 return -1; 653 return -1;
650 } 654 }
@@ -653,9 +657,9 @@ hostap_rx_frame_decrypt(local_info_t *local, struct sk_buff *skb,
653 res = crypt->ops->decrypt_mpdu(skb, hdrlen, crypt->priv); 657 res = crypt->ops->decrypt_mpdu(skb, hdrlen, crypt->priv);
654 atomic_dec(&crypt->refcnt); 658 atomic_dec(&crypt->refcnt);
655 if (res < 0) { 659 if (res < 0) {
656 printk(KERN_DEBUG "%s: decryption failed (SA=" MACSTR 660 printk(KERN_DEBUG "%s: decryption failed (SA=%s"
657 ") res=%d\n", 661 ") res=%d\n",
658 local->dev->name, MAC2STR(hdr->addr2), res); 662 local->dev->name, print_mac(mac, hdr->addr2), res);
659 local->comm_tallies.rx_discards_wep_undecryptable++; 663 local->comm_tallies.rx_discards_wep_undecryptable++;
660 return -1; 664 return -1;
661 } 665 }
@@ -671,6 +675,7 @@ hostap_rx_frame_decrypt_msdu(local_info_t *local, struct sk_buff *skb,
671{ 675{
672 struct ieee80211_hdr_4addr *hdr; 676 struct ieee80211_hdr_4addr *hdr;
673 int res, hdrlen; 677 int res, hdrlen;
678 DECLARE_MAC_BUF(mac);
674 679
675 if (crypt == NULL || crypt->ops->decrypt_msdu == NULL) 680 if (crypt == NULL || crypt->ops->decrypt_msdu == NULL)
676 return 0; 681 return 0;
@@ -683,8 +688,8 @@ hostap_rx_frame_decrypt_msdu(local_info_t *local, struct sk_buff *skb,
683 atomic_dec(&crypt->refcnt); 688 atomic_dec(&crypt->refcnt);
684 if (res < 0) { 689 if (res < 0) {
685 printk(KERN_DEBUG "%s: MSDU decryption/MIC verification failed" 690 printk(KERN_DEBUG "%s: MSDU decryption/MIC verification failed"
686 " (SA=" MACSTR " keyidx=%d)\n", 691 " (SA=%s keyidx=%d)\n",
687 local->dev->name, MAC2STR(hdr->addr2), keyidx); 692 local->dev->name, print_mac(mac, hdr->addr2), keyidx);
688 return -1; 693 return -1;
689 } 694 }
690 695
@@ -716,6 +721,7 @@ void hostap_80211_rx(struct net_device *dev, struct sk_buff *skb,
716 struct ieee80211_crypt_data *crypt = NULL; 721 struct ieee80211_crypt_data *crypt = NULL;
717 void *sta = NULL; 722 void *sta = NULL;
718 int keyidx = 0; 723 int keyidx = 0;
724 DECLARE_MAC_BUF(mac);
719 725
720 iface = netdev_priv(dev); 726 iface = netdev_priv(dev);
721 local = iface->local; 727 local = iface->local;
@@ -792,8 +798,8 @@ void hostap_80211_rx(struct net_device *dev, struct sk_buff *skb,
792 * frames silently instead of filling system log with 798 * frames silently instead of filling system log with
793 * these reports. */ 799 * these reports. */
794 printk(KERN_DEBUG "%s: WEP decryption failed (not set)" 800 printk(KERN_DEBUG "%s: WEP decryption failed (not set)"
795 " (SA=" MACSTR ")\n", 801 " (SA=%s)\n",
796 local->dev->name, MAC2STR(hdr->addr2)); 802 local->dev->name, print_mac(mac, hdr->addr2));
797#endif 803#endif
798 local->comm_tallies.rx_discards_wep_undecryptable++; 804 local->comm_tallies.rx_discards_wep_undecryptable++;
799 goto rx_dropped; 805 goto rx_dropped;
@@ -807,8 +813,8 @@ void hostap_80211_rx(struct net_device *dev, struct sk_buff *skb,
807 (keyidx = hostap_rx_frame_decrypt(local, skb, crypt)) < 0) 813 (keyidx = hostap_rx_frame_decrypt(local, skb, crypt)) < 0)
808 { 814 {
809 printk(KERN_DEBUG "%s: failed to decrypt mgmt::auth " 815 printk(KERN_DEBUG "%s: failed to decrypt mgmt::auth "
810 "from " MACSTR "\n", dev->name, 816 "from %s\n", dev->name,
811 MAC2STR(hdr->addr2)); 817 print_mac(mac, hdr->addr2));
812 /* TODO: could inform hostapd about this so that it 818 /* TODO: could inform hostapd about this so that it
813 * could send auth failure report */ 819 * could send auth failure report */
814 goto rx_dropped; 820 goto rx_dropped;
@@ -976,8 +982,8 @@ void hostap_80211_rx(struct net_device *dev, struct sk_buff *skb,
976 "unencrypted EAPOL frame\n", local->dev->name); 982 "unencrypted EAPOL frame\n", local->dev->name);
977 } else { 983 } else {
978 printk(KERN_DEBUG "%s: encryption configured, but RX " 984 printk(KERN_DEBUG "%s: encryption configured, but RX "
979 "frame not encrypted (SA=" MACSTR ")\n", 985 "frame not encrypted (SA=%s)\n",
980 local->dev->name, MAC2STR(hdr->addr2)); 986 local->dev->name, print_mac(mac, hdr->addr2));
981 goto rx_dropped; 987 goto rx_dropped;
982 } 988 }
983 } 989 }
@@ -986,8 +992,9 @@ void hostap_80211_rx(struct net_device *dev, struct sk_buff *skb,
986 !hostap_is_eapol_frame(local, skb)) { 992 !hostap_is_eapol_frame(local, skb)) {
987 if (net_ratelimit()) { 993 if (net_ratelimit()) {
988 printk(KERN_DEBUG "%s: dropped unencrypted RX data " 994 printk(KERN_DEBUG "%s: dropped unencrypted RX data "
989 "frame from " MACSTR " (drop_unencrypted=1)\n", 995 "frame from %s"
990 dev->name, MAC2STR(hdr->addr2)); 996 " (drop_unencrypted=1)\n",
997 dev->name, print_mac(mac, hdr->addr2));
991 } 998 }
992 goto rx_dropped; 999 goto rx_dropped;
993 } 1000 }
diff --git a/drivers/net/wireless/hostap/hostap_80211_tx.c b/drivers/net/wireless/hostap/hostap_80211_tx.c
index 3df3c60263d4..e7afc3ec3e6d 100644
--- a/drivers/net/wireless/hostap/hostap_80211_tx.c
+++ b/drivers/net/wireless/hostap/hostap_80211_tx.c
@@ -17,6 +17,7 @@ void hostap_dump_tx_80211(const char *name, struct sk_buff *skb)
17{ 17{
18 struct ieee80211_hdr_4addr *hdr; 18 struct ieee80211_hdr_4addr *hdr;
19 u16 fc; 19 u16 fc;
20 DECLARE_MAC_BUF(mac);
20 21
21 hdr = (struct ieee80211_hdr_4addr *) skb->data; 22 hdr = (struct ieee80211_hdr_4addr *) skb->data;
22 23
@@ -40,10 +41,11 @@ void hostap_dump_tx_80211(const char *name, struct sk_buff *skb)
40 printk(" dur=0x%04x seq=0x%04x\n", le16_to_cpu(hdr->duration_id), 41 printk(" dur=0x%04x seq=0x%04x\n", le16_to_cpu(hdr->duration_id),
41 le16_to_cpu(hdr->seq_ctl)); 42 le16_to_cpu(hdr->seq_ctl));
42 43
43 printk(KERN_DEBUG " A1=" MACSTR " A2=" MACSTR " A3=" MACSTR, 44 printk(KERN_DEBUG " A1=%s", print_mac(mac, hdr->addr1));
44 MAC2STR(hdr->addr1), MAC2STR(hdr->addr2), MAC2STR(hdr->addr3)); 45 printk(" A2=%s", print_mac(mac, hdr->addr2));
46 printk(" A3=%s", print_mac(mac, hdr->addr3));
45 if (skb->len >= 30) 47 if (skb->len >= 30)
46 printk(" A4=" MACSTR, MAC2STR(hdr->addr4)); 48 printk(" A4=%s", print_mac(mac, hdr->addr4));
47 printk("\n"); 49 printk("\n");
48} 50}
49 51
@@ -312,6 +314,7 @@ static struct sk_buff * hostap_tx_encrypt(struct sk_buff *skb,
312 struct ieee80211_hdr_4addr *hdr; 314 struct ieee80211_hdr_4addr *hdr;
313 u16 fc; 315 u16 fc;
314 int prefix_len, postfix_len, hdr_len, res; 316 int prefix_len, postfix_len, hdr_len, res;
317 DECLARE_MAC_BUF(mac);
315 318
316 iface = netdev_priv(skb->dev); 319 iface = netdev_priv(skb->dev);
317 local = iface->local; 320 local = iface->local;
@@ -326,8 +329,8 @@ static struct sk_buff * hostap_tx_encrypt(struct sk_buff *skb,
326 hdr = (struct ieee80211_hdr_4addr *) skb->data; 329 hdr = (struct ieee80211_hdr_4addr *) skb->data;
327 if (net_ratelimit()) { 330 if (net_ratelimit()) {
328 printk(KERN_DEBUG "%s: TKIP countermeasures: dropped " 331 printk(KERN_DEBUG "%s: TKIP countermeasures: dropped "
329 "TX packet to " MACSTR "\n", 332 "TX packet to %s\n",
330 local->dev->name, MAC2STR(hdr->addr1)); 333 local->dev->name, print_mac(mac, hdr->addr1));
331 } 334 }
332 kfree_skb(skb); 335 kfree_skb(skb);
333 return NULL; 336 return NULL;
diff --git a/drivers/net/wireless/hostap/hostap_ap.c b/drivers/net/wireless/hostap/hostap_ap.c
index 90900525379c..6bbdb76b32df 100644
--- a/drivers/net/wireless/hostap/hostap_ap.c
+++ b/drivers/net/wireless/hostap/hostap_ap.c
@@ -94,6 +94,7 @@ static void ap_sta_hash_add(struct ap_data *ap, struct sta_info *sta)
94static void ap_sta_hash_del(struct ap_data *ap, struct sta_info *sta) 94static void ap_sta_hash_del(struct ap_data *ap, struct sta_info *sta)
95{ 95{
96 struct sta_info *s; 96 struct sta_info *s;
97 DECLARE_MAC_BUF(mac);
97 98
98 s = ap->sta_hash[STA_HASH(sta->addr)]; 99 s = ap->sta_hash[STA_HASH(sta->addr)];
99 if (s == NULL) return; 100 if (s == NULL) return;
@@ -108,18 +109,20 @@ static void ap_sta_hash_del(struct ap_data *ap, struct sta_info *sta)
108 if (s->hnext != NULL) 109 if (s->hnext != NULL)
109 s->hnext = s->hnext->hnext; 110 s->hnext = s->hnext->hnext;
110 else 111 else
111 printk("AP: could not remove STA " MACSTR " from hash table\n", 112 printk("AP: could not remove STA %s"
112 MAC2STR(sta->addr)); 113 " from hash table\n",
114 print_mac(mac, sta->addr));
113} 115}
114 116
115static void ap_free_sta(struct ap_data *ap, struct sta_info *sta) 117static void ap_free_sta(struct ap_data *ap, struct sta_info *sta)
116{ 118{
119 DECLARE_MAC_BUF(mac);
117 if (sta->ap && sta->local) 120 if (sta->ap && sta->local)
118 hostap_event_expired_sta(sta->local->dev, sta); 121 hostap_event_expired_sta(sta->local->dev, sta);
119 122
120 if (ap->proc != NULL) { 123 if (ap->proc != NULL) {
121 char name[20]; 124 char name[20];
122 sprintf(name, MACSTR, MAC2STR(sta->addr)); 125 sprintf(name, "%s", print_mac(mac, sta->addr));
123 remove_proc_entry(name, ap->proc); 126 remove_proc_entry(name, ap->proc);
124 } 127 }
125 128
@@ -182,6 +185,7 @@ static void ap_handle_timer(unsigned long data)
182 struct ap_data *ap; 185 struct ap_data *ap;
183 unsigned long next_time = 0; 186 unsigned long next_time = 0;
184 int was_assoc; 187 int was_assoc;
188 DECLARE_MAC_BUF(mac);
185 189
186 if (sta == NULL || sta->local == NULL || sta->local->ap == NULL) { 190 if (sta == NULL || sta->local == NULL || sta->local->ap == NULL) {
187 PDEBUG(DEBUG_AP, "ap_handle_timer() called with NULL data\n"); 191 PDEBUG(DEBUG_AP, "ap_handle_timer() called with NULL data\n");
@@ -238,8 +242,8 @@ static void ap_handle_timer(unsigned long data)
238 if (sta->ap) { 242 if (sta->ap) {
239 if (ap->autom_ap_wds) { 243 if (ap->autom_ap_wds) {
240 PDEBUG(DEBUG_AP, "%s: removing automatic WDS " 244 PDEBUG(DEBUG_AP, "%s: removing automatic WDS "
241 "connection to AP " MACSTR "\n", 245 "connection to AP %s\n",
242 local->dev->name, MAC2STR(sta->addr)); 246 local->dev->name, print_mac(mac, sta->addr));
243 hostap_wds_link_oper(local, sta->addr, WDS_DEL); 247 hostap_wds_link_oper(local, sta->addr, WDS_DEL);
244 } 248 }
245 } else if (sta->timeout_next == STA_NULLFUNC) { 249 } else if (sta->timeout_next == STA_NULLFUNC) {
@@ -255,11 +259,11 @@ static void ap_handle_timer(unsigned long data)
255 } else { 259 } else {
256 int deauth = sta->timeout_next == STA_DEAUTH; 260 int deauth = sta->timeout_next == STA_DEAUTH;
257 u16 resp; 261 u16 resp;
258 PDEBUG(DEBUG_AP, "%s: sending %s info to STA " MACSTR 262 PDEBUG(DEBUG_AP, "%s: sending %s info to STA %s"
259 "(last=%lu, jiffies=%lu)\n", 263 "(last=%lu, jiffies=%lu)\n",
260 local->dev->name, 264 local->dev->name,
261 deauth ? "deauthentication" : "disassociation", 265 deauth ? "deauthentication" : "disassociation",
262 MAC2STR(sta->addr), sta->last_rx, jiffies); 266 print_mac(mac, sta->addr), sta->last_rx, jiffies);
263 267
264 resp = cpu_to_le16(deauth ? WLAN_REASON_PREV_AUTH_NOT_VALID : 268 resp = cpu_to_le16(deauth ? WLAN_REASON_PREV_AUTH_NOT_VALID :
265 WLAN_REASON_DISASSOC_DUE_TO_INACTIVITY); 269 WLAN_REASON_DISASSOC_DUE_TO_INACTIVITY);
@@ -271,9 +275,10 @@ static void ap_handle_timer(unsigned long data)
271 275
272 if (sta->timeout_next == STA_DEAUTH) { 276 if (sta->timeout_next == STA_DEAUTH) {
273 if (sta->flags & WLAN_STA_PERM) { 277 if (sta->flags & WLAN_STA_PERM) {
274 PDEBUG(DEBUG_AP, "%s: STA " MACSTR " would have been " 278 PDEBUG(DEBUG_AP, "%s: STA %s"
275 "removed, but it has 'perm' flag\n", 279 " would have been removed, "
276 local->dev->name, MAC2STR(sta->addr)); 280 "but it has 'perm' flag\n",
281 local->dev->name, print_mac(mac, sta->addr));
277 } else 282 } else
278 ap_free_sta(ap, sta); 283 ap_free_sta(ap, sta);
279 return; 284 return;
@@ -327,6 +332,7 @@ static int ap_control_proc_read(char *page, char **start, off_t off,
327 struct ap_data *ap = (struct ap_data *) data; 332 struct ap_data *ap = (struct ap_data *) data;
328 char *policy_txt; 333 char *policy_txt;
329 struct mac_entry *entry; 334 struct mac_entry *entry;
335 DECLARE_MAC_BUF(mac);
330 336
331 if (off != 0) { 337 if (off != 0) {
332 *eof = 1; 338 *eof = 1;
@@ -357,7 +363,7 @@ static int ap_control_proc_read(char *page, char **start, off_t off,
357 break; 363 break;
358 } 364 }
359 365
360 p += sprintf(p, MACSTR "\n", MAC2STR(entry->addr)); 366 p += sprintf(p, "%s\n", print_mac(mac, entry->addr));
361 } 367 }
362 spin_unlock_bh(&ap->mac_restrictions.lock); 368 spin_unlock_bh(&ap->mac_restrictions.lock);
363 369
@@ -514,6 +520,7 @@ static int prism2_ap_proc_read(char *page, char **start, off_t off,
514 struct ap_data *ap = (struct ap_data *) data; 520 struct ap_data *ap = (struct ap_data *) data;
515 struct sta_info *sta; 521 struct sta_info *sta;
516 int i; 522 int i;
523 DECLARE_MAC_BUF(mac);
517 524
518 if (off > PROC_LIMIT) { 525 if (off > PROC_LIMIT) {
519 *eof = 1; 526 *eof = 1;
@@ -526,7 +533,8 @@ static int prism2_ap_proc_read(char *page, char **start, off_t off,
526 if (!sta->ap) 533 if (!sta->ap)
527 continue; 534 continue;
528 535
529 p += sprintf(p, MACSTR " %d %d %d %d '", MAC2STR(sta->addr), 536 p += sprintf(p, "%s %d %d %d %d '",
537 print_mac(mac, sta->addr),
530 sta->u.ap.channel, sta->last_rx_signal, 538 sta->u.ap.channel, sta->last_rx_signal,
531 sta->last_rx_silence, sta->last_rx_rate); 539 sta->last_rx_silence, sta->last_rx_rate);
532 for (i = 0; i < sta->u.ap.ssid_len; i++) 540 for (i = 0; i < sta->u.ap.ssid_len; i++)
@@ -623,6 +631,7 @@ static void hostap_ap_tx_cb_auth(struct sk_buff *skb, int ok, void *data)
623 u16 fc, *pos, auth_alg, auth_transaction, status; 631 u16 fc, *pos, auth_alg, auth_transaction, status;
624 struct sta_info *sta = NULL; 632 struct sta_info *sta = NULL;
625 char *txt = NULL; 633 char *txt = NULL;
634 DECLARE_MAC_BUF(mac);
626 635
627 if (ap->local->hostapd) { 636 if (ap->local->hostapd) {
628 dev_kfree_skb(skb); 637 dev_kfree_skb(skb);
@@ -674,9 +683,9 @@ static void hostap_ap_tx_cb_auth(struct sk_buff *skb, int ok, void *data)
674 if (sta) 683 if (sta)
675 atomic_dec(&sta->users); 684 atomic_dec(&sta->users);
676 if (txt) { 685 if (txt) {
677 PDEBUG(DEBUG_AP, "%s: " MACSTR " auth_cb - alg=%d trans#=%d " 686 PDEBUG(DEBUG_AP, "%s: %s auth_cb - alg=%d "
678 "status=%d - %s\n", 687 "trans#=%d status=%d - %s\n",
679 dev->name, MAC2STR(hdr->addr1), auth_alg, 688 dev->name, print_mac(mac, hdr->addr1), auth_alg,
680 auth_transaction, status, txt); 689 auth_transaction, status, txt);
681 } 690 }
682 dev_kfree_skb(skb); 691 dev_kfree_skb(skb);
@@ -692,6 +701,7 @@ static void hostap_ap_tx_cb_assoc(struct sk_buff *skb, int ok, void *data)
692 u16 fc, *pos, status; 701 u16 fc, *pos, status;
693 struct sta_info *sta = NULL; 702 struct sta_info *sta = NULL;
694 char *txt = NULL; 703 char *txt = NULL;
704 DECLARE_MAC_BUF(mac);
695 705
696 if (ap->local->hostapd) { 706 if (ap->local->hostapd) {
697 dev_kfree_skb(skb); 707 dev_kfree_skb(skb);
@@ -742,8 +752,8 @@ static void hostap_ap_tx_cb_assoc(struct sk_buff *skb, int ok, void *data)
742 if (sta) 752 if (sta)
743 atomic_dec(&sta->users); 753 atomic_dec(&sta->users);
744 if (txt) { 754 if (txt) {
745 PDEBUG(DEBUG_AP, "%s: " MACSTR " assoc_cb - %s\n", 755 PDEBUG(DEBUG_AP, "%s: %s assoc_cb - %s\n",
746 dev->name, MAC2STR(hdr->addr1), txt); 756 dev->name, print_mac(mac, hdr->addr1), txt);
747 } 757 }
748 dev_kfree_skb(skb); 758 dev_kfree_skb(skb);
749} 759}
@@ -755,6 +765,7 @@ static void hostap_ap_tx_cb_poll(struct sk_buff *skb, int ok, void *data)
755 struct ap_data *ap = data; 765 struct ap_data *ap = data;
756 struct ieee80211_hdr_4addr *hdr; 766 struct ieee80211_hdr_4addr *hdr;
757 struct sta_info *sta; 767 struct sta_info *sta;
768 DECLARE_MAC_BUF(mac);
758 769
759 if (skb->len < 24) 770 if (skb->len < 24)
760 goto fail; 771 goto fail;
@@ -766,9 +777,9 @@ static void hostap_ap_tx_cb_poll(struct sk_buff *skb, int ok, void *data)
766 sta->flags &= ~WLAN_STA_PENDING_POLL; 777 sta->flags &= ~WLAN_STA_PENDING_POLL;
767 spin_unlock(&ap->sta_table_lock); 778 spin_unlock(&ap->sta_table_lock);
768 } else { 779 } else {
769 PDEBUG(DEBUG_AP, "%s: STA " MACSTR " did not ACK activity " 780 PDEBUG(DEBUG_AP, "%s: STA %s"
770 "poll frame\n", ap->local->dev->name, 781 " did not ACK activity poll frame\n",
771 MAC2STR(hdr->addr1)); 782 ap->local->dev->name, print_mac(mac, hdr->addr1));
772 } 783 }
773 784
774 fail: 785 fail:
@@ -985,6 +996,7 @@ static int prism2_sta_proc_read(char *page, char **start, off_t off,
985 char *p = page; 996 char *p = page;
986 struct sta_info *sta = (struct sta_info *) data; 997 struct sta_info *sta = (struct sta_info *) data;
987 int i; 998 int i;
999 DECLARE_MAC_BUF(mac);
988 1000
989 /* FIX: possible race condition.. the STA data could have just expired, 1001 /* FIX: possible race condition.. the STA data could have just expired,
990 * but proc entry was still here so that the read could have started; 1002 * but proc entry was still here so that the read could have started;
@@ -995,11 +1007,11 @@ static int prism2_sta_proc_read(char *page, char **start, off_t off,
995 return 0; 1007 return 0;
996 } 1008 }
997 1009
998 p += sprintf(p, "%s=" MACSTR "\nusers=%d\naid=%d\n" 1010 p += sprintf(p, "%s=%s\nusers=%d\naid=%d\n"
999 "flags=0x%04x%s%s%s%s%s%s%s\n" 1011 "flags=0x%04x%s%s%s%s%s%s%s\n"
1000 "capability=0x%02x\nlisten_interval=%d\nsupported_rates=", 1012 "capability=0x%02x\nlisten_interval=%d\nsupported_rates=",
1001 sta->ap ? "AP" : "STA", 1013 sta->ap ? "AP" : "STA",
1002 MAC2STR(sta->addr), atomic_read(&sta->users), sta->aid, 1014 print_mac(mac, sta->addr), atomic_read(&sta->users), sta->aid,
1003 sta->flags, 1015 sta->flags,
1004 sta->flags & WLAN_STA_AUTH ? " AUTH" : "", 1016 sta->flags & WLAN_STA_AUTH ? " AUTH" : "",
1005 sta->flags & WLAN_STA_ASSOC ? " ASSOC" : "", 1017 sta->flags & WLAN_STA_ASSOC ? " ASSOC" : "",
@@ -1060,6 +1072,7 @@ static void handle_add_proc_queue(struct work_struct *work)
1060 struct sta_info *sta; 1072 struct sta_info *sta;
1061 char name[20]; 1073 char name[20];
1062 struct add_sta_proc_data *entry, *prev; 1074 struct add_sta_proc_data *entry, *prev;
1075 DECLARE_MAC_BUF(mac);
1063 1076
1064 entry = ap->add_sta_proc_entries; 1077 entry = ap->add_sta_proc_entries;
1065 ap->add_sta_proc_entries = NULL; 1078 ap->add_sta_proc_entries = NULL;
@@ -1072,7 +1085,7 @@ static void handle_add_proc_queue(struct work_struct *work)
1072 spin_unlock_bh(&ap->sta_table_lock); 1085 spin_unlock_bh(&ap->sta_table_lock);
1073 1086
1074 if (sta) { 1087 if (sta) {
1075 sprintf(name, MACSTR, MAC2STR(sta->addr)); 1088 sprintf(name, "%s", print_mac(mac, sta->addr));
1076 sta->proc = create_proc_read_entry( 1089 sta->proc = create_proc_read_entry(
1077 name, 0, ap->proc, 1090 name, 0, ap->proc,
1078 prism2_sta_proc_read, sta); 1091 prism2_sta_proc_read, sta);
@@ -1290,6 +1303,7 @@ static void handle_authen(local_info_t *local, struct sk_buff *skb,
1290 struct sta_info *sta = NULL; 1303 struct sta_info *sta = NULL;
1291 struct ieee80211_crypt_data *crypt; 1304 struct ieee80211_crypt_data *crypt;
1292 char *txt = ""; 1305 char *txt = "";
1306 DECLARE_MAC_BUF(mac);
1293 1307
1294 len = skb->len - IEEE80211_MGMT_HDR_LEN; 1308 len = skb->len - IEEE80211_MGMT_HDR_LEN;
1295 1309
@@ -1298,8 +1312,8 @@ static void handle_authen(local_info_t *local, struct sk_buff *skb,
1298 1312
1299 if (len < 6) { 1313 if (len < 6) {
1300 PDEBUG(DEBUG_AP, "%s: handle_authen - too short payload " 1314 PDEBUG(DEBUG_AP, "%s: handle_authen - too short payload "
1301 "(len=%d) from " MACSTR "\n", dev->name, len, 1315 "(len=%d) from %s\n", dev->name, len,
1302 MAC2STR(hdr->addr2)); 1316 print_mac(mac, hdr->addr2));
1303 return; 1317 return;
1304 } 1318 }
1305 1319
@@ -1364,8 +1378,8 @@ static void handle_authen(local_info_t *local, struct sk_buff *skb,
1364 if (time_after(jiffies, sta->u.ap.last_beacon + 1378 if (time_after(jiffies, sta->u.ap.last_beacon +
1365 (10 * sta->listen_interval * HZ) / 1024)) { 1379 (10 * sta->listen_interval * HZ) / 1024)) {
1366 PDEBUG(DEBUG_AP, "%s: no beacons received for a while," 1380 PDEBUG(DEBUG_AP, "%s: no beacons received for a while,"
1367 " assuming AP " MACSTR " is now STA\n", 1381 " assuming AP %s is now STA\n",
1368 dev->name, MAC2STR(sta->addr)); 1382 dev->name, print_mac(mac, sta->addr));
1369 sta->ap = 0; 1383 sta->ap = 0;
1370 sta->flags = 0; 1384 sta->flags = 0;
1371 sta->u.sta.challenge = NULL; 1385 sta->u.sta.challenge = NULL;
@@ -1480,9 +1494,9 @@ static void handle_authen(local_info_t *local, struct sk_buff *skb,
1480 } 1494 }
1481 1495
1482 if (resp) { 1496 if (resp) {
1483 PDEBUG(DEBUG_AP, "%s: " MACSTR " auth (alg=%d trans#=%d " 1497 PDEBUG(DEBUG_AP, "%s: %s auth (alg=%d "
1484 "stat=%d len=%d fc=%04x) ==> %d (%s)\n", 1498 "trans#=%d stat=%d len=%d fc=%04x) ==> %d (%s)\n",
1485 dev->name, MAC2STR(hdr->addr2), auth_alg, 1499 dev->name, print_mac(mac, hdr->addr2), auth_alg,
1486 auth_transaction, status_code, len, fc, resp, txt); 1500 auth_transaction, status_code, len, fc, resp, txt);
1487 } 1501 }
1488} 1502}
@@ -1502,13 +1516,14 @@ static void handle_assoc(local_info_t *local, struct sk_buff *skb,
1502 int send_deauth = 0; 1516 int send_deauth = 0;
1503 char *txt = ""; 1517 char *txt = "";
1504 u8 prev_ap[ETH_ALEN]; 1518 u8 prev_ap[ETH_ALEN];
1519 DECLARE_MAC_BUF(mac);
1505 1520
1506 left = len = skb->len - IEEE80211_MGMT_HDR_LEN; 1521 left = len = skb->len - IEEE80211_MGMT_HDR_LEN;
1507 1522
1508 if (len < (reassoc ? 10 : 4)) { 1523 if (len < (reassoc ? 10 : 4)) {
1509 PDEBUG(DEBUG_AP, "%s: handle_assoc - too short payload " 1524 PDEBUG(DEBUG_AP, "%s: handle_assoc - too short payload "
1510 "(len=%d, reassoc=%d) from " MACSTR "\n", 1525 "(len=%d, reassoc=%d) from %s\n",
1511 dev->name, len, reassoc, MAC2STR(hdr->addr2)); 1526 dev->name, len, reassoc, print_mac(mac, hdr->addr2));
1512 return; 1527 return;
1513 } 1528 }
1514 1529
@@ -1585,9 +1600,9 @@ static void handle_assoc(local_info_t *local, struct sk_buff *skb,
1585 } 1600 }
1586 1601
1587 if (left > 0) { 1602 if (left > 0) {
1588 PDEBUG(DEBUG_AP, "%s: assoc from " MACSTR " with extra" 1603 PDEBUG(DEBUG_AP, "%s: assoc from %s"
1589 " data (%d bytes) [", 1604 " with extra data (%d bytes) [",
1590 dev->name, MAC2STR(hdr->addr2), left); 1605 dev->name, print_mac(mac, hdr->addr2), left);
1591 while (left > 0) { 1606 while (left > 0) {
1592 PDEBUG2(DEBUG_AP, "<%02x>", *u); 1607 PDEBUG2(DEBUG_AP, "<%02x>", *u);
1593 u++; left--; 1608 u++; left--;
@@ -1687,10 +1702,10 @@ static void handle_assoc(local_info_t *local, struct sk_buff *skb,
1687 } 1702 }
1688 1703
1689#if 0 1704#if 0
1690 PDEBUG(DEBUG_AP, "%s: " MACSTR " %sassoc (len=%d prev_ap=" MACSTR 1705 PDEBUG(DEBUG_AP, "%s: %s %sassoc (len=%d "
1691 ") => %d(%d) (%s)\n", 1706 "prev_ap=%s) => %d(%d) (%s)\n",
1692 dev->name, MAC2STR(hdr->addr2), reassoc ? "re" : "", len, 1707 dev->name, print_mac(mac, hdr->addr2), reassoc ? "re" : "", len,
1693 MAC2STR(prev_ap), resp, send_deauth, txt); 1708 print_mac(mac, prev_ap), resp, send_deauth, txt);
1694#endif 1709#endif
1695} 1710}
1696 1711
@@ -1705,6 +1720,7 @@ static void handle_deauth(local_info_t *local, struct sk_buff *skb,
1705 int len; 1720 int len;
1706 u16 reason_code, *pos; 1721 u16 reason_code, *pos;
1707 struct sta_info *sta = NULL; 1722 struct sta_info *sta = NULL;
1723 DECLARE_MAC_BUF(mac);
1708 1724
1709 len = skb->len - IEEE80211_MGMT_HDR_LEN; 1725 len = skb->len - IEEE80211_MGMT_HDR_LEN;
1710 1726
@@ -1716,8 +1732,8 @@ static void handle_deauth(local_info_t *local, struct sk_buff *skb,
1716 pos = (u16 *) body; 1732 pos = (u16 *) body;
1717 reason_code = __le16_to_cpu(*pos); 1733 reason_code = __le16_to_cpu(*pos);
1718 1734
1719 PDEBUG(DEBUG_AP, "%s: deauthentication: " MACSTR " len=%d, " 1735 PDEBUG(DEBUG_AP, "%s: deauthentication: %s len=%d, "
1720 "reason_code=%d\n", dev->name, MAC2STR(hdr->addr2), len, 1736 "reason_code=%d\n", dev->name, print_mac(mac, hdr->addr2), len,
1721 reason_code); 1737 reason_code);
1722 1738
1723 spin_lock_bh(&local->ap->sta_table_lock); 1739 spin_lock_bh(&local->ap->sta_table_lock);
@@ -1729,9 +1745,9 @@ static void handle_deauth(local_info_t *local, struct sk_buff *skb,
1729 } 1745 }
1730 spin_unlock_bh(&local->ap->sta_table_lock); 1746 spin_unlock_bh(&local->ap->sta_table_lock);
1731 if (sta == NULL) { 1747 if (sta == NULL) {
1732 printk("%s: deauthentication from " MACSTR ", " 1748 printk("%s: deauthentication from %s, "
1733 "reason_code=%d, but STA not authenticated\n", dev->name, 1749 "reason_code=%d, but STA not authenticated\n", dev->name,
1734 MAC2STR(hdr->addr2), reason_code); 1750 print_mac(mac, hdr->addr2), reason_code);
1735 } 1751 }
1736} 1752}
1737 1753
@@ -1746,6 +1762,7 @@ static void handle_disassoc(local_info_t *local, struct sk_buff *skb,
1746 int len; 1762 int len;
1747 u16 reason_code, *pos; 1763 u16 reason_code, *pos;
1748 struct sta_info *sta = NULL; 1764 struct sta_info *sta = NULL;
1765 DECLARE_MAC_BUF(mac);
1749 1766
1750 len = skb->len - IEEE80211_MGMT_HDR_LEN; 1767 len = skb->len - IEEE80211_MGMT_HDR_LEN;
1751 1768
@@ -1757,8 +1774,8 @@ static void handle_disassoc(local_info_t *local, struct sk_buff *skb,
1757 pos = (u16 *) body; 1774 pos = (u16 *) body;
1758 reason_code = __le16_to_cpu(*pos); 1775 reason_code = __le16_to_cpu(*pos);
1759 1776
1760 PDEBUG(DEBUG_AP, "%s: disassociation: " MACSTR " len=%d, " 1777 PDEBUG(DEBUG_AP, "%s: disassociation: %s len=%d, "
1761 "reason_code=%d\n", dev->name, MAC2STR(hdr->addr2), len, 1778 "reason_code=%d\n", dev->name, print_mac(mac, hdr->addr2), len,
1762 reason_code); 1779 reason_code);
1763 1780
1764 spin_lock_bh(&local->ap->sta_table_lock); 1781 spin_lock_bh(&local->ap->sta_table_lock);
@@ -1770,9 +1787,9 @@ static void handle_disassoc(local_info_t *local, struct sk_buff *skb,
1770 } 1787 }
1771 spin_unlock_bh(&local->ap->sta_table_lock); 1788 spin_unlock_bh(&local->ap->sta_table_lock);
1772 if (sta == NULL) { 1789 if (sta == NULL) {
1773 printk("%s: disassociation from " MACSTR ", " 1790 printk("%s: disassociation from %s, "
1774 "reason_code=%d, but STA not authenticated\n", 1791 "reason_code=%d, but STA not authenticated\n",
1775 dev->name, MAC2STR(hdr->addr2), reason_code); 1792 dev->name, print_mac(mac, hdr->addr2), reason_code);
1776 } 1793 }
1777} 1794}
1778 1795
@@ -1862,15 +1879,16 @@ static void handle_pspoll(local_info_t *local,
1862 struct sta_info *sta; 1879 struct sta_info *sta;
1863 u16 aid; 1880 u16 aid;
1864 struct sk_buff *skb; 1881 struct sk_buff *skb;
1882 DECLARE_MAC_BUF(mac);
1865 1883
1866 PDEBUG(DEBUG_PS2, "handle_pspoll: BSSID=" MACSTR ", TA=" MACSTR 1884 PDEBUG(DEBUG_PS2, "handle_pspoll: BSSID=%s"
1867 " PWRMGT=%d\n", 1885 ", TA=%s PWRMGT=%d\n",
1868 MAC2STR(hdr->addr1), MAC2STR(hdr->addr2), 1886 print_mac(mac, hdr->addr1), print_mac(mac, hdr->addr2),
1869 !!(le16_to_cpu(hdr->frame_ctl) & IEEE80211_FCTL_PM)); 1887 !!(le16_to_cpu(hdr->frame_ctl) & IEEE80211_FCTL_PM));
1870 1888
1871 if (memcmp(hdr->addr1, dev->dev_addr, ETH_ALEN)) { 1889 if (memcmp(hdr->addr1, dev->dev_addr, ETH_ALEN)) {
1872 PDEBUG(DEBUG_AP, "handle_pspoll - addr1(BSSID)=" MACSTR 1890 PDEBUG(DEBUG_AP, "handle_pspoll - addr1(BSSID)=%s"
1873 " not own MAC\n", MAC2STR(hdr->addr1)); 1891 " not own MAC\n", print_mac(mac, hdr->addr1));
1874 return; 1892 return;
1875 } 1893 }
1876 1894
@@ -1948,6 +1966,7 @@ static void handle_wds_oper_queue(struct work_struct *work)
1948 wds_oper_queue); 1966 wds_oper_queue);
1949 local_info_t *local = ap->local; 1967 local_info_t *local = ap->local;
1950 struct wds_oper_data *entry, *prev; 1968 struct wds_oper_data *entry, *prev;
1969 DECLARE_MAC_BUF(mac);
1951 1970
1952 spin_lock_bh(&local->lock); 1971 spin_lock_bh(&local->lock);
1953 entry = local->ap->wds_oper_entries; 1972 entry = local->ap->wds_oper_entries;
@@ -1956,10 +1975,10 @@ static void handle_wds_oper_queue(struct work_struct *work)
1956 1975
1957 while (entry) { 1976 while (entry) {
1958 PDEBUG(DEBUG_AP, "%s: %s automatic WDS connection " 1977 PDEBUG(DEBUG_AP, "%s: %s automatic WDS connection "
1959 "to AP " MACSTR "\n", 1978 "to AP %s\n",
1960 local->dev->name, 1979 local->dev->name,
1961 entry->type == WDS_ADD ? "adding" : "removing", 1980 entry->type == WDS_ADD ? "adding" : "removing",
1962 MAC2STR(entry->addr)); 1981 print_mac(mac, entry->addr));
1963 if (entry->type == WDS_ADD) 1982 if (entry->type == WDS_ADD)
1964 prism2_wds_add(local, entry->addr, 0); 1983 prism2_wds_add(local, entry->addr, 0);
1965 else if (entry->type == WDS_DEL) 1984 else if (entry->type == WDS_DEL)
@@ -2135,6 +2154,7 @@ static void handle_ap_item(local_info_t *local, struct sk_buff *skb,
2135#endif /* PRISM2_NO_KERNEL_IEEE80211_MGMT */ 2154#endif /* PRISM2_NO_KERNEL_IEEE80211_MGMT */
2136 u16 fc, type, stype; 2155 u16 fc, type, stype;
2137 struct ieee80211_hdr_4addr *hdr; 2156 struct ieee80211_hdr_4addr *hdr;
2157 DECLARE_MAC_BUF(mac);
2138 2158
2139 /* FIX: should give skb->len to handler functions and check that the 2159 /* FIX: should give skb->len to handler functions and check that the
2140 * buffer is long enough */ 2160 * buffer is long enough */
@@ -2163,8 +2183,8 @@ static void handle_ap_item(local_info_t *local, struct sk_buff *skb,
2163 2183
2164 if (memcmp(hdr->addr1, dev->dev_addr, ETH_ALEN)) { 2184 if (memcmp(hdr->addr1, dev->dev_addr, ETH_ALEN)) {
2165 PDEBUG(DEBUG_AP, "handle_ap_item - addr1(BSSID)=" 2185 PDEBUG(DEBUG_AP, "handle_ap_item - addr1(BSSID)="
2166 MACSTR " not own MAC\n", 2186 "%s not own MAC\n",
2167 MAC2STR(hdr->addr1)); 2187 print_mac(mac, hdr->addr1));
2168 goto done; 2188 goto done;
2169 } 2189 }
2170 2190
@@ -2200,14 +2220,14 @@ static void handle_ap_item(local_info_t *local, struct sk_buff *skb,
2200 } 2220 }
2201 2221
2202 if (memcmp(hdr->addr1, dev->dev_addr, ETH_ALEN)) { 2222 if (memcmp(hdr->addr1, dev->dev_addr, ETH_ALEN)) {
2203 PDEBUG(DEBUG_AP, "handle_ap_item - addr1(DA)=" MACSTR 2223 PDEBUG(DEBUG_AP, "handle_ap_item - addr1(DA)=%s"
2204 " not own MAC\n", MAC2STR(hdr->addr1)); 2224 " not own MAC\n", print_mac(mac, hdr->addr1));
2205 goto done; 2225 goto done;
2206 } 2226 }
2207 2227
2208 if (memcmp(hdr->addr3, dev->dev_addr, ETH_ALEN)) { 2228 if (memcmp(hdr->addr3, dev->dev_addr, ETH_ALEN)) {
2209 PDEBUG(DEBUG_AP, "handle_ap_item - addr3(BSSID)=" MACSTR 2229 PDEBUG(DEBUG_AP, "handle_ap_item - addr3(BSSID)=%s"
2210 " not own MAC\n", MAC2STR(hdr->addr3)); 2230 " not own MAC\n", print_mac(mac, hdr->addr3));
2211 goto done; 2231 goto done;
2212 } 2232 }
2213 2233
@@ -2288,6 +2308,7 @@ static void schedule_packet_send(local_info_t *local, struct sta_info *sta)
2288 struct sk_buff *skb; 2308 struct sk_buff *skb;
2289 struct ieee80211_hdr_4addr *hdr; 2309 struct ieee80211_hdr_4addr *hdr;
2290 struct hostap_80211_rx_status rx_stats; 2310 struct hostap_80211_rx_status rx_stats;
2311 DECLARE_MAC_BUF(mac);
2291 2312
2292 if (skb_queue_empty(&sta->tx_buf)) 2313 if (skb_queue_empty(&sta->tx_buf))
2293 return; 2314 return;
@@ -2308,8 +2329,8 @@ static void schedule_packet_send(local_info_t *local, struct sta_info *sta)
2308 memcpy(hdr->addr2, sta->addr, ETH_ALEN); 2329 memcpy(hdr->addr2, sta->addr, ETH_ALEN);
2309 hdr->duration_id = cpu_to_le16(sta->aid | BIT(15) | BIT(14)); 2330 hdr->duration_id = cpu_to_le16(sta->aid | BIT(15) | BIT(14));
2310 2331
2311 PDEBUG(DEBUG_PS2, "%s: Scheduling buffered packet delivery for " 2332 PDEBUG(DEBUG_PS2, "%s: Scheduling buffered packet delivery for STA "
2312 "STA " MACSTR "\n", local->dev->name, MAC2STR(sta->addr)); 2333 "%s\n", local->dev->name, print_mac(mac, sta->addr));
2313 2334
2314 skb->dev = local->dev; 2335 skb->dev = local->dev;
2315 2336
@@ -2636,6 +2657,7 @@ static int ap_update_sta_tx_rate(struct sta_info *sta, struct net_device *dev)
2636 int ret = sta->tx_rate; 2657 int ret = sta->tx_rate;
2637 struct hostap_interface *iface; 2658 struct hostap_interface *iface;
2638 local_info_t *local; 2659 local_info_t *local;
2660 DECLARE_MAC_BUF(mac);
2639 2661
2640 iface = netdev_priv(dev); 2662 iface = netdev_priv(dev);
2641 local = iface->local; 2663 local = iface->local;
@@ -2663,9 +2685,9 @@ static int ap_update_sta_tx_rate(struct sta_info *sta, struct net_device *dev)
2663 case 3: sta->tx_rate = 110; break; 2685 case 3: sta->tx_rate = 110; break;
2664 default: sta->tx_rate = 0; break; 2686 default: sta->tx_rate = 0; break;
2665 } 2687 }
2666 PDEBUG(DEBUG_AP, "%s: STA " MACSTR " TX rate raised to" 2688 PDEBUG(DEBUG_AP, "%s: STA %s"
2667 " %d\n", dev->name, MAC2STR(sta->addr), 2689 " TX rate raised to %d\n",
2668 sta->tx_rate); 2690 dev->name, print_mac(mac, sta->addr), sta->tx_rate);
2669 } 2691 }
2670 sta->tx_since_last_failure = 0; 2692 sta->tx_since_last_failure = 0;
2671 } 2693 }
@@ -2683,6 +2705,7 @@ ap_tx_ret hostap_handle_sta_tx(local_info_t *local, struct hostap_tx_data *tx)
2683 int set_tim, ret; 2705 int set_tim, ret;
2684 struct ieee80211_hdr_4addr *hdr; 2706 struct ieee80211_hdr_4addr *hdr;
2685 struct hostap_skb_tx_data *meta; 2707 struct hostap_skb_tx_data *meta;
2708 DECLARE_MAC_BUF(mac);
2686 2709
2687 meta = (struct hostap_skb_tx_data *) skb->cb; 2710 meta = (struct hostap_skb_tx_data *) skb->cb;
2688 ret = AP_TX_CONTINUE; 2711 ret = AP_TX_CONTINUE;
@@ -2718,7 +2741,8 @@ ap_tx_ret hostap_handle_sta_tx(local_info_t *local, struct hostap_tx_data *tx)
2718 * print out any errors here. */ 2741 * print out any errors here. */
2719 if (net_ratelimit()) { 2742 if (net_ratelimit()) {
2720 printk(KERN_DEBUG "AP: drop packet to non-associated " 2743 printk(KERN_DEBUG "AP: drop packet to non-associated "
2721 "STA " MACSTR "\n", MAC2STR(hdr->addr1)); 2744 "STA %s\n",
2745 print_mac(mac, hdr->addr1));
2722 } 2746 }
2723#endif 2747#endif
2724 local->ap->tx_drop_nonassoc++; 2748 local->ap->tx_drop_nonassoc++;
@@ -2756,8 +2780,9 @@ ap_tx_ret hostap_handle_sta_tx(local_info_t *local, struct hostap_tx_data *tx)
2756 } 2780 }
2757 2781
2758 if (skb_queue_len(&sta->tx_buf) >= STA_MAX_TX_BUFFER) { 2782 if (skb_queue_len(&sta->tx_buf) >= STA_MAX_TX_BUFFER) {
2759 PDEBUG(DEBUG_PS, "%s: No more space in STA (" MACSTR ")'s PS " 2783 PDEBUG(DEBUG_PS, "%s: No more space in STA (%s"
2760 "mode buffer\n", local->dev->name, MAC2STR(sta->addr)); 2784 ")'s PS mode buffer\n",
2785 local->dev->name, print_mac(mac, sta->addr));
2761 /* Make sure that TIM is set for the station (it might not be 2786 /* Make sure that TIM is set for the station (it might not be
2762 * after AP wlan hw reset). */ 2787 * after AP wlan hw reset). */
2763 /* FIX: should fix hw reset to restore bits based on STA 2788 /* FIX: should fix hw reset to restore bits based on STA
@@ -2821,6 +2846,7 @@ void hostap_handle_sta_tx_exc(local_info_t *local, struct sk_buff *skb)
2821 struct sta_info *sta; 2846 struct sta_info *sta;
2822 struct ieee80211_hdr_4addr *hdr; 2847 struct ieee80211_hdr_4addr *hdr;
2823 struct hostap_skb_tx_data *meta; 2848 struct hostap_skb_tx_data *meta;
2849 DECLARE_MAC_BUF(mac);
2824 2850
2825 hdr = (struct ieee80211_hdr_4addr *) skb->data; 2851 hdr = (struct ieee80211_hdr_4addr *) skb->data;
2826 meta = (struct hostap_skb_tx_data *) skb->cb; 2852 meta = (struct hostap_skb_tx_data *) skb->cb;
@@ -2829,9 +2855,9 @@ void hostap_handle_sta_tx_exc(local_info_t *local, struct sk_buff *skb)
2829 sta = ap_get_sta(local->ap, hdr->addr1); 2855 sta = ap_get_sta(local->ap, hdr->addr1);
2830 if (!sta) { 2856 if (!sta) {
2831 spin_unlock(&local->ap->sta_table_lock); 2857 spin_unlock(&local->ap->sta_table_lock);
2832 PDEBUG(DEBUG_AP, "%s: Could not find STA " MACSTR " for this " 2858 PDEBUG(DEBUG_AP, "%s: Could not find STA %s"
2833 "TX error (@%lu)\n", 2859 " for this TX error (@%lu)\n",
2834 local->dev->name, MAC2STR(hdr->addr1), jiffies); 2860 local->dev->name, print_mac(mac, hdr->addr1), jiffies);
2835 return; 2861 return;
2836 } 2862 }
2837 2863
@@ -2858,8 +2884,9 @@ void hostap_handle_sta_tx_exc(local_info_t *local, struct sk_buff *skb)
2858 case 3: sta->tx_rate = 110; break; 2884 case 3: sta->tx_rate = 110; break;
2859 default: sta->tx_rate = 0; break; 2885 default: sta->tx_rate = 0; break;
2860 } 2886 }
2861 PDEBUG(DEBUG_AP, "%s: STA " MACSTR " TX rate lowered " 2887 PDEBUG(DEBUG_AP, "%s: STA %s"
2862 "to %d\n", local->dev->name, MAC2STR(sta->addr), 2888 " TX rate lowered to %d\n",
2889 local->dev->name, print_mac(mac, sta->addr),
2863 sta->tx_rate); 2890 sta->tx_rate);
2864 } 2891 }
2865 sta->tx_consecutive_exc = 0; 2892 sta->tx_consecutive_exc = 0;
@@ -2871,16 +2898,17 @@ void hostap_handle_sta_tx_exc(local_info_t *local, struct sk_buff *skb)
2871static void hostap_update_sta_ps2(local_info_t *local, struct sta_info *sta, 2898static void hostap_update_sta_ps2(local_info_t *local, struct sta_info *sta,
2872 int pwrmgt, int type, int stype) 2899 int pwrmgt, int type, int stype)
2873{ 2900{
2901 DECLARE_MAC_BUF(mac);
2874 if (pwrmgt && !(sta->flags & WLAN_STA_PS)) { 2902 if (pwrmgt && !(sta->flags & WLAN_STA_PS)) {
2875 sta->flags |= WLAN_STA_PS; 2903 sta->flags |= WLAN_STA_PS;
2876 PDEBUG(DEBUG_PS2, "STA " MACSTR " changed to use PS " 2904 PDEBUG(DEBUG_PS2, "STA %s changed to use PS "
2877 "mode (type=0x%02X, stype=0x%02X)\n", 2905 "mode (type=0x%02X, stype=0x%02X)\n",
2878 MAC2STR(sta->addr), type >> 2, stype >> 4); 2906 print_mac(mac, sta->addr), type >> 2, stype >> 4);
2879 } else if (!pwrmgt && (sta->flags & WLAN_STA_PS)) { 2907 } else if (!pwrmgt && (sta->flags & WLAN_STA_PS)) {
2880 sta->flags &= ~WLAN_STA_PS; 2908 sta->flags &= ~WLAN_STA_PS;
2881 PDEBUG(DEBUG_PS2, "STA " MACSTR " changed to not use " 2909 PDEBUG(DEBUG_PS2, "STA %s changed to not use "
2882 "PS mode (type=0x%02X, stype=0x%02X)\n", 2910 "PS mode (type=0x%02X, stype=0x%02X)\n",
2883 MAC2STR(sta->addr), type >> 2, stype >> 4); 2911 print_mac(mac, sta->addr), type >> 2, stype >> 4);
2884 if (type != IEEE80211_FTYPE_CTL || 2912 if (type != IEEE80211_FTYPE_CTL ||
2885 stype != IEEE80211_STYPE_PSPOLL) 2913 stype != IEEE80211_STYPE_PSPOLL)
2886 schedule_packet_send(local, sta); 2914 schedule_packet_send(local, sta);
@@ -2924,6 +2952,7 @@ ap_rx_ret hostap_handle_sta_rx(local_info_t *local, struct net_device *dev,
2924 struct sta_info *sta; 2952 struct sta_info *sta;
2925 u16 fc, type, stype; 2953 u16 fc, type, stype;
2926 struct ieee80211_hdr_4addr *hdr; 2954 struct ieee80211_hdr_4addr *hdr;
2955 DECLARE_MAC_BUF(mac);
2927 2956
2928 if (local->ap == NULL) 2957 if (local->ap == NULL)
2929 return AP_RX_CONTINUE; 2958 return AP_RX_CONTINUE;
@@ -2954,9 +2983,10 @@ ap_rx_ret hostap_handle_sta_rx(local_info_t *local, struct net_device *dev,
2954#ifndef PRISM2_NO_KERNEL_IEEE80211_MGMT 2983#ifndef PRISM2_NO_KERNEL_IEEE80211_MGMT
2955 } else { 2984 } else {
2956 printk(KERN_DEBUG "%s: dropped received packet" 2985 printk(KERN_DEBUG "%s: dropped received packet"
2957 " from non-associated STA " MACSTR 2986 " from non-associated STA "
2987 "%s"
2958 " (type=0x%02x, subtype=0x%02x)\n", 2988 " (type=0x%02x, subtype=0x%02x)\n",
2959 dev->name, MAC2STR(hdr->addr2), 2989 dev->name, print_mac(mac, hdr->addr2),
2960 type >> 2, stype >> 4); 2990 type >> 2, stype >> 4);
2961 hostap_rx(dev, skb, rx_stats); 2991 hostap_rx(dev, skb, rx_stats);
2962#endif /* PRISM2_NO_KERNEL_IEEE80211_MGMT */ 2992#endif /* PRISM2_NO_KERNEL_IEEE80211_MGMT */
@@ -2991,8 +3021,8 @@ ap_rx_ret hostap_handle_sta_rx(local_info_t *local, struct net_device *dev,
2991 * being associated. */ 3021 * being associated. */
2992 printk(KERN_DEBUG "%s: rejected received nullfunc " 3022 printk(KERN_DEBUG "%s: rejected received nullfunc "
2993 "frame without ToDS from not associated STA " 3023 "frame without ToDS from not associated STA "
2994 MACSTR "\n", 3024 "%s\n",
2995 dev->name, MAC2STR(hdr->addr2)); 3025 dev->name, print_mac(mac, hdr->addr2));
2996 hostap_rx(dev, skb, rx_stats); 3026 hostap_rx(dev, skb, rx_stats);
2997#endif /* PRISM2_NO_KERNEL_IEEE80211_MGMT */ 3027#endif /* PRISM2_NO_KERNEL_IEEE80211_MGMT */
2998 } 3028 }
@@ -3009,9 +3039,9 @@ ap_rx_ret hostap_handle_sta_rx(local_info_t *local, struct net_device *dev,
3009 * If BSSID is own, report the dropping of this frame. */ 3039 * If BSSID is own, report the dropping of this frame. */
3010 if (memcmp(hdr->addr3, dev->dev_addr, ETH_ALEN) == 0) { 3040 if (memcmp(hdr->addr3, dev->dev_addr, ETH_ALEN) == 0) {
3011 printk(KERN_DEBUG "%s: dropped received packet from " 3041 printk(KERN_DEBUG "%s: dropped received packet from "
3012 MACSTR " with no ToDS flag (type=0x%02x, " 3042 "%s with no ToDS flag "
3013 "subtype=0x%02x)\n", dev->name, 3043 "(type=0x%02x, subtype=0x%02x)\n", dev->name,
3014 MAC2STR(hdr->addr2), type >> 2, stype >> 4); 3044 print_mac(mac, hdr->addr2), type >> 2, stype >> 4);
3015 hostap_dump_rx_80211(dev->name, skb, rx_stats); 3045 hostap_dump_rx_80211(dev->name, skb, rx_stats);
3016 } 3046 }
3017 ret = AP_RX_DROP; 3047 ret = AP_RX_DROP;
diff --git a/drivers/net/wireless/hostap/hostap_common.h b/drivers/net/wireless/hostap/hostap_common.h
index b31e6a05f23c..ceb7f1e5e9e0 100644
--- a/drivers/net/wireless/hostap/hostap_common.h
+++ b/drivers/net/wireless/hostap/hostap_common.h
@@ -6,9 +6,6 @@
6 6
7#define BIT(x) (1 << (x)) 7#define BIT(x) (1 << (x))
8 8
9#define MAC2STR(a) (a)[0], (a)[1], (a)[2], (a)[3], (a)[4], (a)[5]
10#define MACSTR "%02x:%02x:%02x:%02x:%02x:%02x"
11
12 9
13/* IEEE 802.11 defines */ 10/* IEEE 802.11 defines */
14 11
diff --git a/drivers/net/wireless/hostap/hostap_hw.c b/drivers/net/wireless/hostap/hostap_hw.c
index adedb9716542..7fa7ab0a4b23 100644
--- a/drivers/net/wireless/hostap/hostap_hw.c
+++ b/drivers/net/wireless/hostap/hostap_hw.c
@@ -2335,6 +2335,10 @@ static void prism2_txexc(local_info_t *local)
2335 int show_dump, res; 2335 int show_dump, res;
2336 char *payload = NULL; 2336 char *payload = NULL;
2337 struct hfa384x_tx_frame txdesc; 2337 struct hfa384x_tx_frame txdesc;
2338 DECLARE_MAC_BUF(mac);
2339 DECLARE_MAC_BUF(mac2);
2340 DECLARE_MAC_BUF(mac3);
2341 DECLARE_MAC_BUF(mac4);
2338 2342
2339 show_dump = local->frame_dump & PRISM2_DUMP_TXEXC_HDR; 2343 show_dump = local->frame_dump & PRISM2_DUMP_TXEXC_HDR;
2340 local->stats.tx_errors++; 2344 local->stats.tx_errors++;
@@ -2400,10 +2404,9 @@ static void prism2_txexc(local_info_t *local)
2400 WLAN_FC_GET_STYPE(fc) >> 4, 2404 WLAN_FC_GET_STYPE(fc) >> 4,
2401 fc & IEEE80211_FCTL_TODS ? " ToDS" : "", 2405 fc & IEEE80211_FCTL_TODS ? " ToDS" : "",
2402 fc & IEEE80211_FCTL_FROMDS ? " FromDS" : ""); 2406 fc & IEEE80211_FCTL_FROMDS ? " FromDS" : "");
2403 PDEBUG(DEBUG_EXTRA, " A1=" MACSTR " A2=" MACSTR " A3=" 2407 PDEBUG(DEBUG_EXTRA, " A1=%s A2=%s A3=%s A4=%s\n",
2404 MACSTR " A4=" MACSTR "\n", 2408 print_mac(mac, txdesc.addr1), print_mac(mac2, txdesc.addr2),
2405 MAC2STR(txdesc.addr1), MAC2STR(txdesc.addr2), 2409 print_mac(mac3, txdesc.addr3), print_mac(mac4, txdesc.addr4));
2406 MAC2STR(txdesc.addr3), MAC2STR(txdesc.addr4));
2407} 2410}
2408 2411
2409 2412
diff --git a/drivers/net/wireless/hostap/hostap_info.c b/drivers/net/wireless/hostap/hostap_info.c
index b6a02a02da74..636f4b2382ea 100644
--- a/drivers/net/wireless/hostap/hostap_info.c
+++ b/drivers/net/wireless/hostap/hostap_info.c
@@ -166,6 +166,7 @@ static void prism2_host_roaming(local_info_t *local)
166 struct hfa384x_hostscan_result *selected, *entry; 166 struct hfa384x_hostscan_result *selected, *entry;
167 int i; 167 int i;
168 unsigned long flags; 168 unsigned long flags;
169 DECLARE_MAC_BUF(mac);
169 170
170 if (local->last_join_time && 171 if (local->last_join_time &&
171 time_before(jiffies, local->last_join_time + 10 * HZ)) { 172 time_before(jiffies, local->last_join_time + 10 * HZ)) {
@@ -198,8 +199,9 @@ static void prism2_host_roaming(local_info_t *local)
198 local->preferred_ap[2] || local->preferred_ap[3] || 199 local->preferred_ap[2] || local->preferred_ap[3] ||
199 local->preferred_ap[4] || local->preferred_ap[5]) { 200 local->preferred_ap[4] || local->preferred_ap[5]) {
200 /* Try to find preferred AP */ 201 /* Try to find preferred AP */
201 PDEBUG(DEBUG_EXTRA, "%s: Preferred AP BSSID " MACSTR "\n", 202 PDEBUG(DEBUG_EXTRA, "%s: Preferred AP BSSID "
202 dev->name, MAC2STR(local->preferred_ap)); 203 "%s\n",
204 dev->name, print_mac(mac, local->preferred_ap));
203 for (i = 0; i < local->last_scan_results_count; i++) { 205 for (i = 0; i < local->last_scan_results_count; i++) {
204 entry = &local->last_scan_results[i]; 206 entry = &local->last_scan_results[i];
205 if (memcmp(local->preferred_ap, entry->bssid, 6) == 0) 207 if (memcmp(local->preferred_ap, entry->bssid, 6) == 0)
@@ -216,8 +218,9 @@ static void prism2_host_roaming(local_info_t *local)
216 req.channel = selected->chid; 218 req.channel = selected->chid;
217 spin_unlock_irqrestore(&local->lock, flags); 219 spin_unlock_irqrestore(&local->lock, flags);
218 220
219 PDEBUG(DEBUG_EXTRA, "%s: JoinRequest: BSSID=" MACSTR " channel=%d\n", 221 PDEBUG(DEBUG_EXTRA, "%s: JoinRequest: BSSID=%s"
220 dev->name, MAC2STR(req.bssid), le16_to_cpu(req.channel)); 222 " channel=%d\n",
223 dev->name, print_mac(mac, req.bssid), le16_to_cpu(req.channel));
221 if (local->func->set_rid(dev, HFA384X_RID_JOINREQUEST, &req, 224 if (local->func->set_rid(dev, HFA384X_RID_JOINREQUEST, &req,
222 sizeof(req))) { 225 sizeof(req))) {
223 printk(KERN_DEBUG "%s: JoinRequest failed\n", dev->name); 226 printk(KERN_DEBUG "%s: JoinRequest failed\n", dev->name);
@@ -409,6 +412,7 @@ static void handle_info_queue_linkstatus(local_info_t *local)
409 int val = local->prev_link_status; 412 int val = local->prev_link_status;
410 int connected; 413 int connected;
411 union iwreq_data wrqu; 414 union iwreq_data wrqu;
415 DECLARE_MAC_BUF(mac);
412 416
413 connected = 417 connected =
414 val == HFA384X_LINKSTATUS_CONNECTED || 418 val == HFA384X_LINKSTATUS_CONNECTED ||
@@ -420,9 +424,10 @@ static void handle_info_queue_linkstatus(local_info_t *local)
420 printk(KERN_DEBUG "%s: could not read CURRENTBSSID after " 424 printk(KERN_DEBUG "%s: could not read CURRENTBSSID after "
421 "LinkStatus event\n", local->dev->name); 425 "LinkStatus event\n", local->dev->name);
422 } else { 426 } else {
423 PDEBUG(DEBUG_EXTRA, "%s: LinkStatus: BSSID=" MACSTR "\n", 427 PDEBUG(DEBUG_EXTRA, "%s: LinkStatus: BSSID="
428 "%s\n",
424 local->dev->name, 429 local->dev->name,
425 MAC2STR((unsigned char *) local->bssid)); 430 print_mac(mac, (unsigned char *) local->bssid));
426 if (local->wds_type & HOSTAP_WDS_AP_CLIENT) 431 if (local->wds_type & HOSTAP_WDS_AP_CLIENT)
427 hostap_add_sta(local->ap, local->bssid); 432 hostap_add_sta(local->ap, local->bssid);
428 } 433 }
diff --git a/drivers/net/wireless/hostap/hostap_ioctl.c b/drivers/net/wireless/hostap/hostap_ioctl.c
index 730b3541e325..7036ecff5ec1 100644
--- a/drivers/net/wireless/hostap/hostap_ioctl.c
+++ b/drivers/net/wireless/hostap/hostap_ioctl.c
@@ -664,6 +664,7 @@ static int hostap_join_ap(struct net_device *dev)
664 unsigned long flags; 664 unsigned long flags;
665 int i; 665 int i;
666 struct hfa384x_hostscan_result *entry; 666 struct hfa384x_hostscan_result *entry;
667 DECLARE_MAC_BUF(mac);
667 668
668 iface = netdev_priv(dev); 669 iface = netdev_priv(dev);
669 local = iface->local; 670 local = iface->local;
@@ -685,14 +686,14 @@ static int hostap_join_ap(struct net_device *dev)
685 686
686 if (local->func->set_rid(dev, HFA384X_RID_JOINREQUEST, &req, 687 if (local->func->set_rid(dev, HFA384X_RID_JOINREQUEST, &req,
687 sizeof(req))) { 688 sizeof(req))) {
688 printk(KERN_DEBUG "%s: JoinRequest " MACSTR 689 printk(KERN_DEBUG "%s: JoinRequest %s"
689 " failed\n", 690 " failed\n",
690 dev->name, MAC2STR(local->preferred_ap)); 691 dev->name, print_mac(mac, local->preferred_ap));
691 return -1; 692 return -1;
692 } 693 }
693 694
694 printk(KERN_DEBUG "%s: Trying to join BSSID " MACSTR "\n", 695 printk(KERN_DEBUG "%s: Trying to join BSSID %s\n",
695 dev->name, MAC2STR(local->preferred_ap)); 696 dev->name, print_mac(mac, local->preferred_ap));
696 697
697 return 0; 698 return 0;
698} 699}
@@ -3697,8 +3698,10 @@ static int prism2_ioctl_set_assoc_ap_addr(local_info_t *local,
3697 struct prism2_hostapd_param *param, 3698 struct prism2_hostapd_param *param,
3698 int param_len) 3699 int param_len)
3699{ 3700{
3700 printk(KERN_DEBUG "%ssta: associated as client with AP " MACSTR "\n", 3701 DECLARE_MAC_BUF(mac);
3701 local->dev->name, MAC2STR(param->sta_addr)); 3702 printk(KERN_DEBUG "%ssta: associated as client with AP "
3703 "%s\n",
3704 local->dev->name, print_mac(mac, param->sta_addr));
3702 memcpy(local->assoc_ap_addr, param->sta_addr, ETH_ALEN); 3705 memcpy(local->assoc_ap_addr, param->sta_addr, ETH_ALEN);
3703 return 0; 3706 return 0;
3704} 3707}
diff --git a/drivers/net/wireless/hostap/hostap_main.c b/drivers/net/wireless/hostap/hostap_main.c
index 9a470e80ca24..4cb09d81b404 100644
--- a/drivers/net/wireless/hostap/hostap_main.c
+++ b/drivers/net/wireless/hostap/hostap_main.c
@@ -530,6 +530,10 @@ int hostap_set_auth_algs(local_info_t *local)
530void hostap_dump_rx_header(const char *name, const struct hfa384x_rx_frame *rx) 530void hostap_dump_rx_header(const char *name, const struct hfa384x_rx_frame *rx)
531{ 531{
532 u16 status, fc; 532 u16 status, fc;
533 DECLARE_MAC_BUF(mac);
534 DECLARE_MAC_BUF(mac2);
535 DECLARE_MAC_BUF(mac3);
536 DECLARE_MAC_BUF(mac4);
533 537
534 status = __le16_to_cpu(rx->status); 538 status = __le16_to_cpu(rx->status);
535 539
@@ -548,13 +552,12 @@ void hostap_dump_rx_header(const char *name, const struct hfa384x_rx_frame *rx)
548 fc & IEEE80211_FCTL_TODS ? " [ToDS]" : "", 552 fc & IEEE80211_FCTL_TODS ? " [ToDS]" : "",
549 fc & IEEE80211_FCTL_FROMDS ? " [FromDS]" : ""); 553 fc & IEEE80211_FCTL_FROMDS ? " [FromDS]" : "");
550 554
551 printk(KERN_DEBUG " A1=" MACSTR " A2=" MACSTR " A3=" MACSTR " A4=" 555 printk(KERN_DEBUG " A1=%s A2=%s A3=%s A4=%s\n",
552 MACSTR "\n", 556 print_mac(mac, rx->addr1), print_mac(mac2, rx->addr2),
553 MAC2STR(rx->addr1), MAC2STR(rx->addr2), MAC2STR(rx->addr3), 557 print_mac(mac3, rx->addr3), print_mac(mac4, rx->addr4));
554 MAC2STR(rx->addr4));
555 558
556 printk(KERN_DEBUG " dst=" MACSTR " src=" MACSTR " len=%d\n", 559 printk(KERN_DEBUG " dst=%s src=%s len=%d\n",
557 MAC2STR(rx->dst_addr), MAC2STR(rx->src_addr), 560 print_mac(mac, rx->dst_addr), print_mac(mac2, rx->src_addr),
558 __be16_to_cpu(rx->len)); 561 __be16_to_cpu(rx->len));
559} 562}
560 563
@@ -562,6 +565,10 @@ void hostap_dump_rx_header(const char *name, const struct hfa384x_rx_frame *rx)
562void hostap_dump_tx_header(const char *name, const struct hfa384x_tx_frame *tx) 565void hostap_dump_tx_header(const char *name, const struct hfa384x_tx_frame *tx)
563{ 566{
564 u16 fc; 567 u16 fc;
568 DECLARE_MAC_BUF(mac);
569 DECLARE_MAC_BUF(mac2);
570 DECLARE_MAC_BUF(mac3);
571 DECLARE_MAC_BUF(mac4);
565 572
566 printk(KERN_DEBUG "%s: TX status=0x%04x retry_count=%d tx_rate=%d " 573 printk(KERN_DEBUG "%s: TX status=0x%04x retry_count=%d tx_rate=%d "
567 "tx_control=0x%04x; jiffies=%ld\n", 574 "tx_control=0x%04x; jiffies=%ld\n",
@@ -577,13 +584,12 @@ void hostap_dump_tx_header(const char *name, const struct hfa384x_tx_frame *tx)
577 fc & IEEE80211_FCTL_TODS ? " [ToDS]" : "", 584 fc & IEEE80211_FCTL_TODS ? " [ToDS]" : "",
578 fc & IEEE80211_FCTL_FROMDS ? " [FromDS]" : ""); 585 fc & IEEE80211_FCTL_FROMDS ? " [FromDS]" : "");
579 586
580 printk(KERN_DEBUG " A1=" MACSTR " A2=" MACSTR " A3=" MACSTR " A4=" 587 printk(KERN_DEBUG " A1=%s A2=%s A3=%s A4=%s\n",
581 MACSTR "\n", 588 print_mac(mac, tx->addr1), print_mac(mac2, tx->addr2),
582 MAC2STR(tx->addr1), MAC2STR(tx->addr2), MAC2STR(tx->addr3), 589 print_mac(mac3, tx->addr3), print_mac(mac4, tx->addr4));
583 MAC2STR(tx->addr4));
584 590
585 printk(KERN_DEBUG " dst=" MACSTR " src=" MACSTR " len=%d\n", 591 printk(KERN_DEBUG " dst=%s src=%s len=%d\n",
586 MAC2STR(tx->dst_addr), MAC2STR(tx->src_addr), 592 print_mac(mac, tx->dst_addr), print_mac(mac2, tx->src_addr),
587 __be16_to_cpu(tx->len)); 593 __be16_to_cpu(tx->len));
588} 594}
589 595
diff --git a/drivers/net/wireless/hostap/hostap_proc.c b/drivers/net/wireless/hostap/hostap_proc.c
index d1d8ce022e63..b03536008ad9 100644
--- a/drivers/net/wireless/hostap/hostap_proc.c
+++ b/drivers/net/wireless/hostap/hostap_proc.c
@@ -106,6 +106,7 @@ static int prism2_wds_proc_read(char *page, char **start, off_t off,
106 local_info_t *local = (local_info_t *) data; 106 local_info_t *local = (local_info_t *) data;
107 struct list_head *ptr; 107 struct list_head *ptr;
108 struct hostap_interface *iface; 108 struct hostap_interface *iface;
109 DECLARE_MAC_BUF(mac);
109 110
110 if (off > PROC_LIMIT) { 111 if (off > PROC_LIMIT) {
111 *eof = 1; 112 *eof = 1;
@@ -117,9 +118,9 @@ static int prism2_wds_proc_read(char *page, char **start, off_t off,
117 iface = list_entry(ptr, struct hostap_interface, list); 118 iface = list_entry(ptr, struct hostap_interface, list);
118 if (iface->type != HOSTAP_INTERFACE_WDS) 119 if (iface->type != HOSTAP_INTERFACE_WDS)
119 continue; 120 continue;
120 p += sprintf(p, "%s\t" MACSTR "\n", 121 p += sprintf(p, "%s\t%s\n",
121 iface->dev->name, 122 iface->dev->name,
122 MAC2STR(iface->u.wds.remote_addr)); 123 print_mac(mac, iface->u.wds.remote_addr));
123 if ((p - page) > PROC_LIMIT) { 124 if ((p - page) > PROC_LIMIT) {
124 printk(KERN_DEBUG "%s: wds proc did not fit\n", 125 printk(KERN_DEBUG "%s: wds proc did not fit\n",
125 local->dev->name); 126 local->dev->name);
@@ -147,6 +148,7 @@ static int prism2_bss_list_proc_read(char *page, char **start, off_t off,
147 struct list_head *ptr; 148 struct list_head *ptr;
148 struct hostap_bss_info *bss; 149 struct hostap_bss_info *bss;
149 int i; 150 int i;
151 DECLARE_MAC_BUF(mac);
150 152
151 if (off > PROC_LIMIT) { 153 if (off > PROC_LIMIT) {
152 *eof = 1; 154 *eof = 1;
@@ -158,8 +160,8 @@ static int prism2_bss_list_proc_read(char *page, char **start, off_t off,
158 spin_lock_bh(&local->lock); 160 spin_lock_bh(&local->lock);
159 list_for_each(ptr, &local->bss_list) { 161 list_for_each(ptr, &local->bss_list) {
160 bss = list_entry(ptr, struct hostap_bss_info, list); 162 bss = list_entry(ptr, struct hostap_bss_info, list);
161 p += sprintf(p, MACSTR "\t%lu\t%u\t0x%x\t", 163 p += sprintf(p, "%s\t%lu\t%u\t0x%x\t",
162 MAC2STR(bss->bssid), bss->last_update, 164 print_mac(mac, bss->bssid), bss->last_update,
163 bss->count, bss->capab_info); 165 bss->count, bss->capab_info);
164 for (i = 0; i < bss->ssid_len; i++) { 166 for (i = 0; i < bss->ssid_len; i++) {
165 p += sprintf(p, "%c", 167 p += sprintf(p, "%c",
@@ -312,6 +314,7 @@ static int prism2_scan_results_proc_read(char *page, char **start, off_t off,
312 int entry, i, len, total = 0; 314 int entry, i, len, total = 0;
313 struct hfa384x_hostscan_result *scanres; 315 struct hfa384x_hostscan_result *scanres;
314 u8 *pos; 316 u8 *pos;
317 DECLARE_MAC_BUF(mac);
315 318
316 p += sprintf(p, "CHID ANL SL BcnInt Capab Rate BSSID ATIM SupRates " 319 p += sprintf(p, "CHID ANL SL BcnInt Capab Rate BSSID ATIM SupRates "
317 "SSID\n"); 320 "SSID\n");
@@ -329,14 +332,14 @@ static int prism2_scan_results_proc_read(char *page, char **start, off_t off,
329 if ((p - page) > (PAGE_SIZE - 200)) 332 if ((p - page) > (PAGE_SIZE - 200))
330 break; 333 break;
331 334
332 p += sprintf(p, "%d %d %d %d 0x%02x %d " MACSTR " %d ", 335 p += sprintf(p, "%d %d %d %d 0x%02x %d %s %d ",
333 le16_to_cpu(scanres->chid), 336 le16_to_cpu(scanres->chid),
334 (s16) le16_to_cpu(scanres->anl), 337 (s16) le16_to_cpu(scanres->anl),
335 (s16) le16_to_cpu(scanres->sl), 338 (s16) le16_to_cpu(scanres->sl),
336 le16_to_cpu(scanres->beacon_interval), 339 le16_to_cpu(scanres->beacon_interval),
337 le16_to_cpu(scanres->capability), 340 le16_to_cpu(scanres->capability),
338 le16_to_cpu(scanres->rate), 341 le16_to_cpu(scanres->rate),
339 MAC2STR(scanres->bssid), 342 print_mac(mac, scanres->bssid),
340 le16_to_cpu(scanres->atim)); 343 le16_to_cpu(scanres->atim));
341 344
342 pos = scanres->sup_rates; 345 pos = scanres->sup_rates;
diff --git a/drivers/net/wireless/ipw2100.c b/drivers/net/wireless/ipw2100.c
index b3c07b93afce..2d46a16c0945 100644
--- a/drivers/net/wireless/ipw2100.c
+++ b/drivers/net/wireless/ipw2100.c
@@ -1922,6 +1922,7 @@ static void isr_indicate_associated(struct ipw2100_priv *priv, u32 status)
1922 u32 chan; 1922 u32 chan;
1923 char *txratename; 1923 char *txratename;
1924 u8 bssid[ETH_ALEN]; 1924 u8 bssid[ETH_ALEN];
1925 DECLARE_MAC_BUF(mac);
1925 1926
1926 /* 1927 /*
1927 * TBD: BSSID is usually 00:00:00:00:00:00 here and not 1928 * TBD: BSSID is usually 00:00:00:00:00:00 here and not
@@ -1983,9 +1984,9 @@ static void isr_indicate_associated(struct ipw2100_priv *priv, u32 status)
1983 } 1984 }
1984 1985
1985 IPW_DEBUG_INFO("%s: Associated with '%s' at %s, channel %d (BSSID=" 1986 IPW_DEBUG_INFO("%s: Associated with '%s' at %s, channel %d (BSSID="
1986 MAC_FMT ")\n", 1987 "%s)\n",
1987 priv->net_dev->name, escape_essid(essid, essid_len), 1988 priv->net_dev->name, escape_essid(essid, essid_len),
1988 txratename, chan, MAC_ARG(bssid)); 1989 txratename, chan, print_mac(mac, bssid));
1989 1990
1990 /* now we copy read ssid into dev */ 1991 /* now we copy read ssid into dev */
1991 if (!(priv->config & CFG_STATIC_ESSID)) { 1992 if (!(priv->config & CFG_STATIC_ESSID)) {
@@ -2053,10 +2054,12 @@ static int ipw2100_set_essid(struct ipw2100_priv *priv, char *essid,
2053 2054
2054static void isr_indicate_association_lost(struct ipw2100_priv *priv, u32 status) 2055static void isr_indicate_association_lost(struct ipw2100_priv *priv, u32 status)
2055{ 2056{
2057 DECLARE_MAC_BUF(mac);
2058
2056 IPW_DEBUG(IPW_DL_NOTIF | IPW_DL_STATE | IPW_DL_ASSOC, 2059 IPW_DEBUG(IPW_DL_NOTIF | IPW_DL_STATE | IPW_DL_ASSOC,
2057 "disassociated: '%s' " MAC_FMT " \n", 2060 "disassociated: '%s' %s \n",
2058 escape_essid(priv->essid, priv->essid_len), 2061 escape_essid(priv->essid, priv->essid_len),
2059 MAC_ARG(priv->bssid)); 2062 print_mac(mac, priv->bssid));
2060 2063
2061 priv->status &= ~(STATUS_ASSOCIATED | STATUS_ASSOCIATING); 2064 priv->status &= ~(STATUS_ASSOCIATED | STATUS_ASSOCIATING);
2062 2065
@@ -4049,6 +4052,7 @@ static ssize_t show_bssinfo(struct device *d, struct device_attribute *attr,
4049 char *out = buf; 4052 char *out = buf;
4050 int length; 4053 int length;
4051 int ret; 4054 int ret;
4055 DECLARE_MAC_BUF(mac);
4052 4056
4053 if (priv->status & STATUS_RF_KILL_MASK) 4057 if (priv->status & STATUS_RF_KILL_MASK)
4054 return 0; 4058 return 0;
@@ -4076,9 +4080,7 @@ static ssize_t show_bssinfo(struct device *d, struct device_attribute *attr,
4076 __LINE__); 4080 __LINE__);
4077 4081
4078 out += sprintf(out, "ESSID: %s\n", essid); 4082 out += sprintf(out, "ESSID: %s\n", essid);
4079 out += sprintf(out, "BSSID: %02x:%02x:%02x:%02x:%02x:%02x\n", 4083 out += sprintf(out, "BSSID: %s\n", print_mac(mac, bssid));
4080 bssid[0], bssid[1], bssid[2],
4081 bssid[3], bssid[4], bssid[5]);
4082 out += sprintf(out, "Channel: %d\n", chan); 4084 out += sprintf(out, "Channel: %d\n", chan);
4083 4085
4084 return out - buf; 4086 return out - buf;
@@ -4652,19 +4654,20 @@ static void ipw2100_rx_free(struct ipw2100_priv *priv)
4652static int ipw2100_read_mac_address(struct ipw2100_priv *priv) 4654static int ipw2100_read_mac_address(struct ipw2100_priv *priv)
4653{ 4655{
4654 u32 length = ETH_ALEN; 4656 u32 length = ETH_ALEN;
4655 u8 mac[ETH_ALEN]; 4657 u8 addr[ETH_ALEN];
4658 DECLARE_MAC_BUF(mac);
4656 4659
4657 int err; 4660 int err;
4658 4661
4659 err = ipw2100_get_ordinal(priv, IPW_ORD_STAT_ADAPTER_MAC, mac, &length); 4662 err = ipw2100_get_ordinal(priv, IPW_ORD_STAT_ADAPTER_MAC, addr, &length);
4660 if (err) { 4663 if (err) {
4661 IPW_DEBUG_INFO("MAC address read failed\n"); 4664 IPW_DEBUG_INFO("MAC address read failed\n");
4662 return -EIO; 4665 return -EIO;
4663 } 4666 }
4664 IPW_DEBUG_INFO("card MAC is %02X:%02X:%02X:%02X:%02X:%02X\n",
4665 mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]);
4666 4667
4667 memcpy(priv->net_dev->dev_addr, mac, ETH_ALEN); 4668 memcpy(priv->net_dev->dev_addr, addr, ETH_ALEN);
4669 IPW_DEBUG_INFO("card MAC is %s\n",
4670 print_mac(mac, priv->net_dev->dev_addr));
4668 4671
4669 return 0; 4672 return 0;
4670} 4673}
@@ -5043,10 +5046,10 @@ static int ipw2100_set_mandatory_bssid(struct ipw2100_priv *priv, u8 * bssid,
5043 int err; 5046 int err;
5044 5047
5045#ifdef CONFIG_IPW2100_DEBUG 5048#ifdef CONFIG_IPW2100_DEBUG
5049 DECLARE_MAC_BUF(mac);
5046 if (bssid != NULL) 5050 if (bssid != NULL)
5047 IPW_DEBUG_HC("MANDATORY_BSSID: %02X:%02X:%02X:%02X:%02X:%02X\n", 5051 IPW_DEBUG_HC("MANDATORY_BSSID: %s\n",
5048 bssid[0], bssid[1], bssid[2], bssid[3], bssid[4], 5052 print_mac(mac, bssid));
5049 bssid[5]);
5050 else 5053 else
5051 IPW_DEBUG_HC("MANDATORY_BSSID: <clear>\n"); 5054 IPW_DEBUG_HC("MANDATORY_BSSID: <clear>\n");
5052#endif 5055#endif
@@ -6892,6 +6895,7 @@ static int ipw2100_wx_set_wap(struct net_device *dev,
6892 static const unsigned char off[] = { 6895 static const unsigned char off[] = {
6893 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 6896 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
6894 }; 6897 };
6898 DECLARE_MAC_BUF(mac);
6895 6899
6896 // sanity checks 6900 // sanity checks
6897 if (wrqu->ap_addr.sa_family != ARPHRD_ETHER) 6901 if (wrqu->ap_addr.sa_family != ARPHRD_ETHER)
@@ -6917,13 +6921,8 @@ static int ipw2100_wx_set_wap(struct net_device *dev,
6917 6921
6918 err = ipw2100_set_mandatory_bssid(priv, wrqu->ap_addr.sa_data, 0); 6922 err = ipw2100_set_mandatory_bssid(priv, wrqu->ap_addr.sa_data, 0);
6919 6923
6920 IPW_DEBUG_WX("SET BSSID -> %02X:%02X:%02X:%02X:%02X:%02X\n", 6924 IPW_DEBUG_WX("SET BSSID -> %s\n",
6921 wrqu->ap_addr.sa_data[0] & 0xff, 6925 print_mac(mac, wrqu->ap_addr.sa_data));
6922 wrqu->ap_addr.sa_data[1] & 0xff,
6923 wrqu->ap_addr.sa_data[2] & 0xff,
6924 wrqu->ap_addr.sa_data[3] & 0xff,
6925 wrqu->ap_addr.sa_data[4] & 0xff,
6926 wrqu->ap_addr.sa_data[5] & 0xff);
6927 6926
6928 done: 6927 done:
6929 mutex_unlock(&priv->action_mutex); 6928 mutex_unlock(&priv->action_mutex);
@@ -6939,6 +6938,7 @@ static int ipw2100_wx_get_wap(struct net_device *dev,
6939 */ 6938 */
6940 6939
6941 struct ipw2100_priv *priv = ieee80211_priv(dev); 6940 struct ipw2100_priv *priv = ieee80211_priv(dev);
6941 DECLARE_MAC_BUF(mac);
6942 6942
6943 /* If we are associated, trying to associate, or have a statically 6943 /* If we are associated, trying to associate, or have a statically
6944 * configured BSSID then return that; otherwise return ANY */ 6944 * configured BSSID then return that; otherwise return ANY */
@@ -6948,8 +6948,8 @@ static int ipw2100_wx_get_wap(struct net_device *dev,
6948 } else 6948 } else
6949 memset(wrqu->ap_addr.sa_data, 0, ETH_ALEN); 6949 memset(wrqu->ap_addr.sa_data, 0, ETH_ALEN);
6950 6950
6951 IPW_DEBUG_WX("Getting WAP BSSID: " MAC_FMT "\n", 6951 IPW_DEBUG_WX("Getting WAP BSSID: %s\n",
6952 MAC_ARG(wrqu->ap_addr.sa_data)); 6952 print_mac(mac, wrqu->ap_addr.sa_data));
6953 return 0; 6953 return 0;
6954} 6954}
6955 6955
diff --git a/drivers/net/wireless/ipw2200.c b/drivers/net/wireless/ipw2200.c
index afad8bb7e334..2119a79dcc86 100644
--- a/drivers/net/wireless/ipw2200.c
+++ b/drivers/net/wireless/ipw2200.c
@@ -2247,8 +2247,8 @@ static int ipw_send_adapter_address(struct ipw_priv *priv, u8 * mac)
2247 return -1; 2247 return -1;
2248 } 2248 }
2249 2249
2250 IPW_DEBUG_INFO("%s: Setting MAC to " MAC_FMT "\n", 2250 IPW_DEBUG_INFO("%s: Setting MAC to %s\n",
2251 priv->net_dev->name, MAC_ARG(mac)); 2251 priv->net_dev->name, print_mac(mac, mac));
2252 2252
2253 return ipw_send_cmd_pdu(priv, IPW_CMD_ADAPTER_ADDRESS, ETH_ALEN, mac); 2253 return ipw_send_cmd_pdu(priv, IPW_CMD_ADAPTER_ADDRESS, ETH_ALEN, mac);
2254} 2254}
@@ -3796,6 +3796,7 @@ static u8 ipw_add_station(struct ipw_priv *priv, u8 * bssid)
3796{ 3796{
3797 struct ipw_station_entry entry; 3797 struct ipw_station_entry entry;
3798 int i; 3798 int i;
3799 DECLARE_MAC_BUF(mac);
3799 3800
3800 for (i = 0; i < priv->num_stations; i++) { 3801 for (i = 0; i < priv->num_stations; i++) {
3801 if (!memcmp(priv->stations[i], bssid, ETH_ALEN)) { 3802 if (!memcmp(priv->stations[i], bssid, ETH_ALEN)) {
@@ -3812,7 +3813,7 @@ static u8 ipw_add_station(struct ipw_priv *priv, u8 * bssid)
3812 if (i == MAX_STATIONS) 3813 if (i == MAX_STATIONS)
3813 return IPW_INVALID_STATION; 3814 return IPW_INVALID_STATION;
3814 3815
3815 IPW_DEBUG_SCAN("Adding AdHoc station: " MAC_FMT "\n", MAC_ARG(bssid)); 3816 IPW_DEBUG_SCAN("Adding AdHoc station: %s\n", print_mac(mac, bssid));
3816 3817
3817 entry.reserved = 0; 3818 entry.reserved = 0;
3818 entry.support_mode = 0; 3819 entry.support_mode = 0;
@@ -3839,6 +3840,7 @@ static u8 ipw_find_station(struct ipw_priv *priv, u8 * bssid)
3839static void ipw_send_disassociate(struct ipw_priv *priv, int quiet) 3840static void ipw_send_disassociate(struct ipw_priv *priv, int quiet)
3840{ 3841{
3841 int err; 3842 int err;
3843 DECLARE_MAC_BUF(mac);
3842 3844
3843 if (priv->status & STATUS_ASSOCIATING) { 3845 if (priv->status & STATUS_ASSOCIATING) {
3844 IPW_DEBUG_ASSOC("Disassociating while associating.\n"); 3846 IPW_DEBUG_ASSOC("Disassociating while associating.\n");
@@ -3851,9 +3853,9 @@ static void ipw_send_disassociate(struct ipw_priv *priv, int quiet)
3851 return; 3853 return;
3852 } 3854 }
3853 3855
3854 IPW_DEBUG_ASSOC("Disassocation attempt from " MAC_FMT " " 3856 IPW_DEBUG_ASSOC("Disassocation attempt from %s "
3855 "on channel %d.\n", 3857 "on channel %d.\n",
3856 MAC_ARG(priv->assoc_request.bssid), 3858 print_mac(mac, priv->assoc_request.bssid),
3857 priv->assoc_request.channel); 3859 priv->assoc_request.channel);
3858 3860
3859 priv->status &= ~(STATUS_ASSOCIATING | STATUS_ASSOCIATED); 3861 priv->status &= ~(STATUS_ASSOCIATING | STATUS_ASSOCIATED);
@@ -4348,6 +4350,7 @@ static void ipw_handle_missed_beacon(struct ipw_priv *priv,
4348static void ipw_rx_notification(struct ipw_priv *priv, 4350static void ipw_rx_notification(struct ipw_priv *priv,
4349 struct ipw_rx_notification *notif) 4351 struct ipw_rx_notification *notif)
4350{ 4352{
4353 DECLARE_MAC_BUF(mac);
4351 notif->size = le16_to_cpu(notif->size); 4354 notif->size = le16_to_cpu(notif->size);
4352 4355
4353 IPW_DEBUG_NOTIF("type = %i (%d bytes)\n", notif->subtype, notif->size); 4356 IPW_DEBUG_NOTIF("type = %i (%d bytes)\n", notif->subtype, notif->size);
@@ -4360,11 +4363,11 @@ static void ipw_rx_notification(struct ipw_priv *priv,
4360 case CMAS_ASSOCIATED:{ 4363 case CMAS_ASSOCIATED:{
4361 IPW_DEBUG(IPW_DL_NOTIF | IPW_DL_STATE | 4364 IPW_DEBUG(IPW_DL_NOTIF | IPW_DL_STATE |
4362 IPW_DL_ASSOC, 4365 IPW_DL_ASSOC,
4363 "associated: '%s' " MAC_FMT 4366 "associated: '%s' %s"
4364 " \n", 4367 " \n",
4365 escape_essid(priv->essid, 4368 escape_essid(priv->essid,
4366 priv->essid_len), 4369 priv->essid_len),
4367 MAC_ARG(priv->bssid)); 4370 print_mac(mac, priv->bssid));
4368 4371
4369 switch (priv->ieee->iw_mode) { 4372 switch (priv->ieee->iw_mode) {
4370 case IW_MODE_INFRA: 4373 case IW_MODE_INFRA:
@@ -4444,13 +4447,13 @@ static void ipw_rx_notification(struct ipw_priv *priv,
4444 IPW_DL_STATE | 4447 IPW_DL_STATE |
4445 IPW_DL_ASSOC, 4448 IPW_DL_ASSOC,
4446 "deauthenticated: '%s' " 4449 "deauthenticated: '%s' "
4447 MAC_FMT 4450 "%s"
4448 ": (0x%04X) - %s \n", 4451 ": (0x%04X) - %s \n",
4449 escape_essid(priv-> 4452 escape_essid(priv->
4450 essid, 4453 essid,
4451 priv-> 4454 priv->
4452 essid_len), 4455 essid_len),
4453 MAC_ARG(priv->bssid), 4456 print_mac(mac, priv->bssid),
4454 ntohs(auth->status), 4457 ntohs(auth->status),
4455 ipw_get_status_code 4458 ipw_get_status_code
4456 (ntohs 4459 (ntohs
@@ -4467,11 +4470,11 @@ static void ipw_rx_notification(struct ipw_priv *priv,
4467 4470
4468 IPW_DEBUG(IPW_DL_NOTIF | IPW_DL_STATE | 4471 IPW_DEBUG(IPW_DL_NOTIF | IPW_DL_STATE |
4469 IPW_DL_ASSOC, 4472 IPW_DL_ASSOC,
4470 "authenticated: '%s' " MAC_FMT 4473 "authenticated: '%s' %s"
4471 "\n", 4474 "\n",
4472 escape_essid(priv->essid, 4475 escape_essid(priv->essid,
4473 priv->essid_len), 4476 priv->essid_len),
4474 MAC_ARG(priv->bssid)); 4477 print_mac(mac, priv->bssid));
4475 break; 4478 break;
4476 } 4479 }
4477 4480
@@ -4496,11 +4499,11 @@ static void ipw_rx_notification(struct ipw_priv *priv,
4496 4499
4497 IPW_DEBUG(IPW_DL_NOTIF | IPW_DL_STATE | 4500 IPW_DEBUG(IPW_DL_NOTIF | IPW_DL_STATE |
4498 IPW_DL_ASSOC, 4501 IPW_DL_ASSOC,
4499 "disassociated: '%s' " MAC_FMT 4502 "disassociated: '%s' %s"
4500 " \n", 4503 " \n",
4501 escape_essid(priv->essid, 4504 escape_essid(priv->essid,
4502 priv->essid_len), 4505 priv->essid_len),
4503 MAC_ARG(priv->bssid)); 4506 print_mac(mac, priv->bssid));
4504 4507
4505 priv->status &= 4508 priv->status &=
4506 ~(STATUS_DISASSOCIATING | 4509 ~(STATUS_DISASSOCIATING |
@@ -4535,10 +4538,10 @@ static void ipw_rx_notification(struct ipw_priv *priv,
4535 switch (auth->state) { 4538 switch (auth->state) {
4536 case CMAS_AUTHENTICATED: 4539 case CMAS_AUTHENTICATED:
4537 IPW_DEBUG(IPW_DL_NOTIF | IPW_DL_STATE, 4540 IPW_DEBUG(IPW_DL_NOTIF | IPW_DL_STATE,
4538 "authenticated: '%s' " MAC_FMT " \n", 4541 "authenticated: '%s' %s \n",
4539 escape_essid(priv->essid, 4542 escape_essid(priv->essid,
4540 priv->essid_len), 4543 priv->essid_len),
4541 MAC_ARG(priv->bssid)); 4544 print_mac(mac, priv->bssid));
4542 priv->status |= STATUS_AUTH; 4545 priv->status |= STATUS_AUTH;
4543 break; 4546 break;
4544 4547
@@ -4554,10 +4557,10 @@ static void ipw_rx_notification(struct ipw_priv *priv,
4554 } 4557 }
4555 IPW_DEBUG(IPW_DL_NOTIF | IPW_DL_STATE | 4558 IPW_DEBUG(IPW_DL_NOTIF | IPW_DL_STATE |
4556 IPW_DL_ASSOC, 4559 IPW_DL_ASSOC,
4557 "deauthenticated: '%s' " MAC_FMT "\n", 4560 "deauthenticated: '%s' %s\n",
4558 escape_essid(priv->essid, 4561 escape_essid(priv->essid,
4559 priv->essid_len), 4562 priv->essid_len),
4560 MAC_ARG(priv->bssid)); 4563 print_mac(mac, priv->bssid));
4561 4564
4562 priv->status &= ~(STATUS_ASSOCIATING | 4565 priv->status &= ~(STATUS_ASSOCIATING |
4563 STATUS_AUTH | 4566 STATUS_AUTH |
@@ -5383,25 +5386,27 @@ static int ipw_find_adhoc_network(struct ipw_priv *priv,
5383 int roaming) 5386 int roaming)
5384{ 5387{
5385 struct ipw_supported_rates rates; 5388 struct ipw_supported_rates rates;
5389 DECLARE_MAC_BUF(mac);
5390 DECLARE_MAC_BUF(mac2);
5386 5391
5387 /* Verify that this network's capability is compatible with the 5392 /* Verify that this network's capability is compatible with the
5388 * current mode (AdHoc or Infrastructure) */ 5393 * current mode (AdHoc or Infrastructure) */
5389 if ((priv->ieee->iw_mode == IW_MODE_ADHOC && 5394 if ((priv->ieee->iw_mode == IW_MODE_ADHOC &&
5390 !(network->capability & WLAN_CAPABILITY_IBSS))) { 5395 !(network->capability & WLAN_CAPABILITY_IBSS))) {
5391 IPW_DEBUG_MERGE("Network '%s (" MAC_FMT ")' excluded due to " 5396 IPW_DEBUG_MERGE("Network '%s (%s)' excluded due to "
5392 "capability mismatch.\n", 5397 "capability mismatch.\n",
5393 escape_essid(network->ssid, network->ssid_len), 5398 escape_essid(network->ssid, network->ssid_len),
5394 MAC_ARG(network->bssid)); 5399 print_mac(mac, network->bssid));
5395 return 0; 5400 return 0;
5396 } 5401 }
5397 5402
5398 /* If we do not have an ESSID for this AP, we can not associate with 5403 /* If we do not have an ESSID for this AP, we can not associate with
5399 * it */ 5404 * it */
5400 if (network->flags & NETWORK_EMPTY_ESSID) { 5405 if (network->flags & NETWORK_EMPTY_ESSID) {
5401 IPW_DEBUG_MERGE("Network '%s (" MAC_FMT ")' excluded " 5406 IPW_DEBUG_MERGE("Network '%s (%s)' excluded "
5402 "because of hidden ESSID.\n", 5407 "because of hidden ESSID.\n",
5403 escape_essid(network->ssid, network->ssid_len), 5408 escape_essid(network->ssid, network->ssid_len),
5404 MAC_ARG(network->bssid)); 5409 print_mac(mac, network->bssid));
5405 return 0; 5410 return 0;
5406 } 5411 }
5407 5412
@@ -5411,11 +5416,11 @@ static int ipw_find_adhoc_network(struct ipw_priv *priv,
5411 if ((network->ssid_len != match->network->ssid_len) || 5416 if ((network->ssid_len != match->network->ssid_len) ||
5412 memcmp(network->ssid, match->network->ssid, 5417 memcmp(network->ssid, match->network->ssid,
5413 network->ssid_len)) { 5418 network->ssid_len)) {
5414 IPW_DEBUG_MERGE("Netowrk '%s (" MAC_FMT ")' excluded " 5419 IPW_DEBUG_MERGE("Network '%s (%s)' excluded "
5415 "because of non-network ESSID.\n", 5420 "because of non-network ESSID.\n",
5416 escape_essid(network->ssid, 5421 escape_essid(network->ssid,
5417 network->ssid_len), 5422 network->ssid_len),
5418 MAC_ARG(network->bssid)); 5423 print_mac(mac, network->bssid));
5419 return 0; 5424 return 0;
5420 } 5425 }
5421 } else { 5426 } else {
@@ -5430,9 +5435,9 @@ static int ipw_find_adhoc_network(struct ipw_priv *priv,
5430 strncpy(escaped, 5435 strncpy(escaped,
5431 escape_essid(network->ssid, network->ssid_len), 5436 escape_essid(network->ssid, network->ssid_len),
5432 sizeof(escaped)); 5437 sizeof(escaped));
5433 IPW_DEBUG_MERGE("Network '%s (" MAC_FMT ")' excluded " 5438 IPW_DEBUG_MERGE("Network '%s (%s)' excluded "
5434 "because of ESSID mismatch: '%s'.\n", 5439 "because of ESSID mismatch: '%s'.\n",
5435 escaped, MAC_ARG(network->bssid), 5440 escaped, print_mac(mac, network->bssid),
5436 escape_essid(priv->essid, 5441 escape_essid(priv->essid,
5437 priv->essid_len)); 5442 priv->essid_len));
5438 return 0; 5443 return 0;
@@ -5459,10 +5464,10 @@ static int ipw_find_adhoc_network(struct ipw_priv *priv,
5459 /* Now go through and see if the requested network is valid... */ 5464 /* Now go through and see if the requested network is valid... */
5460 if (priv->ieee->scan_age != 0 && 5465 if (priv->ieee->scan_age != 0 &&
5461 time_after(jiffies, network->last_scanned + priv->ieee->scan_age)) { 5466 time_after(jiffies, network->last_scanned + priv->ieee->scan_age)) {
5462 IPW_DEBUG_MERGE("Network '%s (" MAC_FMT ")' excluded " 5467 IPW_DEBUG_MERGE("Network '%s (%s)' excluded "
5463 "because of age: %ums.\n", 5468 "because of age: %ums.\n",
5464 escape_essid(network->ssid, network->ssid_len), 5469 escape_essid(network->ssid, network->ssid_len),
5465 MAC_ARG(network->bssid), 5470 print_mac(mac, network->bssid),
5466 jiffies_to_msecs(jiffies - 5471 jiffies_to_msecs(jiffies -
5467 network->last_scanned)); 5472 network->last_scanned));
5468 return 0; 5473 return 0;
@@ -5470,10 +5475,10 @@ static int ipw_find_adhoc_network(struct ipw_priv *priv,
5470 5475
5471 if ((priv->config & CFG_STATIC_CHANNEL) && 5476 if ((priv->config & CFG_STATIC_CHANNEL) &&
5472 (network->channel != priv->channel)) { 5477 (network->channel != priv->channel)) {
5473 IPW_DEBUG_MERGE("Network '%s (" MAC_FMT ")' excluded " 5478 IPW_DEBUG_MERGE("Network '%s (%s)' excluded "
5474 "because of channel mismatch: %d != %d.\n", 5479 "because of channel mismatch: %d != %d.\n",
5475 escape_essid(network->ssid, network->ssid_len), 5480 escape_essid(network->ssid, network->ssid_len),
5476 MAC_ARG(network->bssid), 5481 print_mac(mac, network->bssid),
5477 network->channel, priv->channel); 5482 network->channel, priv->channel);
5478 return 0; 5483 return 0;
5479 } 5484 }
@@ -5481,10 +5486,10 @@ static int ipw_find_adhoc_network(struct ipw_priv *priv,
5481 /* Verify privacy compatability */ 5486 /* Verify privacy compatability */
5482 if (((priv->capability & CAP_PRIVACY_ON) ? 1 : 0) != 5487 if (((priv->capability & CAP_PRIVACY_ON) ? 1 : 0) !=
5483 ((network->capability & WLAN_CAPABILITY_PRIVACY) ? 1 : 0)) { 5488 ((network->capability & WLAN_CAPABILITY_PRIVACY) ? 1 : 0)) {
5484 IPW_DEBUG_MERGE("Network '%s (" MAC_FMT ")' excluded " 5489 IPW_DEBUG_MERGE("Network '%s (%s)' excluded "
5485 "because of privacy mismatch: %s != %s.\n", 5490 "because of privacy mismatch: %s != %s.\n",
5486 escape_essid(network->ssid, network->ssid_len), 5491 escape_essid(network->ssid, network->ssid_len),
5487 MAC_ARG(network->bssid), 5492 print_mac(mac, network->bssid),
5488 priv-> 5493 priv->
5489 capability & CAP_PRIVACY_ON ? "on" : "off", 5494 capability & CAP_PRIVACY_ON ? "on" : "off",
5490 network-> 5495 network->
@@ -5494,40 +5499,41 @@ static int ipw_find_adhoc_network(struct ipw_priv *priv,
5494 } 5499 }
5495 5500
5496 if (!memcmp(network->bssid, priv->bssid, ETH_ALEN)) { 5501 if (!memcmp(network->bssid, priv->bssid, ETH_ALEN)) {
5497 IPW_DEBUG_MERGE("Network '%s (" MAC_FMT ")' excluded " 5502 IPW_DEBUG_MERGE("Network '%s (%s)' excluded "
5498 "because of the same BSSID match: " MAC_FMT 5503 "because of the same BSSID match: %s"
5499 ".\n", escape_essid(network->ssid, 5504 ".\n", escape_essid(network->ssid,
5500 network->ssid_len), 5505 network->ssid_len),
5501 MAC_ARG(network->bssid), MAC_ARG(priv->bssid)); 5506 print_mac(mac, network->bssid),
5507 print_mac(mac2, priv->bssid));
5502 return 0; 5508 return 0;
5503 } 5509 }
5504 5510
5505 /* Filter out any incompatible freq / mode combinations */ 5511 /* Filter out any incompatible freq / mode combinations */
5506 if (!ieee80211_is_valid_mode(priv->ieee, network->mode)) { 5512 if (!ieee80211_is_valid_mode(priv->ieee, network->mode)) {
5507 IPW_DEBUG_MERGE("Network '%s (" MAC_FMT ")' excluded " 5513 IPW_DEBUG_MERGE("Network '%s (%s)' excluded "
5508 "because of invalid frequency/mode " 5514 "because of invalid frequency/mode "
5509 "combination.\n", 5515 "combination.\n",
5510 escape_essid(network->ssid, network->ssid_len), 5516 escape_essid(network->ssid, network->ssid_len),
5511 MAC_ARG(network->bssid)); 5517 print_mac(mac, network->bssid));
5512 return 0; 5518 return 0;
5513 } 5519 }
5514 5520
5515 /* Ensure that the rates supported by the driver are compatible with 5521 /* Ensure that the rates supported by the driver are compatible with
5516 * this AP, including verification of basic rates (mandatory) */ 5522 * this AP, including verification of basic rates (mandatory) */
5517 if (!ipw_compatible_rates(priv, network, &rates)) { 5523 if (!ipw_compatible_rates(priv, network, &rates)) {
5518 IPW_DEBUG_MERGE("Network '%s (" MAC_FMT ")' excluded " 5524 IPW_DEBUG_MERGE("Network '%s (%s)' excluded "
5519 "because configured rate mask excludes " 5525 "because configured rate mask excludes "
5520 "AP mandatory rate.\n", 5526 "AP mandatory rate.\n",
5521 escape_essid(network->ssid, network->ssid_len), 5527 escape_essid(network->ssid, network->ssid_len),
5522 MAC_ARG(network->bssid)); 5528 print_mac(mac, network->bssid));
5523 return 0; 5529 return 0;
5524 } 5530 }
5525 5531
5526 if (rates.num_rates == 0) { 5532 if (rates.num_rates == 0) {
5527 IPW_DEBUG_MERGE("Network '%s (" MAC_FMT ")' excluded " 5533 IPW_DEBUG_MERGE("Network '%s (%s)' excluded "
5528 "because of no compatible rates.\n", 5534 "because of no compatible rates.\n",
5529 escape_essid(network->ssid, network->ssid_len), 5535 escape_essid(network->ssid, network->ssid_len),
5530 MAC_ARG(network->bssid)); 5536 print_mac(mac, network->bssid));
5531 return 0; 5537 return 0;
5532 } 5538 }
5533 5539
@@ -5538,9 +5544,9 @@ static int ipw_find_adhoc_network(struct ipw_priv *priv,
5538 /* Set up 'new' AP to this network */ 5544 /* Set up 'new' AP to this network */
5539 ipw_copy_rates(&match->rates, &rates); 5545 ipw_copy_rates(&match->rates, &rates);
5540 match->network = network; 5546 match->network = network;
5541 IPW_DEBUG_MERGE("Network '%s (" MAC_FMT ")' is a viable match.\n", 5547 IPW_DEBUG_MERGE("Network '%s (%s)' is a viable match.\n",
5542 escape_essid(network->ssid, network->ssid_len), 5548 escape_essid(network->ssid, network->ssid_len),
5543 MAC_ARG(network->bssid)); 5549 print_mac(mac, network->bssid));
5544 5550
5545 return 1; 5551 return 1;
5546} 5552}
@@ -5594,6 +5600,7 @@ static int ipw_best_network(struct ipw_priv *priv,
5594 struct ieee80211_network *network, int roaming) 5600 struct ieee80211_network *network, int roaming)
5595{ 5601{
5596 struct ipw_supported_rates rates; 5602 struct ipw_supported_rates rates;
5603 DECLARE_MAC_BUF(mac);
5597 5604
5598 /* Verify that this network's capability is compatible with the 5605 /* Verify that this network's capability is compatible with the
5599 * current mode (AdHoc or Infrastructure) */ 5606 * current mode (AdHoc or Infrastructure) */
@@ -5601,20 +5608,20 @@ static int ipw_best_network(struct ipw_priv *priv,
5601 !(network->capability & WLAN_CAPABILITY_ESS)) || 5608 !(network->capability & WLAN_CAPABILITY_ESS)) ||
5602 (priv->ieee->iw_mode == IW_MODE_ADHOC && 5609 (priv->ieee->iw_mode == IW_MODE_ADHOC &&
5603 !(network->capability & WLAN_CAPABILITY_IBSS))) { 5610 !(network->capability & WLAN_CAPABILITY_IBSS))) {
5604 IPW_DEBUG_ASSOC("Network '%s (" MAC_FMT ")' excluded due to " 5611 IPW_DEBUG_ASSOC("Network '%s (%s)' excluded due to "
5605 "capability mismatch.\n", 5612 "capability mismatch.\n",
5606 escape_essid(network->ssid, network->ssid_len), 5613 escape_essid(network->ssid, network->ssid_len),
5607 MAC_ARG(network->bssid)); 5614 print_mac(mac, network->bssid));
5608 return 0; 5615 return 0;
5609 } 5616 }
5610 5617
5611 /* If we do not have an ESSID for this AP, we can not associate with 5618 /* If we do not have an ESSID for this AP, we can not associate with
5612 * it */ 5619 * it */
5613 if (network->flags & NETWORK_EMPTY_ESSID) { 5620 if (network->flags & NETWORK_EMPTY_ESSID) {
5614 IPW_DEBUG_ASSOC("Network '%s (" MAC_FMT ")' excluded " 5621 IPW_DEBUG_ASSOC("Network '%s (%s)' excluded "
5615 "because of hidden ESSID.\n", 5622 "because of hidden ESSID.\n",
5616 escape_essid(network->ssid, network->ssid_len), 5623 escape_essid(network->ssid, network->ssid_len),
5617 MAC_ARG(network->bssid)); 5624 print_mac(mac, network->bssid));
5618 return 0; 5625 return 0;
5619 } 5626 }
5620 5627
@@ -5624,11 +5631,11 @@ static int ipw_best_network(struct ipw_priv *priv,
5624 if ((network->ssid_len != match->network->ssid_len) || 5631 if ((network->ssid_len != match->network->ssid_len) ||
5625 memcmp(network->ssid, match->network->ssid, 5632 memcmp(network->ssid, match->network->ssid,
5626 network->ssid_len)) { 5633 network->ssid_len)) {
5627 IPW_DEBUG_ASSOC("Netowrk '%s (" MAC_FMT ")' excluded " 5634 IPW_DEBUG_ASSOC("Network '%s (%s)' excluded "
5628 "because of non-network ESSID.\n", 5635 "because of non-network ESSID.\n",
5629 escape_essid(network->ssid, 5636 escape_essid(network->ssid,
5630 network->ssid_len), 5637 network->ssid_len),
5631 MAC_ARG(network->bssid)); 5638 print_mac(mac, network->bssid));
5632 return 0; 5639 return 0;
5633 } 5640 }
5634 } else { 5641 } else {
@@ -5642,9 +5649,9 @@ static int ipw_best_network(struct ipw_priv *priv,
5642 strncpy(escaped, 5649 strncpy(escaped,
5643 escape_essid(network->ssid, network->ssid_len), 5650 escape_essid(network->ssid, network->ssid_len),
5644 sizeof(escaped)); 5651 sizeof(escaped));
5645 IPW_DEBUG_ASSOC("Network '%s (" MAC_FMT ")' excluded " 5652 IPW_DEBUG_ASSOC("Network '%s (%s)' excluded "
5646 "because of ESSID mismatch: '%s'.\n", 5653 "because of ESSID mismatch: '%s'.\n",
5647 escaped, MAC_ARG(network->bssid), 5654 escaped, print_mac(mac, network->bssid),
5648 escape_essid(priv->essid, 5655 escape_essid(priv->essid,
5649 priv->essid_len)); 5656 priv->essid_len));
5650 return 0; 5657 return 0;
@@ -5658,12 +5665,12 @@ static int ipw_best_network(struct ipw_priv *priv,
5658 strncpy(escaped, 5665 strncpy(escaped,
5659 escape_essid(network->ssid, network->ssid_len), 5666 escape_essid(network->ssid, network->ssid_len),
5660 sizeof(escaped)); 5667 sizeof(escaped));
5661 IPW_DEBUG_ASSOC("Network '%s (" MAC_FMT ")' excluded because " 5668 IPW_DEBUG_ASSOC("Network '%s (%s)' excluded because "
5662 "'%s (" MAC_FMT ")' has a stronger signal.\n", 5669 "'%s (%s)' has a stronger signal.\n",
5663 escaped, MAC_ARG(network->bssid), 5670 escaped, print_mac(mac, network->bssid),
5664 escape_essid(match->network->ssid, 5671 escape_essid(match->network->ssid,
5665 match->network->ssid_len), 5672 match->network->ssid_len),
5666 MAC_ARG(match->network->bssid)); 5673 print_mac(mac, match->network->bssid));
5667 return 0; 5674 return 0;
5668 } 5675 }
5669 5676
@@ -5671,11 +5678,11 @@ static int ipw_best_network(struct ipw_priv *priv,
5671 * last 3 seconds, do not try and associate again... */ 5678 * last 3 seconds, do not try and associate again... */
5672 if (network->last_associate && 5679 if (network->last_associate &&
5673 time_after(network->last_associate + (HZ * 3UL), jiffies)) { 5680 time_after(network->last_associate + (HZ * 3UL), jiffies)) {
5674 IPW_DEBUG_ASSOC("Network '%s (" MAC_FMT ")' excluded " 5681 IPW_DEBUG_ASSOC("Network '%s (%s)' excluded "
5675 "because of storming (%ums since last " 5682 "because of storming (%ums since last "
5676 "assoc attempt).\n", 5683 "assoc attempt).\n",
5677 escape_essid(network->ssid, network->ssid_len), 5684 escape_essid(network->ssid, network->ssid_len),
5678 MAC_ARG(network->bssid), 5685 print_mac(mac, network->bssid),
5679 jiffies_to_msecs(jiffies - 5686 jiffies_to_msecs(jiffies -
5680 network->last_associate)); 5687 network->last_associate));
5681 return 0; 5688 return 0;
@@ -5684,10 +5691,10 @@ static int ipw_best_network(struct ipw_priv *priv,
5684 /* Now go through and see if the requested network is valid... */ 5691 /* Now go through and see if the requested network is valid... */
5685 if (priv->ieee->scan_age != 0 && 5692 if (priv->ieee->scan_age != 0 &&
5686 time_after(jiffies, network->last_scanned + priv->ieee->scan_age)) { 5693 time_after(jiffies, network->last_scanned + priv->ieee->scan_age)) {
5687 IPW_DEBUG_ASSOC("Network '%s (" MAC_FMT ")' excluded " 5694 IPW_DEBUG_ASSOC("Network '%s (%s)' excluded "
5688 "because of age: %ums.\n", 5695 "because of age: %ums.\n",
5689 escape_essid(network->ssid, network->ssid_len), 5696 escape_essid(network->ssid, network->ssid_len),
5690 MAC_ARG(network->bssid), 5697 print_mac(mac, network->bssid),
5691 jiffies_to_msecs(jiffies - 5698 jiffies_to_msecs(jiffies -
5692 network->last_scanned)); 5699 network->last_scanned));
5693 return 0; 5700 return 0;
@@ -5695,10 +5702,10 @@ static int ipw_best_network(struct ipw_priv *priv,
5695 5702
5696 if ((priv->config & CFG_STATIC_CHANNEL) && 5703 if ((priv->config & CFG_STATIC_CHANNEL) &&
5697 (network->channel != priv->channel)) { 5704 (network->channel != priv->channel)) {
5698 IPW_DEBUG_ASSOC("Network '%s (" MAC_FMT ")' excluded " 5705 IPW_DEBUG_ASSOC("Network '%s (%s)' excluded "
5699 "because of channel mismatch: %d != %d.\n", 5706 "because of channel mismatch: %d != %d.\n",
5700 escape_essid(network->ssid, network->ssid_len), 5707 escape_essid(network->ssid, network->ssid_len),
5701 MAC_ARG(network->bssid), 5708 print_mac(mac, network->bssid),
5702 network->channel, priv->channel); 5709 network->channel, priv->channel);
5703 return 0; 5710 return 0;
5704 } 5711 }
@@ -5706,10 +5713,10 @@ static int ipw_best_network(struct ipw_priv *priv,
5706 /* Verify privacy compatability */ 5713 /* Verify privacy compatability */
5707 if (((priv->capability & CAP_PRIVACY_ON) ? 1 : 0) != 5714 if (((priv->capability & CAP_PRIVACY_ON) ? 1 : 0) !=
5708 ((network->capability & WLAN_CAPABILITY_PRIVACY) ? 1 : 0)) { 5715 ((network->capability & WLAN_CAPABILITY_PRIVACY) ? 1 : 0)) {
5709 IPW_DEBUG_ASSOC("Network '%s (" MAC_FMT ")' excluded " 5716 IPW_DEBUG_ASSOC("Network '%s (%s)' excluded "
5710 "because of privacy mismatch: %s != %s.\n", 5717 "because of privacy mismatch: %s != %s.\n",
5711 escape_essid(network->ssid, network->ssid_len), 5718 escape_essid(network->ssid, network->ssid_len),
5712 MAC_ARG(network->bssid), 5719 print_mac(mac, network->bssid),
5713 priv->capability & CAP_PRIVACY_ON ? "on" : 5720 priv->capability & CAP_PRIVACY_ON ? "on" :
5714 "off", 5721 "off",
5715 network->capability & 5722 network->capability &
@@ -5719,48 +5726,48 @@ static int ipw_best_network(struct ipw_priv *priv,
5719 5726
5720 if ((priv->config & CFG_STATIC_BSSID) && 5727 if ((priv->config & CFG_STATIC_BSSID) &&
5721 memcmp(network->bssid, priv->bssid, ETH_ALEN)) { 5728 memcmp(network->bssid, priv->bssid, ETH_ALEN)) {
5722 IPW_DEBUG_ASSOC("Network '%s (" MAC_FMT ")' excluded " 5729 IPW_DEBUG_ASSOC("Network '%s (%s)' excluded "
5723 "because of BSSID mismatch: " MAC_FMT ".\n", 5730 "because of BSSID mismatch: %s.\n",
5724 escape_essid(network->ssid, network->ssid_len), 5731 escape_essid(network->ssid, network->ssid_len),
5725 MAC_ARG(network->bssid), MAC_ARG(priv->bssid)); 5732 print_mac(mac, network->bssid), print_mac(mac, priv->bssid));
5726 return 0; 5733 return 0;
5727 } 5734 }
5728 5735
5729 /* Filter out any incompatible freq / mode combinations */ 5736 /* Filter out any incompatible freq / mode combinations */
5730 if (!ieee80211_is_valid_mode(priv->ieee, network->mode)) { 5737 if (!ieee80211_is_valid_mode(priv->ieee, network->mode)) {
5731 IPW_DEBUG_ASSOC("Network '%s (" MAC_FMT ")' excluded " 5738 IPW_DEBUG_ASSOC("Network '%s (%s)' excluded "
5732 "because of invalid frequency/mode " 5739 "because of invalid frequency/mode "
5733 "combination.\n", 5740 "combination.\n",
5734 escape_essid(network->ssid, network->ssid_len), 5741 escape_essid(network->ssid, network->ssid_len),
5735 MAC_ARG(network->bssid)); 5742 print_mac(mac, network->bssid));
5736 return 0; 5743 return 0;
5737 } 5744 }
5738 5745
5739 /* Filter out invalid channel in current GEO */ 5746 /* Filter out invalid channel in current GEO */
5740 if (!ieee80211_is_valid_channel(priv->ieee, network->channel)) { 5747 if (!ieee80211_is_valid_channel(priv->ieee, network->channel)) {
5741 IPW_DEBUG_ASSOC("Network '%s (" MAC_FMT ")' excluded " 5748 IPW_DEBUG_ASSOC("Network '%s (%s)' excluded "
5742 "because of invalid channel in current GEO\n", 5749 "because of invalid channel in current GEO\n",
5743 escape_essid(network->ssid, network->ssid_len), 5750 escape_essid(network->ssid, network->ssid_len),
5744 MAC_ARG(network->bssid)); 5751 print_mac(mac, network->bssid));
5745 return 0; 5752 return 0;
5746 } 5753 }
5747 5754
5748 /* Ensure that the rates supported by the driver are compatible with 5755 /* Ensure that the rates supported by the driver are compatible with
5749 * this AP, including verification of basic rates (mandatory) */ 5756 * this AP, including verification of basic rates (mandatory) */
5750 if (!ipw_compatible_rates(priv, network, &rates)) { 5757 if (!ipw_compatible_rates(priv, network, &rates)) {
5751 IPW_DEBUG_ASSOC("Network '%s (" MAC_FMT ")' excluded " 5758 IPW_DEBUG_ASSOC("Network '%s (%s)' excluded "
5752 "because configured rate mask excludes " 5759 "because configured rate mask excludes "
5753 "AP mandatory rate.\n", 5760 "AP mandatory rate.\n",
5754 escape_essid(network->ssid, network->ssid_len), 5761 escape_essid(network->ssid, network->ssid_len),
5755 MAC_ARG(network->bssid)); 5762 print_mac(mac, network->bssid));
5756 return 0; 5763 return 0;
5757 } 5764 }
5758 5765
5759 if (rates.num_rates == 0) { 5766 if (rates.num_rates == 0) {
5760 IPW_DEBUG_ASSOC("Network '%s (" MAC_FMT ")' excluded " 5767 IPW_DEBUG_ASSOC("Network '%s (%s)' excluded "
5761 "because of no compatible rates.\n", 5768 "because of no compatible rates.\n",
5762 escape_essid(network->ssid, network->ssid_len), 5769 escape_essid(network->ssid, network->ssid_len),
5763 MAC_ARG(network->bssid)); 5770 print_mac(mac, network->bssid));
5764 return 0; 5771 return 0;
5765 } 5772 }
5766 5773
@@ -5772,9 +5779,9 @@ static int ipw_best_network(struct ipw_priv *priv,
5772 ipw_copy_rates(&match->rates, &rates); 5779 ipw_copy_rates(&match->rates, &rates);
5773 match->network = network; 5780 match->network = network;
5774 5781
5775 IPW_DEBUG_ASSOC("Network '%s (" MAC_FMT ")' is a viable match.\n", 5782 IPW_DEBUG_ASSOC("Network '%s (%s)' is a viable match.\n",
5776 escape_essid(network->ssid, network->ssid_len), 5783 escape_essid(network->ssid, network->ssid_len),
5777 MAC_ARG(network->bssid)); 5784 print_mac(mac, network->bssid));
5778 5785
5779 return 1; 5786 return 1;
5780} 5787}
@@ -6016,6 +6023,7 @@ static void ipw_bg_adhoc_check(struct work_struct *work)
6016 6023
6017static void ipw_debug_config(struct ipw_priv *priv) 6024static void ipw_debug_config(struct ipw_priv *priv)
6018{ 6025{
6026 DECLARE_MAC_BUF(mac);
6019 IPW_DEBUG_INFO("Scan completed, no valid APs matched " 6027 IPW_DEBUG_INFO("Scan completed, no valid APs matched "
6020 "[CFG 0x%08X]\n", priv->config); 6028 "[CFG 0x%08X]\n", priv->config);
6021 if (priv->config & CFG_STATIC_CHANNEL) 6029 if (priv->config & CFG_STATIC_CHANNEL)
@@ -6028,8 +6036,8 @@ static void ipw_debug_config(struct ipw_priv *priv)
6028 else 6036 else
6029 IPW_DEBUG_INFO("ESSID unlocked.\n"); 6037 IPW_DEBUG_INFO("ESSID unlocked.\n");
6030 if (priv->config & CFG_STATIC_BSSID) 6038 if (priv->config & CFG_STATIC_BSSID)
6031 IPW_DEBUG_INFO("BSSID locked to " MAC_FMT "\n", 6039 IPW_DEBUG_INFO("BSSID locked to %s\n",
6032 MAC_ARG(priv->bssid)); 6040 print_mac(mac, priv->bssid));
6033 else 6041 else
6034 IPW_DEBUG_INFO("BSSID unlocked.\n"); 6042 IPW_DEBUG_INFO("BSSID unlocked.\n");
6035 if (priv->capability & CAP_PRIVACY_ON) 6043 if (priv->capability & CAP_PRIVACY_ON)
@@ -7221,6 +7229,7 @@ static int ipw_associate_network(struct ipw_priv *priv,
7221 struct ipw_supported_rates *rates, int roaming) 7229 struct ipw_supported_rates *rates, int roaming)
7222{ 7230{
7223 int err; 7231 int err;
7232 DECLARE_MAC_BUF(mac);
7224 7233
7225 if (priv->config & CFG_FIXED_RATE) 7234 if (priv->config & CFG_FIXED_RATE)
7226 ipw_set_fixed_rate(priv, network->mode); 7235 ipw_set_fixed_rate(priv, network->mode);
@@ -7388,9 +7397,9 @@ static int ipw_associate_network(struct ipw_priv *priv,
7388 return err; 7397 return err;
7389 } 7398 }
7390 7399
7391 IPW_DEBUG(IPW_DL_STATE, "associating: '%s' " MAC_FMT " \n", 7400 IPW_DEBUG(IPW_DL_STATE, "associating: '%s' %s \n",
7392 escape_essid(priv->essid, priv->essid_len), 7401 escape_essid(priv->essid, priv->essid_len),
7393 MAC_ARG(priv->bssid)); 7402 print_mac(mac, priv->bssid));
7394 7403
7395 return 0; 7404 return 0;
7396} 7405}
@@ -8202,6 +8211,9 @@ static void ipw_rx(struct ipw_priv *priv)
8202 struct ieee80211_hdr_4addr *header; 8211 struct ieee80211_hdr_4addr *header;
8203 u32 r, w, i; 8212 u32 r, w, i;
8204 u8 network_packet; 8213 u8 network_packet;
8214 DECLARE_MAC_BUF(mac);
8215 DECLARE_MAC_BUF(mac2);
8216 DECLARE_MAC_BUF(mac3);
8205 8217
8206 r = ipw_read32(priv, IPW_RX_READ_INDEX); 8218 r = ipw_read32(priv, IPW_RX_READ_INDEX);
8207 w = ipw_read32(priv, IPW_RX_WRITE_INDEX); 8219 w = ipw_read32(priv, IPW_RX_WRITE_INDEX);
@@ -8328,14 +8340,17 @@ static void ipw_rx(struct ipw_priv *priv)
8328 header))) 8340 header)))
8329 { 8341 {
8330 IPW_DEBUG_DROP("Dropping: " 8342 IPW_DEBUG_DROP("Dropping: "
8331 MAC_FMT ", " 8343 "%s, "
8332 MAC_FMT ", " 8344 "%s, "
8333 MAC_FMT "\n", 8345 "%s\n",
8334 MAC_ARG(header-> 8346 print_mac(mac,
8347 header->
8335 addr1), 8348 addr1),
8336 MAC_ARG(header-> 8349 print_mac(mac2,
8350 header->
8337 addr2), 8351 addr2),
8338 MAC_ARG(header-> 8352 print_mac(mac3,
8353 header->
8339 addr3)); 8354 addr3));
8340 break; 8355 break;
8341 } 8356 }
@@ -8867,6 +8882,7 @@ static int ipw_wx_set_wap(struct net_device *dev,
8867 union iwreq_data *wrqu, char *extra) 8882 union iwreq_data *wrqu, char *extra)
8868{ 8883{
8869 struct ipw_priv *priv = ieee80211_priv(dev); 8884 struct ipw_priv *priv = ieee80211_priv(dev);
8885 DECLARE_MAC_BUF(mac);
8870 8886
8871 static const unsigned char any[] = { 8887 static const unsigned char any[] = {
8872 0xff, 0xff, 0xff, 0xff, 0xff, 0xff 8888 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
@@ -8897,8 +8913,8 @@ static int ipw_wx_set_wap(struct net_device *dev,
8897 return 0; 8913 return 0;
8898 } 8914 }
8899 8915
8900 IPW_DEBUG_WX("Setting mandatory BSSID to " MAC_FMT "\n", 8916 IPW_DEBUG_WX("Setting mandatory BSSID to %s\n",
8901 MAC_ARG(wrqu->ap_addr.sa_data)); 8917 print_mac(mac, wrqu->ap_addr.sa_data));
8902 8918
8903 memcpy(priv->bssid, wrqu->ap_addr.sa_data, ETH_ALEN); 8919 memcpy(priv->bssid, wrqu->ap_addr.sa_data, ETH_ALEN);
8904 8920
@@ -8916,6 +8932,8 @@ static int ipw_wx_get_wap(struct net_device *dev,
8916 union iwreq_data *wrqu, char *extra) 8932 union iwreq_data *wrqu, char *extra)
8917{ 8933{
8918 struct ipw_priv *priv = ieee80211_priv(dev); 8934 struct ipw_priv *priv = ieee80211_priv(dev);
8935 DECLARE_MAC_BUF(mac);
8936
8919 /* If we are associated, trying to associate, or have a statically 8937 /* If we are associated, trying to associate, or have a statically
8920 * configured BSSID then return that; otherwise return ANY */ 8938 * configured BSSID then return that; otherwise return ANY */
8921 mutex_lock(&priv->mutex); 8939 mutex_lock(&priv->mutex);
@@ -8926,8 +8944,8 @@ static int ipw_wx_get_wap(struct net_device *dev,
8926 } else 8944 } else
8927 memset(wrqu->ap_addr.sa_data, 0, ETH_ALEN); 8945 memset(wrqu->ap_addr.sa_data, 0, ETH_ALEN);
8928 8946
8929 IPW_DEBUG_WX("Getting WAP BSSID: " MAC_FMT "\n", 8947 IPW_DEBUG_WX("Getting WAP BSSID: %s\n",
8930 MAC_ARG(wrqu->ap_addr.sa_data)); 8948 print_mac(mac, wrqu->ap_addr.sa_data));
8931 mutex_unlock(&priv->mutex); 8949 mutex_unlock(&priv->mutex);
8932 return 0; 8950 return 0;
8933} 8951}
@@ -10133,6 +10151,7 @@ static int ipw_tx_skb(struct ipw_priv *priv, struct ieee80211_txb *txb,
10133 u8 id, hdr_len, unicast; 10151 u8 id, hdr_len, unicast;
10134 u16 remaining_bytes; 10152 u16 remaining_bytes;
10135 int fc; 10153 int fc;
10154 DECLARE_MAC_BUF(mac);
10136 10155
10137 hdr_len = ieee80211_get_hdrlen(le16_to_cpu(hdr->frame_ctl)); 10156 hdr_len = ieee80211_get_hdrlen(le16_to_cpu(hdr->frame_ctl));
10138 switch (priv->ieee->iw_mode) { 10157 switch (priv->ieee->iw_mode) {
@@ -10143,8 +10162,8 @@ static int ipw_tx_skb(struct ipw_priv *priv, struct ieee80211_txb *txb,
10143 id = ipw_add_station(priv, hdr->addr1); 10162 id = ipw_add_station(priv, hdr->addr1);
10144 if (id == IPW_INVALID_STATION) { 10163 if (id == IPW_INVALID_STATION) {
10145 IPW_WARNING("Attempt to send data to " 10164 IPW_WARNING("Attempt to send data to "
10146 "invalid cell: " MAC_FMT "\n", 10165 "invalid cell: %s\n",
10147 MAC_ARG(hdr->addr1)); 10166 print_mac(mac, hdr->addr1));
10148 goto drop; 10167 goto drop;
10149 } 10168 }
10150 } 10169 }
@@ -10460,13 +10479,15 @@ static int ipw_net_set_mac_address(struct net_device *dev, void *p)
10460{ 10479{
10461 struct ipw_priv *priv = ieee80211_priv(dev); 10480 struct ipw_priv *priv = ieee80211_priv(dev);
10462 struct sockaddr *addr = p; 10481 struct sockaddr *addr = p;
10482 DECLARE_MAC_BUF(mac);
10483
10463 if (!is_valid_ether_addr(addr->sa_data)) 10484 if (!is_valid_ether_addr(addr->sa_data))
10464 return -EADDRNOTAVAIL; 10485 return -EADDRNOTAVAIL;
10465 mutex_lock(&priv->mutex); 10486 mutex_lock(&priv->mutex);
10466 priv->config |= CFG_CUSTOM_MAC; 10487 priv->config |= CFG_CUSTOM_MAC;
10467 memcpy(priv->mac_addr, addr->sa_data, ETH_ALEN); 10488 memcpy(priv->mac_addr, addr->sa_data, ETH_ALEN);
10468 printk(KERN_INFO "%s: Setting MAC to " MAC_FMT "\n", 10489 printk(KERN_INFO "%s: Setting MAC to %s\n",
10469 priv->net_dev->name, MAC_ARG(priv->mac_addr)); 10490 priv->net_dev->name, print_mac(mac, priv->mac_addr));
10470 queue_work(priv->workqueue, &priv->adapter_restart); 10491 queue_work(priv->workqueue, &priv->adapter_restart);
10471 mutex_unlock(&priv->mutex); 10492 mutex_unlock(&priv->mutex);
10472 return 0; 10493 return 0;
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945-rs.c b/drivers/net/wireless/iwlwifi/iwl-3945-rs.c
index a4f4c8798a83..b0d28ae0b324 100644
--- a/drivers/net/wireless/iwlwifi/iwl-3945-rs.c
+++ b/drivers/net/wireless/iwlwifi/iwl-3945-rs.c
@@ -646,6 +646,7 @@ static struct ieee80211_rate *rs_get_rate(void *priv_rate,
646 struct sta_info *sta; 646 struct sta_info *sta;
647 u16 fc, rate_mask; 647 u16 fc, rate_mask;
648 struct iwl_priv *priv = (struct iwl_priv *)priv_rate; 648 struct iwl_priv *priv = (struct iwl_priv *)priv_rate;
649 DECLARE_MAC_BUF(mac);
649 650
650 IWL_DEBUG_RATE("enter\n"); 651 IWL_DEBUG_RATE("enter\n");
651 652
@@ -681,8 +682,8 @@ static struct ieee80211_rate *rs_get_rate(void *priv_rate,
681 u8 sta_id = iwl_hw_find_station(priv, hdr->addr1); 682 u8 sta_id = iwl_hw_find_station(priv, hdr->addr1);
682 683
683 if (sta_id == IWL_INVALID_STATION) { 684 if (sta_id == IWL_INVALID_STATION) {
684 IWL_DEBUG_RATE("LQ: ADD station " MAC_FMT "\n", 685 IWL_DEBUG_RATE("LQ: ADD station %s\n",
685 MAC_ARG(hdr->addr1)); 686 print_mac(mac, hdr->addr1));
686 sta_id = iwl_add_station(priv, 687 sta_id = iwl_add_station(priv,
687 hdr->addr1, 0, CMD_ASYNC); 688 hdr->addr1, 0, CMD_ASYNC);
688 } 689 }
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.c b/drivers/net/wireless/iwlwifi/iwl-3945.c
index 26f03a0b878d..55f7d89aad8d 100644
--- a/drivers/net/wireless/iwlwifi/iwl-3945.c
+++ b/drivers/net/wireless/iwlwifi/iwl-3945.c
@@ -457,13 +457,16 @@ static void iwl3945_rx_reply_rx(struct iwl_priv *priv,
457 } 457 }
458 458
459 case IEEE80211_STYPE_PROBE_REQ:{ 459 case IEEE80211_STYPE_PROBE_REQ:{
460 DECLARE_MAC_BUF(mac1);
461 DECLARE_MAC_BUF(mac2);
462 DECLARE_MAC_BUF(mac3);
460 if (priv->iw_mode == IEEE80211_IF_TYPE_IBSS) 463 if (priv->iw_mode == IEEE80211_IF_TYPE_IBSS)
461 IWL_DEBUG_DROP 464 IWL_DEBUG_DROP
462 ("Dropping (non network): " MAC_FMT 465 ("Dropping (non network): %s"
463 ", " MAC_FMT ", " MAC_FMT "\n", 466 ", %s, %s\n",
464 MAC_ARG(header->addr1), 467 print_mac(mac1, header->addr1),
465 MAC_ARG(header->addr2), 468 print_mac(mac2, header->addr2),
466 MAC_ARG(header->addr3)); 469 print_mac(mac3, header->addr3));
467 return; 470 return;
468 } 471 }
469 } 472 }
@@ -474,18 +477,22 @@ static void iwl3945_rx_reply_rx(struct iwl_priv *priv,
474 case IEEE80211_FTYPE_CTL: 477 case IEEE80211_FTYPE_CTL:
475 break; 478 break;
476 479
477 case IEEE80211_FTYPE_DATA: 480 case IEEE80211_FTYPE_DATA: {
481 DECLARE_MAC_BUF(mac1);
482 DECLARE_MAC_BUF(mac2);
483 DECLARE_MAC_BUF(mac3);
484
478 if (unlikely(is_duplicate_packet(priv, header))) 485 if (unlikely(is_duplicate_packet(priv, header)))
479 IWL_DEBUG_DROP("Dropping (dup): " MAC_FMT ", " 486 IWL_DEBUG_DROP("Dropping (dup): %s, %s, %s\n",
480 MAC_FMT ", " MAC_FMT "\n", 487 print_mac(mac1, header->addr1),
481 MAC_ARG(header->addr1), 488 print_mac(mac2, header->addr2),
482 MAC_ARG(header->addr2), 489 print_mac(mac3, header->addr3));
483 MAC_ARG(header->addr3));
484 else 490 else
485 iwl3945_handle_data_packet(priv, 1, rxb, &stats, 491 iwl3945_handle_data_packet(priv, 1, rxb, &stats,
486 phy_flags); 492 phy_flags);
487 break; 493 break;
488 } 494 }
495 }
489} 496}
490 497
491int iwl_hw_txq_attach_buf_to_tfd(struct iwl_priv *priv, void *ptr, 498int iwl_hw_txq_attach_buf_to_tfd(struct iwl_priv *priv, void *ptr,
@@ -563,6 +570,7 @@ u8 iwl_hw_find_station(struct iwl_priv *priv, const u8 *addr)
563 int i; 570 int i;
564 int ret = IWL_INVALID_STATION; 571 int ret = IWL_INVALID_STATION;
565 unsigned long flags; 572 unsigned long flags;
573 DECLARE_MAC_BUF(mac);
566 574
567 spin_lock_irqsave(&priv->sta_lock, flags); 575 spin_lock_irqsave(&priv->sta_lock, flags);
568 for (i = IWL_STA_ID; i < priv->hw_setting.max_stations; i++) 576 for (i = IWL_STA_ID; i < priv->hw_setting.max_stations; i++)
@@ -573,8 +581,8 @@ u8 iwl_hw_find_station(struct iwl_priv *priv, const u8 *addr)
573 goto out; 581 goto out;
574 } 582 }
575 583
576 IWL_DEBUG_INFO("can not find STA " MAC_FMT " (total %d)\n", 584 IWL_DEBUG_INFO("can not find STA %s (total %d)\n",
577 MAC_ARG(addr), priv->num_stations); 585 print_mac(mac, addr), priv->num_stations);
578 out: 586 out:
579 spin_unlock_irqrestore(&priv->sta_lock, flags); 587 spin_unlock_irqrestore(&priv->sta_lock, flags);
580 return ret; 588 return ret;
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965-rs.c b/drivers/net/wireless/iwlwifi/iwl-4965-rs.c
index f3638607d641..7b74481f5282 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965-rs.c
+++ b/drivers/net/wireless/iwlwifi/iwl-4965-rs.c
@@ -1737,10 +1737,11 @@ static struct ieee80211_rate *rs_get_rate(void *priv_rate,
1737 1737
1738 if ((priv->iw_mode == IEEE80211_IF_TYPE_IBSS) && !lq->ibss_sta_added) { 1738 if ((priv->iw_mode == IEEE80211_IF_TYPE_IBSS) && !lq->ibss_sta_added) {
1739 u8 sta_id = iwl_hw_find_station(priv, hdr->addr1); 1739 u8 sta_id = iwl_hw_find_station(priv, hdr->addr1);
1740 DECLARE_MAC_BUF(mac);
1740 1741
1741 if (sta_id == IWL_INVALID_STATION) { 1742 if (sta_id == IWL_INVALID_STATION) {
1742 IWL_DEBUG_RATE("LQ: ADD station " MAC_FMT "\n", 1743 IWL_DEBUG_RATE("LQ: ADD station %s\n",
1743 MAC_ARG(hdr->addr1)); 1744 print_mac(mac, hdr->addr1));
1744 sta_id = iwl_add_station(priv, 1745 sta_id = iwl_add_station(priv,
1745 hdr->addr1, 0, CMD_ASYNC); 1746 hdr->addr1, 0, CMD_ASYNC);
1746 } 1747 }
@@ -1811,14 +1812,16 @@ static void rs_rate_init(void *priv_rate, void *priv_sta,
1811 crl->ibss_sta_added = 0; 1812 crl->ibss_sta_added = 0;
1812 if (priv->iw_mode == IEEE80211_IF_TYPE_AP) { 1813 if (priv->iw_mode == IEEE80211_IF_TYPE_AP) {
1813 u8 sta_id = iwl_hw_find_station(priv, sta->addr); 1814 u8 sta_id = iwl_hw_find_station(priv, sta->addr);
1815 DECLARE_MAC_BUF(mac);
1816
1814 /* for IBSS the call are from tasklet */ 1817 /* for IBSS the call are from tasklet */
1815 IWL_DEBUG_HT("LQ: ADD station " MAC_FMT " \n", 1818 IWL_DEBUG_HT("LQ: ADD station %s\n",
1816 MAC_ARG(sta->addr)); 1819 print_mac(mac, sta->addr));
1817 1820
1818 if (sta_id == IWL_INVALID_STATION) { 1821 if (sta_id == IWL_INVALID_STATION) {
1819 IWL_DEBUG_RATE("LQ: ADD station " MAC_FMT "\n", 1822 IWL_DEBUG_RATE("LQ: ADD station %s\n",
1820 MAC_ARG(sta->addr)); 1823 print_mac(mac, sta->addr));
1821 sta_id = iwl_add_station(priv, 1824 sta_id = iwl_add_station(priv,
1822 sta->addr, 0, CMD_ASYNC); 1825 sta->addr, 0, CMD_ASYNC);
1823 } 1826 }
1824 if ((sta_id != IWL_INVALID_STATION)) { 1827 if ((sta_id != IWL_INVALID_STATION)) {
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c
index ba35b3ac7c7e..e624f2a41e0e 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965.c
+++ b/drivers/net/wireless/iwlwifi/iwl-4965.c
@@ -164,6 +164,7 @@ u8 iwl_hw_find_station(struct iwl_priv *priv, const u8 *addr)
164 int start = 0; 164 int start = 0;
165 int ret = IWL_INVALID_STATION; 165 int ret = IWL_INVALID_STATION;
166 unsigned long flags; 166 unsigned long flags;
167 DECLARE_MAC_BUF(mac);
167 168
168 if ((priv->iw_mode == IEEE80211_IF_TYPE_IBSS) || 169 if ((priv->iw_mode == IEEE80211_IF_TYPE_IBSS) ||
169 (priv->iw_mode == IEEE80211_IF_TYPE_AP)) 170 (priv->iw_mode == IEEE80211_IF_TYPE_AP))
@@ -181,8 +182,8 @@ u8 iwl_hw_find_station(struct iwl_priv *priv, const u8 *addr)
181 goto out; 182 goto out;
182 } 183 }
183 184
184 IWL_DEBUG_ASSOC("can not find STA " MAC_FMT " total %d\n", 185 IWL_DEBUG_ASSOC("can not find STA %s total %d\n",
185 MAC_ARG(addr), priv->num_stations); 186 print_mac(mac, addr), priv->num_stations);
186 187
187 out: 188 out:
188 spin_unlock_irqrestore(&priv->sta_lock, flags); 189 spin_unlock_irqrestore(&priv->sta_lock, flags);
@@ -3909,12 +3910,15 @@ static void iwl4965_rx_reply_rx(struct iwl_priv *priv,
3909 case IEEE80211_STYPE_PROBE_REQ: 3910 case IEEE80211_STYPE_PROBE_REQ:
3910 if ((priv->iw_mode == IEEE80211_IF_TYPE_IBSS) && 3911 if ((priv->iw_mode == IEEE80211_IF_TYPE_IBSS) &&
3911 !iwl_is_associated(priv)) { 3912 !iwl_is_associated(priv)) {
3913 DECLARE_MAC_BUF(mac1);
3914 DECLARE_MAC_BUF(mac2);
3915 DECLARE_MAC_BUF(mac3);
3916
3912 IWL_DEBUG_DROP("Dropping (non network): " 3917 IWL_DEBUG_DROP("Dropping (non network): "
3913 MAC_FMT ", " MAC_FMT ", " 3918 "%s, %s, %s\n",
3914 MAC_FMT "\n", 3919 print_mac(mac1, header->addr1),
3915 MAC_ARG(header->addr1), 3920 print_mac(mac2, header->addr2),
3916 MAC_ARG(header->addr2), 3921 print_mac(mac3, header->addr3));
3917 MAC_ARG(header->addr3));
3918 return; 3922 return;
3919 } 3923 }
3920 } 3924 }
@@ -3936,28 +3940,31 @@ static void iwl4965_rx_reply_rx(struct iwl_priv *priv,
3936 3940
3937 break; 3941 break;
3938 3942
3939 case IEEE80211_FTYPE_DATA: 3943 case IEEE80211_FTYPE_DATA: {
3944 DECLARE_MAC_BUF(mac1);
3945 DECLARE_MAC_BUF(mac2);
3946 DECLARE_MAC_BUF(mac3);
3947
3940 if (priv->iw_mode == IEEE80211_IF_TYPE_AP) 3948 if (priv->iw_mode == IEEE80211_IF_TYPE_AP)
3941 iwl4965_update_ps_mode(priv, fc & IEEE80211_FCTL_PM, 3949 iwl4965_update_ps_mode(priv, fc & IEEE80211_FCTL_PM,
3942 header->addr2); 3950 header->addr2);
3943 3951
3944 if (unlikely(!network_packet)) 3952 if (unlikely(!network_packet))
3945 IWL_DEBUG_DROP("Dropping (non network): " 3953 IWL_DEBUG_DROP("Dropping (non network): "
3946 MAC_FMT ", " MAC_FMT ", " 3954 "%s, %s, %s\n",
3947 MAC_FMT "\n", 3955 print_mac(mac1, header->addr1),
3948 MAC_ARG(header->addr1), 3956 print_mac(mac2, header->addr2),
3949 MAC_ARG(header->addr2), 3957 print_mac(mac3, header->addr3));
3950 MAC_ARG(header->addr3));
3951 else if (unlikely(is_duplicate_packet(priv, header))) 3958 else if (unlikely(is_duplicate_packet(priv, header)))
3952 IWL_DEBUG_DROP("Dropping (dup): " MAC_FMT ", " 3959 IWL_DEBUG_DROP("Dropping (dup): %s, %s, %s\n",
3953 MAC_FMT ", " MAC_FMT "\n", 3960 print_mac(mac1, header->addr1),
3954 MAC_ARG(header->addr1), 3961 print_mac(mac2, header->addr2),
3955 MAC_ARG(header->addr2), 3962 print_mac(mac3, header->addr3));
3956 MAC_ARG(header->addr3));
3957 else 3963 else
3958 iwl4965_handle_data_packet(priv, 1, include_phy, rxb, 3964 iwl4965_handle_data_packet(priv, 1, include_phy, rxb,
3959 &stats); 3965 &stats);
3960 break; 3966 break;
3967 }
3961 default: 3968 default:
3962 break; 3969 break;
3963 3970
@@ -4106,10 +4113,12 @@ static void iwl4965_rx_reply_compressed_ba(struct iwl_priv *priv,
4106 4113
4107 /* TODO: Need to get this copy more sefely - now good for debug */ 4114 /* TODO: Need to get this copy more sefely - now good for debug */
4108/* 4115/*
4109 IWL_DEBUG_TX_REPLY("REPLY_COMPRESSED_BA [%d]Received from " MAC_FMT ", 4116 {
4110 sta_id = %d\n", 4117 DECLARE_MAC_BUF(mac);
4118 IWL_DEBUG_TX_REPLY("REPLY_COMPRESSED_BA [%d]Received from %s, "
4119 "sta_id = %d\n",
4111 agg->wait_for_ba, 4120 agg->wait_for_ba,
4112 MAC_ARG((u8*) &ba_resp->sta_addr_lo32), 4121 print_mac(mac, (u8*) &ba_resp->sta_addr_lo32),
4113 ba_resp->sta_id); 4122 ba_resp->sta_id);
4114 IWL_DEBUG_TX_REPLY("TID = %d, SeqCtl = %d, bitmap = 0x%X%X, scd_flow = " 4123 IWL_DEBUG_TX_REPLY("TID = %d, SeqCtl = %d, bitmap = 0x%X%X, scd_flow = "
4115 "%d, scd_ssn = %d\n", 4124 "%d, scd_ssn = %d\n",
@@ -4123,6 +4132,7 @@ static void iwl4965_rx_reply_compressed_ba(struct iwl_priv *priv,
4123 agg->start_idx, 4132 agg->start_idx,
4124 agg->bitmap1, 4133 agg->bitmap1,
4125 agg->bitmap0); 4134 agg->bitmap0);
4135 }
4126*/ 4136*/
4127 iwl4965_tx_status_reply_compressed_ba(priv, agg, ba_resp); 4137 iwl4965_tx_status_reply_compressed_ba(priv, agg, ba_resp);
4128 /* releases all the TFDs until the SSN */ 4138 /* releases all the TFDs until the SSN */
@@ -4539,14 +4549,15 @@ int iwl_mac_ht_tx_agg_start(struct ieee80211_hw *hw, u8 *da, u16 tid,
4539 int ssn = -1; 4549 int ssn = -1;
4540 unsigned long flags; 4550 unsigned long flags;
4541 struct iwl_tid_data *tid_data; 4551 struct iwl_tid_data *tid_data;
4552 DECLARE_MAC_BUF(mac);
4542 4553
4543 if (likely(tid < ARRAY_SIZE(default_tid_to_tx_fifo))) 4554 if (likely(tid < ARRAY_SIZE(default_tid_to_tx_fifo)))
4544 tx_fifo = default_tid_to_tx_fifo[tid]; 4555 tx_fifo = default_tid_to_tx_fifo[tid];
4545 else 4556 else
4546 return -EINVAL; 4557 return -EINVAL;
4547 4558
4548 IWL_WARNING("iwl-AGG iwl_mac_ht_tx_agg_start on da=" MAC_FMT 4559 IWL_WARNING("iwl-AGG iwl_mac_ht_tx_agg_start on da=%s"
4549 " tid=%d\n", MAC_ARG(da), tid); 4560 " tid=%d\n", print_mac(mac, da), tid);
4550 4561
4551 sta_id = iwl_hw_find_station(priv, da); 4562 sta_id = iwl_hw_find_station(priv, da);
4552 if (sta_id == IWL_INVALID_STATION) 4563 if (sta_id == IWL_INVALID_STATION)
@@ -4577,6 +4588,8 @@ int iwl_mac_ht_tx_agg_stop(struct ieee80211_hw *hw, u8 *da, u16 tid,
4577 int tx_fifo_id, txq_id, sta_id, ssn = -1; 4588 int tx_fifo_id, txq_id, sta_id, ssn = -1;
4578 struct iwl_tid_data *tid_data; 4589 struct iwl_tid_data *tid_data;
4579 int rc; 4590 int rc;
4591 DECLARE_MAC_BUF(mac);
4592
4580 if (!da) { 4593 if (!da) {
4581 IWL_ERROR("%s: da = NULL\n", __func__); 4594 IWL_ERROR("%s: da = NULL\n", __func__);
4582 return -EINVAL; 4595 return -EINVAL;
@@ -4602,8 +4615,8 @@ int iwl_mac_ht_tx_agg_stop(struct ieee80211_hw *hw, u8 *da, u16 tid,
4602 return rc; 4615 return rc;
4603 4616
4604 iwl4965_ba_status(priv, tid, BA_STATUS_INITIATOR_DELBA); 4617 iwl4965_ba_status(priv, tid, BA_STATUS_INITIATOR_DELBA);
4605 IWL_DEBUG_INFO("iwl_mac_ht_tx_agg_stop on da=" MAC_FMT " tid=%d\n", 4618 IWL_DEBUG_INFO("iwl_mac_ht_tx_agg_stop on da=%s tid=%d\n",
4606 MAC_ARG(da), tid); 4619 print_mac(mac, da), tid);
4607 4620
4608 return 0; 4621 return 0;
4609} 4622}
@@ -4613,9 +4626,10 @@ int iwl_mac_ht_rx_agg_start(struct ieee80211_hw *hw, u8 *da,
4613{ 4626{
4614 struct iwl_priv *priv = hw->priv; 4627 struct iwl_priv *priv = hw->priv;
4615 int sta_id; 4628 int sta_id;
4629 DECLARE_MAC_BUF(mac);
4616 4630
4617 IWL_WARNING("iwl-AGG iwl_mac_ht_rx_agg_start on da=" MAC_FMT 4631 IWL_WARNING("iwl-AGG iwl_mac_ht_rx_agg_start on da=%s"
4618 " tid=%d\n", MAC_ARG(da), tid); 4632 " tid=%d\n", print_mac(mac, da), tid);
4619 sta_id = iwl_hw_find_station(priv, da); 4633 sta_id = iwl_hw_find_station(priv, da);
4620 iwl4965_sta_modify_add_ba_tid(priv, sta_id, tid, start_seq_num); 4634 iwl4965_sta_modify_add_ba_tid(priv, sta_id, tid, start_seq_num);
4621 return 0; 4635 return 0;
@@ -4626,9 +4640,10 @@ int iwl_mac_ht_rx_agg_stop(struct ieee80211_hw *hw, u8 *da,
4626{ 4640{
4627 struct iwl_priv *priv = hw->priv; 4641 struct iwl_priv *priv = hw->priv;
4628 int sta_id; 4642 int sta_id;
4643 DECLARE_MAC_BUF(mac);
4629 4644
4630 IWL_WARNING("iwl-AGG iwl_mac_ht_rx_agg_stop on da=" MAC_FMT " tid=%d\n", 4645 IWL_WARNING("iwl-AGG iwl_mac_ht_rx_agg_stop on da=%s tid=%d\n",
4631 MAC_ARG(da), tid); 4646 print_mac(mac, da), tid);
4632 sta_id = iwl_hw_find_station(priv, da); 4647 sta_id = iwl_hw_find_station(priv, da);
4633 iwl4965_sta_modify_del_ba_tid(priv, sta_id, tid); 4648 iwl4965_sta_modify_del_ba_tid(priv, sta_id, tid);
4634 return 0; 4649 return 0;
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index 474b6402040c..cc405f4a8647 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -460,6 +460,7 @@ u8 iwl_add_station(struct iwl_priv *priv, const u8 *addr, int is_ap, u8 flags)
460 int index = IWL_INVALID_STATION; 460 int index = IWL_INVALID_STATION;
461 struct iwl_station_entry *station; 461 struct iwl_station_entry *station;
462 unsigned long flags_spin; 462 unsigned long flags_spin;
463 DECLARE_MAC_BUF(mac);
463 464
464 spin_lock_irqsave(&priv->sta_lock, flags_spin); 465 spin_lock_irqsave(&priv->sta_lock, flags_spin);
465 if (is_ap) 466 if (is_ap)
@@ -492,7 +493,7 @@ u8 iwl_add_station(struct iwl_priv *priv, const u8 *addr, int is_ap, u8 flags)
492 return index; 493 return index;
493 } 494 }
494 495
495 IWL_DEBUG_ASSOC("Add STA ID %d: " MAC_FMT "\n", index, MAC_ARG(addr)); 496 IWL_DEBUG_ASSOC("Add STA ID %d: %s\n", index, print_mac(mac, addr));
496 station = &priv->stations[index]; 497 station = &priv->stations[index];
497 station->used = 1; 498 station->used = 1;
498 priv->num_stations++; 499 priv->num_stations++;
@@ -1064,6 +1065,7 @@ static int iwl_commit_rxon(struct iwl_priv *priv)
1064 /* cast away the const for active_rxon in this function */ 1065 /* cast away the const for active_rxon in this function */
1065 struct iwl_rxon_cmd *active_rxon = (void *)&priv->active_rxon; 1066 struct iwl_rxon_cmd *active_rxon = (void *)&priv->active_rxon;
1066 int rc = 0; 1067 int rc = 0;
1068 DECLARE_MAC_BUF(mac);
1067 1069
1068 if (!iwl_is_alive(priv)) 1070 if (!iwl_is_alive(priv))
1069 return -1; 1071 return -1;
@@ -1134,11 +1136,11 @@ static int iwl_commit_rxon(struct iwl_priv *priv)
1134 IWL_DEBUG_INFO("Sending RXON\n" 1136 IWL_DEBUG_INFO("Sending RXON\n"
1135 "* with%s RXON_FILTER_ASSOC_MSK\n" 1137 "* with%s RXON_FILTER_ASSOC_MSK\n"
1136 "* channel = %d\n" 1138 "* channel = %d\n"
1137 "* bssid = " MAC_FMT "\n", 1139 "* bssid = %s\n",
1138 ((priv->staging_rxon.filter_flags & 1140 ((priv->staging_rxon.filter_flags &
1139 RXON_FILTER_ASSOC_MSK) ? "" : "out"), 1141 RXON_FILTER_ASSOC_MSK) ? "" : "out"),
1140 le16_to_cpu(priv->staging_rxon.channel), 1142 le16_to_cpu(priv->staging_rxon.channel),
1141 MAC_ARG(priv->staging_rxon.bssid_addr)); 1143 print_mac(mac, priv->staging_rxon.bssid_addr));
1142 1144
1143 /* Apply the new configuration */ 1145 /* Apply the new configuration */
1144 rc = iwl_send_cmd_pdu(priv, REPLY_RXON, 1146 rc = iwl_send_cmd_pdu(priv, REPLY_RXON,
@@ -2693,7 +2695,9 @@ static int iwl_get_sta_id(struct iwl_priv *priv, struct ieee80211_hdr *hdr)
2693 2695
2694 /* If this frame is part of a IBSS network, then we use the 2696 /* If this frame is part of a IBSS network, then we use the
2695 * target specific station id */ 2697 * target specific station id */
2696 case IEEE80211_IF_TYPE_IBSS: 2698 case IEEE80211_IF_TYPE_IBSS: {
2699 DECLARE_MAC_BUF(mac);
2700
2697 sta_id = iwl_hw_find_station(priv, hdr->addr1); 2701 sta_id = iwl_hw_find_station(priv, hdr->addr1);
2698 if (sta_id != IWL_INVALID_STATION) 2702 if (sta_id != IWL_INVALID_STATION)
2699 return sta_id; 2703 return sta_id;
@@ -2703,12 +2707,12 @@ static int iwl_get_sta_id(struct iwl_priv *priv, struct ieee80211_hdr *hdr)
2703 if (sta_id != IWL_INVALID_STATION) 2707 if (sta_id != IWL_INVALID_STATION)
2704 return sta_id; 2708 return sta_id;
2705 2709
2706 IWL_DEBUG_DROP("Station " MAC_FMT " not in station map. " 2710 IWL_DEBUG_DROP("Station %s not in station map. "
2707 "Defaulting to broadcast...\n", 2711 "Defaulting to broadcast...\n",
2708 MAC_ARG(hdr->addr1)); 2712 print_mac(mac, hdr->addr1));
2709 iwl_print_hex_dump(IWL_DL_DROP, (u8 *) hdr, sizeof(*hdr)); 2713 iwl_print_hex_dump(IWL_DL_DROP, (u8 *) hdr, sizeof(*hdr));
2710 return priv->hw_setting.bcast_sta_id; 2714 return priv->hw_setting.bcast_sta_id;
2711 2715 }
2712 default: 2716 default:
2713 IWL_WARNING("Unkown mode of operation: %d", priv->iw_mode); 2717 IWL_WARNING("Unkown mode of operation: %d", priv->iw_mode);
2714 return priv->hw_setting.bcast_sta_id; 2718 return priv->hw_setting.bcast_sta_id;
@@ -2781,8 +2785,10 @@ static int iwl_tx_skb(struct iwl_priv *priv,
2781 hdr_len = ieee80211_get_hdrlen(fc); 2785 hdr_len = ieee80211_get_hdrlen(fc);
2782 sta_id = iwl_get_sta_id(priv, hdr); 2786 sta_id = iwl_get_sta_id(priv, hdr);
2783 if (sta_id == IWL_INVALID_STATION) { 2787 if (sta_id == IWL_INVALID_STATION) {
2784 IWL_DEBUG_DROP("Dropping - INVALID STATION: " MAC_FMT "\n", 2788 DECLARE_MAC_BUF(mac);
2785 MAC_ARG(hdr->addr1)); 2789
2790 IWL_DEBUG_DROP("Dropping - INVALID STATION: %s\n",
2791 print_mac(mac, hdr->addr1));
2786 goto drop; 2792 goto drop;
2787 } 2793 }
2788 2794
@@ -4385,6 +4391,8 @@ int iwl_tx_queue_update_write_ptr(struct iwl_priv *priv,
4385#ifdef CONFIG_IWLWIFI_DEBUG 4391#ifdef CONFIG_IWLWIFI_DEBUG
4386static void iwl_print_rx_config_cmd(struct iwl_rxon_cmd *rxon) 4392static void iwl_print_rx_config_cmd(struct iwl_rxon_cmd *rxon)
4387{ 4393{
4394 DECLARE_MAC_BUF(mac);
4395
4388 IWL_DEBUG_RADIO("RX CONFIG:\n"); 4396 IWL_DEBUG_RADIO("RX CONFIG:\n");
4389 iwl_print_hex_dump(IWL_DL_RADIO, (u8 *) rxon, sizeof(*rxon)); 4397 iwl_print_hex_dump(IWL_DL_RADIO, (u8 *) rxon, sizeof(*rxon));
4390 IWL_DEBUG_RADIO("u16 channel: 0x%x\n", le16_to_cpu(rxon->channel)); 4398 IWL_DEBUG_RADIO("u16 channel: 0x%x\n", le16_to_cpu(rxon->channel));
@@ -4395,10 +4403,10 @@ static void iwl_print_rx_config_cmd(struct iwl_rxon_cmd *rxon)
4395 IWL_DEBUG_RADIO("u8 ofdm_basic_rates: 0x%02x\n", 4403 IWL_DEBUG_RADIO("u8 ofdm_basic_rates: 0x%02x\n",
4396 rxon->ofdm_basic_rates); 4404 rxon->ofdm_basic_rates);
4397 IWL_DEBUG_RADIO("u8 cck_basic_rates: 0x%02x\n", rxon->cck_basic_rates); 4405 IWL_DEBUG_RADIO("u8 cck_basic_rates: 0x%02x\n", rxon->cck_basic_rates);
4398 IWL_DEBUG_RADIO("u8[6] node_addr: " MAC_FMT "\n", 4406 IWL_DEBUG_RADIO("u8[6] node_addr: %s\n",
4399 MAC_ARG(rxon->node_addr)); 4407 print_mac(mac, rxon->node_addr));
4400 IWL_DEBUG_RADIO("u8[6] bssid_addr: " MAC_FMT "\n", 4408 IWL_DEBUG_RADIO("u8[6] bssid_addr: %s\n",
4401 MAC_ARG(rxon->bssid_addr)); 4409 print_mac(mac, rxon->bssid_addr));
4402 IWL_DEBUG_RADIO("u16 assoc_id: 0x%x\n", le16_to_cpu(rxon->assoc_id)); 4410 IWL_DEBUG_RADIO("u16 assoc_id: 0x%x\n", le16_to_cpu(rxon->assoc_id));
4403} 4411}
4404#endif 4412#endif
@@ -6322,6 +6330,7 @@ static void iwl_down(struct iwl_priv *priv)
6322 6330
6323static int __iwl_up(struct iwl_priv *priv) 6331static int __iwl_up(struct iwl_priv *priv)
6324{ 6332{
6333 DECLARE_MAC_BUF(mac);
6325 int rc, i; 6334 int rc, i;
6326 6335
6327 if (test_bit(STATUS_EXIT_PENDING, &priv->status)) { 6336 if (test_bit(STATUS_EXIT_PENDING, &priv->status)) {
@@ -6381,8 +6390,8 @@ static int __iwl_up(struct iwl_priv *priv)
6381 6390
6382 /* MAC Address location in EEPROM same for 3945/4965 */ 6391 /* MAC Address location in EEPROM same for 3945/4965 */
6383 get_eeprom_mac(priv, priv->mac_addr); 6392 get_eeprom_mac(priv, priv->mac_addr);
6384 IWL_DEBUG_INFO("MAC address: " MAC_FMT "\n", 6393 IWL_DEBUG_INFO("MAC address: %s\n",
6385 MAC_ARG(priv->mac_addr)); 6394 print_mac(mac, priv->mac_addr));
6386 6395
6387 SET_IEEE80211_PERM_ADDR(priv->hw, priv->mac_addr); 6396 SET_IEEE80211_PERM_ADDR(priv->hw, priv->mac_addr);
6388 6397
@@ -6728,6 +6737,7 @@ static void iwl_bg_post_associate(struct work_struct *data)
6728 6737
6729 int rc = 0; 6738 int rc = 0;
6730 struct ieee80211_conf *conf = NULL; 6739 struct ieee80211_conf *conf = NULL;
6740 DECLARE_MAC_BUF(mac);
6731 6741
6732 if (priv->iw_mode == IEEE80211_IF_TYPE_AP) { 6742 if (priv->iw_mode == IEEE80211_IF_TYPE_AP) {
6733 IWL_ERROR("%s Should not be called in AP mode\n", __FUNCTION__); 6743 IWL_ERROR("%s Should not be called in AP mode\n", __FUNCTION__);
@@ -6735,8 +6745,9 @@ static void iwl_bg_post_associate(struct work_struct *data)
6735 } 6745 }
6736 6746
6737 6747
6738 IWL_DEBUG_ASSOC("Associated as %d to: " MAC_FMT "\n", 6748 IWL_DEBUG_ASSOC("Associated as %d to: %s\n",
6739 priv->assoc_id, MAC_ARG(priv->active_rxon.bssid_addr)); 6749 priv->assoc_id,
6750 print_mac(mac, priv->active_rxon.bssid_addr));
6740 6751
6741 if (test_bit(STATUS_EXIT_PENDING, &priv->status)) 6752 if (test_bit(STATUS_EXIT_PENDING, &priv->status))
6742 return; 6753 return;
@@ -6916,11 +6927,12 @@ static int iwl_mac_add_interface(struct ieee80211_hw *hw,
6916{ 6927{
6917 struct iwl_priv *priv = hw->priv; 6928 struct iwl_priv *priv = hw->priv;
6918 unsigned long flags; 6929 unsigned long flags;
6930 DECLARE_MAC_BUF(mac);
6919 6931
6920 IWL_DEBUG_MAC80211("enter: id %d, type %d\n", conf->if_id, conf->type); 6932 IWL_DEBUG_MAC80211("enter: id %d, type %d\n", conf->if_id, conf->type);
6921 if (conf->mac_addr) 6933 if (conf->mac_addr)
6922 IWL_DEBUG_MAC80211("enter: MAC " MAC_FMT "\n", 6934 IWL_DEBUG_MAC80211("enter: MAC %s\n",
6923 MAC_ARG(conf->mac_addr)); 6935 print_mac(mac, conf->mac_addr));
6924 6936
6925 if (priv->interface_id) { 6937 if (priv->interface_id) {
6926 IWL_DEBUG_MAC80211("leave - interface_id != 0\n"); 6938 IWL_DEBUG_MAC80211("leave - interface_id != 0\n");
@@ -7094,6 +7106,7 @@ static int iwl_mac_config_interface(struct ieee80211_hw *hw, int if_id,
7094 struct ieee80211_if_conf *conf) 7106 struct ieee80211_if_conf *conf)
7095{ 7107{
7096 struct iwl_priv *priv = hw->priv; 7108 struct iwl_priv *priv = hw->priv;
7109 DECLARE_MAC_BUF(mac);
7097 unsigned long flags; 7110 unsigned long flags;
7098 int rc; 7111 int rc;
7099 7112
@@ -7111,8 +7124,8 @@ static int iwl_mac_config_interface(struct ieee80211_hw *hw, int if_id,
7111 7124
7112 IWL_DEBUG_MAC80211("enter: interface id %d\n", if_id); 7125 IWL_DEBUG_MAC80211("enter: interface id %d\n", if_id);
7113 if (conf->bssid) 7126 if (conf->bssid)
7114 IWL_DEBUG_MAC80211("bssid: " MAC_FMT "\n", 7127 IWL_DEBUG_MAC80211("bssid: %s\n",
7115 MAC_ARG(conf->bssid)); 7128 print_mac(mac, conf->bssid));
7116 7129
7117 if (unlikely(test_bit(STATUS_SCANNING, &priv->status)) && 7130 if (unlikely(test_bit(STATUS_SCANNING, &priv->status)) &&
7118 !(priv->hw->flags & IEEE80211_HW_NO_PROBE_FILTERING)) { 7131 !(priv->hw->flags & IEEE80211_HW_NO_PROBE_FILTERING)) {
@@ -7131,8 +7144,8 @@ static int iwl_mac_config_interface(struct ieee80211_hw *hw, int if_id,
7131 if (!conf->bssid) { 7144 if (!conf->bssid) {
7132 conf->bssid = priv->mac_addr; 7145 conf->bssid = priv->mac_addr;
7133 memcpy(priv->bssid, priv->mac_addr, ETH_ALEN); 7146 memcpy(priv->bssid, priv->mac_addr, ETH_ALEN);
7134 IWL_DEBUG_MAC80211("bssid was set to: " MAC_FMT "\n", 7147 IWL_DEBUG_MAC80211("bssid was set to: %s\n",
7135 MAC_ARG(conf->bssid)); 7148 print_mac(mac, conf->bssid));
7136 } 7149 }
7137 if (priv->ibss_beacon) 7150 if (priv->ibss_beacon)
7138 dev_kfree_skb(priv->ibss_beacon); 7151 dev_kfree_skb(priv->ibss_beacon);
@@ -7282,8 +7295,10 @@ static int iwl_mac_set_key(struct ieee80211_hw *hw, set_key_cmd cmd,
7282 7295
7283 sta_id = iwl_hw_find_station(priv, addr); 7296 sta_id = iwl_hw_find_station(priv, addr);
7284 if (sta_id == IWL_INVALID_STATION) { 7297 if (sta_id == IWL_INVALID_STATION) {
7285 IWL_DEBUG_MAC80211("leave - " MAC_FMT " not in station map.\n", 7298 DECLARE_MAC_BUF(mac);
7286 MAC_ARG(addr)); 7299
7300 IWL_DEBUG_MAC80211("leave - %s not in station map.\n",
7301 print_mac(mac, addr));
7287 return -EINVAL; 7302 return -EINVAL;
7288 } 7303 }
7289 7304
diff --git a/drivers/net/wireless/iwlwifi/iwl4965-base.c b/drivers/net/wireless/iwlwifi/iwl4965-base.c
index b79dabc8c01c..6cea3118b7c1 100644
--- a/drivers/net/wireless/iwlwifi/iwl4965-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl4965-base.c
@@ -459,6 +459,7 @@ u8 iwl_add_station(struct iwl_priv *priv, const u8 *addr, int is_ap, u8 flags)
459 int index = IWL_INVALID_STATION; 459 int index = IWL_INVALID_STATION;
460 struct iwl_station_entry *station; 460 struct iwl_station_entry *station;
461 unsigned long flags_spin; 461 unsigned long flags_spin;
462 DECLARE_MAC_BUF(mac);
462 463
463 spin_lock_irqsave(&priv->sta_lock, flags_spin); 464 spin_lock_irqsave(&priv->sta_lock, flags_spin);
464 if (is_ap) 465 if (is_ap)
@@ -493,7 +494,7 @@ u8 iwl_add_station(struct iwl_priv *priv, const u8 *addr, int is_ap, u8 flags)
493 } 494 }
494 495
495 496
496 IWL_DEBUG_ASSOC("Add STA ID %d: " MAC_FMT "\n", index, MAC_ARG(addr)); 497 IWL_DEBUG_ASSOC("Add STA ID %d: %s\n", index, print_mac(mac, addr));
497 station = &priv->stations[index]; 498 station = &priv->stations[index];
498 station->used = 1; 499 station->used = 1;
499 priv->num_stations++; 500 priv->num_stations++;
@@ -1083,6 +1084,7 @@ static int iwl_commit_rxon(struct iwl_priv *priv)
1083{ 1084{
1084 /* cast away the const for active_rxon in this function */ 1085 /* cast away the const for active_rxon in this function */
1085 struct iwl_rxon_cmd *active_rxon = (void *)&priv->active_rxon; 1086 struct iwl_rxon_cmd *active_rxon = (void *)&priv->active_rxon;
1087 DECLARE_MAC_BUF(mac);
1086 int rc = 0; 1088 int rc = 0;
1087 1089
1088 if (!iwl_is_alive(priv)) 1090 if (!iwl_is_alive(priv))
@@ -1160,11 +1162,11 @@ static int iwl_commit_rxon(struct iwl_priv *priv)
1160 IWL_DEBUG_INFO("Sending RXON\n" 1162 IWL_DEBUG_INFO("Sending RXON\n"
1161 "* with%s RXON_FILTER_ASSOC_MSK\n" 1163 "* with%s RXON_FILTER_ASSOC_MSK\n"
1162 "* channel = %d\n" 1164 "* channel = %d\n"
1163 "* bssid = " MAC_FMT "\n", 1165 "* bssid = %s\n",
1164 ((priv->staging_rxon.filter_flags & 1166 ((priv->staging_rxon.filter_flags &
1165 RXON_FILTER_ASSOC_MSK) ? "" : "out"), 1167 RXON_FILTER_ASSOC_MSK) ? "" : "out"),
1166 le16_to_cpu(priv->staging_rxon.channel), 1168 le16_to_cpu(priv->staging_rxon.channel),
1167 MAC_ARG(priv->staging_rxon.bssid_addr)); 1169 print_mac(mac, priv->staging_rxon.bssid_addr));
1168 1170
1169 /* Apply the new configuration */ 1171 /* Apply the new configuration */
1170 rc = iwl_send_cmd_pdu(priv, REPLY_RXON, 1172 rc = iwl_send_cmd_pdu(priv, REPLY_RXON,
@@ -2748,6 +2750,7 @@ static int iwl_get_sta_id(struct iwl_priv *priv, struct ieee80211_hdr *hdr)
2748{ 2750{
2749 int sta_id; 2751 int sta_id;
2750 u16 fc = le16_to_cpu(hdr->frame_control); 2752 u16 fc = le16_to_cpu(hdr->frame_control);
2753 DECLARE_MAC_BUF(mac);
2751 2754
2752 /* If this frame is broadcast or not data then use the broadcast 2755 /* If this frame is broadcast or not data then use the broadcast
2753 * station id */ 2756 * station id */
@@ -2781,9 +2784,9 @@ static int iwl_get_sta_id(struct iwl_priv *priv, struct ieee80211_hdr *hdr)
2781 if (sta_id != IWL_INVALID_STATION) 2784 if (sta_id != IWL_INVALID_STATION)
2782 return sta_id; 2785 return sta_id;
2783 2786
2784 IWL_DEBUG_DROP("Station " MAC_FMT " not in station map. " 2787 IWL_DEBUG_DROP("Station %s not in station map. "
2785 "Defaulting to broadcast...\n", 2788 "Defaulting to broadcast...\n",
2786 MAC_ARG(hdr->addr1)); 2789 print_mac(mac, hdr->addr1));
2787 iwl_print_hex_dump(IWL_DL_DROP, (u8 *) hdr, sizeof(*hdr)); 2790 iwl_print_hex_dump(IWL_DL_DROP, (u8 *) hdr, sizeof(*hdr));
2788 return priv->hw_setting.bcast_sta_id; 2791 return priv->hw_setting.bcast_sta_id;
2789 2792
@@ -2859,8 +2862,10 @@ static int iwl_tx_skb(struct iwl_priv *priv,
2859 hdr_len = ieee80211_get_hdrlen(fc); 2862 hdr_len = ieee80211_get_hdrlen(fc);
2860 sta_id = iwl_get_sta_id(priv, hdr); 2863 sta_id = iwl_get_sta_id(priv, hdr);
2861 if (sta_id == IWL_INVALID_STATION) { 2864 if (sta_id == IWL_INVALID_STATION) {
2862 IWL_DEBUG_DROP("Dropping - INVALID STATION: " MAC_FMT "\n", 2865 DECLARE_MAC_BUF(mac);
2863 MAC_ARG(hdr->addr1)); 2866
2867 IWL_DEBUG_DROP("Dropping - INVALID STATION: %s\n",
2868 print_mac(mac, hdr->addr1));
2864 goto drop; 2869 goto drop;
2865 } 2870 }
2866 2871
@@ -4703,6 +4708,8 @@ int iwl_tx_queue_update_write_ptr(struct iwl_priv *priv,
4703#ifdef CONFIG_IWLWIFI_DEBUG 4708#ifdef CONFIG_IWLWIFI_DEBUG
4704static void iwl_print_rx_config_cmd(struct iwl_rxon_cmd *rxon) 4709static void iwl_print_rx_config_cmd(struct iwl_rxon_cmd *rxon)
4705{ 4710{
4711 DECLARE_MAC_BUF(mac);
4712
4706 IWL_DEBUG_RADIO("RX CONFIG:\n"); 4713 IWL_DEBUG_RADIO("RX CONFIG:\n");
4707 iwl_print_hex_dump(IWL_DL_RADIO, (u8 *) rxon, sizeof(*rxon)); 4714 iwl_print_hex_dump(IWL_DL_RADIO, (u8 *) rxon, sizeof(*rxon));
4708 IWL_DEBUG_RADIO("u16 channel: 0x%x\n", le16_to_cpu(rxon->channel)); 4715 IWL_DEBUG_RADIO("u16 channel: 0x%x\n", le16_to_cpu(rxon->channel));
@@ -4713,10 +4720,10 @@ static void iwl_print_rx_config_cmd(struct iwl_rxon_cmd *rxon)
4713 IWL_DEBUG_RADIO("u8 ofdm_basic_rates: 0x%02x\n", 4720 IWL_DEBUG_RADIO("u8 ofdm_basic_rates: 0x%02x\n",
4714 rxon->ofdm_basic_rates); 4721 rxon->ofdm_basic_rates);
4715 IWL_DEBUG_RADIO("u8 cck_basic_rates: 0x%02x\n", rxon->cck_basic_rates); 4722 IWL_DEBUG_RADIO("u8 cck_basic_rates: 0x%02x\n", rxon->cck_basic_rates);
4716 IWL_DEBUG_RADIO("u8[6] node_addr: " MAC_FMT "\n", 4723 IWL_DEBUG_RADIO("u8[6] node_addr: %s\n",
4717 MAC_ARG(rxon->node_addr)); 4724 print_mac(mac, rxon->node_addr));
4718 IWL_DEBUG_RADIO("u8[6] bssid_addr: " MAC_FMT "\n", 4725 IWL_DEBUG_RADIO("u8[6] bssid_addr: %s\n",
4719 MAC_ARG(rxon->bssid_addr)); 4726 print_mac(mac, rxon->bssid_addr));
4720 IWL_DEBUG_RADIO("u16 assoc_id: 0x%x\n", le16_to_cpu(rxon->assoc_id)); 4727 IWL_DEBUG_RADIO("u16 assoc_id: 0x%x\n", le16_to_cpu(rxon->assoc_id));
4721} 4728}
4722#endif 4729#endif
@@ -6670,6 +6677,7 @@ static void iwl_down(struct iwl_priv *priv)
6670 6677
6671static int __iwl_up(struct iwl_priv *priv) 6678static int __iwl_up(struct iwl_priv *priv)
6672{ 6679{
6680 DECLARE_MAC_BUF(mac);
6673 int rc, i; 6681 int rc, i;
6674 u32 hw_rf_kill = 0; 6682 u32 hw_rf_kill = 0;
6675 6683
@@ -6742,8 +6750,8 @@ static int __iwl_up(struct iwl_priv *priv)
6742 6750
6743 /* MAC Address location in EEPROM same for 3945/4965 */ 6751 /* MAC Address location in EEPROM same for 3945/4965 */
6744 get_eeprom_mac(priv, priv->mac_addr); 6752 get_eeprom_mac(priv, priv->mac_addr);
6745 IWL_DEBUG_INFO("MAC address: " MAC_FMT "\n", 6753 IWL_DEBUG_INFO("MAC address: %s\n",
6746 MAC_ARG(priv->mac_addr)); 6754 print_mac(mac, priv->mac_addr));
6747 6755
6748 SET_IEEE80211_PERM_ADDR(priv->hw, priv->mac_addr); 6756 SET_IEEE80211_PERM_ADDR(priv->hw, priv->mac_addr);
6749 6757
@@ -7096,14 +7104,16 @@ static void iwl_bg_post_associate(struct work_struct *data)
7096 7104
7097 int rc = 0; 7105 int rc = 0;
7098 struct ieee80211_conf *conf = NULL; 7106 struct ieee80211_conf *conf = NULL;
7107 DECLARE_MAC_BUF(mac);
7099 7108
7100 if (priv->iw_mode == IEEE80211_IF_TYPE_AP) { 7109 if (priv->iw_mode == IEEE80211_IF_TYPE_AP) {
7101 IWL_ERROR("%s Should not be called in AP mode\n", __FUNCTION__); 7110 IWL_ERROR("%s Should not be called in AP mode\n", __FUNCTION__);
7102 return; 7111 return;
7103 } 7112 }
7104 7113
7105 IWL_DEBUG_ASSOC("Associated as %d to: " MAC_FMT "\n", 7114 IWL_DEBUG_ASSOC("Associated as %d to: %s\n",
7106 priv->assoc_id, MAC_ARG(priv->active_rxon.bssid_addr)); 7115 priv->assoc_id,
7116 print_mac(mac, priv->active_rxon.bssid_addr));
7107 7117
7108 7118
7109 if (test_bit(STATUS_EXIT_PENDING, &priv->status)) 7119 if (test_bit(STATUS_EXIT_PENDING, &priv->status))
@@ -7299,11 +7309,12 @@ static int iwl_mac_add_interface(struct ieee80211_hw *hw,
7299{ 7309{
7300 struct iwl_priv *priv = hw->priv; 7310 struct iwl_priv *priv = hw->priv;
7301 unsigned long flags; 7311 unsigned long flags;
7312 DECLARE_MAC_BUF(mac);
7302 7313
7303 IWL_DEBUG_MAC80211("enter: id %d, type %d\n", conf->if_id, conf->type); 7314 IWL_DEBUG_MAC80211("enter: id %d, type %d\n", conf->if_id, conf->type);
7304 if (conf->mac_addr) 7315 if (conf->mac_addr)
7305 IWL_DEBUG_MAC80211("enter: MAC " MAC_FMT "\n", 7316 IWL_DEBUG_MAC80211("enter: MAC %s\n",
7306 MAC_ARG(conf->mac_addr)); 7317 print_mac(mac, conf->mac_addr));
7307 7318
7308 if (priv->interface_id) { 7319 if (priv->interface_id) {
7309 IWL_DEBUG_MAC80211("leave - interface_id != 0\n"); 7320 IWL_DEBUG_MAC80211("leave - interface_id != 0\n");
@@ -7494,6 +7505,7 @@ static int iwl_mac_config_interface(struct ieee80211_hw *hw, int if_id,
7494 struct ieee80211_if_conf *conf) 7505 struct ieee80211_if_conf *conf)
7495{ 7506{
7496 struct iwl_priv *priv = hw->priv; 7507 struct iwl_priv *priv = hw->priv;
7508 DECLARE_MAC_BUF(mac);
7497 unsigned long flags; 7509 unsigned long flags;
7498 int rc; 7510 int rc;
7499 7511
@@ -7511,8 +7523,8 @@ static int iwl_mac_config_interface(struct ieee80211_hw *hw, int if_id,
7511 7523
7512 IWL_DEBUG_MAC80211("enter: interface id %d\n", if_id); 7524 IWL_DEBUG_MAC80211("enter: interface id %d\n", if_id);
7513 if (conf->bssid) 7525 if (conf->bssid)
7514 IWL_DEBUG_MAC80211("bssid: " MAC_FMT "\n", 7526 IWL_DEBUG_MAC80211("bssid: %s\n",
7515 MAC_ARG(conf->bssid)); 7527 print_mac(mac, conf->bssid));
7516 7528
7517 if (unlikely(test_bit(STATUS_SCANNING, &priv->status)) && 7529 if (unlikely(test_bit(STATUS_SCANNING, &priv->status)) &&
7518 !(priv->hw->flags & IEEE80211_HW_NO_PROBE_FILTERING)) { 7530 !(priv->hw->flags & IEEE80211_HW_NO_PROBE_FILTERING)) {
@@ -7531,8 +7543,8 @@ static int iwl_mac_config_interface(struct ieee80211_hw *hw, int if_id,
7531 if (!conf->bssid) { 7543 if (!conf->bssid) {
7532 conf->bssid = priv->mac_addr; 7544 conf->bssid = priv->mac_addr;
7533 memcpy(priv->bssid, priv->mac_addr, ETH_ALEN); 7545 memcpy(priv->bssid, priv->mac_addr, ETH_ALEN);
7534 IWL_DEBUG_MAC80211("bssid was set to: " MAC_FMT "\n", 7546 IWL_DEBUG_MAC80211("bssid was set to: %s\n",
7535 MAC_ARG(conf->bssid)); 7547 print_mac(mac, conf->bssid));
7536 } 7548 }
7537 if (priv->ibss_beacon) 7549 if (priv->ibss_beacon)
7538 dev_kfree_skb(priv->ibss_beacon); 7550 dev_kfree_skb(priv->ibss_beacon);
@@ -7666,6 +7678,7 @@ static int iwl_mac_set_key(struct ieee80211_hw *hw, set_key_cmd cmd,
7666 struct ieee80211_key_conf *key) 7678 struct ieee80211_key_conf *key)
7667{ 7679{
7668 struct iwl_priv *priv = hw->priv; 7680 struct iwl_priv *priv = hw->priv;
7681 DECLARE_MAC_BUF(mac);
7669 int rc = 0; 7682 int rc = 0;
7670 u8 sta_id; 7683 u8 sta_id;
7671 7684
@@ -7682,8 +7695,8 @@ static int iwl_mac_set_key(struct ieee80211_hw *hw, set_key_cmd cmd,
7682 7695
7683 sta_id = iwl_hw_find_station(priv, addr); 7696 sta_id = iwl_hw_find_station(priv, addr);
7684 if (sta_id == IWL_INVALID_STATION) { 7697 if (sta_id == IWL_INVALID_STATION) {
7685 IWL_DEBUG_MAC80211("leave - " MAC_FMT " not in station map.\n", 7698 IWL_DEBUG_MAC80211("leave - %s not in station map.\n",
7686 MAC_ARG(addr)); 7699 print_mac(mac, addr));
7687 return -EINVAL; 7700 return -EINVAL;
7688 } 7701 }
7689 7702
diff --git a/drivers/net/wireless/libertas/assoc.c b/drivers/net/wireless/libertas/assoc.c
index 3131afcf4590..2c6ddb1f0072 100644
--- a/drivers/net/wireless/libertas/assoc.c
+++ b/drivers/net/wireless/libertas/assoc.c
@@ -16,6 +16,7 @@ static const u8 bssid_off[ETH_ALEN] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
16 16
17static void print_assoc_req(const char * extra, struct assoc_request * assoc_req) 17static void print_assoc_req(const char * extra, struct assoc_request * assoc_req)
18{ 18{
19 DECLARE_MAC_BUF(mac);
19 lbs_deb_assoc( 20 lbs_deb_assoc(
20 "#### Association Request: %s\n" 21 "#### Association Request: %s\n"
21 " flags: 0x%08lX\n" 22 " flags: 0x%08lX\n"
@@ -23,13 +24,13 @@ static void print_assoc_req(const char * extra, struct assoc_request * assoc_req
23 " channel: %d\n" 24 " channel: %d\n"
24 " band: %d\n" 25 " band: %d\n"
25 " mode: %d\n" 26 " mode: %d\n"
26 " BSSID: " MAC_FMT "\n" 27 " BSSID: %s\n"
27 " Encryption:%s%s%s\n" 28 " Encryption:%s%s%s\n"
28 " auth: %d\n", 29 " auth: %d\n",
29 extra, assoc_req->flags, 30 extra, assoc_req->flags,
30 escape_essid(assoc_req->ssid, assoc_req->ssid_len), 31 escape_essid(assoc_req->ssid, assoc_req->ssid_len),
31 assoc_req->channel, assoc_req->band, assoc_req->mode, 32 assoc_req->channel, assoc_req->band, assoc_req->mode,
32 MAC_ARG(assoc_req->bssid), 33 print_mac(mac, assoc_req->bssid),
33 assoc_req->secinfo.WPAenabled ? " WPA" : "", 34 assoc_req->secinfo.WPAenabled ? " WPA" : "",
34 assoc_req->secinfo.WPA2enabled ? " WPA2" : "", 35 assoc_req->secinfo.WPA2enabled ? " WPA2" : "",
35 assoc_req->secinfo.wep_enabled ? " WEP" : "", 36 assoc_req->secinfo.wep_enabled ? " WEP" : "",
@@ -104,16 +105,17 @@ static int assoc_helper_bssid(wlan_private *priv,
104 wlan_adapter *adapter = priv->adapter; 105 wlan_adapter *adapter = priv->adapter;
105 int ret = 0; 106 int ret = 0;
106 struct bss_descriptor * bss; 107 struct bss_descriptor * bss;
108 DECLARE_MAC_BUF(mac);
107 109
108 lbs_deb_enter_args(LBS_DEB_ASSOC, "BSSID " MAC_FMT, 110 lbs_deb_enter_args(LBS_DEB_ASSOC, "BSSID %s",
109 MAC_ARG(assoc_req->bssid)); 111 print_mac(mac, assoc_req->bssid));
110 112
111 /* Search for index position in list for requested MAC */ 113 /* Search for index position in list for requested MAC */
112 bss = libertas_find_bssid_in_list(adapter, assoc_req->bssid, 114 bss = libertas_find_bssid_in_list(adapter, assoc_req->bssid,
113 assoc_req->mode); 115 assoc_req->mode);
114 if (bss == NULL) { 116 if (bss == NULL) {
115 lbs_deb_assoc("ASSOC: WAP: BSSID " MAC_FMT " not found, " 117 lbs_deb_assoc("ASSOC: WAP: BSSID %s not found, "
116 "cannot associate.\n", MAC_ARG(assoc_req->bssid)); 118 "cannot associate.\n", print_mac(mac, assoc_req->bssid));
117 goto out; 119 goto out;
118 } 120 }
119 121
@@ -481,6 +483,7 @@ void libertas_association_worker(struct work_struct *work)
481 struct assoc_request * assoc_req = NULL; 483 struct assoc_request * assoc_req = NULL;
482 int ret = 0; 484 int ret = 0;
483 int find_any_ssid = 0; 485 int find_any_ssid = 0;
486 DECLARE_MAC_BUF(mac);
484 487
485 lbs_deb_enter(LBS_DEB_ASSOC); 488 lbs_deb_enter(LBS_DEB_ASSOC);
486 489
@@ -629,10 +632,10 @@ void libertas_association_worker(struct work_struct *work)
629 632
630 if (success) { 633 if (success) {
631 lbs_deb_assoc("ASSOC: association attempt successful. " 634 lbs_deb_assoc("ASSOC: association attempt successful. "
632 "Associated to '%s' (" MAC_FMT ")\n", 635 "Associated to '%s' (%s)\n",
633 escape_essid(adapter->curbssparams.ssid, 636 escape_essid(adapter->curbssparams.ssid,
634 adapter->curbssparams.ssid_len), 637 adapter->curbssparams.ssid_len),
635 MAC_ARG(adapter->curbssparams.bssid)); 638 print_mac(mac, adapter->curbssparams.bssid));
636 libertas_prepare_and_send_command(priv, 639 libertas_prepare_and_send_command(priv,
637 CMD_802_11_RSSI, 640 CMD_802_11_RSSI,
638 0, CMD_OPTION_WAITFORRSP, 0, NULL); 641 0, CMD_OPTION_WAITFORRSP, 0, NULL);
diff --git a/drivers/net/wireless/libertas/cmdresp.c b/drivers/net/wireless/libertas/cmdresp.c
index d64ad87db459..fe70e30b1f3c 100644
--- a/drivers/net/wireless/libertas/cmdresp.c
+++ b/drivers/net/wireless/libertas/cmdresp.c
@@ -159,6 +159,7 @@ static int wlan_ret_get_hw_spec(wlan_private * priv,
159 struct cmd_ds_get_hw_spec *hwspec = &resp->params.hwspec; 159 struct cmd_ds_get_hw_spec *hwspec = &resp->params.hwspec;
160 wlan_adapter *adapter = priv->adapter; 160 wlan_adapter *adapter = priv->adapter;
161 int ret = 0; 161 int ret = 0;
162 DECLARE_MAC_BUF(mac);
162 163
163 lbs_deb_enter(LBS_DEB_CMD); 164 lbs_deb_enter(LBS_DEB_CMD);
164 165
@@ -169,8 +170,8 @@ static int wlan_ret_get_hw_spec(wlan_private * priv,
169 lbs_deb_cmd("GET_HW_SPEC: firmware release %u.%u.%up%u\n", 170 lbs_deb_cmd("GET_HW_SPEC: firmware release %u.%u.%up%u\n",
170 adapter->fwreleasenumber[2], adapter->fwreleasenumber[1], 171 adapter->fwreleasenumber[2], adapter->fwreleasenumber[1],
171 adapter->fwreleasenumber[0], adapter->fwreleasenumber[3]); 172 adapter->fwreleasenumber[0], adapter->fwreleasenumber[3]);
172 lbs_deb_cmd("GET_HW_SPEC: MAC addr " MAC_FMT "\n", 173 lbs_deb_cmd("GET_HW_SPEC: MAC addr %s\n",
173 MAC_ARG(hwspec->permanentaddr)); 174 print_mac(mac, hwspec->permanentaddr));
174 lbs_deb_cmd("GET_HW_SPEC: hardware interface 0x%x, hardware spec 0x%04x\n", 175 lbs_deb_cmd("GET_HW_SPEC: hardware interface 0x%x, hardware spec 0x%04x\n",
175 hwspec->hwifversion, hwspec->version); 176 hwspec->hwifversion, hwspec->version);
176 177
diff --git a/drivers/net/wireless/libertas/debugfs.c b/drivers/net/wireless/libertas/debugfs.c
index 816f42e4f5b4..cb00b080409e 100644
--- a/drivers/net/wireless/libertas/debugfs.c
+++ b/drivers/net/wireless/libertas/debugfs.c
@@ -63,6 +63,7 @@ static ssize_t libertas_getscantable(struct file *file, char __user *userbuf,
63 int numscansdone = 0, res; 63 int numscansdone = 0, res;
64 unsigned long addr = get_zeroed_page(GFP_KERNEL); 64 unsigned long addr = get_zeroed_page(GFP_KERNEL);
65 char *buf = (char *)addr; 65 char *buf = (char *)addr;
66 DECLARE_MAC_BUF(mac);
66 struct bss_descriptor * iter_bss; 67 struct bss_descriptor * iter_bss;
67 68
68 pos += snprintf(buf+pos, len-pos, 69 pos += snprintf(buf+pos, len-pos,
@@ -75,9 +76,9 @@ static ssize_t libertas_getscantable(struct file *file, char __user *userbuf,
75 u16 spectrum_mgmt = (iter_bss->capability & WLAN_CAPABILITY_SPECTRUM_MGMT); 76 u16 spectrum_mgmt = (iter_bss->capability & WLAN_CAPABILITY_SPECTRUM_MGMT);
76 77
77 pos += snprintf(buf+pos, len-pos, 78 pos += snprintf(buf+pos, len-pos,
78 "%02u| %03d | %04ld | " MAC_FMT " |", 79 "%02u| %03d | %04ld | %s |",
79 numscansdone, iter_bss->channel, iter_bss->rssi, 80 numscansdone, iter_bss->channel, iter_bss->rssi,
80 MAC_ARG(iter_bss->bssid)); 81 print_mac(mac, iter_bss->bssid));
81 pos += snprintf(buf+pos, len-pos, " %04x-", iter_bss->capability); 82 pos += snprintf(buf+pos, len-pos, " %04x-", iter_bss->capability);
82 pos += snprintf(buf+pos, len-pos, "%c%c%c |", 83 pos += snprintf(buf+pos, len-pos, "%c%c%c |",
83 ibss ? 'A' : 'I', privacy ? 'P' : ' ', 84 ibss ? 'A' : 'I', privacy ? 'P' : ' ',
diff --git a/drivers/net/wireless/libertas/join.c b/drivers/net/wireless/libertas/join.c
index 0ad1362b14e2..8dcff00574f3 100644
--- a/drivers/net/wireless/libertas/join.c
+++ b/drivers/net/wireless/libertas/join.c
@@ -293,6 +293,7 @@ int libertas_cmd_80211_authenticate(wlan_private * priv,
293 struct cmd_ds_802_11_authenticate *pauthenticate = &cmd->params.auth; 293 struct cmd_ds_802_11_authenticate *pauthenticate = &cmd->params.auth;
294 int ret = -1; 294 int ret = -1;
295 u8 *bssid = pdata_buf; 295 u8 *bssid = pdata_buf;
296 DECLARE_MAC_BUF(mac);
296 297
297 lbs_deb_enter(LBS_DEB_JOIN); 298 lbs_deb_enter(LBS_DEB_JOIN);
298 299
@@ -319,8 +320,8 @@ int libertas_cmd_80211_authenticate(wlan_private * priv,
319 320
320 memcpy(pauthenticate->macaddr, bssid, ETH_ALEN); 321 memcpy(pauthenticate->macaddr, bssid, ETH_ALEN);
321 322
322 lbs_deb_join("AUTH_CMD: BSSID is : " MAC_FMT " auth=0x%X\n", 323 lbs_deb_join("AUTH_CMD: BSSID is : %s auth=0x%X\n",
323 MAC_ARG(bssid), pauthenticate->authtype); 324 print_mac(mac, bssid), pauthenticate->authtype);
324 ret = 0; 325 ret = 0;
325 326
326out: 327out:
@@ -598,6 +599,7 @@ int libertas_cmd_80211_ad_hoc_join(wlan_private * priv,
598 int cmdappendsize = 0; 599 int cmdappendsize = 0;
599 int ret = 0; 600 int ret = 0;
600 u16 ratesize = 0; 601 u16 ratesize = 0;
602 DECLARE_MAC_BUF(mac);
601 603
602 lbs_deb_enter(LBS_DEB_JOIN); 604 lbs_deb_enter(LBS_DEB_JOIN);
603 605
@@ -621,8 +623,9 @@ int libertas_cmd_80211_ad_hoc_join(wlan_private * priv,
621 623
622 /* information on BSSID descriptor passed to FW */ 624 /* information on BSSID descriptor passed to FW */
623 lbs_deb_join( 625 lbs_deb_join(
624 "ADHOC_J_CMD: BSSID = " MAC_FMT ", SSID = '%s'\n", 626 "ADHOC_J_CMD: BSSID = %s, SSID = '%s'\n",
625 MAC_ARG(join_cmd->bss.bssid), join_cmd->bss.ssid); 627 print_mac(mac, join_cmd->bss.bssid),
628 join_cmd->bss.ssid);
626 629
627 /* failtimeout */ 630 /* failtimeout */
628 join_cmd->failtimeout = cpu_to_le16(MRVDRV_ASSOCIATION_TIME_OUT); 631 join_cmd->failtimeout = cpu_to_le16(MRVDRV_ASSOCIATION_TIME_OUT);
@@ -829,6 +832,7 @@ int libertas_ret_80211_ad_hoc_start(wlan_private * priv,
829 struct cmd_ds_802_11_ad_hoc_result *padhocresult; 832 struct cmd_ds_802_11_ad_hoc_result *padhocresult;
830 union iwreq_data wrqu; 833 union iwreq_data wrqu;
831 struct bss_descriptor *bss; 834 struct bss_descriptor *bss;
835 DECLARE_MAC_BUF(mac);
832 836
833 lbs_deb_enter(LBS_DEB_JOIN); 837 lbs_deb_enter(LBS_DEB_JOIN);
834 838
@@ -894,8 +898,8 @@ int libertas_ret_80211_ad_hoc_start(wlan_private * priv,
894 898
895 lbs_deb_join("ADHOC_RESP: - Joined/Started Ad Hoc\n"); 899 lbs_deb_join("ADHOC_RESP: - Joined/Started Ad Hoc\n");
896 lbs_deb_join("ADHOC_RESP: channel = %d\n", adapter->curbssparams.channel); 900 lbs_deb_join("ADHOC_RESP: channel = %d\n", adapter->curbssparams.channel);
897 lbs_deb_join("ADHOC_RESP: BSSID = " MAC_FMT "\n", 901 lbs_deb_join("ADHOC_RESP: BSSID = %s\n",
898 MAC_ARG(padhocresult->bssid)); 902 print_mac(mac, padhocresult->bssid));
899 903
900done: 904done:
901 lbs_deb_leave_args(LBS_DEB_JOIN, "ret %d", ret); 905 lbs_deb_leave_args(LBS_DEB_JOIN, "ret %d", ret);
diff --git a/drivers/net/wireless/libertas/main.c b/drivers/net/wireless/libertas/main.c
index a54171af7b97..5ead08312e1e 100644
--- a/drivers/net/wireless/libertas/main.c
+++ b/drivers/net/wireless/libertas/main.c
@@ -677,6 +677,7 @@ static void libertas_set_multicast_list(struct net_device *dev)
677 wlan_private *priv = dev->priv; 677 wlan_private *priv = dev->priv;
678 wlan_adapter *adapter = priv->adapter; 678 wlan_adapter *adapter = priv->adapter;
679 int oldpacketfilter; 679 int oldpacketfilter;
680 DECLARE_MAC_BUF(mac);
680 681
681 lbs_deb_enter(LBS_DEB_NET); 682 lbs_deb_enter(LBS_DEB_NET);
682 683
@@ -723,14 +724,9 @@ static void libertas_set_multicast_list(struct net_device *dev)
723 dev->mc_count); 724 dev->mc_count);
724 725
725 for (i = 0; i < dev->mc_count; i++) { 726 for (i = 0; i < dev->mc_count; i++) {
726 lbs_deb_net("Multicast address %d:" 727 lbs_deb_net("Multicast address %d:%s\n",
727 MAC_FMT "\n", i, 728 i, print_mac(mac,
728 adapter->multicastlist[i][0], 729 adapter->multicastlist[i]));
729 adapter->multicastlist[i][1],
730 adapter->multicastlist[i][2],
731 adapter->multicastlist[i][3],
732 adapter->multicastlist[i][4],
733 adapter->multicastlist[i][5]);
734 } 730 }
735 /* send multicast addresses to firmware */ 731 /* send multicast addresses to firmware */
736 libertas_prepare_and_send_command(priv, 732 libertas_prepare_and_send_command(priv,
diff --git a/drivers/net/wireless/libertas/scan.c b/drivers/net/wireless/libertas/scan.c
index e2e9ebcd8340..8f073ad1957f 100644
--- a/drivers/net/wireless/libertas/scan.c
+++ b/drivers/net/wireless/libertas/scan.c
@@ -777,6 +777,7 @@ int wlan_scan_networks(wlan_private * priv,
777#ifdef CONFIG_LIBERTAS_DEBUG 777#ifdef CONFIG_LIBERTAS_DEBUG
778 struct bss_descriptor * iter_bss; 778 struct bss_descriptor * iter_bss;
779 int i = 0; 779 int i = 0;
780 DECLARE_MAC_BUF(mac);
780#endif 781#endif
781 782
782 lbs_deb_enter(LBS_DEB_SCAN); 783 lbs_deb_enter(LBS_DEB_SCAN);
@@ -831,8 +832,8 @@ int wlan_scan_networks(wlan_private * priv,
831 /* Dump the scan table */ 832 /* Dump the scan table */
832 mutex_lock(&adapter->lock); 833 mutex_lock(&adapter->lock);
833 list_for_each_entry (iter_bss, &adapter->network_list, list) { 834 list_for_each_entry (iter_bss, &adapter->network_list, list) {
834 lbs_deb_scan("Scan:(%02d) " MAC_FMT ", RSSI[%03d], SSID[%s]\n", 835 lbs_deb_scan("Scan:(%02d) %s, RSSI[%03d], SSID[%s]\n",
835 i++, MAC_ARG(iter_bss->bssid), (s32) iter_bss->rssi, 836 i++, print_mac(mac, iter_bss->bssid), (s32) iter_bss->rssi,
836 escape_essid(iter_bss->ssid, iter_bss->ssid_len)); 837 escape_essid(iter_bss->ssid, iter_bss->ssid_len));
837 } 838 }
838 mutex_unlock(&adapter->lock); 839 mutex_unlock(&adapter->lock);
@@ -876,6 +877,7 @@ static int libertas_process_bss(struct bss_descriptor * bss,
876 struct ieeetypes_dsparamset *pDS; 877 struct ieeetypes_dsparamset *pDS;
877 struct ieeetypes_cfparamset *pCF; 878 struct ieeetypes_cfparamset *pCF;
878 struct ieeetypes_ibssparamset *pibss; 879 struct ieeetypes_ibssparamset *pibss;
880 DECLARE_MAC_BUF(mac);
879 struct ieeetypes_countryinfoset *pcountryinfo; 881 struct ieeetypes_countryinfoset *pcountryinfo;
880 u8 *pos, *end, *p; 882 u8 *pos, *end, *p;
881 u8 n_ex_rates = 0, got_basic_rates = 0, n_basic_rates = 0; 883 u8 n_ex_rates = 0, got_basic_rates = 0, n_basic_rates = 0;
@@ -906,7 +908,7 @@ static int libertas_process_bss(struct bss_descriptor * bss,
906 *bytesleft -= beaconsize; 908 *bytesleft -= beaconsize;
907 909
908 memcpy(bss->bssid, pos, ETH_ALEN); 910 memcpy(bss->bssid, pos, ETH_ALEN);
909 lbs_deb_scan("process_bss: AP BSSID " MAC_FMT "\n", MAC_ARG(bss->bssid)); 911 lbs_deb_scan("process_bss: AP BSSID %s\n", print_mac(mac, bss->bssid));
910 pos += ETH_ALEN; 912 pos += ETH_ALEN;
911 913
912 if ((end - pos) < 12) { 914 if ((end - pos) < 12) {
@@ -1724,6 +1726,7 @@ int libertas_ret_80211_scan(wlan_private * priv, struct cmd_ds_command *resp)
1724 struct bss_descriptor new; 1726 struct bss_descriptor new;
1725 struct bss_descriptor * found = NULL; 1727 struct bss_descriptor * found = NULL;
1726 struct bss_descriptor * oldest = NULL; 1728 struct bss_descriptor * oldest = NULL;
1729 DECLARE_MAC_BUF(mac);
1727 1730
1728 /* Process the data fields and IEs returned for this BSS */ 1731 /* Process the data fields and IEs returned for this BSS */
1729 memset(&new, 0, sizeof (struct bss_descriptor)); 1732 memset(&new, 0, sizeof (struct bss_descriptor));
@@ -1762,9 +1765,8 @@ int libertas_ret_80211_scan(wlan_private * priv, struct cmd_ds_command *resp)
1762 continue; 1765 continue;
1763 } 1766 }
1764 1767
1765 lbs_deb_scan("SCAN_RESP: BSSID = " MAC_FMT "\n", 1768 lbs_deb_scan("SCAN_RESP: BSSID = %s\n",
1766 new.bssid[0], new.bssid[1], new.bssid[2], 1769 print_mac(mac, new.bssid));
1767 new.bssid[3], new.bssid[4], new.bssid[5]);
1768 1770
1769 /* Copy the locally created newbssentry to the scan table */ 1771 /* Copy the locally created newbssentry to the scan table */
1770 memcpy(found, &new, offsetof(struct bss_descriptor, list)); 1772 memcpy(found, &new, offsetof(struct bss_descriptor, list));
diff --git a/drivers/net/wireless/libertas/wext.c b/drivers/net/wireless/libertas/wext.c
index f8036efd7294..0b2103e0af57 100644
--- a/drivers/net/wireless/libertas/wext.c
+++ b/drivers/net/wireless/libertas/wext.c
@@ -1160,7 +1160,7 @@ static int wlan_get_encode(struct net_device *dev,
1160 1160
1161 dwrq->flags |= IW_ENCODE_NOKEY; 1161 dwrq->flags |= IW_ENCODE_NOKEY;
1162 1162
1163 lbs_deb_wext("key: " MAC_FMT ", keylen %d\n", 1163 lbs_deb_wext("key: %02x:%02x:%02x:%02x:%02x:%02x, keylen %d\n",
1164 extra[0], extra[1], extra[2], 1164 extra[0], extra[1], extra[2],
1165 extra[3], extra[4], extra[5], dwrq->length); 1165 extra[3], extra[4], extra[5], dwrq->length);
1166 1166
@@ -1980,13 +1980,14 @@ static int wlan_set_wap(struct net_device *dev, struct iw_request_info *info,
1980 wlan_adapter *adapter = priv->adapter; 1980 wlan_adapter *adapter = priv->adapter;
1981 struct assoc_request * assoc_req; 1981 struct assoc_request * assoc_req;
1982 int ret = 0; 1982 int ret = 0;
1983 DECLARE_MAC_BUF(mac);
1983 1984
1984 lbs_deb_enter(LBS_DEB_WEXT); 1985 lbs_deb_enter(LBS_DEB_WEXT);
1985 1986
1986 if (awrq->sa_family != ARPHRD_ETHER) 1987 if (awrq->sa_family != ARPHRD_ETHER)
1987 return -EINVAL; 1988 return -EINVAL;
1988 1989
1989 lbs_deb_wext("ASSOC: WAP: sa_data " MAC_FMT "\n", MAC_ARG(awrq->sa_data)); 1990 lbs_deb_wext("ASSOC: WAP: sa_data %s\n", print_mac(mac, awrq->sa_data));
1990 1991
1991 mutex_lock(&adapter->lock); 1992 mutex_lock(&adapter->lock);
1992 1993
diff --git a/drivers/net/wireless/netwave_cs.c b/drivers/net/wireless/netwave_cs.c
index d8a59afa7178..c2d71afd57e5 100644
--- a/drivers/net/wireless/netwave_cs.c
+++ b/drivers/net/wireless/netwave_cs.c
@@ -737,6 +737,7 @@ static int netwave_pcmcia_config(struct pcmcia_device *link) {
737 win_req_t req; 737 win_req_t req;
738 memreq_t mem; 738 memreq_t mem;
739 u_char __iomem *ramBase = NULL; 739 u_char __iomem *ramBase = NULL;
740 DECLARE_MAC_BUF(mac);
740 741
741 DEBUG(0, "netwave_pcmcia_config(0x%p)\n", link); 742 DEBUG(0, "netwave_pcmcia_config(0x%p)\n", link);
742 743
@@ -805,12 +806,13 @@ static int netwave_pcmcia_config(struct pcmcia_device *link) {
805 for (i = 0; i < 6; i++) 806 for (i = 0; i < 6; i++)
806 dev->dev_addr[i] = readb(ramBase + NETWAVE_EREG_PA + i); 807 dev->dev_addr[i] = readb(ramBase + NETWAVE_EREG_PA + i);
807 808
808 printk(KERN_INFO "%s: Netwave: port %#3lx, irq %d, mem %lx id " 809 printk(KERN_INFO "%s: Netwave: port %#3lx, irq %d, mem %lx"
809 "%c%c, hw_addr ", dev->name, dev->base_addr, dev->irq, 810 "id %c%c, hw_addr %s\n",
810 (u_long) ramBase, (int) readb(ramBase+NETWAVE_EREG_NI), 811 dev->name, dev->base_addr, dev->irq,
811 (int) readb(ramBase+NETWAVE_EREG_NI+1)); 812 (u_long) ramBase,
812 for (i = 0; i < 6; i++) 813 (int) readb(ramBase+NETWAVE_EREG_NI),
813 printk("%02X%s", dev->dev_addr[i], ((i<5) ? ":" : "\n")); 814 (int) readb(ramBase+NETWAVE_EREG_NI+1),
815 print_mac(mac, dev->dev_addr));
814 816
815 /* get revision words */ 817 /* get revision words */
816 printk(KERN_DEBUG "Netwave_reset: revision %04x %04x\n", 818 printk(KERN_DEBUG "Netwave_reset: revision %04x %04x\n",
diff --git a/drivers/net/wireless/orinoco.c b/drivers/net/wireless/orinoco.c
index 062286dc8e15..ca6c2da7bc5d 100644
--- a/drivers/net/wireless/orinoco.c
+++ b/drivers/net/wireless/orinoco.c
@@ -2232,6 +2232,7 @@ static int orinoco_init(struct net_device *dev)
2232 struct hermes_idstring nickbuf; 2232 struct hermes_idstring nickbuf;
2233 u16 reclen; 2233 u16 reclen;
2234 int len; 2234 int len;
2235 DECLARE_MAC_BUF(mac);
2235 2236
2236 /* No need to lock, the hw_unavailable flag is already set in 2237 /* No need to lock, the hw_unavailable flag is already set in
2237 * alloc_orinocodev() */ 2238 * alloc_orinocodev() */
@@ -2274,10 +2275,8 @@ static int orinoco_init(struct net_device *dev)
2274 goto out; 2275 goto out;
2275 } 2276 }
2276 2277
2277 printk(KERN_DEBUG "%s: MAC address %02X:%02X:%02X:%02X:%02X:%02X\n", 2278 printk(KERN_DEBUG "%s: MAC address %s\n",
2278 dev->name, dev->dev_addr[0], dev->dev_addr[1], 2279 dev->name, print_mac(mac, dev->dev_addr));
2279 dev->dev_addr[2], dev->dev_addr[3], dev->dev_addr[4],
2280 dev->dev_addr[5]);
2281 2280
2282 /* Get the station name */ 2281 /* Get the station name */
2283 err = hermes_read_ltv(hw, USER_BAP, HERMES_RID_CNFOWNNAME, 2282 err = hermes_read_ltv(hw, USER_BAP, HERMES_RID_CNFOWNNAME,
diff --git a/drivers/net/wireless/prism54/isl_ioctl.c b/drivers/net/wireless/prism54/isl_ioctl.c
index 77ea13bf0c02..6d80ca421cf0 100644
--- a/drivers/net/wireless/prism54/isl_ioctl.c
+++ b/drivers/net/wireless/prism54/isl_ioctl.c
@@ -2029,12 +2029,12 @@ static void
2029format_event(islpci_private *priv, char *dest, const char *str, 2029format_event(islpci_private *priv, char *dest, const char *str,
2030 const struct obj_mlme *mlme, u16 *length, int error) 2030 const struct obj_mlme *mlme, u16 *length, int error)
2031{ 2031{
2032 const u8 *a = mlme->address; 2032 DECLARE_MAC_BUF(mac);
2033 int n = snprintf(dest, IW_CUSTOM_MAX, 2033 int n = snprintf(dest, IW_CUSTOM_MAX,
2034 "%s %s %2.2X:%2.2X:%2.2X:%2.2X:%2.2X:%2.2X %s (%2.2X)", 2034 "%s %s %s %s (%2.2X)",
2035 str, 2035 str,
2036 ((priv->iw_mode == IW_MODE_MASTER) ? "from" : "to"), 2036 ((priv->iw_mode == IW_MODE_MASTER) ? "from" : "to"),
2037 a[0], a[1], a[2], a[3], a[4], a[5], 2037 print_mac(mac, mlme->address),
2038 (error ? (mlme->code ? " : REJECTED " : " : ACCEPTED ") 2038 (error ? (mlme->code ? " : REJECTED " : " : ACCEPTED ")
2039 : ""), mlme->code); 2039 : ""), mlme->code);
2040 BUG_ON(n > IW_CUSTOM_MAX); 2040 BUG_ON(n > IW_CUSTOM_MAX);
@@ -2105,15 +2105,13 @@ struct ieee80211_beacon_phdr {
2105#define WLAN_EID_GENERIC 0xdd 2105#define WLAN_EID_GENERIC 0xdd
2106static u8 wpa_oid[4] = { 0x00, 0x50, 0xf2, 1 }; 2106static u8 wpa_oid[4] = { 0x00, 0x50, 0xf2, 1 };
2107 2107
2108#define MAC2STR(a) (a)[0], (a)[1], (a)[2], (a)[3], (a)[4], (a)[5]
2109#define MACSTR "%02x:%02x:%02x:%02x:%02x:%02x"
2110
2111static void 2108static void
2112prism54_wpa_bss_ie_add(islpci_private *priv, u8 *bssid, 2109prism54_wpa_bss_ie_add(islpci_private *priv, u8 *bssid,
2113 u8 *wpa_ie, size_t wpa_ie_len) 2110 u8 *wpa_ie, size_t wpa_ie_len)
2114{ 2111{
2115 struct list_head *ptr; 2112 struct list_head *ptr;
2116 struct islpci_bss_wpa_ie *bss = NULL; 2113 struct islpci_bss_wpa_ie *bss = NULL;
2114 DECLARE_MAC_BUF(mac);
2117 2115
2118 if (wpa_ie_len > MAX_WPA_IE_LEN) 2116 if (wpa_ie_len > MAX_WPA_IE_LEN)
2119 wpa_ie_len = MAX_WPA_IE_LEN; 2117 wpa_ie_len = MAX_WPA_IE_LEN;
@@ -2154,8 +2152,8 @@ prism54_wpa_bss_ie_add(islpci_private *priv, u8 *bssid,
2154 bss->wpa_ie_len = wpa_ie_len; 2152 bss->wpa_ie_len = wpa_ie_len;
2155 bss->last_update = jiffies; 2153 bss->last_update = jiffies;
2156 } else { 2154 } else {
2157 printk(KERN_DEBUG "Failed to add BSS WPA entry for " MACSTR 2155 printk(KERN_DEBUG "Failed to add BSS WPA entry for "
2158 "\n", MAC2STR(bssid)); 2156 "%s\n", print_mac(mac, bssid));
2159 } 2157 }
2160 2158
2161 /* expire old entries from WPA list */ 2159 /* expire old entries from WPA list */
@@ -2221,6 +2219,7 @@ prism54_process_bss_data(islpci_private *priv, u32 oid, u8 *addr,
2221{ 2219{
2222 struct ieee80211_beacon_phdr *hdr; 2220 struct ieee80211_beacon_phdr *hdr;
2223 u8 *pos, *end; 2221 u8 *pos, *end;
2222 DECLARE_MAC_BUF(mac);
2224 2223
2225 if (!priv->wpa) 2224 if (!priv->wpa)
2226 return; 2225 return;
@@ -2231,7 +2230,7 @@ prism54_process_bss_data(islpci_private *priv, u32 oid, u8 *addr,
2231 while (pos < end) { 2230 while (pos < end) {
2232 if (pos + 2 + pos[1] > end) { 2231 if (pos + 2 + pos[1] > end) {
2233 printk(KERN_DEBUG "Parsing Beacon/ProbeResp failed " 2232 printk(KERN_DEBUG "Parsing Beacon/ProbeResp failed "
2234 "for " MACSTR "\n", MAC2STR(addr)); 2233 "for %s\n", print_mac(mac, addr));
2235 return; 2234 return;
2236 } 2235 }
2237 if (pos[0] == WLAN_EID_GENERIC && pos[1] >= 4 && 2236 if (pos[0] == WLAN_EID_GENERIC && pos[1] >= 4 &&
@@ -2270,6 +2269,7 @@ prism54_process_trap_helper(islpci_private *priv, enum oid_num_t oid,
2270 size_t len = 0; /* u16, better? */ 2269 size_t len = 0; /* u16, better? */
2271 u8 *payload = NULL, *pos = NULL; 2270 u8 *payload = NULL, *pos = NULL;
2272 int ret; 2271 int ret;
2272 DECLARE_MAC_BUF(mac);
2273 2273
2274 /* I think all trapable objects are listed here. 2274 /* I think all trapable objects are listed here.
2275 * Some oids have a EX version. The difference is that they are emitted 2275 * Some oids have a EX version. The difference is that they are emitted
@@ -2358,14 +2358,8 @@ prism54_process_trap_helper(islpci_private *priv, enum oid_num_t oid,
2358 break; 2358 break;
2359 2359
2360 memcpy(&confirm->address, mlmeex->address, ETH_ALEN); 2360 memcpy(&confirm->address, mlmeex->address, ETH_ALEN);
2361 printk(KERN_DEBUG "Authenticate from: address:\t%02x:%02x:%02x:%02x:%02x:%02x\n", 2361 printk(KERN_DEBUG "Authenticate from: address:\t%s\n",
2362 mlmeex->address[0], 2362 print_mac(mac, mlmeex->address));
2363 mlmeex->address[1],
2364 mlmeex->address[2],
2365 mlmeex->address[3],
2366 mlmeex->address[4],
2367 mlmeex->address[5]
2368 );
2369 confirm->id = -1; /* or mlmeex->id ? */ 2363 confirm->id = -1; /* or mlmeex->id ? */
2370 confirm->state = 0; /* not used */ 2364 confirm->state = 0; /* not used */
2371 confirm->code = 0; 2365 confirm->code = 0;
@@ -2410,15 +2404,8 @@ prism54_process_trap_helper(islpci_private *priv, enum oid_num_t oid,
2410 wpa_ie_len = prism54_wpa_bss_ie_get(priv, mlmeex->address, wpa_ie); 2404 wpa_ie_len = prism54_wpa_bss_ie_get(priv, mlmeex->address, wpa_ie);
2411 2405
2412 if (!wpa_ie_len) { 2406 if (!wpa_ie_len) {
2413 printk(KERN_DEBUG "No WPA IE found from " 2407 printk(KERN_DEBUG "No WPA IE found from address:\t%s\n",
2414 "address:\t%02x:%02x:%02x:%02x:%02x:%02x\n", 2408 print_mac(mac, mlmeex->address));
2415 mlmeex->address[0],
2416 mlmeex->address[1],
2417 mlmeex->address[2],
2418 mlmeex->address[3],
2419 mlmeex->address[4],
2420 mlmeex->address[5]
2421 );
2422 kfree(confirm); 2409 kfree(confirm);
2423 break; 2410 break;
2424 } 2411 }
@@ -2454,15 +2441,8 @@ prism54_process_trap_helper(islpci_private *priv, enum oid_num_t oid,
2454 wpa_ie_len = prism54_wpa_bss_ie_get(priv, mlmeex->address, wpa_ie); 2441 wpa_ie_len = prism54_wpa_bss_ie_get(priv, mlmeex->address, wpa_ie);
2455 2442
2456 if (!wpa_ie_len) { 2443 if (!wpa_ie_len) {
2457 printk(KERN_DEBUG "No WPA IE found from " 2444 printk(KERN_DEBUG "No WPA IE found from address:\t%s\n",
2458 "address:\t%02x:%02x:%02x:%02x:%02x:%02x\n", 2445 print_mac(mac, mlmeex->address));
2459 mlmeex->address[0],
2460 mlmeex->address[1],
2461 mlmeex->address[2],
2462 mlmeex->address[3],
2463 mlmeex->address[4],
2464 mlmeex->address[5]
2465 );
2466 kfree(confirm); 2446 kfree(confirm);
2467 break; 2447 break;
2468 } 2448 }
diff --git a/drivers/net/wireless/ray_cs.c b/drivers/net/wireless/ray_cs.c
index 429bca8d0b5f..f87fe10059ae 100644
--- a/drivers/net/wireless/ray_cs.c
+++ b/drivers/net/wireless/ray_cs.c
@@ -412,6 +412,7 @@ static int ray_config(struct pcmcia_device *link)
412 memreq_t mem; 412 memreq_t mem;
413 struct net_device *dev = (struct net_device *)link->priv; 413 struct net_device *dev = (struct net_device *)link->priv;
414 ray_dev_t *local = netdev_priv(dev); 414 ray_dev_t *local = netdev_priv(dev);
415 DECLARE_MAC_BUF(mac);
415 416
416 DEBUG(1, "ray_config(0x%p)\n", link); 417 DEBUG(1, "ray_config(0x%p)\n", link);
417 418
@@ -482,10 +483,8 @@ static int ray_config(struct pcmcia_device *link)
482 strcpy(local->node.dev_name, dev->name); 483 strcpy(local->node.dev_name, dev->name);
483 link->dev_node = &local->node; 484 link->dev_node = &local->node;
484 485
485 printk(KERN_INFO "%s: RayLink, irq %d, hw_addr ", 486 printk(KERN_INFO "%s: RayLink, irq %d, hw_addr %s\n",
486 dev->name, dev->irq); 487 dev->name, dev->irq, print_mac(mac, dev->dev_addr));
487 for (i = 0; i < 6; i++)
488 printk("%02X%s", dev->dev_addr[i], ((i<5) ? ":" : "\n"));
489 488
490 return 0; 489 return 0;
491 490
@@ -2610,6 +2609,7 @@ static int ray_cs_proc_read(char *buf, char **start, off_t offset, int len)
2610 UCHAR *p; 2609 UCHAR *p;
2611 struct freq_hop_element *pfh; 2610 struct freq_hop_element *pfh;
2612 UCHAR c[33]; 2611 UCHAR c[33];
2612 DECLARE_MAC_BUF(mac);
2613 2613
2614 link = this_device; 2614 link = this_device;
2615 if (!link) 2615 if (!link)
@@ -2639,9 +2639,8 @@ static int ray_cs_proc_read(char *buf, char **start, off_t offset, int len)
2639 nettype[local->sparm.b5.a_network_type], c); 2639 nettype[local->sparm.b5.a_network_type], c);
2640 2640
2641 p = local->bss_id; 2641 p = local->bss_id;
2642 len += sprintf(buf + len, 2642 len += sprintf(buf + len, "BSSID = %s\n",
2643 "BSSID = %02x:%02x:%02x:%02x:%02x:%02x\n", 2643 print_mac(mac, p));
2644 p[0],p[1],p[2],p[3],p[4],p[5]);
2645 2644
2646 len += sprintf(buf + len, "Country code = %d\n", 2645 len += sprintf(buf + len, "Country code = %d\n",
2647 local->sparm.b5.a_curr_country_code); 2646 local->sparm.b5.a_curr_country_code);
diff --git a/drivers/net/wireless/rt2x00/rt2400pci.c b/drivers/net/wireless/rt2x00/rt2400pci.c
index 38e2188937c5..398c20105c81 100644
--- a/drivers/net/wireless/rt2x00/rt2400pci.c
+++ b/drivers/net/wireless/rt2x00/rt2400pci.c
@@ -1362,8 +1362,10 @@ static int rt2400pci_validate_eeprom(struct rt2x00_dev *rt2x00dev)
1362 */ 1362 */
1363 mac = rt2x00_eeprom_addr(rt2x00dev, EEPROM_MAC_ADDR_0); 1363 mac = rt2x00_eeprom_addr(rt2x00dev, EEPROM_MAC_ADDR_0);
1364 if (!is_valid_ether_addr(mac)) { 1364 if (!is_valid_ether_addr(mac)) {
1365 DECLARE_MAC_BUF(macbuf);
1366
1365 random_ether_addr(mac); 1367 random_ether_addr(mac);
1366 EEPROM(rt2x00dev, "MAC: " MAC_FMT "\n", MAC_ARG(mac)); 1368 EEPROM(rt2x00dev, "MAC: %s\n", print_mac(macbuf, mac));
1367 } 1369 }
1368 1370
1369 rt2x00_eeprom_read(rt2x00dev, EEPROM_ANTENNA, &word); 1371 rt2x00_eeprom_read(rt2x00dev, EEPROM_ANTENNA, &word);
diff --git a/drivers/net/wireless/rt2x00/rt2500pci.c b/drivers/net/wireless/rt2x00/rt2500pci.c
index f6115c626fa7..e8d63aaab7bc 100644
--- a/drivers/net/wireless/rt2x00/rt2500pci.c
+++ b/drivers/net/wireless/rt2x00/rt2500pci.c
@@ -1509,8 +1509,11 @@ static int rt2500pci_validate_eeprom(struct rt2x00_dev *rt2x00dev)
1509 */ 1509 */
1510 mac = rt2x00_eeprom_addr(rt2x00dev, EEPROM_MAC_ADDR_0); 1510 mac = rt2x00_eeprom_addr(rt2x00dev, EEPROM_MAC_ADDR_0);
1511 if (!is_valid_ether_addr(mac)) { 1511 if (!is_valid_ether_addr(mac)) {
1512 DECLARE_MAC_BUF(macbuf);
1513
1512 random_ether_addr(mac); 1514 random_ether_addr(mac);
1513 EEPROM(rt2x00dev, "MAC: " MAC_FMT "\n", MAC_ARG(mac)); 1515 EEPROM(rt2x00dev, "MAC: %s\n",
1516 print_mac(macbuf, mac));
1514 } 1517 }
1515 1518
1516 rt2x00_eeprom_read(rt2x00dev, EEPROM_ANTENNA, &word); 1519 rt2x00_eeprom_read(rt2x00dev, EEPROM_ANTENNA, &word);
diff --git a/drivers/net/wireless/rt2x00/rt2500usb.c b/drivers/net/wireless/rt2x00/rt2500usb.c
index 847bd7f58eed..614600c5510d 100644
--- a/drivers/net/wireless/rt2x00/rt2500usb.c
+++ b/drivers/net/wireless/rt2x00/rt2500usb.c
@@ -1233,8 +1233,10 @@ static int rt2500usb_validate_eeprom(struct rt2x00_dev *rt2x00dev)
1233 */ 1233 */
1234 mac = rt2x00_eeprom_addr(rt2x00dev, EEPROM_MAC_ADDR_0); 1234 mac = rt2x00_eeprom_addr(rt2x00dev, EEPROM_MAC_ADDR_0);
1235 if (!is_valid_ether_addr(mac)) { 1235 if (!is_valid_ether_addr(mac)) {
1236 DECLARE_MAC_BUF(macbuf);
1237
1236 random_ether_addr(mac); 1238 random_ether_addr(mac);
1237 EEPROM(rt2x00dev, "MAC: " MAC_FMT "\n", MAC_ARG(mac)); 1239 EEPROM(rt2x00dev, "MAC: %s\n", print_mac(macbuf, mac));
1238 } 1240 }
1239 1241
1240 rt2x00_eeprom_read(rt2x00dev, EEPROM_ANTENNA, &word); 1242 rt2x00_eeprom_read(rt2x00dev, EEPROM_ANTENNA, &word);
diff --git a/drivers/net/wireless/rt2x00/rt61pci.c b/drivers/net/wireless/rt2x00/rt61pci.c
index 730bed5a1984..09c8c96e2f83 100644
--- a/drivers/net/wireless/rt2x00/rt61pci.c
+++ b/drivers/net/wireless/rt2x00/rt61pci.c
@@ -2019,8 +2019,10 @@ static int rt61pci_validate_eeprom(struct rt2x00_dev *rt2x00dev)
2019 */ 2019 */
2020 mac = rt2x00_eeprom_addr(rt2x00dev, EEPROM_MAC_ADDR_0); 2020 mac = rt2x00_eeprom_addr(rt2x00dev, EEPROM_MAC_ADDR_0);
2021 if (!is_valid_ether_addr(mac)) { 2021 if (!is_valid_ether_addr(mac)) {
2022 DECLARE_MAC_BUF(macbuf);
2023
2022 random_ether_addr(mac); 2024 random_ether_addr(mac);
2023 EEPROM(rt2x00dev, "MAC: " MAC_FMT "\n", MAC_ARG(mac)); 2025 EEPROM(rt2x00dev, "MAC: %s\n", print_mac(macbuf, mac));
2024 } 2026 }
2025 2027
2026 rt2x00_eeprom_read(rt2x00dev, EEPROM_ANTENNA, &word); 2028 rt2x00_eeprom_read(rt2x00dev, EEPROM_ANTENNA, &word);
diff --git a/drivers/net/wireless/rt2x00/rt73usb.c b/drivers/net/wireless/rt2x00/rt73usb.c
index b047c7c0f9ee..3397881bd63d 100644
--- a/drivers/net/wireless/rt2x00/rt73usb.c
+++ b/drivers/net/wireless/rt2x00/rt73usb.c
@@ -1475,8 +1475,10 @@ static int rt73usb_validate_eeprom(struct rt2x00_dev *rt2x00dev)
1475 */ 1475 */
1476 mac = rt2x00_eeprom_addr(rt2x00dev, EEPROM_MAC_ADDR_0); 1476 mac = rt2x00_eeprom_addr(rt2x00dev, EEPROM_MAC_ADDR_0);
1477 if (!is_valid_ether_addr(mac)) { 1477 if (!is_valid_ether_addr(mac)) {
1478 DECLARE_MAC_BUF(macbuf);
1479
1478 random_ether_addr(mac); 1480 random_ether_addr(mac);
1479 EEPROM(rt2x00dev, "MAC: " MAC_FMT "\n", MAC_ARG(mac)); 1481 EEPROM(rt2x00dev, "MAC: %s\n", print_mac(macbuf, mac));
1480 } 1482 }
1481 1483
1482 rt2x00_eeprom_read(rt2x00dev, EEPROM_ANTENNA, &word); 1484 rt2x00_eeprom_read(rt2x00dev, EEPROM_ANTENNA, &word);
diff --git a/drivers/net/wireless/rtl8187_dev.c b/drivers/net/wireless/rtl8187_dev.c
index 7dbf11e30db3..bf9f0cc5a645 100644
--- a/drivers/net/wireless/rtl8187_dev.c
+++ b/drivers/net/wireless/rtl8187_dev.c
@@ -574,6 +574,7 @@ static int __devinit rtl8187_probe(struct usb_interface *intf,
574 struct ieee80211_channel *channel; 574 struct ieee80211_channel *channel;
575 u16 txpwr, reg; 575 u16 txpwr, reg;
576 int err, i; 576 int err, i;
577 DECLARE_MAC_BUF(mac);
577 578
578 dev = ieee80211_alloc_hw(sizeof(*priv), &rtl8187_ops); 579 dev = ieee80211_alloc_hw(sizeof(*priv), &rtl8187_ops);
579 if (!dev) { 580 if (!dev) {
@@ -681,8 +682,8 @@ static int __devinit rtl8187_probe(struct usb_interface *intf,
681 goto err_free_dev; 682 goto err_free_dev;
682 } 683 }
683 684
684 printk(KERN_INFO "%s: hwaddr " MAC_FMT ", rtl8187 V%d + %s\n", 685 printk(KERN_INFO "%s: hwaddr %s, rtl8187 V%d + %s\n",
685 wiphy_name(dev->wiphy), MAC_ARG(dev->wiphy->perm_addr), 686 wiphy_name(dev->wiphy), print_mac(mac, dev->wiphy->perm_addr),
686 priv->asic_rev, priv->rf_init == rtl8225_rf_init ? 687 priv->asic_rev, priv->rf_init == rtl8225_rf_init ?
687 "rtl8225" : "rtl8225z2"); 688 "rtl8225" : "rtl8225z2");
688 689
diff --git a/drivers/net/wireless/wavelan.c b/drivers/net/wireless/wavelan.c
index 33ed9fe95f3d..a1f8a1687842 100644
--- a/drivers/net/wireless/wavelan.c
+++ b/drivers/net/wireless/wavelan.c
@@ -880,6 +880,8 @@ static void wv_82586_reconfig(struct net_device * dev)
880 */ 880 */
881static void wv_psa_show(psa_t * p) 881static void wv_psa_show(psa_t * p)
882{ 882{
883 DECLARE_MAC_BUF(mac);
884
883 printk(KERN_DEBUG "##### WaveLAN PSA contents: #####\n"); 885 printk(KERN_DEBUG "##### WaveLAN PSA contents: #####\n");
884 printk(KERN_DEBUG "psa_io_base_addr_1: 0x%02X %02X %02X %02X\n", 886 printk(KERN_DEBUG "psa_io_base_addr_1: 0x%02X %02X %02X %02X\n",
885 p->psa_io_base_addr_1, 887 p->psa_io_base_addr_1,
@@ -891,22 +893,13 @@ static void wv_psa_show(psa_t * p)
891 printk(KERN_DEBUG "psa_holi_params: 0x%02x, ", p->psa_holi_params); 893 printk(KERN_DEBUG "psa_holi_params: 0x%02x, ", p->psa_holi_params);
892 printk("psa_int_req_no: %d\n", p->psa_int_req_no); 894 printk("psa_int_req_no: %d\n", p->psa_int_req_no);
893#ifdef DEBUG_SHOW_UNUSED 895#ifdef DEBUG_SHOW_UNUSED
894 printk(KERN_DEBUG 896 printk(KERN_DEBUG "psa_unused0[]: %s\n",
895 "psa_unused0[]: %02X:%02X:%02X:%02X:%02X:%02X:%02X\n", 897 print_mac(mac, p->psa_unused0));
896 p->psa_unused0[0], p->psa_unused0[1], p->psa_unused0[2],
897 p->psa_unused0[3], p->psa_unused0[4], p->psa_unused0[5],
898 p->psa_unused0[6]);
899#endif /* DEBUG_SHOW_UNUSED */ 898#endif /* DEBUG_SHOW_UNUSED */
900 printk(KERN_DEBUG 899 printk(KERN_DEBUG "psa_univ_mac_addr[]: %s\n",
901 "psa_univ_mac_addr[]: %02x:%02x:%02x:%02x:%02x:%02x\n", 900 print_mac(mac, p->psa_univ_mac_addr));
902 p->psa_univ_mac_addr[0], p->psa_univ_mac_addr[1], 901 printk(KERN_DEBUG "psa_local_mac_addr[]: %s\n",
903 p->psa_univ_mac_addr[2], p->psa_univ_mac_addr[3], 902 print_mac(mac, p->psa_local_mac_addr));
904 p->psa_univ_mac_addr[4], p->psa_univ_mac_addr[5]);
905 printk(KERN_DEBUG
906 "psa_local_mac_addr[]: %02x:%02x:%02x:%02x:%02x:%02x\n",
907 p->psa_local_mac_addr[0], p->psa_local_mac_addr[1],
908 p->psa_local_mac_addr[2], p->psa_local_mac_addr[3],
909 p->psa_local_mac_addr[4], p->psa_local_mac_addr[5]);
910 printk(KERN_DEBUG "psa_univ_local_sel: %d, ", 903 printk(KERN_DEBUG "psa_univ_local_sel: %d, ",
911 p->psa_univ_local_sel); 904 p->psa_univ_local_sel);
912 printk("psa_comp_number: %d, ", p->psa_comp_number); 905 printk("psa_comp_number: %d, ", p->psa_comp_number);
@@ -1248,14 +1241,14 @@ static inline void wv_packet_info(u8 * p, /* Packet to dump */
1248{ /* Name of the function */ 1241{ /* Name of the function */
1249 int i; 1242 int i;
1250 int maxi; 1243 int maxi;
1244 DECLARE_MAC_BUF(mac);
1251 1245
1252 printk(KERN_DEBUG 1246 printk(KERN_DEBUG
1253 "%s: %s(): dest %02X:%02X:%02X:%02X:%02X:%02X, length %d\n", 1247 "%s: %s(): dest %s, length %d\n",
1254 msg1, msg2, p[0], p[1], p[2], p[3], p[4], p[5], length); 1248 msg1, msg2, print_mac(mac, p), length);
1255 printk(KERN_DEBUG 1249 printk(KERN_DEBUG
1256 "%s: %s(): src %02X:%02X:%02X:%02X:%02X:%02X, type 0x%02X%02X\n", 1250 "%s: %s(): src %s, type 0x%02X%02X\n",
1257 msg1, msg2, p[6], p[7], p[8], p[9], p[10], p[11], p[12], 1251 msg1, msg2, print_mac(mac, &p[6]), p[12], p[13]);
1258 p[13]);
1259 1252
1260#ifdef DEBUG_PACKET_DUMP 1253#ifdef DEBUG_PACKET_DUMP
1261 1254
@@ -1286,7 +1279,9 @@ static void wv_init_info(struct net_device * dev)
1286 short ioaddr = dev->base_addr; 1279 short ioaddr = dev->base_addr;
1287 net_local *lp = (net_local *) dev->priv; 1280 net_local *lp = (net_local *) dev->priv;
1288 psa_t psa; 1281 psa_t psa;
1289 int i; 1282#ifdef DEBUG_BASIC_SHOW
1283 DECLARE_MAC_BUF(mac);
1284#endif
1290 1285
1291 /* Read the parameter storage area */ 1286 /* Read the parameter storage area */
1292 psa_read(ioaddr, lp->hacr, 0, (unsigned char *) &psa, sizeof(psa)); 1287 psa_read(ioaddr, lp->hacr, 0, (unsigned char *) &psa, sizeof(psa));
@@ -1303,10 +1298,8 @@ static void wv_init_info(struct net_device * dev)
1303 1298
1304#ifdef DEBUG_BASIC_SHOW 1299#ifdef DEBUG_BASIC_SHOW
1305 /* Now, let's go for the basic stuff. */ 1300 /* Now, let's go for the basic stuff. */
1306 printk(KERN_NOTICE "%s: WaveLAN at %#x,", dev->name, ioaddr); 1301 printk(KERN_NOTICE "%s: WaveLAN at %#x, %s, IRQ %d",
1307 for (i = 0; i < WAVELAN_ADDR_SIZE; i++) 1302 dev->name, ioaddr, print_mac(mac, dev->dev_addr), dev->irq);
1308 printk("%s%02X", (i == 0) ? " " : ":", dev->dev_addr[i]);
1309 printk(", IRQ %d", dev->irq);
1310 1303
1311 /* Print current network ID. */ 1304 /* Print current network ID. */
1312 if (psa.psa_nwid_select) 1305 if (psa.psa_nwid_select)
@@ -3596,15 +3589,15 @@ static void wv_82586_config(struct net_device * dev)
3596 WAVELAN_ADDR_SIZE >> 1); 3589 WAVELAN_ADDR_SIZE >> 1);
3597 3590
3598#ifdef DEBUG_CONFIG_INFO 3591#ifdef DEBUG_CONFIG_INFO
3592 {
3593 DECLARE_MAC_BUF(mac);
3599 printk(KERN_DEBUG 3594 printk(KERN_DEBUG
3600 "%s: wv_82586_config(): set %d multicast addresses:\n", 3595 "%s: wv_82586_config(): set %d multicast addresses:\n",
3601 dev->name, lp->mc_count); 3596 dev->name, lp->mc_count);
3602 for (dmi = dev->mc_list; dmi; dmi = dmi->next) 3597 for (dmi = dev->mc_list; dmi; dmi = dmi->next)
3603 printk(KERN_DEBUG 3598 printk(KERN_DEBUG " %s\n",
3604 " %02x:%02x:%02x:%02x:%02x:%02x\n", 3599 print_mac(mac, dmi->dmi_addr));
3605 dmi->dmi_addr[0], dmi->dmi_addr[1], 3600 }
3606 dmi->dmi_addr[2], dmi->dmi_addr[3],
3607 dmi->dmi_addr[4], dmi->dmi_addr[5]);
3608#endif 3601#endif
3609 } 3602 }
3610 3603
diff --git a/drivers/net/wireless/wavelan_cs.c b/drivers/net/wireless/wavelan_cs.c
index 9b7f44957869..577c647824fe 100644
--- a/drivers/net/wireless/wavelan_cs.c
+++ b/drivers/net/wireless/wavelan_cs.c
@@ -1042,6 +1042,7 @@ wv_82593_reconfig(struct net_device * dev)
1042static void 1042static void
1043wv_psa_show(psa_t * p) 1043wv_psa_show(psa_t * p)
1044{ 1044{
1045 DECLARE_MAC_BUF(mac);
1045 printk(KERN_DEBUG "##### wavelan psa contents: #####\n"); 1046 printk(KERN_DEBUG "##### wavelan psa contents: #####\n");
1046 printk(KERN_DEBUG "psa_io_base_addr_1: 0x%02X %02X %02X %02X\n", 1047 printk(KERN_DEBUG "psa_io_base_addr_1: 0x%02X %02X %02X %02X\n",
1047 p->psa_io_base_addr_1, 1048 p->psa_io_base_addr_1,
@@ -1055,29 +1056,13 @@ wv_psa_show(psa_t * p)
1055 printk(KERN_DEBUG "psa_holi_params: 0x%02x, ", p->psa_holi_params); 1056 printk(KERN_DEBUG "psa_holi_params: 0x%02x, ", p->psa_holi_params);
1056 printk("psa_int_req_no: %d\n", p->psa_int_req_no); 1057 printk("psa_int_req_no: %d\n", p->psa_int_req_no);
1057#ifdef DEBUG_SHOW_UNUSED 1058#ifdef DEBUG_SHOW_UNUSED
1058 printk(KERN_DEBUG "psa_unused0[]: %02X:%02X:%02X:%02X:%02X:%02X:%02X\n", 1059 printk(KERN_DEBUG "psa_unused0[]: %s\n",
1059 p->psa_unused0[0], 1060 print_mac(mac, p->psa_unused0));
1060 p->psa_unused0[1],
1061 p->psa_unused0[2],
1062 p->psa_unused0[3],
1063 p->psa_unused0[4],
1064 p->psa_unused0[5],
1065 p->psa_unused0[6]);
1066#endif /* DEBUG_SHOW_UNUSED */ 1061#endif /* DEBUG_SHOW_UNUSED */
1067 printk(KERN_DEBUG "psa_univ_mac_addr[]: %02x:%02x:%02x:%02x:%02x:%02x\n", 1062 printk(KERN_DEBUG "psa_univ_mac_addr[]: %s\n",
1068 p->psa_univ_mac_addr[0], 1063 print_mac(mac, p->psa_univ_mac_addr));
1069 p->psa_univ_mac_addr[1], 1064 printk(KERN_DEBUG "psa_local_mac_addr[]: %s\n",
1070 p->psa_univ_mac_addr[2], 1065 print_mac(mac, p->psa_local_mac_addr));
1071 p->psa_univ_mac_addr[3],
1072 p->psa_univ_mac_addr[4],
1073 p->psa_univ_mac_addr[5]);
1074 printk(KERN_DEBUG "psa_local_mac_addr[]: %02x:%02x:%02x:%02x:%02x:%02x\n",
1075 p->psa_local_mac_addr[0],
1076 p->psa_local_mac_addr[1],
1077 p->psa_local_mac_addr[2],
1078 p->psa_local_mac_addr[3],
1079 p->psa_local_mac_addr[4],
1080 p->psa_local_mac_addr[5]);
1081 printk(KERN_DEBUG "psa_univ_local_sel: %d, ", p->psa_univ_local_sel); 1066 printk(KERN_DEBUG "psa_univ_local_sel: %d, ", p->psa_univ_local_sel);
1082 printk("psa_comp_number: %d, ", p->psa_comp_number); 1067 printk("psa_comp_number: %d, ", p->psa_comp_number);
1083 printk("psa_thr_pre_set: 0x%02x\n", p->psa_thr_pre_set); 1068 printk("psa_thr_pre_set: 0x%02x\n", p->psa_thr_pre_set);
@@ -1277,11 +1262,12 @@ wv_packet_info(u_char * p, /* Packet to dump */
1277{ 1262{
1278 int i; 1263 int i;
1279 int maxi; 1264 int maxi;
1265 DECLARE_MAC_BUF(mac);
1280 1266
1281 printk(KERN_DEBUG "%s: %s(): dest %02X:%02X:%02X:%02X:%02X:%02X, length %d\n", 1267 printk(KERN_DEBUG "%s: %s(): dest %s, length %d\n",
1282 msg1, msg2, p[0], p[1], p[2], p[3], p[4], p[5], length); 1268 msg1, msg2, print_mac(mac, p), length);
1283 printk(KERN_DEBUG "%s: %s(): src %02X:%02X:%02X:%02X:%02X:%02X, type 0x%02X%02X\n", 1269 printk(KERN_DEBUG "%s: %s(): src %s, type 0x%02X%02X\n",
1284 msg1, msg2, p[6], p[7], p[8], p[9], p[10], p[11], p[12], p[13]); 1270 msg1, msg2, print_mac(mac, &p[6]), p[12], p[13]);
1285 1271
1286#ifdef DEBUG_PACKET_DUMP 1272#ifdef DEBUG_PACKET_DUMP
1287 1273
@@ -1312,7 +1298,7 @@ wv_init_info(struct net_device * dev)
1312{ 1298{
1313 kio_addr_t base = dev->base_addr; 1299 kio_addr_t base = dev->base_addr;
1314 psa_t psa; 1300 psa_t psa;
1315 int i; 1301 DECLARE_MAC_BUF(mac);
1316 1302
1317 /* Read the parameter storage area */ 1303 /* Read the parameter storage area */
1318 psa_read(dev, 0, (unsigned char *) &psa, sizeof(psa)); 1304 psa_read(dev, 0, (unsigned char *) &psa, sizeof(psa));
@@ -1329,10 +1315,10 @@ wv_init_info(struct net_device * dev)
1329 1315
1330#ifdef DEBUG_BASIC_SHOW 1316#ifdef DEBUG_BASIC_SHOW
1331 /* Now, let's go for the basic stuff */ 1317 /* Now, let's go for the basic stuff */
1332 printk(KERN_NOTICE "%s: WaveLAN: port %#lx, irq %d, hw_addr", 1318 printk(KERN_NOTICE "%s: WaveLAN: port %#lx, irq %d, "
1333 dev->name, base, dev->irq); 1319 "hw_addr %s",
1334 for(i = 0; i < WAVELAN_ADDR_SIZE; i++) 1320 dev->name, base, dev->irq,
1335 printk("%s%02X", (i == 0) ? " " : ":", dev->dev_addr[i]); 1321 print_mac(mac, dev->dev_addr));
1336 1322
1337 /* Print current network id */ 1323 /* Print current network id */
1338 if(psa.psa_nwid_select) 1324 if(psa.psa_nwid_select)
@@ -3691,12 +3677,12 @@ wv_82593_config(struct net_device * dev)
3691 int addrs_len = WAVELAN_ADDR_SIZE * lp->mc_count; 3677 int addrs_len = WAVELAN_ADDR_SIZE * lp->mc_count;
3692 3678
3693#ifdef DEBUG_CONFIG_INFO 3679#ifdef DEBUG_CONFIG_INFO
3680 DECLARE_MAC_BUF(mac);
3694 printk(KERN_DEBUG "%s: wv_hw_config(): set %d multicast addresses:\n", 3681 printk(KERN_DEBUG "%s: wv_hw_config(): set %d multicast addresses:\n",
3695 dev->name, lp->mc_count); 3682 dev->name, lp->mc_count);
3696 for(dmi=dev->mc_list; dmi; dmi=dmi->next) 3683 for(dmi=dev->mc_list; dmi; dmi=dmi->next)
3697 printk(KERN_DEBUG " %02x:%02x:%02x:%02x:%02x:%02x\n", 3684 printk(KERN_DEBUG " %s\n",
3698 dmi->dmi_addr[0], dmi->dmi_addr[1], dmi->dmi_addr[2], 3685 print_mac(mac, dmi->dmi_addr));
3699 dmi->dmi_addr[3], dmi->dmi_addr[4], dmi->dmi_addr[5] );
3700#endif 3686#endif
3701 3687
3702 /* Initialize adapter's ethernet multicast addresses */ 3688 /* Initialize adapter's ethernet multicast addresses */
diff --git a/drivers/net/wireless/wl3501_cs.c b/drivers/net/wireless/wl3501_cs.c
index 2690f291e3f7..42a36b3f3ff7 100644
--- a/drivers/net/wireless/wl3501_cs.c
+++ b/drivers/net/wireless/wl3501_cs.c
@@ -860,11 +860,10 @@ static int wl3501_esbq_confirm(struct wl3501_card *this)
860static void wl3501_online(struct net_device *dev) 860static void wl3501_online(struct net_device *dev)
861{ 861{
862 struct wl3501_card *this = netdev_priv(dev); 862 struct wl3501_card *this = netdev_priv(dev);
863 DECLARE_MAC_BUF(mac);
863 864
864 printk(KERN_INFO "%s: Wireless LAN online. BSSID: " 865 printk(KERN_INFO "%s: Wireless LAN online. BSSID: %s\n",
865 "%02X %02X %02X %02X %02X %02X\n", dev->name, 866 dev->name, print_mac(mac, this->bssid));
866 this->bssid[0], this->bssid[1], this->bssid[2],
867 this->bssid[3], this->bssid[4], this->bssid[5]);
868 netif_wake_queue(dev); 867 netif_wake_queue(dev);
869} 868}
870 869
@@ -1966,6 +1965,7 @@ static int wl3501_config(struct pcmcia_device *link)
1966 struct net_device *dev = link->priv; 1965 struct net_device *dev = link->priv;
1967 int i = 0, j, last_fn, last_ret; 1966 int i = 0, j, last_fn, last_ret;
1968 struct wl3501_card *this; 1967 struct wl3501_card *this;
1968 DECLARE_MAC_BUF(mac);
1969 1969
1970 /* Try allocating IO ports. This tries a few fixed addresses. If you 1970 /* Try allocating IO ports. This tries a few fixed addresses. If you
1971 * want, you can also read the card's config table to pick addresses -- 1971 * want, you can also read the card's config table to pick addresses --
@@ -2019,14 +2019,14 @@ static int wl3501_config(struct pcmcia_device *link)
2019 } 2019 }
2020 strcpy(this->node.dev_name, dev->name); 2020 strcpy(this->node.dev_name, dev->name);
2021 2021
2022 /* print probe information */ 2022 for (i = 0; i < 6; i++)
2023 printk(KERN_INFO "%s: wl3501 @ 0x%3.3x, IRQ %d, MAC addr in flash ROM:",
2024 dev->name, this->base_addr, (int)dev->irq);
2025 for (i = 0; i < 6; i++) {
2026 dev->dev_addr[i] = ((char *)&this->mac_addr)[i]; 2023 dev->dev_addr[i] = ((char *)&this->mac_addr)[i];
2027 printk("%c%02x", i ? ':' : ' ', dev->dev_addr[i]); 2024
2028 } 2025 /* print probe information */
2029 printk("\n"); 2026 printk(KERN_INFO "%s: wl3501 @ 0x%3.3x, IRQ %d, "
2027 "MAC addr in flash ROM:%s\n",
2028 dev->name, this->base_addr, (int)dev->irq,
2029 print_mac(mac, dev->dev_addr));
2030 /* 2030 /*
2031 * Initialize card parameters - added by jss 2031 * Initialize card parameters - added by jss
2032 */ 2032 */
diff --git a/drivers/net/wireless/zd1211rw/zd_chip.c b/drivers/net/wireless/zd1211rw/zd_chip.c
index 495904218b1b..750c0f99e86f 100644
--- a/drivers/net/wireless/zd1211rw/zd_chip.c
+++ b/drivers/net/wireless/zd1211rw/zd_chip.c
@@ -377,6 +377,7 @@ int zd_write_mac_addr(struct zd_chip *chip, const u8 *mac_addr)
377 [0] = { .addr = CR_MAC_ADDR_P1 }, 377 [0] = { .addr = CR_MAC_ADDR_P1 },
378 [1] = { .addr = CR_MAC_ADDR_P2 }, 378 [1] = { .addr = CR_MAC_ADDR_P2 },
379 }; 379 };
380 DECLARE_MAC_BUF(mac);
380 381
381 reqs[0].value = (mac_addr[3] << 24) 382 reqs[0].value = (mac_addr[3] << 24)
382 | (mac_addr[2] << 16) 383 | (mac_addr[2] << 16)
@@ -386,7 +387,7 @@ int zd_write_mac_addr(struct zd_chip *chip, const u8 *mac_addr)
386 | mac_addr[4]; 387 | mac_addr[4];
387 388
388 dev_dbg_f(zd_chip_dev(chip), 389 dev_dbg_f(zd_chip_dev(chip),
389 "mac addr " MAC_FMT "\n", MAC_ARG(mac_addr)); 390 "mac addr %s\n", print_mac(mac, mac_addr));
390 391
391 mutex_lock(&chip->mutex); 392 mutex_lock(&chip->mutex);
392 r = zd_iowrite32a_locked(chip, reqs, ARRAY_SIZE(reqs)); 393 r = zd_iowrite32a_locked(chip, reqs, ARRAY_SIZE(reqs));
diff --git a/drivers/net/wireless/zd1211rw/zd_mac.c b/drivers/net/wireless/zd1211rw/zd_mac.c
index 451308d7095d..06b342b39792 100644
--- a/drivers/net/wireless/zd1211rw/zd_mac.c
+++ b/drivers/net/wireless/zd1211rw/zd_mac.c
@@ -289,12 +289,13 @@ int zd_mac_set_mac_address(struct net_device *netdev, void *p)
289 struct sockaddr *addr = p; 289 struct sockaddr *addr = p;
290 struct zd_mac *mac = zd_netdev_mac(netdev); 290 struct zd_mac *mac = zd_netdev_mac(netdev);
291 struct zd_chip *chip = &mac->chip; 291 struct zd_chip *chip = &mac->chip;
292 DECLARE_MAC_BUF(mac2);
292 293
293 if (!is_valid_ether_addr(addr->sa_data)) 294 if (!is_valid_ether_addr(addr->sa_data))
294 return -EADDRNOTAVAIL; 295 return -EADDRNOTAVAIL;
295 296
296 dev_dbg_f(zd_mac_dev(mac), 297 dev_dbg_f(zd_mac_dev(mac),
297 "Setting MAC to " MAC_FMT "\n", MAC_ARG(addr->sa_data)); 298 "Setting MAC to %s\n", print_mac(mac2, addr->sa_data));
298 299
299 if (netdev->flags & IFF_UP) { 300 if (netdev->flags & IFF_UP) {
300 r = zd_write_mac_addr(chip, addr->sa_data); 301 r = zd_write_mac_addr(chip, addr->sa_data);
@@ -329,6 +330,7 @@ void zd_mac_set_multicast_list(struct net_device *dev)
329 struct zd_mc_hash hash; 330 struct zd_mc_hash hash;
330 struct dev_mc_list *mc; 331 struct dev_mc_list *mc;
331 unsigned long flags; 332 unsigned long flags;
333 DECLARE_MAC_BUF(mac2);
332 334
333 if (dev->flags & (IFF_PROMISC|IFF_ALLMULTI) || 335 if (dev->flags & (IFF_PROMISC|IFF_ALLMULTI) ||
334 ieee->iw_mode == IW_MODE_MONITOR) { 336 ieee->iw_mode == IW_MODE_MONITOR) {
@@ -336,8 +338,8 @@ void zd_mac_set_multicast_list(struct net_device *dev)
336 } else { 338 } else {
337 zd_mc_clear(&hash); 339 zd_mc_clear(&hash);
338 for (mc = dev->mc_list; mc; mc = mc->next) { 340 for (mc = dev->mc_list; mc; mc = mc->next) {
339 dev_dbg_f(zd_mac_dev(mac), "mc addr " MAC_FMT "\n", 341 dev_dbg_f(zd_mac_dev(mac), "mc addr %s\n",
340 MAC_ARG(mc->dmi_addr)); 342 print_mac(mac2, mc->dmi_addr));
341 zd_mc_add_addr(&hash, mc->dmi_addr); 343 zd_mc_add_addr(&hash, mc->dmi_addr);
342 } 344 }
343 } 345 }
diff --git a/drivers/net/yellowfin.c b/drivers/net/yellowfin.c
index 709623e1c611..87f002ade531 100644
--- a/drivers/net/yellowfin.c
+++ b/drivers/net/yellowfin.c
@@ -374,6 +374,7 @@ static int __devinit yellowfin_init_one(struct pci_dev *pdev,
374#else 374#else
375 int bar = 1; 375 int bar = 1;
376#endif 376#endif
377 DECLARE_MAC_BUF(mac);
377 378
378/* when built into the kernel, we only print version if device is found */ 379/* when built into the kernel, we only print version if device is found */
379#ifndef MODULE 380#ifndef MODULE
@@ -480,12 +481,10 @@ static int __devinit yellowfin_init_one(struct pci_dev *pdev,
480 if (i) 481 if (i)
481 goto err_out_unmap_status; 482 goto err_out_unmap_status;
482 483
483 printk(KERN_INFO "%s: %s type %8x at %p, ", 484 printk(KERN_INFO "%s: %s type %8x at %p, %s, IRQ %d.\n",
484 dev->name, pci_id_tbl[chip_idx].name, 485 dev->name, pci_id_tbl[chip_idx].name,
485 ioread32(ioaddr + ChipRev), ioaddr); 486 ioread32(ioaddr + ChipRev), ioaddr,
486 for (i = 0; i < 5; i++) 487 print_mac(mac, dev->dev_addr), irq);
487 printk("%2.2x:", dev->dev_addr[i]);
488 printk("%2.2x, IRQ %d.\n", dev->dev_addr[i], irq);
489 488
490 if (np->drv_flags & HasMII) { 489 if (np->drv_flags & HasMII) {
491 int phy, phy_idx = 0; 490 int phy, phy_idx = 0;
@@ -1101,11 +1100,11 @@ static int yellowfin_rx(struct net_device *dev)
1101 memcmp(le32_to_cpu(yp->rx_ring_dma + 1100 memcmp(le32_to_cpu(yp->rx_ring_dma +
1102 entry*sizeof(struct yellowfin_desc)), 1101 entry*sizeof(struct yellowfin_desc)),
1103 "\377\377\377\377\377\377", 6) != 0) { 1102 "\377\377\377\377\377\377", 6) != 0) {
1104 if (bogus_rx++ == 0) 1103 if (bogus_rx++ == 0) {
1105 printk(KERN_WARNING "%s: Bad frame to %2.2x:%2.2x:%2.2x:%2.2x:" 1104 DECLARE_MAC_BUF(mac);
1106 "%2.2x:%2.2x.\n", 1105 printk(KERN_WARNING "%s: Bad frame to %s\n",
1107 dev->name, buf_addr[0], buf_addr[1], buf_addr[2], 1106 dev->name, print_mac(mac, buf_addr));
1108 buf_addr[3], buf_addr[4], buf_addr[5]); 1107 }
1109#endif 1108#endif
1110 } else { 1109 } else {
1111 struct sk_buff *skb; 1110 struct sk_buff *skb;
diff --git a/drivers/net/znet.c b/drivers/net/znet.c
index 43712c7b9ecf..a86c022d6a94 100644
--- a/drivers/net/znet.c
+++ b/drivers/net/znet.c
@@ -370,6 +370,7 @@ static int __init znet_probe (void)
370 struct net_device *dev; 370 struct net_device *dev;
371 char *p; 371 char *p;
372 int err = -ENOMEM; 372 int err = -ENOMEM;
373 DECLARE_MAC_BUF(mac);
373 374
374 /* This code scans the region 0xf0000 to 0xfffff for a "NETIDBLK". */ 375 /* This code scans the region 0xf0000 to 0xfffff for a "NETIDBLK". */
375 for(p = (char *)phys_to_virt(0xf0000); p < (char *)phys_to_virt(0x100000); p++) 376 for(p = (char *)phys_to_virt(0xf0000); p < (char *)phys_to_virt(0x100000); p++)
@@ -392,14 +393,14 @@ static int __init znet_probe (void)
392 dev->base_addr = netinfo->iobase1; 393 dev->base_addr = netinfo->iobase1;
393 dev->irq = netinfo->irq1; 394 dev->irq = netinfo->irq1;
394 395
395 printk(KERN_INFO "%s: ZNET at %#3lx,", dev->name, dev->base_addr);
396
397 /* The station address is in the "netidblk" at 0x0f0000. */ 396 /* The station address is in the "netidblk" at 0x0f0000. */
398 for (i = 0; i < 6; i++) 397 for (i = 0; i < 6; i++)
399 printk(" %2.2x", dev->dev_addr[i] = netinfo->netid[i]); 398 dev->dev_addr[i] = netinfo->netid[i];
400 399
401 printk(", using IRQ %d DMA %d and %d.\n", dev->irq, netinfo->dma1, 400 printk(KERN_INFO "%s: ZNET at %#3lx, %s"
402 netinfo->dma2); 401 ", using IRQ %d DMA %d and %d.\n",
402 dev->name, dev->base_addr, print_mac(mac, dev->dev_addr),
403 dev->irq, netinfo->dma1, netinfo->dma2);
403 404
404 if (znet_debug > 1) { 405 if (znet_debug > 1) {
405 printk(KERN_INFO "%s: vendor '%16.16s' IRQ1 %d IRQ2 %d DMA1 %d DMA2 %d.\n", 406 printk(KERN_INFO "%s: vendor '%16.16s' IRQ1 %d IRQ2 %d DMA1 %d DMA2 %d.\n",
diff --git a/drivers/net/zorro8390.c b/drivers/net/zorro8390.c
index fb215eb6dcf3..3926b2aa9cca 100644
--- a/drivers/net/zorro8390.c
+++ b/drivers/net/zorro8390.c
@@ -151,6 +151,7 @@ static int __devinit zorro8390_init(struct net_device *dev,
151 0x00, 0x02, 0x04, 0x06, 0x08, 0x0a, 0x0c, 0x0e, 151 0x00, 0x02, 0x04, 0x06, 0x08, 0x0a, 0x0c, 0x0e,
152 0x10, 0x12, 0x14, 0x16, 0x18, 0x1a, 0x1c, 0x1e, 152 0x10, 0x12, 0x14, 0x16, 0x18, 0x1a, 0x1c, 0x1e,
153 }; 153 };
154 DECLARE_MAC_BUF(mac);
154 155
155 /* Reset card. Who knows what dain-bramaged state it was left in. */ 156 /* Reset card. Who knows what dain-bramaged state it was left in. */
156 { 157 {
@@ -211,12 +212,12 @@ static int __devinit zorro8390_init(struct net_device *dev,
211 i = request_irq(IRQ_AMIGA_PORTS, __ei_interrupt, IRQF_SHARED, DRV_NAME, dev); 212 i = request_irq(IRQ_AMIGA_PORTS, __ei_interrupt, IRQF_SHARED, DRV_NAME, dev);
212 if (i) return i; 213 if (i) return i;
213 214
214 for(i = 0; i < ETHER_ADDR_LEN; i++) { 215 for(i = 0; i < ETHER_ADDR_LEN; i++)
216 dev->dev_addr[i] = SA_prom[i];
217
215#ifdef DEBUG 218#ifdef DEBUG
216 printk(" %2.2x", SA_prom[i]); 219 printk("%s", print_mac(mac, dev->dev_addr));
217#endif 220#endif
218 dev->dev_addr[i] = SA_prom[i];
219 }
220 221
221 ei_status.name = name; 222 ei_status.name = name;
222 ei_status.tx_start_page = start_page; 223 ei_status.tx_start_page = start_page;
@@ -243,10 +244,8 @@ static int __devinit zorro8390_init(struct net_device *dev,
243 return err; 244 return err;
244 } 245 }
245 246
246 printk(KERN_INFO "%s: %s at 0x%08lx, Ethernet Address " 247 printk(KERN_INFO "%s: %s at 0x%08lx, Ethernet Address %s\n",
247 "%02x:%02x:%02x:%02x:%02x:%02x\n", dev->name, name, board, 248 dev->name, name, board, print_mac(mac, dev->dev_addr));
248 dev->dev_addr[0], dev->dev_addr[1], dev->dev_addr[2],
249 dev->dev_addr[3], dev->dev_addr[4], dev->dev_addr[5]);
250 249
251 return 0; 250 return 0;
252} 251}