aboutsummaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
authorPeter Pan(潘卫平) <panweiping3@gmail.com>2014-06-16 09:57:22 -0400
committerDavid S. Miller <davem@davemloft.net>2014-06-17 18:30:54 -0400
commitd215d10f2d6bd41ce9d11a2707568bbb50d2c32e (patch)
treead419008829a94d61f01c8a2e83d567a238ad02e /net/core
parent3dac9a79e1425069e7950bd46bd932e0b1c1d795 (diff)
net: delete duplicate dev_set_rx_mode() call
In __dev_open(), it already calls dev_set_rx_mode(). and dev_set_rx_mode() has no effect for a net device which does not have IFF_UP flag set. So the call of dev_set_rx_mode() is duplicate in __dev_change_flags(). Signed-off-by: Weiping Pan <panweiping3@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r--net/core/dev.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index 30eedf677913..a04b12f31e18 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -5432,13 +5432,9 @@ int __dev_change_flags(struct net_device *dev, unsigned int flags)
5432 */ 5432 */
5433 5433
5434 ret = 0; 5434 ret = 0;
5435 if ((old_flags ^ flags) & IFF_UP) { /* Bit is different ? */ 5435 if ((old_flags ^ flags) & IFF_UP)
5436 ret = ((old_flags & IFF_UP) ? __dev_close : __dev_open)(dev); 5436 ret = ((old_flags & IFF_UP) ? __dev_close : __dev_open)(dev);
5437 5437
5438 if (!ret)
5439 dev_set_rx_mode(dev);
5440 }
5441
5442 if ((flags ^ dev->gflags) & IFF_PROMISC) { 5438 if ((flags ^ dev->gflags) & IFF_PROMISC) {
5443 int inc = (flags & IFF_PROMISC) ? 1 : -1; 5439 int inc = (flags & IFF_PROMISC) ? 1 : -1;
5444 unsigned int old_flags = dev->flags; 5440 unsigned int old_flags = dev->flags;