diff options
author | Jiri Pirko <jpirko@redhat.com> | 2010-02-22 04:22:26 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-02-22 18:45:52 -0500 |
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 94749ebaaea8..cf098bb636b8 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) | |||
822 | static void enic_set_multicast_list(struct net_device *netdev) | 822 | static void enic_set_multicast_list(struct net_device *netdev) |
823 | { | 823 | { |
824 | struct enic *enic = netdev_priv(netdev); | 824 | struct enic *enic = netdev_priv(netdev); |
825 | struct dev_mc_list *list = netdev->mc_list; | 825 | struct dev_mc_list *list; |
826 | int directed = 1; | 826 | int directed = 1; |
827 | int multicast = (netdev->flags & IFF_MULTICAST) ? 1 : 0; | 827 | int multicast = (netdev->flags & IFF_MULTICAST) ? 1 : 0; |
828 | int broadcast = (netdev->flags & IFF_BROADCAST) ? 1 : 0; | 828 | int broadcast = (netdev->flags & IFF_BROADCAST) ? 1 : 0; |
@@ -851,9 +851,11 @@ static void enic_set_multicast_list(struct net_device *netdev) | |||
851 | * look for changes to add/del. | 851 | * look for changes to add/del. |
852 | */ | 852 | */ |
853 | 853 | ||
854 | for (i = 0; list && i < mc_count; i++) { | 854 | i = 0; |
855 | memcpy(mc_addr[i], list->dmi_addr, ETH_ALEN); | 855 | netdev_for_each_mc_addr(list, netdev) { |
856 | list = list->next; | 856 | if (i == mc_count) |
857 | break; | ||
858 | memcpy(mc_addr[i++], list->dmi_addr, ETH_ALEN); | ||
857 | } | 859 | } |
858 | 860 | ||
859 | for (i = 0; i < enic->mc_count; i++) { | 861 | for (i = 0; i < enic->mc_count; i++) { |