diff options
Diffstat (limited to 'net/core/dev_mcast.c')
-rw-r--r-- | net/core/dev_mcast.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/net/core/dev_mcast.c b/net/core/dev_mcast.c index 5cc9b448c443..aa38100601fb 100644 --- a/net/core/dev_mcast.c +++ b/net/core/dev_mcast.c | |||
@@ -72,10 +72,9 @@ int dev_mc_delete(struct net_device *dev, void *addr, int alen, int glbl) | |||
72 | int err; | 72 | int err; |
73 | 73 | ||
74 | netif_tx_lock_bh(dev); | 74 | netif_tx_lock_bh(dev); |
75 | err = __dev_addr_delete(&dev->mc_list, addr, alen, glbl); | 75 | err = __dev_addr_delete(&dev->mc_list, &dev->mc_count, |
76 | addr, alen, glbl); | ||
76 | if (!err) { | 77 | if (!err) { |
77 | dev->mc_count--; | ||
78 | |||
79 | /* | 78 | /* |
80 | * We have altered the list, so the card | 79 | * We have altered the list, so the card |
81 | * loaded filter is now wrong. Fix it | 80 | * loaded filter is now wrong. Fix it |
@@ -96,11 +95,9 @@ int dev_mc_add(struct net_device *dev, void *addr, int alen, int glbl) | |||
96 | int err; | 95 | int err; |
97 | 96 | ||
98 | netif_tx_lock_bh(dev); | 97 | netif_tx_lock_bh(dev); |
99 | err = __dev_addr_add(&dev->mc_list, addr, alen, glbl); | 98 | err = __dev_addr_add(&dev->mc_list, &dev->mc_count, addr, alen, glbl); |
100 | if (!err) { | 99 | if (!err) |
101 | dev->mc_count++; | ||
102 | __dev_set_rx_mode(dev); | 100 | __dev_set_rx_mode(dev); |
103 | } | ||
104 | netif_tx_unlock_bh(dev); | 101 | netif_tx_unlock_bh(dev); |
105 | return err; | 102 | return err; |
106 | } | 103 | } |