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/zd1211rw/zd_mac.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/zd1211rw/zd_mac.c')
-rw-r--r-- | drivers/net/wireless/zd1211rw/zd_mac.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/net/wireless/zd1211rw/zd_mac.c b/drivers/net/wireless/zd1211rw/zd_mac.c index 451308d7095d..06b342b39792 100644 --- a/drivers/net/wireless/zd1211rw/zd_mac.c +++ b/drivers/net/wireless/zd1211rw/zd_mac.c | |||
@@ -289,12 +289,13 @@ int zd_mac_set_mac_address(struct net_device *netdev, void *p) | |||
289 | struct sockaddr *addr = p; | 289 | struct sockaddr *addr = p; |
290 | struct zd_mac *mac = zd_netdev_mac(netdev); | 290 | struct zd_mac *mac = zd_netdev_mac(netdev); |
291 | struct zd_chip *chip = &mac->chip; | 291 | struct zd_chip *chip = &mac->chip; |
292 | DECLARE_MAC_BUF(mac2); | ||
292 | 293 | ||
293 | if (!is_valid_ether_addr(addr->sa_data)) | 294 | if (!is_valid_ether_addr(addr->sa_data)) |
294 | return -EADDRNOTAVAIL; | 295 | return -EADDRNOTAVAIL; |
295 | 296 | ||
296 | dev_dbg_f(zd_mac_dev(mac), | 297 | dev_dbg_f(zd_mac_dev(mac), |
297 | "Setting MAC to " MAC_FMT "\n", MAC_ARG(addr->sa_data)); | 298 | "Setting MAC to %s\n", print_mac(mac2, addr->sa_data)); |
298 | 299 | ||
299 | if (netdev->flags & IFF_UP) { | 300 | if (netdev->flags & IFF_UP) { |
300 | r = zd_write_mac_addr(chip, addr->sa_data); | 301 | r = zd_write_mac_addr(chip, addr->sa_data); |
@@ -329,6 +330,7 @@ void zd_mac_set_multicast_list(struct net_device *dev) | |||
329 | struct zd_mc_hash hash; | 330 | struct zd_mc_hash hash; |
330 | struct dev_mc_list *mc; | 331 | struct dev_mc_list *mc; |
331 | unsigned long flags; | 332 | unsigned long flags; |
333 | DECLARE_MAC_BUF(mac2); | ||
332 | 334 | ||
333 | if (dev->flags & (IFF_PROMISC|IFF_ALLMULTI) || | 335 | if (dev->flags & (IFF_PROMISC|IFF_ALLMULTI) || |
334 | ieee->iw_mode == IW_MODE_MONITOR) { | 336 | ieee->iw_mode == IW_MODE_MONITOR) { |
@@ -336,8 +338,8 @@ void zd_mac_set_multicast_list(struct net_device *dev) | |||
336 | } else { | 338 | } else { |
337 | zd_mc_clear(&hash); | 339 | zd_mc_clear(&hash); |
338 | for (mc = dev->mc_list; mc; mc = mc->next) { | 340 | for (mc = dev->mc_list; mc; mc = mc->next) { |
339 | dev_dbg_f(zd_mac_dev(mac), "mc addr " MAC_FMT "\n", | 341 | dev_dbg_f(zd_mac_dev(mac), "mc addr %s\n", |
340 | MAC_ARG(mc->dmi_addr)); | 342 | print_mac(mac2, mc->dmi_addr)); |
341 | zd_mc_add_addr(&hash, mc->dmi_addr); | 343 | zd_mc_add_addr(&hash, mc->dmi_addr); |
342 | } | 344 | } |
343 | } | 345 | } |