net: use eth_hw_addr_random() and reset addr_assign_type
[deliverable/linux.git] / net / openvswitch / vport-internal_dev.c
index 8fc28b86f2b3e4666fd2ef18d63ad785aed2c25d..b6b1d7daa3cbd831a4884d3414bb2aa97369149b 100644 (file)
@@ -23,7 +23,6 @@
 #include <linux/etherdevice.h>
 #include <linux/ethtool.h>
 #include <linux/skbuff.h>
-#include <linux/version.h>
 
 #include "datapath.h"
 #include "vport-internal_dev.h"
@@ -67,6 +66,7 @@ static int internal_dev_mac_addr(struct net_device *dev, void *p)
 
        if (!is_valid_ether_addr(addr->sa_data))
                return -EADDRNOTAVAIL;
+       dev->addr_assign_type &= ~NET_ADDR_RANDOM;
        memcpy(dev->dev_addr, addr->sa_data, dev->addr_len);
        return 0;
 }
@@ -146,7 +146,7 @@ static void do_setup(struct net_device *netdev)
        netdev->vlan_features = netdev->features;
        netdev->features |= NETIF_F_HW_VLAN_TX;
        netdev->hw_features = netdev->features & ~NETIF_F_LLTX;
-       random_ether_addr(netdev->dev_addr);
+       eth_hw_addr_random(netdev);
 }
 
 static struct vport *internal_dev_create(const struct vport_parms *parms)
This page took 0.031562 seconds and 5 git commands to generate.