netdev
[Top] [All Lists]

Re: [PATCH] NETDEV: fix receiving multicast frames.

To: yoshfuji@xxxxxxxxxxxxxx (YOSHIFUJI Hideaki / ????)
Subject: Re: [PATCH] NETDEV: fix receiving multicast frames.
From: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 25 May 2005 18:19:14 +1000
Cc: jgarzik@xxxxxxxxx, netdev@xxxxxxxxxxx, yoshfuji@xxxxxxxxxxxxxx, usagi-core@xxxxxxxxxxxxxx
In-reply-to: <20050525.160704.28910448.yoshfuji@linux-ipv6.org>
Organization: Core
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: tin/1.7.4-20040225 ("Benbecula") (UNIX) (Linux/2.4.27-hx-1-686-smp (i686))
YOSHIFUJI Hideaki / ???? <yoshfuji@xxxxxxxxxxxxxx> wrote:
> From: YOSHIFUJI Hideaki <yoshfuji@xxxxxxxxxxxxxx>
> 
> Some USB ethernet drivers did not accept multicast frames appropriately.
> IPv6 did not work with those drivers without this patch.
> 
> Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@xxxxxxxxxxxxxx>
> 
> Index: drivers/usb/net/pegasus.c
> ===================================================================
> --- 5b713315560487f8c288820b17061fe27016c2cc/drivers/usb/net/pegasus.c  
> (mode:100644)
> +++ uncommitted/drivers/usb/net/pegasus.c  (mode:100644)
> @@ -1166,7 +1166,7 @@
>                pegasus->eth_regs[EthCtrl2] |= RX_PROMISCUOUS;
>                if (netif_msg_link(pegasus))
>                        pr_info("%s: Promiscuous mode enabled.\n", net->name);
> -       } else if ((net->mc_count > multicast_filter_limit) ||
> +       } else if (net->mc_count ||
>                   (net->flags & IFF_ALLMULTI)) {
>                pegasus->eth_regs[EthCtrl0] |= RX_MULTICAST;
>                pegasus->eth_regs[EthCtrl2] &= ~RX_PROMISCUOUS;
> Index: drivers/usb/net/rtl8150.c
> ===================================================================
> --- 5b713315560487f8c288820b17061fe27016c2cc/drivers/usb/net/rtl8150.c  
> (mode:100644)
> +++ uncommitted/drivers/usb/net/rtl8150.c  (mode:100644)
> @@ -667,7 +667,7 @@
>        if (netdev->flags & IFF_PROMISC) {
>                dev->rx_creg |= cpu_to_le16(0x0001);
>                info("%s: promiscuous mode", netdev->name);
> -       } else if ((netdev->mc_count > multicast_filter_limit) ||
> +       } else if (netdev->mc_count ||
>                   (netdev->flags & IFF_ALLMULTI)) {
>                dev->rx_creg &= cpu_to_le16(0xfffe);
>                dev->rx_creg |= cpu_to_le16(0x0002);

This patch is correct.  However, I presume these chips do actually have
filter support so it'd be even better if we could utilise that.

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

<Prev in Thread] Current Thread [Next in Thread>