diff options
author | Jiri Pirko <jpirko@redhat.com> | 2010-02-23 09:19:49 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-02-26 02:07:30 -0800 |
commit | f9dcbcc9e338d08c0f7de7eba4eaafbbb7f81249 (patch) | |
tree | 8a1d9a37bc057440220a5ad23231e0fe974b93f6 /drivers/net/ll_temac_main.c | |
parent | 52c793f24054f5dc30d228e37e0e19cc8313f086 (diff) | |
download | lwn-f9dcbcc9e338d08c0f7de7eba4eaafbbb7f81249.tar.gz lwn-f9dcbcc9e338d08c0f7de7eba4eaafbbb7f81249.zip |
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.c | 7 |
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) temac_indirect_out32(lp, XTE_AFM_OFFSET, XTE_AFM_EPPRM_MASK); dev_info(&ndev->dev, "Promiscuous mode enabled.\n"); } else if (!netdev_mc_empty(ndev)) { - struct dev_mc_list *mclist = ndev->mc_list; - for (i = 0; mclist && i < netdev_mc_count(ndev); i++) { + struct dev_mc_list *mclist; + i = 0; + netdev_for_each_mc_addr(mclist, ndev) { if (i >= MULTICAST_CAM_TABLE_NUM) break; multi_addr_msw = ((mclist->dmi_addr[3] << 24) | @@ -265,7 +266,7 @@ static void temac_set_multicast_list(struct net_device *ndev) (mclist->dmi_addr[4]) | (i << 16)); temac_indirect_out32(lp, XTE_MAW1_OFFSET, multi_addr_lsw); - mclist = mclist->next; + i++; } } else { val = temac_indirect_in32(lp, XTE_AFM_OFFSET); |