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/stmmac | |
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/stmmac')
-rw-r--r-- | drivers/net/stmmac/dwmac1000_core.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/stmmac/dwmac1000_core.c b/drivers/net/stmmac/dwmac1000_core.c index 928eac05b912..d812e9cdb3db 100644 --- a/drivers/net/stmmac/dwmac1000_core.c +++ b/drivers/net/stmmac/dwmac1000_core.c | |||
@@ -83,7 +83,7 @@ static void dwmac1000_set_filter(struct net_device *dev) | |||
83 | unsigned int value = 0; | 83 | unsigned int value = 0; |
84 | 84 | ||
85 | DBG(KERN_INFO "%s: # mcasts %d, # unicast %d\n", | 85 | DBG(KERN_INFO "%s: # mcasts %d, # unicast %d\n", |
86 | __func__, dev->mc_count, dev->uc.count); | 86 | __func__, dev->mc_count, netdev_uc_count(dev)); |
87 | 87 | ||
88 | if (dev->flags & IFF_PROMISC) | 88 | if (dev->flags & IFF_PROMISC) |
89 | value = GMAC_FRAME_FILTER_PR; | 89 | value = GMAC_FRAME_FILTER_PR; |
@@ -117,7 +117,7 @@ static void dwmac1000_set_filter(struct net_device *dev) | |||
117 | } | 117 | } |
118 | 118 | ||
119 | /* Handle multiple unicast addresses (perfect filtering)*/ | 119 | /* Handle multiple unicast addresses (perfect filtering)*/ |
120 | if (dev->uc.count > GMAC_MAX_UNICAST_ADDRESSES) | 120 | if (netdev_uc_count(dev) > GMAC_MAX_UNICAST_ADDRESSES) |
121 | /* Switch to promiscuous mode is more than 16 addrs | 121 | /* Switch to promiscuous mode is more than 16 addrs |
122 | are required */ | 122 | are required */ |
123 | value |= GMAC_FRAME_FILTER_PR; | 123 | value |= GMAC_FRAME_FILTER_PR; |
@@ -125,9 +125,9 @@ static void dwmac1000_set_filter(struct net_device *dev) | |||
125 | int reg = 1; | 125 | int reg = 1; |
126 | struct netdev_hw_addr *ha; | 126 | struct netdev_hw_addr *ha; |
127 | 127 | ||
128 | list_for_each_entry(ha, &dev->uc.list, list) { | 128 | netdev_for_each_uc_addr(ha, dev) { |
129 | dwmac1000_set_umac_addr(ioaddr, ha->addr, reg); | 129 | dwmac1000_set_umac_addr(ioaddr, ha->addr, reg); |
130 | reg++; | 130 | reg++; |
131 | } | 131 | } |
132 | } | 132 | } |
133 | 133 | ||