diff options
author | Jiri Pirko <jpirko@redhat.com> | 2010-01-25 16:36:10 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-01-25 16:36:10 -0500 |
commit | 32e7bfc41110bc8f29ec0f293c3bcee6645fef34 (patch) | |
tree | b770a040aee7a6a196514cbf5328debb33321d4d /net/core | |
parent | 9010bc3364db56dd88a1851e0797e597e322ce08 (diff) |
net: use helpers to access uc list V2
This patch introduces three macros to work with uc list from net drivers.
Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/dev.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index 4fad9db417b1..2cba5c521e56 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -3665,10 +3665,10 @@ void __dev_set_rx_mode(struct net_device *dev) | |||
3665 | /* Unicast addresses changes may only happen under the rtnl, | 3665 | /* Unicast addresses changes may only happen under the rtnl, |
3666 | * therefore calling __dev_set_promiscuity here is safe. | 3666 | * therefore calling __dev_set_promiscuity here is safe. |
3667 | */ | 3667 | */ |
3668 | if (dev->uc.count > 0 && !dev->uc_promisc) { | 3668 | if (!netdev_uc_empty(dev) && !dev->uc_promisc) { |
3669 | __dev_set_promiscuity(dev, 1); | 3669 | __dev_set_promiscuity(dev, 1); |
3670 | dev->uc_promisc = 1; | 3670 | dev->uc_promisc = 1; |
3671 | } else if (dev->uc.count == 0 && dev->uc_promisc) { | 3671 | } else if (netdev_uc_empty(dev) && dev->uc_promisc) { |
3672 | __dev_set_promiscuity(dev, -1); | 3672 | __dev_set_promiscuity(dev, -1); |
3673 | dev->uc_promisc = 0; | 3673 | dev->uc_promisc = 0; |
3674 | } | 3674 | } |