VIRTIO_NET_F_MAC is a bit position, not a bit mask.
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
qvirtio_set_driver(&dev->vdev);
features = qvirtio_get_features(&dev->vdev);
- features = features & VIRTIO_NET_F_MAC;
+ features = features & (1u << VIRTIO_NET_F_MAC);
qvirtio_set_features(&dev->vdev, features);
qvirtio_set_driver_ok(&dev->vdev);