diff options
author | Jiri Pirko <jpirko@redhat.com> | 2010-02-22 04:22:26 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-02-22 18:45:52 -0500 |
commit | 48e2f183cb1709600012265a2e723f45a350d5fe (patch) | |
tree | 608368bda6f159342c307deca3b03998d25434c8 /drivers/net/igb | |
parent | 7a81e9f3ca712db82344ea3ab2a5879241f59c48 (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/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) | |||
2877 | { | 2877 | { |
2878 | struct igb_adapter *adapter = netdev_priv(netdev); | 2878 | struct igb_adapter *adapter = netdev_priv(netdev); |
2879 | struct e1000_hw *hw = &adapter->hw; | 2879 | struct e1000_hw *hw = &adapter->hw; |
2880 | struct dev_mc_list *mc_ptr = netdev->mc_list; | 2880 | struct dev_mc_list *mc_ptr; |
2881 | u8 *mta_list; | 2881 | u8 *mta_list; |
2882 | int i; | 2882 | int i; |
2883 | 2883 | ||
@@ -2893,14 +2893,10 @@ static int igb_write_mc_addr_list(struct net_device *netdev) | |||
2893 | return -ENOMEM; | 2893 | return -ENOMEM; |
2894 | 2894 | ||
2895 | /* The shared function expects a packed array of only addresses. */ | 2895 | /* The shared function expects a packed array of only addresses. */ |
2896 | mc_ptr = netdev->mc_list; | 2896 | i = 0; |
2897 | netdev_for_each_mc_addr(mc_ptr, netdev) | ||
2898 | memcpy(mta_list + (i++ * ETH_ALEN), mc_ptr->dmi_addr, ETH_ALEN); | ||
2897 | 2899 | ||
2898 | for (i = 0; i < netdev_mc_count(netdev); i++) { | ||
2899 | if (!mc_ptr) | ||
2900 | break; | ||
2901 | memcpy(mta_list + (i*ETH_ALEN), mc_ptr->dmi_addr, ETH_ALEN); | ||
2902 | mc_ptr = mc_ptr->next; | ||
2903 | } | ||
2904 | igb_update_mc_addr_list(hw, mta_list, i); | 2900 | igb_update_mc_addr_list(hw, mta_list, i); |
2905 | kfree(mta_list); | 2901 | kfree(mta_list); |
2906 | 2902 | ||