aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ll_temac_main.c
diff options
context:
space:
mode:
authorJiri Pirko <jpirko@redhat.com>2010-02-07 23:30:35 -0500
committerDavid S. Miller <davem@davemloft.net>2010-02-12 14:38:58 -0500
commit4cd24eaf0c6ee7f0242e34ee77ec899f255e66b5 (patch)
tree99f57f6374a58022e1e5ed1cbc12699288c7eae1 /drivers/net/ll_temac_main.c
parent8e5574211d96c0552f84c757718475fdb4021be7 (diff)
net: use netdev_mc_count and netdev_mc_empty when appropriate
This patch replaces dev->mc_count in all drivers (hopefully I didn't miss anything). Used spatch and did small tweaks and conding style changes when it was suitable. Jirka Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ll_temac_main.c')
-rw-r--r--drivers/net/ll_temac_main.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/ll_temac_main.c b/drivers/net/ll_temac_main.c
index a8522bd73ae..8442c47e93e 100644
--- a/drivers/net/ll_temac_main.c
+++ b/drivers/net/ll_temac_main.c
@@ -232,7 +232,7 @@ static void temac_set_multicast_list(struct net_device *ndev)
232 232
233 mutex_lock(&lp->indirect_mutex); 233 mutex_lock(&lp->indirect_mutex);
234 if (ndev->flags & (IFF_ALLMULTI | IFF_PROMISC) || 234 if (ndev->flags & (IFF_ALLMULTI | IFF_PROMISC) ||
235 ndev->mc_count > MULTICAST_CAM_TABLE_NUM) { 235 netdev_mc_count(ndev) > MULTICAST_CAM_TABLE_NUM) {
236 /* 236 /*
237 * We must make the kernel realise we had to move 237 * We must make the kernel realise we had to move
238 * into promisc mode or we start all out war on 238 * into promisc mode or we start all out war on
@@ -242,9 +242,9 @@ static void temac_set_multicast_list(struct net_device *ndev)
242 ndev->flags |= IFF_PROMISC; 242 ndev->flags |= IFF_PROMISC;
243 temac_indirect_out32(lp, XTE_AFM_OFFSET, XTE_AFM_EPPRM_MASK); 243 temac_indirect_out32(lp, XTE_AFM_OFFSET, XTE_AFM_EPPRM_MASK);
244 dev_info(&ndev->dev, "Promiscuous mode enabled.\n"); 244 dev_info(&ndev->dev, "Promiscuous mode enabled.\n");
245 } else if (ndev->mc_count) { 245 } else if (!netdev_mc_empty(ndev)) {
246 struct dev_mc_list *mclist = ndev->mc_list; 246 struct dev_mc_list *mclist = ndev->mc_list;
247 for (i = 0; mclist && i < ndev->mc_count; i++) { 247 for (i = 0; mclist && i < netdev_mc_count(ndev); i++) {
248 248
249 if (i >= MULTICAST_CAM_TABLE_NUM) 249 if (i >= MULTICAST_CAM_TABLE_NUM)
250 break; 250 break;