diff options
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/dev.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index 3ba63aaa3001..17c9cbd77eb0 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -2777,23 +2777,16 @@ int dev_unicast_add(struct net_device *dev, void *addr, int alen) | |||
2777 | } | 2777 | } |
2778 | EXPORT_SYMBOL(dev_unicast_add); | 2778 | EXPORT_SYMBOL(dev_unicast_add); |
2779 | 2779 | ||
2780 | static void dev_unicast_discard(struct net_device *dev) | 2780 | static void dev_addr_discard(struct net_device *dev) |
2781 | { | 2781 | { |
2782 | netif_tx_lock_bh(dev); | 2782 | netif_tx_lock_bh(dev); |
2783 | |||
2783 | __dev_addr_discard(&dev->uc_list); | 2784 | __dev_addr_discard(&dev->uc_list); |
2784 | dev->uc_count = 0; | 2785 | dev->uc_count = 0; |
2785 | netif_tx_unlock_bh(dev); | ||
2786 | } | ||
2787 | 2786 | ||
2788 | /* | ||
2789 | * Discard multicast list when a device is downed | ||
2790 | */ | ||
2791 | |||
2792 | static void dev_mc_discard(struct net_device *dev) | ||
2793 | { | ||
2794 | netif_tx_lock_bh(dev); | ||
2795 | __dev_addr_discard(&dev->mc_list); | 2787 | __dev_addr_discard(&dev->mc_list); |
2796 | dev->mc_count = 0; | 2788 | dev->mc_count = 0; |
2789 | |||
2797 | netif_tx_unlock_bh(dev); | 2790 | netif_tx_unlock_bh(dev); |
2798 | } | 2791 | } |
2799 | 2792 | ||
@@ -3751,8 +3744,7 @@ void unregister_netdevice(struct net_device *dev) | |||
3751 | /* | 3744 | /* |
3752 | * Flush the unicast and multicast chains | 3745 | * Flush the unicast and multicast chains |
3753 | */ | 3746 | */ |
3754 | dev_unicast_discard(dev); | 3747 | dev_addr_discard(dev); |
3755 | dev_mc_discard(dev); | ||
3756 | 3748 | ||
3757 | if (dev->uninit) | 3749 | if (dev->uninit) |
3758 | dev->uninit(dev); | 3750 | dev->uninit(dev); |