diff options
Diffstat (limited to 'drivers/net/igb')
-rw-r--r-- | drivers/net/igb/igb_main.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c index d9679493c635..01cc29483e2f 100644 --- a/drivers/net/igb/igb_main.c +++ b/drivers/net/igb/igb_main.c | |||
@@ -2905,12 +2905,13 @@ static int igb_write_uc_addr_list(struct net_device *netdev) | |||
2905 | int count = 0; | 2905 | int count = 0; |
2906 | 2906 | ||
2907 | /* return ENOMEM indicating insufficient memory for addresses */ | 2907 | /* return ENOMEM indicating insufficient memory for addresses */ |
2908 | if (netdev->uc.count > rar_entries) | 2908 | if (netdev_uc_count(netdev) > rar_entries) |
2909 | return -ENOMEM; | 2909 | return -ENOMEM; |
2910 | 2910 | ||
2911 | if (netdev->uc.count && rar_entries) { | 2911 | if (!netdev_uc_empty(netdev) && rar_entries) { |
2912 | struct netdev_hw_addr *ha; | 2912 | struct netdev_hw_addr *ha; |
2913 | list_for_each_entry(ha, &netdev->uc.list, list) { | 2913 | |
2914 | netdev_for_each_uc_addr(ha, netdev) { | ||
2914 | if (!rar_entries) | 2915 | if (!rar_entries) |
2915 | break; | 2916 | break; |
2916 | igb_rar_set_qsel(adapter, ha->addr, | 2917 | igb_rar_set_qsel(adapter, ha->addr, |