aboutsummaryrefslogtreecommitdiffstats
path: root/net/batman-adv
diff options
context:
space:
mode:
Diffstat (limited to 'net/batman-adv')
-rw-r--r--net/batman-adv/soft-interface.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/net/batman-adv/soft-interface.c b/net/batman-adv/soft-interface.c
index c39c120e1171..8fb16d209fd9 100644
--- a/net/batman-adv/soft-interface.c
+++ b/net/batman-adv/soft-interface.c
@@ -541,6 +541,7 @@ static int interface_set_mac_addr(struct net_device *dev, void *p)
541 } 541 }
542 542
543 memcpy(dev->dev_addr, addr->sa_data, ETH_ALEN); 543 memcpy(dev->dev_addr, addr->sa_data, ETH_ALEN);
544 dev->addr_assign_type &= ~NET_ADDR_RANDOM;
544 return 0; 545 return 0;
545} 546}
546 547
@@ -783,7 +784,6 @@ static const struct net_device_ops bat_netdev_ops = {
783static void interface_setup(struct net_device *dev) 784static void interface_setup(struct net_device *dev)
784{ 785{
785 struct bat_priv *priv = netdev_priv(dev); 786 struct bat_priv *priv = netdev_priv(dev);
786 char dev_addr[ETH_ALEN];
787 787
788 ether_setup(dev); 788 ether_setup(dev);
789 789
@@ -800,8 +800,7 @@ static void interface_setup(struct net_device *dev)
800 dev->hard_header_len = BAT_HEADER_LEN; 800 dev->hard_header_len = BAT_HEADER_LEN;
801 801
802 /* generate random address */ 802 /* generate random address */
803 random_ether_addr(dev_addr); 803 eth_hw_addr_random(dev);
804 memcpy(dev->dev_addr, dev_addr, ETH_ALEN);
805 804
806 SET_ETHTOOL_OPS(dev, &bat_ethtool_ops); 805 SET_ETHTOOL_OPS(dev, &bat_ethtool_ops);
807 806