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/wireless/arlan-main.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/wireless/arlan-main.c')
-rw-r--r-- | drivers/net/wireless/arlan-main.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/drivers/net/wireless/arlan-main.c b/drivers/net/wireless/arlan-main.c index 3eaaab0ba0cc..dbdfc9e39d20 100644 --- a/drivers/net/wireless/arlan-main.c +++ b/drivers/net/wireless/arlan-main.c | |||
@@ -1469,10 +1469,10 @@ static void arlan_rx_interrupt(struct net_device *dev, u_char rxStatus, u_short | |||
1469 | while (dmi) | 1469 | while (dmi) |
1470 | { if (dmi->dmi_addrlen == 6) | 1470 | { if (dmi->dmi_addrlen == 6) |
1471 | { | 1471 | { |
1472 | DECLARE_MAC_BUF(mac); | ||
1472 | if (arlan_debug & ARLAN_DEBUG_HEADER_DUMP) | 1473 | if (arlan_debug & ARLAN_DEBUG_HEADER_DUMP) |
1473 | printk(KERN_ERR "%s mcl %2x:%2x:%2x:%2x:%2x:%2x \n", dev->name, | 1474 | printk(KERN_ERR "%s mcl %s\n", |
1474 | dmi->dmi_addr[0], dmi->dmi_addr[1], dmi->dmi_addr[2], | 1475 | dev->name, print_mac(mac, dmi->dmi_addr)); |
1475 | dmi->dmi_addr[3], dmi->dmi_addr[4], dmi->dmi_addr[5]); | ||
1476 | for (i = 0; i < 6; i++) | 1476 | for (i = 0; i < 6; i++) |
1477 | if (dmi->dmi_addr[i] != hw_dst_addr[i]) | 1477 | if (dmi->dmi_addr[i] != hw_dst_addr[i]) |
1478 | break; | 1478 | break; |
@@ -1512,17 +1512,18 @@ static void arlan_rx_interrupt(struct net_device *dev, u_char rxStatus, u_short | |||
1512 | { | 1512 | { |
1513 | char immedDestAddress[6]; | 1513 | char immedDestAddress[6]; |
1514 | char immedSrcAddress[6]; | 1514 | char immedSrcAddress[6]; |
1515 | DECLARE_MAC_BUF(mac); | ||
1516 | DECLARE_MAC_BUF(mac2); | ||
1517 | DECLARE_MAC_BUF(mac3); | ||
1518 | DECLARE_MAC_BUF(mac4); | ||
1515 | memcpy_fromio(immedDestAddress, arlan->immedDestAddress, 6); | 1519 | memcpy_fromio(immedDestAddress, arlan->immedDestAddress, 6); |
1516 | memcpy_fromio(immedSrcAddress, arlan->immedSrcAddress, 6); | 1520 | memcpy_fromio(immedSrcAddress, arlan->immedSrcAddress, 6); |
1517 | 1521 | ||
1518 | printk(KERN_WARNING "%s t %2x:%2x:%2x:%2x:%2x:%2x f %2x:%2x:%2x:%2x:%2x:%2x imd %2x:%2x:%2x:%2x:%2x:%2x ims %2x:%2x:%2x:%2x:%2x:%2x\n", dev->name, | 1522 | printk(KERN_WARNING "%s t %s f %s imd %s ims %s\n", |
1519 | (unsigned char) skbtmp[0], (unsigned char) skbtmp[1], (unsigned char) skbtmp[2], (unsigned char) skbtmp[3], | 1523 | dev->name, print_mac(mac, skbtmp), |
1520 | (unsigned char) skbtmp[4], (unsigned char) skbtmp[5], (unsigned char) skbtmp[6], (unsigned char) skbtmp[7], | 1524 | print_mac(mac2, &skbtmp[6]), |
1521 | (unsigned char) skbtmp[8], (unsigned char) skbtmp[9], (unsigned char) skbtmp[10], (unsigned char) skbtmp[11], | 1525 | print_mac(mac3, immedDestAddress), |
1522 | immedDestAddress[0], immedDestAddress[1], immedDestAddress[2], | 1526 | print_mac(mac4, immedSrcAddress)); |
1523 | immedDestAddress[3], immedDestAddress[4], immedDestAddress[5], | ||
1524 | immedSrcAddress[0], immedSrcAddress[1], immedSrcAddress[2], | ||
1525 | immedSrcAddress[3], immedSrcAddress[4], immedSrcAddress[5]); | ||
1526 | } | 1527 | } |
1527 | skb->protocol = eth_type_trans(skb, dev); | 1528 | skb->protocol = eth_type_trans(skb, dev); |
1528 | IFDEBUG(ARLAN_DEBUG_HEADER_DUMP) | 1529 | IFDEBUG(ARLAN_DEBUG_HEADER_DUMP) |