Commit ae0a97bf authored by YOSHIFUJI Hideaki's avatar YOSHIFUJI Hideaki Committed by Jeff Garzik

[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: default avatarYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
parent e8d99795
...@@ -1166,7 +1166,7 @@ static void pegasus_set_multicast(struct net_device *net) ...@@ -1166,7 +1166,7 @@ static void pegasus_set_multicast(struct net_device *net)
pegasus->eth_regs[EthCtrl2] |= RX_PROMISCUOUS; pegasus->eth_regs[EthCtrl2] |= RX_PROMISCUOUS;
if (netif_msg_link(pegasus)) if (netif_msg_link(pegasus))
pr_info("%s: Promiscuous mode enabled.\n", net->name); 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)) { (net->flags & IFF_ALLMULTI)) {
pegasus->eth_regs[EthCtrl0] |= RX_MULTICAST; pegasus->eth_regs[EthCtrl0] |= RX_MULTICAST;
pegasus->eth_regs[EthCtrl2] &= ~RX_PROMISCUOUS; pegasus->eth_regs[EthCtrl2] &= ~RX_PROMISCUOUS;
......
...@@ -667,7 +667,7 @@ static void rtl8150_set_multicast(struct net_device *netdev) ...@@ -667,7 +667,7 @@ static void rtl8150_set_multicast(struct net_device *netdev)
if (netdev->flags & IFF_PROMISC) { if (netdev->flags & IFF_PROMISC) {
dev->rx_creg |= cpu_to_le16(0x0001); dev->rx_creg |= cpu_to_le16(0x0001);
info("%s: promiscuous mode", netdev->name); info("%s: promiscuous mode", netdev->name);
} else if ((netdev->mc_count > multicast_filter_limit) || } else if (netdev->mc_count ||
(netdev->flags & IFF_ALLMULTI)) { (netdev->flags & IFF_ALLMULTI)) {
dev->rx_creg &= cpu_to_le16(0xfffe); dev->rx_creg &= cpu_to_le16(0xfffe);
dev->rx_creg |= cpu_to_le16(0x0002); dev->rx_creg |= cpu_to_le16(0x0002);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment