summaryrefslogtreecommitdiffstats
path: root/drivers/net/stmmac
diff options
context:
space:
mode:
authorJiri Pirko <jpirko@redhat.com>2010-01-25 13:36:10 -0800
committerDavid S. Miller <davem@davemloft.net>2010-01-25 13:36:10 -0800
commit32e7bfc41110bc8f29ec0f293c3bcee6645fef34 (patch)
treeb770a040aee7a6a196514cbf5328debb33321d4d /drivers/net/stmmac
parent9010bc3364db56dd88a1851e0797e597e322ce08 (diff)
downloadop-kernel-dev-32e7bfc41110bc8f29ec0f293c3bcee6645fef34.zip
op-kernel-dev-32e7bfc41110bc8f29ec0f293c3bcee6645fef34.tar.gz
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.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/stmmac/dwmac1000_core.c b/drivers/net/stmmac/dwmac1000_core.c
index 928eac0..d812e9c 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)
unsigned int value = 0;
DBG(KERN_INFO "%s: # mcasts %d, # unicast %d\n",
- __func__, dev->mc_count, dev->uc.count);
+ __func__, dev->mc_count, netdev_uc_count(dev));
if (dev->flags & IFF_PROMISC)
value = GMAC_FRAME_FILTER_PR;
@@ -117,7 +117,7 @@ static void dwmac1000_set_filter(struct net_device *dev)
}
/* Handle multiple unicast addresses (perfect filtering)*/
- if (dev->uc.count > GMAC_MAX_UNICAST_ADDRESSES)
+ if (netdev_uc_count(dev) > GMAC_MAX_UNICAST_ADDRESSES)
/* Switch to promiscuous mode is more than 16 addrs
are required */
value |= GMAC_FRAME_FILTER_PR;
@@ -125,9 +125,9 @@ static void dwmac1000_set_filter(struct net_device *dev)
int reg = 1;
struct netdev_hw_addr *ha;
- list_for_each_entry(ha, &dev->uc.list, list) {
- dwmac1000_set_umac_addr(ioaddr, ha->addr, reg);
- reg++;
+ netdev_for_each_uc_addr(ha, dev) {
+ dwmac1000_set_umac_addr(ioaddr, ha->addr, reg);
+ reg++;
}
}
OpenPOWER on IntegriCloud