Re: [PATCH net-next-2.6 0/4] net: change the way mc_list is accessed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



wrong subject... reposting...

Thu, Oct 22, 2009 at 03:54:47PM CEST, jpirko@xxxxxxxxxx wrote:
>Signed-off-by: Jiri Pirko <jpirko@xxxxxxxxxx>
>---
> drivers/media/dvb/dvb-core/dvb_net.c |   22 +++++++---------------
> 1 files changed, 7 insertions(+), 15 deletions(-)
>
>diff --git a/drivers/media/dvb/dvb-core/dvb_net.c b/drivers/media/dvb/dvb-core/dvb_net.c
>index 8c9ae0a..eb50fb0 100644
>--- a/drivers/media/dvb/dvb-core/dvb_net.c
>+++ b/drivers/media/dvb/dvb-core/dvb_net.c
>@@ -1110,17 +1110,16 @@ static int dvb_net_feed_stop(struct net_device *dev)
> }
> 
> 
>-static int dvb_set_mc_filter (struct net_device *dev, struct dev_mc_list *mc)
>+static void dvb_set_mc_filter(void *data, unsigned char *addr)
> {
>-	struct dvb_net_priv *priv = netdev_priv(dev);
>+	struct dvb_net_priv *priv = data;
> 
> 	if (priv->multi_num == DVB_NET_MULTICAST_MAX)
>-		return -ENOMEM;
>+		return;
> 
>-	memcpy(priv->multi_macs[priv->multi_num], mc->dmi_addr, 6);
>+	memcpy(priv->multi_macs[priv->multi_num], addr, ETH_ALEN);
> 
> 	priv->multi_num++;
>-	return 0;
> }
> 
> 
>@@ -1140,21 +1139,14 @@ static void wq_set_multicast_list (struct work_struct *work)
> 	} else if ((dev->flags & IFF_ALLMULTI)) {
> 		dprintk("%s: allmulti mode\n", dev->name);
> 		priv->rx_mode = RX_MODE_ALL_MULTI;
>-	} else if (dev->mc_count) {
>-		int mci;
>-		struct dev_mc_list *mc;
>-
>+	} else if (netdev_mc_count(dev)) {
> 		dprintk("%s: set_mc_list, %d entries\n",
>-			dev->name, dev->mc_count);
>+			dev->name, netdev_mc_count(dev));
> 
> 		priv->rx_mode = RX_MODE_MULTI;
> 		priv->multi_num = 0;
> 
>-		for (mci = 0, mc=dev->mc_list;
>-		     mci < dev->mc_count;
>-		     mc = mc->next, mci++) {
>-			dvb_set_mc_filter(dev, mc);
>-		}
>+		netdev_mc_walk(dev, dvb_set_mc_filter, priv);
> 	}
> 
> 	netif_addr_unlock_bh(dev);
>-- 
>1.6.2.5
>
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux