aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorJiri Pirko <jpirko@redhat.com>2010-02-04 21:52:39 -0500
committerDavid S. Miller <davem@davemloft.net>2010-02-05 11:58:40 -0500
commit7aeef972cce30b0ab04047e07918b04d867e7a29 (patch)
tree504bf9d83a372d4bf79c7421bf2ff53ae7636cde /drivers/net
parent2cc04d27c497af9e8d11181fa8ddef9c99592c78 (diff)
net: e1000e: convert to use mc helpers
Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/e1000e/netdev.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c
index ffa37c682a00..88d54d3efcef 100644
--- a/drivers/net/e1000e/netdev.c
+++ b/drivers/net/e1000e/netdev.c
@@ -2589,21 +2589,16 @@ static void e1000_set_multi(struct net_device *netdev)
2589 2589
2590 ew32(RCTL, rctl); 2590 ew32(RCTL, rctl);
2591 2591
2592 if (netdev->mc_count) { 2592 if (!netdev_mc_empty(netdev)) {
2593 mta_list = kmalloc(netdev->mc_count * 6, GFP_ATOMIC); 2593 mta_list = kmalloc(netdev_mc_count(netdev) * 6, GFP_ATOMIC);
2594 if (!mta_list) 2594 if (!mta_list)
2595 return; 2595 return;
2596 2596
2597 /* prepare a packed array of only addresses. */ 2597 /* prepare a packed array of only addresses. */
2598 mc_ptr = netdev->mc_list; 2598 i = 0;
2599 2599 netdev_for_each_mc_addr(mc_ptr, netdev)
2600 for (i = 0; i < netdev->mc_count; i++) { 2600 memcpy(mta_list + (i++ * ETH_ALEN),
2601 if (!mc_ptr) 2601 mc_ptr->dmi_addr, ETH_ALEN);
2602 break;
2603 memcpy(mta_list + (i*ETH_ALEN), mc_ptr->dmi_addr,
2604 ETH_ALEN);
2605 mc_ptr = mc_ptr->next;
2606 }
2607 2602
2608 e1000_update_mc_addr_list(hw, mta_list, i); 2603 e1000_update_mc_addr_list(hw, mta_list, i);
2609 kfree(mta_list); 2604 kfree(mta_list);