From d59079425f6f1be0da995926b5ad1d54d9e4545d Mon Sep 17 00:00:00 2001 From: Jiri Pirko Date: Thu, 18 Feb 2010 05:10:14 +0000 Subject: staging: convert to use netdev_for_each_mc_addr removed needless checks in arlan-main.c and slicoss.c fixed bug in et131x_netdev.c to actually fill addresses in. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller --- drivers/staging/slicoss/slicoss.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) (limited to 'drivers/staging/slicoss') diff --git a/drivers/staging/slicoss/slicoss.c b/drivers/staging/slicoss/slicoss.c index 8c9d5e5c7702..f5cc01ba4145 100644 --- a/drivers/staging/slicoss/slicoss.c +++ b/drivers/staging/slicoss/slicoss.c @@ -1362,25 +1362,17 @@ static void slic_mcast_set_list(struct net_device *dev) { struct adapter *adapter = (struct adapter *)netdev_priv(dev); int status = STATUS_SUCCESS; - int i; char *addresses; - struct dev_mc_list *mc_list = dev->mc_list; - int mc_count = netdev_mc_count(dev); + struct dev_mc_list *mc_list; ASSERT(adapter); - for (i = 1; i <= mc_count; i++) { + netdev_for_each_mc_addr(mc_list, dev) { addresses = (char *) &mc_list->dmi_addr; - if (mc_list->dmi_addrlen == 6) { - status = slic_mcast_add_list(adapter, addresses); - if (status != STATUS_SUCCESS) - break; - } else { - status = -EINVAL; + status = slic_mcast_add_list(adapter, addresses); + if (status != STATUS_SUCCESS) break; - } slic_mcast_set_bit(adapter, addresses); - mc_list = mc_list->next; } if (adapter->devflags_prev != dev->flags) { -- cgit v1.2.3