* [PATCH] NETDEV: fix receiving multicast frames.
@ 2005-05-25 7:07 YOSHIFUJI Hideaki / 吉藤英明
2005-05-25 8:19 ` Herbert Xu
0 siblings, 1 reply; 2+ messages in thread
From: YOSHIFUJI Hideaki / 吉藤英明 @ 2005-05-25 7:07 UTC (permalink / raw)
To: jgarzik; +Cc: netdev, yoshfuji, usagi-core
From: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
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@linux-ipv6.org>
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);
--
YOSHIFUJI Hideaki @ USAGI Project <yoshfuji@linux-ipv6.org>
GPG-FP : 9022 65EB 1ECF 3AD1 0BDF 80D8 4807 F894 E062 0EEA
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] NETDEV: fix receiving multicast frames.
2005-05-25 7:07 [PATCH] NETDEV: fix receiving multicast frames YOSHIFUJI Hideaki / 吉藤英明
@ 2005-05-25 8:19 ` Herbert Xu
0 siblings, 0 replies; 2+ messages in thread
From: Herbert Xu @ 2005-05-25 8:19 UTC (permalink / raw)
To: YOSHIFUJI Hideaki / ????; +Cc: jgarzik, netdev, yoshfuji, usagi-core
YOSHIFUJI Hideaki / ???? <yoshfuji@linux-ipv6.org> wrote:
> From: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
>
> 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@linux-ipv6.org>
>
> 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@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-05-25 8:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-25 7:07 [PATCH] NETDEV: fix receiving multicast frames YOSHIFUJI Hideaki / 吉藤英明
2005-05-25 8:19 ` Herbert Xu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox