aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/e100.c
diff options
context:
space:
mode:
authorJiri Pirko <jpirko@redhat.com>2010-02-22 04:22:26 -0500
committerDavid S. Miller <davem@davemloft.net>2010-02-22 18:45:52 -0500
commit48e2f183cb1709600012265a2e723f45a350d5fe (patch)
tree608368bda6f159342c307deca3b03998d25434c8 /drivers/net/e100.c
parent7a81e9f3ca712db82344ea3ab2a5879241f59c48 (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.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/net/e100.c b/drivers/net/e100.c
index e8c0e823a06f..a26ccab057d5 100644
--- a/drivers/net/e100.c
+++ b/drivers/net/e100.c
@@ -1537,14 +1537,18 @@ static int e100_hw_init(struct nic *nic)
1537static void e100_multi(struct nic *nic, struct cb *cb, struct sk_buff *skb) 1537static void e100_multi(struct nic *nic, struct cb *cb, struct sk_buff *skb)
1538{ 1538{
1539 struct net_device *netdev = nic->netdev; 1539 struct net_device *netdev = nic->netdev;
1540 struct dev_mc_list *list = netdev->mc_list; 1540 struct dev_mc_list *list;
1541 u16 i, count = min(netdev_mc_count(netdev), E100_MAX_MULTICAST_ADDRS); 1541 u16 i, count = min(netdev_mc_count(netdev), E100_MAX_MULTICAST_ADDRS);
1542 1542
1543 cb->command = cpu_to_le16(cb_multi); 1543 cb->command = cpu_to_le16(cb_multi);
1544 cb->u.multi.count = cpu_to_le16(count * ETH_ALEN); 1544 cb->u.multi.count = cpu_to_le16(count * ETH_ALEN);
1545 for (i = 0; list && i < count; i++, list = list->next) 1545 i = 0;
1546 memcpy(&cb->u.multi.addr[i*ETH_ALEN], &list->dmi_addr, 1546 netdev_for_each_mc_addr(list, netdev) {
1547 if (i == count)
1548 break;
1549 memcpy(&cb->u.multi.addr[i++ * ETH_ALEN], &list->dmi_addr,
1547 ETH_ALEN); 1550 ETH_ALEN);
1551 }
1548} 1552}
1549 1553
1550static void e100_set_multicast_list(struct net_device *netdev) 1554static void e100_set_multicast_list(struct net_device *netdev)