diff options
author | Eugenio Pérez <eperezma@redhat.com> | 2022-12-21 12:50:13 +0100 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2023-01-08 01:54:21 -0500 |
commit | 4f93aafc8f9d731c6588f5dc5594c6a1dd1fbe66 (patch) | |
tree | 1fc24b61f7f4466e0bab41295aade50e04e374bb /hw | |
parent | ebc141a62508dc91901373c1a19fe7e2cf560dfb (diff) | |
download | qemu-4f93aafc8f9d731c6588f5dc5594c6a1dd1fbe66.zip qemu-4f93aafc8f9d731c6588f5dc5594c6a1dd1fbe66.tar.gz qemu-4f93aafc8f9d731c6588f5dc5594c6a1dd1fbe66.tar.bz2 |
virtio_net: copy VIRTIO_NET_S_ANNOUNCE if device model has it
Status part of the emulated feature. It will follow device model, so we
must copy it as long as NIC device model has it set.
Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
Message-Id: <20221221115015.1400889-3-eperezma@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/net/virtio-net.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index b30038d..122eac2 100644 --- a/hw/net/virtio-net.c +++ b/hw/net/virtio-net.c @@ -183,6 +183,8 @@ static void virtio_net_get_config(VirtIODevice *vdev, uint8_t *config) memcpy(netcfg.mac, n->mac, ETH_ALEN); } + netcfg.status |= virtio_tswap16(vdev, + n->status & VIRTIO_NET_S_ANNOUNCE); memcpy(config, &netcfg, n->config_size); } } |