diff options
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 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) | |||
1537 | static void e100_multi(struct nic *nic, struct cb *cb, struct sk_buff *skb) | 1537 | static 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 | ||
1550 | static void e100_set_multicast_list(struct net_device *netdev) | 1554 | static void e100_set_multicast_list(struct net_device *netdev) |