diff options
author | Jiri Pirko <jpirko@redhat.com> | 2010-02-22 09:22:26 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-02-22 15:45:52 -0800 |
commit | 48e2f183cb1709600012265a2e723f45a350d5fe (patch) | |
tree | 608368bda6f159342c307deca3b03998d25434c8 /drivers/net/enic | |
parent | 7a81e9f3ca712db82344ea3ab2a5879241f59c48 (diff) |
net: convert multiple drivers to use netdev_for_each_mc_addr, part4
Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/enic')
-rw-r--r-- | drivers/net/enic/enic_main.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c index 94749ebaaea..cf098bb636b 100644 --- a/drivers/net/enic/enic_main.c +++ b/drivers/net/enic/enic_main.c @@ -822,7 +822,7 @@ static int enic_set_mac_addr(struct net_device *netdev, char *addr) static void enic_set_multicast_list(struct net_device *netdev) { struct enic *enic = netdev_priv(netdev); - struct dev_mc_list *list = netdev->mc_list; + struct dev_mc_list *list; int directed = 1; int multicast = (netdev->flags & IFF_MULTICAST) ? 1 : 0; int broadcast = (netdev->flags & IFF_BROADCAST) ? 1 : 0; @@ -851,9 +851,11 @@ static void enic_set_multicast_list(struct net_device *netdev) * look for changes to add/del. */ - for (i = 0; list && i < mc_count; i++) { - memcpy(mc_addr[i], list->dmi_addr, ETH_ALEN); - list = list->next; + i = 0; + netdev_for_each_mc_addr(list, netdev) { + if (i == mc_count) + break; + memcpy(mc_addr[i++], list->dmi_addr, ETH_ALEN); } for (i = 0; i < enic->mc_count; i++) { |