aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorJiri Pirko <jpirko@redhat.com>2011-08-16 02:29:00 -0400
committerDavid S. Miller <davem@davemloft.net>2011-08-17 23:21:27 -0400
commit01789349ee52e4a3faf376f1485303d9723c4f1f (patch)
treecea58b51337ffda221f67d47dd234e52f76f65cf /net
parentd03462b999307ec5c186851ec9c5751bd5a675f7 (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 'net')
-rw-r--r--net/core/dev.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index a8d91a5dd909..6eb03fdaf075 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -4522,9 +4522,7 @@ void __dev_set_rx_mode(struct net_device *dev)
4522 if (!netif_device_present(dev)) 4522 if (!netif_device_present(dev))
4523 return; 4523 return;
4524 4524
4525 if (ops->ndo_set_rx_mode) 4525 if (!(dev->priv_flags & IFF_UNICAST_FLT)) {
4526 ops->ndo_set_rx_mode(dev);
4527 else {
4528 /* Unicast addresses changes may only happen under the rtnl, 4526 /* Unicast addresses changes may only happen under the rtnl,
4529 * therefore calling __dev_set_promiscuity here is safe. 4527 * therefore calling __dev_set_promiscuity here is safe.
4530 */ 4528 */
@@ -4535,10 +4533,12 @@ void __dev_set_rx_mode(struct net_device *dev)
4535 __dev_set_promiscuity(dev, -1); 4533 __dev_set_promiscuity(dev, -1);
4536 dev->uc_promisc = false; 4534 dev->uc_promisc = false;
4537 } 4535 }
4538
4539 if (ops->ndo_set_multicast_list)
4540 ops->ndo_set_multicast_list(dev);
4541 } 4536 }
4537
4538 if (ops->ndo_set_rx_mode)
4539 ops->ndo_set_rx_mode(dev);
4540 else if (ops->ndo_set_multicast_list)
4541 ops->ndo_set_multicast_list(dev);
4542} 4542}
4543 4543
4544void dev_set_rx_mode(struct net_device *dev) 4544void dev_set_rx_mode(struct net_device *dev)