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/e100.c | |
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/e100.c')
-rw-r--r-- | drivers/net/e100.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/net/e100.c b/drivers/net/e100.c index e8c0e823a06..a26ccab057d 100644 --- a/drivers/net/e100.c +++ b/drivers/net/e100.c @@ -1537,14 +1537,18 @@ static int e100_hw_init(struct nic *nic) static void e100_multi(struct nic *nic, struct cb *cb, struct sk_buff *skb) { struct net_device *netdev = nic->netdev; - struct dev_mc_list *list = netdev->mc_list; + struct dev_mc_list *list; u16 i, count = min(netdev_mc_count(netdev), E100_MAX_MULTICAST_ADDRS); cb->command = cpu_to_le16(cb_multi); cb->u.multi.count = cpu_to_le16(count * ETH_ALEN); - for (i = 0; list && i < count; i++, list = list->next) - memcpy(&cb->u.multi.addr[i*ETH_ALEN], &list->dmi_addr, + i = 0; + netdev_for_each_mc_addr(list, netdev) { + if (i == count) + break; + memcpy(&cb->u.multi.addr[i++ * ETH_ALEN], &list->dmi_addr, ETH_ALEN); + } } static void e100_set_multicast_list(struct net_device *netdev) |