2e83913
Mac feature bit isn't going to work as all network cards already have a
2e83913
'mac' property to set the mac address.  Remove it from mask and add in
2e83913
get_features.
2e83913
2e83913
Reported-by: Gerd Hoffmann <kraxel@redhat.com>
2e83913
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2e83913
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2e83913
(cherry picked from commit c9f79a3f79a48de28b4575cb5644bcf45d3754d0)
2e83913
---
2e83913
 hw/virtio-net.c |    2 ++
2e83913
 hw/virtio-net.h |    1 -
2e83913
 2 files changed, 2 insertions(+), 1 deletions(-)
2e83913
2e83913
diff --git a/hw/virtio-net.c b/hw/virtio-net.c
2e83913
index c2a389f..02d9180 100644
2e83913
--- a/hw/virtio-net.c
2e83913
+++ b/hw/virtio-net.c
2e83913
@@ -151,6 +151,8 @@ static uint32_t virtio_net_get_features(VirtIODevice *vdev, uint32_t features)
2e83913
 {
2e83913
     VirtIONet *n = to_virtio_net(vdev);
2e83913
 
2e83913
+    features |= (1 << VIRTIO_NET_F_MAC);
2e83913
+
2e83913
     if (peer_has_vnet_hdr(n)) {
2e83913
         tap_using_vnet_hdr(n->nic->nc.peer, 1);
2e83913
     } else {
2e83913
diff --git a/hw/virtio-net.h b/hw/virtio-net.h
2e83913
index 9130d75..e55119b 100644
2e83913
--- a/hw/virtio-net.h
2e83913
+++ b/hw/virtio-net.h
2e83913
@@ -157,7 +157,6 @@ struct virtio_net_ctrl_mac {
2e83913
         DEFINE_VIRTIO_COMMON_FEATURES(_state, _field), \
2e83913
         DEFINE_PROP_BIT("csum", _state, _field, VIRTIO_NET_F_CSUM, true), \
2e83913
         DEFINE_PROP_BIT("guest_csum", _state, _field, VIRTIO_NET_F_GUEST_CSUM, true), \
2e83913
-        DEFINE_PROP_BIT("mac", _state, _field, VIRTIO_NET_F_MAC, true), \
2e83913
         DEFINE_PROP_BIT("gso", _state, _field, VIRTIO_NET_F_GSO, true), \
2e83913
         DEFINE_PROP_BIT("guest_tso4", _state, _field, VIRTIO_NET_F_GUEST_TSO4, true), \
2e83913
         DEFINE_PROP_BIT("guest_tso6", _state, _field, VIRTIO_NET_F_GUEST_TSO6, true), \
2e83913
-- 
2e83913
1.6.6.144.g5c3af