diff options
Diffstat (limited to 'net/core/dev.c')
-rw-r--r-- | net/core/dev.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index 0ebaea16632f..c8569f826b71 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -1172,6 +1172,7 @@ static int __dev_open(struct net_device *dev) | |||
1172 | net_dmaengine_get(); | 1172 | net_dmaengine_get(); |
1173 | dev_set_rx_mode(dev); | 1173 | dev_set_rx_mode(dev); |
1174 | dev_activate(dev); | 1174 | dev_activate(dev); |
1175 | add_device_randomness(dev->dev_addr, dev->addr_len); | ||
1175 | } | 1176 | } |
1176 | 1177 | ||
1177 | return ret; | 1178 | return ret; |
@@ -4801,6 +4802,7 @@ int dev_set_mac_address(struct net_device *dev, struct sockaddr *sa) | |||
4801 | err = ops->ndo_set_mac_address(dev, sa); | 4802 | err = ops->ndo_set_mac_address(dev, sa); |
4802 | if (!err) | 4803 | if (!err) |
4803 | call_netdevice_notifiers(NETDEV_CHANGEADDR, dev); | 4804 | call_netdevice_notifiers(NETDEV_CHANGEADDR, dev); |
4805 | add_device_randomness(dev->dev_addr, dev->addr_len); | ||
4804 | return err; | 4806 | return err; |
4805 | } | 4807 | } |
4806 | EXPORT_SYMBOL(dev_set_mac_address); | 4808 | EXPORT_SYMBOL(dev_set_mac_address); |
@@ -5579,6 +5581,7 @@ int register_netdevice(struct net_device *dev) | |||
5579 | dev_init_scheduler(dev); | 5581 | dev_init_scheduler(dev); |
5580 | dev_hold(dev); | 5582 | dev_hold(dev); |
5581 | list_netdevice(dev); | 5583 | list_netdevice(dev); |
5584 | add_device_randomness(dev->dev_addr, dev->addr_len); | ||
5582 | 5585 | ||
5583 | /* Notify protocols, that a new device appeared. */ | 5586 | /* Notify protocols, that a new device appeared. */ |
5584 | ret = call_netdevice_notifiers(NETDEV_REGISTER, dev); | 5587 | ret = call_netdevice_notifiers(NETDEV_REGISTER, dev); |