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/cs89x0.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/cs89x0.c')
-rw-r--r-- | drivers/net/cs89x0.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/drivers/net/cs89x0.c b/drivers/net/cs89x0.c index 4cf82cf5ac10..571750975137 100644 --- a/drivers/net/cs89x0.c +++ b/drivers/net/cs89x0.c | |||
@@ -516,6 +516,7 @@ cs89x0_probe1(struct net_device *dev, int ioaddr, int modular) | |||
516 | unsigned rev_type = 0; | 516 | unsigned rev_type = 0; |
517 | int eeprom_buff[CHKSUM_LEN]; | 517 | int eeprom_buff[CHKSUM_LEN]; |
518 | int retval; | 518 | int retval; |
519 | DECLARE_MAC_BUF(mac); | ||
519 | 520 | ||
520 | /* Initialize the device structure. */ | 521 | /* Initialize the device structure. */ |
521 | if (!modular) { | 522 | if (!modular) { |
@@ -840,11 +841,7 @@ cs89x0_probe1(struct net_device *dev, int ioaddr, int modular) | |||
840 | } | 841 | } |
841 | 842 | ||
842 | /* print the ethernet address. */ | 843 | /* print the ethernet address. */ |
843 | printk(", MAC"); | 844 | printk(", MAC %s", print_mac(mac, dev->dev_addr)); |
844 | for (i = 0; i < ETH_ALEN; i++) | ||
845 | { | ||
846 | printk("%c%02x", i ? ':' : ' ', dev->dev_addr[i]); | ||
847 | } | ||
848 | 845 | ||
849 | dev->open = net_open; | 846 | dev->open = net_open; |
850 | dev->stop = net_close; | 847 | dev->stop = net_close; |
@@ -1806,17 +1803,15 @@ static int set_mac_address(struct net_device *dev, void *p) | |||
1806 | int i; | 1803 | int i; |
1807 | struct sockaddr *addr = p; | 1804 | struct sockaddr *addr = p; |
1808 | 1805 | ||
1809 | |||
1810 | if (netif_running(dev)) | 1806 | if (netif_running(dev)) |
1811 | return -EBUSY; | 1807 | return -EBUSY; |
1812 | 1808 | ||
1813 | memcpy(dev->dev_addr, addr->sa_data, dev->addr_len); | 1809 | memcpy(dev->dev_addr, addr->sa_data, dev->addr_len); |
1814 | 1810 | ||
1815 | if (net_debug) { | 1811 | if (net_debug) { |
1816 | printk("%s: Setting MAC address to ", dev->name); | 1812 | DECLARE_MAC_BUF(mac); |
1817 | for (i = 0; i < dev->addr_len; i++) | 1813 | printk("%s: Setting MAC address to %s.\n", |
1818 | printk(" %2.2x", dev->dev_addr[i]); | 1814 | dev->name, print_mac(mac, dev->dev_addr)); |
1819 | printk(".\n"); | ||
1820 | } | 1815 | } |
1821 | /* set the Ethernet address */ | 1816 | /* set the Ethernet address */ |
1822 | for (i=0; i < ETH_ALEN/2; i++) | 1817 | for (i=0; i < ETH_ALEN/2; i++) |