lkml.org 
[lkml]   [2012]   [Feb]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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@bisect.de>

Acked-by: Michael S. Tsirkin <mst@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


\
 
 \ /
  Last update: 2012-02-09 10:39    [from the cache]
©2003-2011 Jasper Spaans