aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/tulip/winbond-840.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2007-10-03 20:59:30 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 19:51:42 -0400
commit0795af5729b18218767fab27c44b1384f72dc9ad (patch)
tree67c16df84aa6ec219340b8ea1b5cfb0e8150a216 /drivers/net/tulip/winbond-840.c
parent95ea36275f3c9a1d3d04c217b4b576c657c4e70e (diff)
[NET]: Introduce and use print_mac() and DECLARE_MAC_BUF()
This is nicer than the MAC_FMT stuff. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/tulip/winbond-840.c')
-rw-r--r--drivers/net/tulip/winbond-840.c29
1 files changed, 14 insertions, 15 deletions
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);