From 567ec874d15b478c8eda7e9a5d2dcb05f13f1fb5 Mon Sep 17 00:00:00 2001 From: Jiri Pirko Date: Tue, 23 Feb 2010 23:17:07 +0000 Subject: net: convert multiple drivers to use netdev_for_each_mc_addr, part6 Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller --- drivers/net/virtio_net.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'drivers/net/virtio_net.c') diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index ce35b42cc2cb..e6095f3aa05f 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -776,8 +776,9 @@ static void virtnet_set_rx_mode(struct net_device *dev) mac_data->entries = mc_count; addr = dev->mc_list; - for (i = 0; i < mc_count; i++, addr = addr->next) - memcpy(&mac_data->macs[i][0], addr->da_addr, ETH_ALEN); + i = 0; + netdev_for_each_mc_addr(addr, dev) + memcpy(&mac_data->macs[i++][0], addr->da_addr, ETH_ALEN); sg_set_buf(&sg[1], mac_data, sizeof(mac_data->entries) + (mc_count * ETH_ALEN)); -- cgit v1.2.2