Commit 7aeef972 authored by Jiri Pirko's avatar Jiri Pirko Committed by David S. Miller

net: e1000e: convert to use mc helpers

Signed-off-by: default avatarJiri Pirko <jpirko@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 2cc04d27
...@@ -2589,21 +2589,16 @@ static void e1000_set_multi(struct net_device *netdev) ...@@ -2589,21 +2589,16 @@ static void e1000_set_multi(struct net_device *netdev)
ew32(RCTL, rctl); ew32(RCTL, rctl);
if (netdev->mc_count) { if (!netdev_mc_empty(netdev)) {
mta_list = kmalloc(netdev->mc_count * 6, GFP_ATOMIC); mta_list = kmalloc(netdev_mc_count(netdev) * 6, GFP_ATOMIC);
if (!mta_list) if (!mta_list)
return; return;
/* prepare a packed array of only addresses. */ /* prepare a packed array of only addresses. */
mc_ptr = netdev->mc_list; i = 0;
netdev_for_each_mc_addr(mc_ptr, netdev)
for (i = 0; i < netdev->mc_count; i++) { memcpy(mta_list + (i++ * ETH_ALEN),
if (!mc_ptr) mc_ptr->dmi_addr, ETH_ALEN);
break;
memcpy(mta_list + (i*ETH_ALEN), mc_ptr->dmi_addr,
ETH_ALEN);
mc_ptr = mc_ptr->next;
}
e1000_update_mc_addr_list(hw, mta_list, i); e1000_update_mc_addr_list(hw, mta_list, i);
kfree(mta_list); kfree(mta_list);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment