diff options
author | Patrick McHardy <kaber@trash.net> | 2007-06-27 01:28:10 -0700 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-07-10 22:15:56 -0700 |
commit | 4417da668c0021903464f92db278ddae348e0299 (patch) | |
tree | a4330cbc2e69a5714fee0a04bcfbabe97109de46 /net/core/dev_mcast.c | |
parent | 3fba5a8b1e3df2384b90493538161e83cf15dd5f (diff) | |
download | linux-4417da668c0021903464f92db278ddae348e0299.tar.gz linux-4417da668c0021903464f92db278ddae348e0299.tar.bz2 linux-4417da668c0021903464f92db278ddae348e0299.zip |
[NET]: dev: secondary unicast address support
Add support for configuring secondary unicast addresses on network
devices. To support this devices capable of filtering multiple
unicast addresses need to change their set_multicast_list function
to configure unicast filters as well and assign it to dev->set_rx_mode
instead of dev->set_multicast_list. Other devices are put into promiscous
mode when secondary unicast addresses are present.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/dev_mcast.c')
-rw-r--r-- | net/core/dev_mcast.c | 37 |
1 files changed, 2 insertions, 35 deletions
diff --git a/net/core/dev_mcast.c b/net/core/dev_mcast.c index 702907434a47..5cc9b448c443 100644 --- a/net/core/dev_mcast.c +++ b/net/core/dev_mcast.c @@ -64,39 +64,6 @@ */ /* - * Update the multicast list into the physical NIC controller. - */ - -static void __dev_mc_upload(struct net_device *dev) -{ - /* Don't do anything till we up the interface - * [dev_open will call this function so the list will - * stay sane] - */ - - if (!(dev->flags&IFF_UP)) - return; - - /* - * Devices with no set multicast or which have been - * detached don't get set. - */ - - if (dev->set_multicast_list == NULL || - !netif_device_present(dev)) - return; - - dev->set_multicast_list(dev); -} - -void dev_mc_upload(struct net_device *dev) -{ - netif_tx_lock_bh(dev); - __dev_mc_upload(dev); - netif_tx_unlock_bh(dev); -} - -/* * Delete a device level multicast */ @@ -114,7 +81,7 @@ int dev_mc_delete(struct net_device *dev, void *addr, int alen, int glbl) * loaded filter is now wrong. Fix it */ - __dev_mc_upload(dev); + __dev_set_rx_mode(dev); } netif_tx_unlock_bh(dev); return err; @@ -132,7 +99,7 @@ int dev_mc_add(struct net_device *dev, void *addr, int alen, int glbl) err = __dev_addr_add(&dev->mc_list, addr, alen, glbl); if (!err) { dev->mc_count++; - __dev_mc_upload(dev); + __dev_set_rx_mode(dev); } netif_tx_unlock_bh(dev); return err; |