From: YOSHIFUJI Hideaki Date: Wed, 25 May 2005 07:07:04 +0000 (+0900) Subject: [PATCH] NETDEV: fix receiving multicast frames. X-Git-Tag: v2.6.13-rc1~51^2~40^2~3 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=ae0a97bfda598088b6f97db9d9f65cd6c4f439c6;p=linux-2.6-omap-h63xx.git [PATCH] NETDEV: fix receiving multicast frames. 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 --- diff --git a/drivers/usb/net/pegasus.c b/drivers/usb/net/pegasus.c index d976790312a..5f4496d8dba 100644 --- a/drivers/usb/net/pegasus.c +++ b/drivers/usb/net/pegasus.c @@ -1166,7 +1166,7 @@ static void pegasus_set_multicast(struct net_device *net) 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; diff --git a/drivers/usb/net/rtl8150.c b/drivers/usb/net/rtl8150.c index 8fb223385f2..626b016addf 100644 --- a/drivers/usb/net/rtl8150.c +++ b/drivers/usb/net/rtl8150.c @@ -667,7 +667,7 @@ static void rtl8150_set_multicast(struct net_device *netdev) 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);