[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 2/4] virtio_net: copy VIRTIO_NET_S_ANNOUNCE if device model ha
From: |
Eugenio Pérez |
Subject: |
[PATCH v2 2/4] virtio_net: copy VIRTIO_NET_S_ANNOUNCE if device model has it |
Date: |
Thu, 24 Nov 2022 18:33:12 +0100 |
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>
---
hw/net/virtio-net.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
index eed629766f..bf71ef33e8 100644
--- a/hw/net/virtio-net.c
+++ b/hw/net/virtio-net.c
@@ -183,6 +183,7 @@ static void virtio_net_get_config(VirtIODevice *vdev,
uint8_t *config)
memcpy(netcfg.mac, n->mac, ETH_ALEN);
}
+ netcfg.status |= (n->status & VIRTIO_NET_S_ANNOUNCE);
memcpy(config, &netcfg, n->config_size);
}
}
--
2.31.1