* [PATCH] net/hsr: use eth_hw_addr_random()
@ 2017-02-21 13:04 Tobias Klauser
2017-02-21 18:25 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Tobias Klauser @ 2017-02-21 13:04 UTC (permalink / raw)
To: arvid.brodin, davem, netdev
Use eth_hw_addr_random() to set a random MAC address in order to make sure
dev->addr_assign_type will be properly set to NET_ADDR_RANDOM.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
---
net/hsr/hsr_device.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/hsr/hsr_device.c b/net/hsr/hsr_device.c
index fc65b145f6e7..c73160fb11e7 100644
--- a/net/hsr/hsr_device.c
+++ b/net/hsr/hsr_device.c
@@ -395,7 +395,7 @@ static struct device_type hsr_type = {
void hsr_dev_setup(struct net_device *dev)
{
- random_ether_addr(dev->dev_addr);
+ eth_hw_addr_random(dev);
ether_setup(dev);
dev->min_mtu = 0;
--
2.11.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-02-21 18:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-21 13:04 [PATCH] net/hsr: use eth_hw_addr_random() Tobias Klauser
2017-02-21 18:25 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).