aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/igb
diff options
context:
space:
mode:
authorJiri Pirko <jpirko@redhat.com>2010-02-22 09:22:26 +0000
committerDavid S. Miller <davem@davemloft.net>2010-02-22 15:45:52 -0800
commit48e2f183cb1709600012265a2e723f45a350d5fe (patch)
tree608368bda6f159342c307deca3b03998d25434c8 /drivers/net/igb
parent7a81e9f3ca712db82344ea3ab2a5879241f59c48 (diff)
downloadkernel_samsung_smdk4412-48e2f183cb1709600012265a2e723f45a350d5fe.zip
kernel_samsung_smdk4412-48e2f183cb1709600012265a2e723f45a350d5fe.tar.gz
kernel_samsung_smdk4412-48e2f183cb1709600012265a2e723f45a350d5fe.tar.bz2
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.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c
index f588e49..583a21c 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);