diff options
author | Jiri Pirko <jpirko@redhat.com> | 2010-02-22 10:22:26 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-02-23 00:45:52 +0100 |
commit | 48e2f183cb1709600012265a2e723f45a350d5fe (patch) | |
tree | 608368bda6f159342c307deca3b03998d25434c8 /drivers/net/igb | |
parent | e1000: convert to use netdev_for_each_mc_addr (diff) | |
download | linux-48e2f183cb1709600012265a2e723f45a350d5fe.tar.xz linux-48e2f183cb1709600012265a2e723f45a350d5fe.zip |
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/igb')
-rw-r--r-- | drivers/net/igb/igb_main.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c index f588e49c65f1..583a21c1def3 100644 --- a/drivers/net/igb/igb_main.c +++ b/drivers/net/igb/igb_main.c @@ -2877,7 +2877,7 @@ static int igb_write_mc_addr_list(struct net_device *netdev) { struct igb_adapter *adapter = netdev_priv(netdev); struct e1000_hw *hw = &adapter->hw; - struct dev_mc_list *mc_ptr = netdev->mc_list; + struct dev_mc_list *mc_ptr; u8 *mta_list; int i; @@ -2893,14 +2893,10 @@ static int igb_write_mc_addr_list(struct net_device *netdev) return -ENOMEM; /* The shared function expects a packed array of only addresses. */ - mc_ptr = netdev->mc_list; + i = 0; + netdev_for_each_mc_addr(mc_ptr, netdev) + memcpy(mta_list + (i++ * ETH_ALEN), mc_ptr->dmi_addr, ETH_ALEN); - for (i = 0; i < netdev_mc_count(netdev); i++) { - if (!mc_ptr) - break; - memcpy(mta_list + (i*ETH_ALEN), mc_ptr->dmi_addr, ETH_ALEN); - mc_ptr = mc_ptr->next; - } igb_update_mc_addr_list(hw, mta_list, i); kfree(mta_list); |