aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ll_temac_main.c
diff options
context:
space:
mode:
authorJiri Pirko <jpirko@redhat.com>2010-02-23 04:19:49 -0500
committerDavid S. Miller <davem@davemloft.net>2010-02-26 05:07:30 -0500
commitf9dcbcc9e338d08c0f7de7eba4eaafbbb7f81249 (patch)
tree8a1d9a37bc057440220a5ad23231e0fe974b93f6 /drivers/net/ll_temac_main.c
parent52c793f24054f5dc30d228e37e0e19cc8313f086 (diff)
net: convert multiple drivers to use netdev_for_each_mc_addr, part5 V2
removed some needless checks and also corrected bug in lp486e (dmi was passed instead of dmi->dmi_addr) 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.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/net/ll_temac_main.c b/drivers/net/ll_temac_main.c
index e53440253748..a18e3485476e 100644
--- a/drivers/net/ll_temac_main.c
+++ b/drivers/net/ll_temac_main.c
@@ -250,9 +250,10 @@ static void temac_set_multicast_list(struct net_device *ndev)
250 temac_indirect_out32(lp, XTE_AFM_OFFSET, XTE_AFM_EPPRM_MASK); 250 temac_indirect_out32(lp, XTE_AFM_OFFSET, XTE_AFM_EPPRM_MASK);
251 dev_info(&ndev->dev, "Promiscuous mode enabled.\n"); 251 dev_info(&ndev->dev, "Promiscuous mode enabled.\n");
252 } else if (!netdev_mc_empty(ndev)) { 252 } else if (!netdev_mc_empty(ndev)) {
253 struct dev_mc_list *mclist = ndev->mc_list; 253 struct dev_mc_list *mclist;
254 for (i = 0; mclist && i < netdev_mc_count(ndev); i++) {
255 254
255 i = 0;
256 netdev_for_each_mc_addr(mclist, ndev) {
256 if (i >= MULTICAST_CAM_TABLE_NUM) 257 if (i >= MULTICAST_CAM_TABLE_NUM)
257 break; 258 break;
258 multi_addr_msw = ((mclist->dmi_addr[3] << 24) | 259 multi_addr_msw = ((mclist->dmi_addr[3] << 24) |
@@ -265,7 +266,7 @@ static void temac_set_multicast_list(struct net_device *ndev)
265 (mclist->dmi_addr[4]) | (i << 16)); 266 (mclist->dmi_addr[4]) | (i << 16));
266 temac_indirect_out32(lp, XTE_MAW1_OFFSET, 267 temac_indirect_out32(lp, XTE_MAW1_OFFSET,
267 multi_addr_lsw); 268 multi_addr_lsw);
268 mclist = mclist->next; 269 i++;
269 } 270 }
270 } else { 271 } else {
271 val = temac_indirect_in32(lp, XTE_AFM_OFFSET); 272 val = temac_indirect_in32(lp, XTE_AFM_OFFSET);