[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>
This commit is contained in:
committed by
David S. Miller
parent
95ea36275f
commit
0795af5729
@ -374,6 +374,7 @@ static int __devinit yellowfin_init_one(struct pci_dev *pdev,
|
||||
#else
|
||||
int bar = 1;
|
||||
#endif
|
||||
DECLARE_MAC_BUF(mac);
|
||||
|
||||
/* when built into the kernel, we only print version if device is found */
|
||||
#ifndef MODULE
|
||||
@ -480,12 +481,10 @@ static int __devinit yellowfin_init_one(struct pci_dev *pdev,
|
||||
if (i)
|
||||
goto err_out_unmap_status;
|
||||
|
||||
printk(KERN_INFO "%s: %s type %8x at %p, ",
|
||||
printk(KERN_INFO "%s: %s type %8x at %p, %s, IRQ %d.\n",
|
||||
dev->name, pci_id_tbl[chip_idx].name,
|
||||
ioread32(ioaddr + ChipRev), ioaddr);
|
||||
for (i = 0; i < 5; i++)
|
||||
printk("%2.2x:", dev->dev_addr[i]);
|
||||
printk("%2.2x, IRQ %d.\n", dev->dev_addr[i], irq);
|
||||
ioread32(ioaddr + ChipRev), ioaddr,
|
||||
print_mac(mac, dev->dev_addr), irq);
|
||||
|
||||
if (np->drv_flags & HasMII) {
|
||||
int phy, phy_idx = 0;
|
||||
@ -1101,11 +1100,11 @@ static int yellowfin_rx(struct net_device *dev)
|
||||
memcmp(le32_to_cpu(yp->rx_ring_dma +
|
||||
entry*sizeof(struct yellowfin_desc)),
|
||||
"\377\377\377\377\377\377", 6) != 0) {
|
||||
if (bogus_rx++ == 0)
|
||||
printk(KERN_WARNING "%s: Bad frame to %2.2x:%2.2x:%2.2x:%2.2x:"
|
||||
"%2.2x:%2.2x.\n",
|
||||
dev->name, buf_addr[0], buf_addr[1], buf_addr[2],
|
||||
buf_addr[3], buf_addr[4], buf_addr[5]);
|
||||
if (bogus_rx++ == 0) {
|
||||
DECLARE_MAC_BUF(mac);
|
||||
printk(KERN_WARNING "%s: Bad frame to %s\n",
|
||||
dev->name, print_mac(mac, buf_addr));
|
||||
}
|
||||
#endif
|
||||
} else {
|
||||
struct sk_buff *skb;
|
||||
|
Reference in New Issue
Block a user