mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-07-04 00:03:25 -04:00
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:
parent
83eb9db95e
commit
64ffa39dc8
2 changed files with 6 additions and 5 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue