diff options
author | Jiri Pirko <jpirko@redhat.com> | 2010-01-25 16:36:10 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-01-25 16:36:10 -0500 |
commit | 32e7bfc41110bc8f29ec0f293c3bcee6645fef34 (patch) | |
tree | b770a040aee7a6a196514cbf5328debb33321d4d /drivers/net/igb/igb_main.c | |
parent | 9010bc3364db56dd88a1851e0797e597e322ce08 (diff) |
net: use helpers to access uc list V2
This patch introduces three macros to work with uc list from net drivers.
Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/igb/igb_main.c')
-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, |