aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/lib82596.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/lib82596.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/lib82596.c')
-rw-r--r--drivers/net/lib82596.c18
1 files changed, 8 insertions, 10 deletions
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);