aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/igb/igb_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/igb/igb_main.c')
-rw-r--r--drivers/net/igb/igb_main.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c
index 83cd0d7417d0..28371d648208 100644
--- a/drivers/net/igb/igb_main.c
+++ b/drivers/net/igb/igb_main.c
@@ -2848,14 +2848,14 @@ static int igb_write_mc_addr_list(struct net_device *netdev)
2848 u32 vmolr = 0; 2848 u32 vmolr = 0;
2849 int i; 2849 int i;
2850 2850
2851 if (!netdev->mc_count) { 2851 if (netdev_mc_empty(netdev)) {
2852 /* nothing to program, so clear mc list */ 2852 /* nothing to program, so clear mc list */
2853 igb_update_mc_addr_list(hw, NULL, 0); 2853 igb_update_mc_addr_list(hw, NULL, 0);
2854 igb_restore_vf_multicasts(adapter); 2854 igb_restore_vf_multicasts(adapter);
2855 return 0; 2855 return 0;
2856 } 2856 }
2857 2857
2858 mta_list = kzalloc(netdev->mc_count * 6, GFP_ATOMIC); 2858 mta_list = kzalloc(netdev_mc_count(netdev) * 6, GFP_ATOMIC);
2859 if (!mta_list) 2859 if (!mta_list)
2860 return -ENOMEM; 2860 return -ENOMEM;
2861 2861
@@ -2865,7 +2865,7 @@ static int igb_write_mc_addr_list(struct net_device *netdev)
2865 /* The shared function expects a packed array of only addresses. */ 2865 /* The shared function expects a packed array of only addresses. */
2866 mc_ptr = netdev->mc_list; 2866 mc_ptr = netdev->mc_list;
2867 2867
2868 for (i = 0; i < netdev->mc_count; i++) { 2868 for (i = 0; i < netdev_mc_count(netdev); i++) {
2869 if (!mc_ptr) 2869 if (!mc_ptr)
2870 break; 2870 break;
2871 memcpy(mta_list + (i*ETH_ALEN), mc_ptr->dmi_addr, ETH_ALEN); 2871 memcpy(mta_list + (i*ETH_ALEN), mc_ptr->dmi_addr, ETH_ALEN);
@@ -2874,7 +2874,7 @@ static int igb_write_mc_addr_list(struct net_device *netdev)
2874 igb_update_mc_addr_list(hw, mta_list, i); 2874 igb_update_mc_addr_list(hw, mta_list, i);
2875 kfree(mta_list); 2875 kfree(mta_list);
2876 2876
2877 return netdev->mc_count; 2877 return netdev_mc_count(netdev);
2878} 2878}
2879 2879
2880/** 2880/**