]> Git Repo - qemu.git/commitdiff
virtio-net: mac property is mandatory
authorMichael S. Tsirkin <[email protected]>
Tue, 12 Jan 2010 18:50:17 +0000 (20:50 +0200)
committerAnthony Liguori <[email protected]>
Tue, 12 Jan 2010 20:32:19 +0000 (14:32 -0600)
Mac feature bit isn't going to work as all network cards already have a
'mac' property to set the mac address.  Remove it from mask and add in
get_features.

Reported-by: Gerd Hoffmann <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Anthony Liguori <[email protected]>
hw/virtio-net.c
hw/virtio-net.h

index c2a389ffb579487c5fa86025d4a3adb3efcfe437..02d9180f743b46d49f6c8129aa569d4182934df0 100644 (file)
@@ -151,6 +151,8 @@ static uint32_t virtio_net_get_features(VirtIODevice *vdev, uint32_t features)
 {
     VirtIONet *n = to_virtio_net(vdev);
 
+    features |= (1 << VIRTIO_NET_F_MAC);
+
     if (peer_has_vnet_hdr(n)) {
         tap_using_vnet_hdr(n->nic->nc.peer, 1);
     } else {
index 9130d75c939d98f8b8de7b60797e954cb8a77579..e55119b6124766d0c855d9ca95e7d190fe4f136f 100644 (file)
@@ -157,7 +157,6 @@ struct virtio_net_ctrl_mac {
         DEFINE_VIRTIO_COMMON_FEATURES(_state, _field), \
         DEFINE_PROP_BIT("csum", _state, _field, VIRTIO_NET_F_CSUM, true), \
         DEFINE_PROP_BIT("guest_csum", _state, _field, VIRTIO_NET_F_GUEST_CSUM, true), \
-        DEFINE_PROP_BIT("mac", _state, _field, VIRTIO_NET_F_MAC, true), \
         DEFINE_PROP_BIT("gso", _state, _field, VIRTIO_NET_F_GSO, true), \
         DEFINE_PROP_BIT("guest_tso4", _state, _field, VIRTIO_NET_F_GUEST_TSO4, true), \
         DEFINE_PROP_BIT("guest_tso6", _state, _field, VIRTIO_NET_F_GUEST_TSO6, true), \
This page took 0.030302 seconds and 4 git commands to generate.