virtio_net: use LE accessors for speed/duplex
Speed and duplex config fields depend on VIRTIO_NET_F_SPEED_DUPLEX which being 63>31 depends on VIRTIO_F_VERSION_1. Accordingly, use LE accessors for these fields. Reported-by: Cornelia Huck <cohuck@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
@@ -99,7 +99,7 @@ struct virtio_net_config {
|
||||
* speed, in units of 1Mb. All values 0 to INT_MAX are legal.
|
||||
* Any other value stands for unknown.
|
||||
*/
|
||||
__virtio32 speed;
|
||||
__le32 speed;
|
||||
/*
|
||||
* 0x00 - half duplex
|
||||
* 0x01 - full duplex
|
||||
|
Reference in New Issue
Block a user