Netdev List
 help / color / mirror / Atom feed
* [net-next] net: remove duplicate add_device_randomness() call
@ 2017-05-04  3:40 Zhang Shengju
  2017-05-04 15:13 ` David Miller
  0 siblings, 1 reply; 5+ messages in thread
From: Zhang Shengju @ 2017-05-04  3:40 UTC (permalink / raw)
  To: davem, netdev, edumazet

Since register_netdevice() already call add_device_randomness() and
dev_set_mac_address() will call it after mac address change.
It's not necessary to call at device UP.

Signed-off-by: Zhang Shengju <zhangshengju@cmss.chinamobile.com>
---
 net/core/dev.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/net/core/dev.c b/net/core/dev.c
index 35a06ce..cb48e40 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -1347,7 +1347,6 @@ static int __dev_open(struct net_device *dev)
 		dev->flags |= IFF_UP;
 		dev_set_rx_mode(dev);
 		dev_activate(dev);
-		add_device_randomness(dev->dev_addr, dev->addr_len);
 	}
 
 	return ret;
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread
* [net-next] net: remove duplicate add_device_randomness() call
@ 2017-05-17  9:23 Zhang Shengju
  2017-05-17 15:17 ` David Miller
  0 siblings, 1 reply; 5+ messages in thread
From: Zhang Shengju @ 2017-05-17  9:23 UTC (permalink / raw)
  To: davem, netdev

Since register_netdevice() already call add_device_randomness() and
dev_set_mac_address() will call it after mac address change.
It's not necessary to call at device UP.

Signed-off-by: Zhang Shengju <zhangshengju@cmss.chinamobile.com>
---
 net/core/dev.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/net/core/dev.c b/net/core/dev.c
index 35a06ce..cb48e40 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -1347,7 +1347,6 @@ static int __dev_open(struct net_device *dev)
 		dev->flags |= IFF_UP;
 		dev_set_rx_mode(dev);
 		dev_activate(dev);
-		add_device_randomness(dev->dev_addr, dev->addr_len);
 	}
 
 	return ret;
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-05-17 15:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-04  3:40 [net-next] net: remove duplicate add_device_randomness() call Zhang Shengju
2017-05-04 15:13 ` David Miller
2017-05-05  2:40   ` 张胜举
  -- strict thread matches above, loose matches on Subject: below --
2017-05-17  9:23 Zhang Shengju
2017-05-17 15:17 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox