Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 142368
b: refs/heads/master
c: 62994b2
h: refs/heads/master
v: v3
  • Loading branch information
Alex Williamson authored and David S. Miller committed Apr 4, 2009
1 parent e34a592 commit 761cc72
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cd36e9efaa5195396ae5344c6ce32c2b0048df6a
refs/heads/master: 62994b2d6beb5f7c59a25bf77e01f191acf74ea2
10 changes: 4 additions & 6 deletions trunk/drivers/net/virtio_net.c
Original file line number Diff line number Diff line change
Expand Up @@ -575,8 +575,9 @@ static int virtnet_set_mac_address(struct net_device *dev, void *p)
if (ret)
return ret;

vdev->config->set(vdev, offsetof(struct virtio_net_config, mac),
dev->dev_addr, dev->addr_len);
if (virtio_has_feature(vdev, VIRTIO_NET_F_MAC))
vdev->config->set(vdev, offsetof(struct virtio_net_config, mac),
dev->dev_addr, dev->addr_len);

return 0;
}
Expand Down Expand Up @@ -876,11 +877,8 @@ static int virtnet_probe(struct virtio_device *vdev)
vdev->config->get(vdev,
offsetof(struct virtio_net_config, mac),
dev->dev_addr, dev->addr_len);
} else {
} else
random_ether_addr(dev->dev_addr);
vdev->config->set(vdev, offsetof(struct virtio_net_config, mac),
dev->dev_addr, dev->addr_len);
}

/* Set up our device-specific information */
vi = netdev_priv(dev);
Expand Down

0 comments on commit 761cc72

Please sign in to comment.