diff options
author | Joe Perches <joe@perches.com> | 2007-10-03 20:59:30 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-10-10 19:51:42 -0400 |
commit | 0795af5729b18218767fab27c44b1384f72dc9ad (patch) | |
tree | 67c16df84aa6ec219340b8ea1b5cfb0e8150a216 /drivers/net/pcmcia | |
parent | 95ea36275f3c9a1d3d04c217b4b576c657c4e70e (diff) |
[NET]: Introduce and use print_mac() and DECLARE_MAC_BUF()
This is nicer than the MAC_FMT stuff.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/pcmcia')
-rw-r--r-- | drivers/net/pcmcia/3c574_cs.c | 9 | ||||
-rw-r--r-- | drivers/net/pcmcia/3c589_cs.c | 10 | ||||
-rw-r--r-- | drivers/net/pcmcia/axnet_cs.c | 9 | ||||
-rw-r--r-- | drivers/net/pcmcia/fmvj18x_cs.c | 8 | ||||
-rw-r--r-- | drivers/net/pcmcia/nmclan_cs.c | 9 | ||||
-rw-r--r-- | drivers/net/pcmcia/pcnet_cs.c | 7 | ||||
-rw-r--r-- | drivers/net/pcmcia/smc91c92_cs.c | 8 | ||||
-rw-r--r-- | drivers/net/pcmcia/xirc2ps_cs.c | 9 |
8 files changed, 35 insertions, 34 deletions
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 | ||
725 | cs_failed: | 726 | cs_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 | ||
678 | cs_failed: | 677 | cs_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 | ||