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/yellowfin.c | |
parent | 95ea36275f3c9a1d3d04c217b4b576c657c4e70e (diff) |
[NET]: Introduce and use print_mac() and DECLARE_MAC_BUF()
This is nicer than the MAC_FMT stuff.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/yellowfin.c')
-rw-r--r-- | drivers/net/yellowfin.c | 19 |
1 files changed, 9 insertions, 10 deletions
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; |