Danny Kukawka
2012-Feb-08 21:10 UTC
[PATCH 42/50] virtio_net: use dev_hw_addr_random() instead of random_ether_addr()
Use dev_hw_addr_random() instead of calling random_ether_addr() to set addr_assign_type correctly to NET_ADDR_RANDOM. Signed-off-by: Danny Kukawka <danny.kukawka at bisect.de> --- drivers/net/virtio_net.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 4880aa8..69d36e1 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -1061,7 +1061,7 @@ static int virtnet_probe(struct virtio_device *vdev) if (virtio_config_val_len(vdev, VIRTIO_NET_F_MAC, offsetof(struct virtio_net_config, mac), dev->dev_addr, dev->addr_len) < 0) - random_ether_addr(dev->dev_addr); + dev_hw_addr_random(dev, dev->dev_addr); /* Set up our device-specific information */ vi = netdev_priv(dev); -- 1.7.7.3
Michael S. Tsirkin
2012-Feb-09 09:35 UTC
[PATCH 42/50] virtio_net: use dev_hw_addr_random() instead of random_ether_addr()
On Wed, Feb 08, 2012 at 10:10:49PM +0100, Danny Kukawka wrote:> Use dev_hw_addr_random() instead of calling random_ether_addr() > to set addr_assign_type correctly to NET_ADDR_RANDOM. > > Signed-off-by: Danny Kukawka <danny.kukawka at bisect.de>Acked-by: Michael S. Tsirkin <mst at redhat.com>> --- > drivers/net/virtio_net.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c > index 4880aa8..69d36e1 100644 > --- a/drivers/net/virtio_net.c > +++ b/drivers/net/virtio_net.c > @@ -1061,7 +1061,7 @@ static int virtnet_probe(struct virtio_device *vdev) > if (virtio_config_val_len(vdev, VIRTIO_NET_F_MAC, > offsetof(struct virtio_net_config, mac), > dev->dev_addr, dev->addr_len) < 0) > - random_ether_addr(dev->dev_addr); > + dev_hw_addr_random(dev, dev->dev_addr); > > /* Set up our device-specific information */ > vi = netdev_priv(dev); > -- > 1.7.7.3