diff options
author | Jiri Pirko <jpirko@redhat.com> | 2011-08-16 02:29:00 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-08-17 23:21:27 -0400 |
commit | 01789349ee52e4a3faf376f1485303d9723c4f1f (patch) | |
tree | cea58b51337ffda221f67d47dd234e52f76f65cf /drivers/net/ethernet/sun | |
parent | d03462b999307ec5c186851ec9c5751bd5a675f7 (diff) |
net: introduce IFF_UNICAST_FLT private flag
Use IFF_UNICAST_FTL to find out if driver handles unicast address
filtering. In case it does not, promisc mode is entered.
Patch also fixes following drivers:
stmmac, niu: support uc filtering and yet it propagated
ndo_set_multicast_list
bna, benet, pxa168_eth, ks8851, ks8851_mll, ksz884x : has set
ndo_set_rx_mode but do not support uc filtering
Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/sun')
-rw-r--r-- | drivers/net/ethernet/sun/niu.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/ethernet/sun/niu.c b/drivers/net/ethernet/sun/niu.c index ed47585a6862..3c9ef1c196a9 100644 --- a/drivers/net/ethernet/sun/niu.c +++ b/drivers/net/ethernet/sun/niu.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/delay.h> | 17 | #include <linux/delay.h> |
18 | #include <linux/bitops.h> | 18 | #include <linux/bitops.h> |
19 | #include <linux/mii.h> | 19 | #include <linux/mii.h> |
20 | #include <linux/if.h> | ||
20 | #include <linux/if_ether.h> | 21 | #include <linux/if_ether.h> |
21 | #include <linux/if_vlan.h> | 22 | #include <linux/if_vlan.h> |
22 | #include <linux/ip.h> | 23 | #include <linux/ip.h> |
@@ -9716,7 +9717,7 @@ static const struct net_device_ops niu_netdev_ops = { | |||
9716 | .ndo_stop = niu_close, | 9717 | .ndo_stop = niu_close, |
9717 | .ndo_start_xmit = niu_start_xmit, | 9718 | .ndo_start_xmit = niu_start_xmit, |
9718 | .ndo_get_stats64 = niu_get_stats, | 9719 | .ndo_get_stats64 = niu_get_stats, |
9719 | .ndo_set_multicast_list = niu_set_rx_mode, | 9720 | .ndo_set_rx_mode = niu_set_rx_mode, |
9720 | .ndo_validate_addr = eth_validate_addr, | 9721 | .ndo_validate_addr = eth_validate_addr, |
9721 | .ndo_set_mac_address = niu_set_mac_addr, | 9722 | .ndo_set_mac_address = niu_set_mac_addr, |
9722 | .ndo_do_ioctl = niu_ioctl, | 9723 | .ndo_do_ioctl = niu_ioctl, |
@@ -9852,6 +9853,8 @@ static int __devinit niu_pci_init_one(struct pci_dev *pdev, | |||
9852 | 9853 | ||
9853 | niu_set_basic_features(dev); | 9854 | niu_set_basic_features(dev); |
9854 | 9855 | ||
9856 | dev->priv_flags |= IFF_UNICAST_FLT; | ||
9857 | |||
9855 | np->regs = pci_ioremap_bar(pdev, 0); | 9858 | np->regs = pci_ioremap_bar(pdev, 0); |
9856 | if (!np->regs) { | 9859 | if (!np->regs) { |
9857 | dev_err(&pdev->dev, "Cannot map device registers, aborting\n"); | 9860 | dev_err(&pdev->dev, "Cannot map device registers, aborting\n"); |