|
@@ -1870,10 +1870,12 @@ static int virtnet_probe(struct virtio_device *vdev)
|
|
mtu = virtio_cread16(vdev,
|
|
mtu = virtio_cread16(vdev,
|
|
offsetof(struct virtio_net_config,
|
|
offsetof(struct virtio_net_config,
|
|
mtu));
|
|
mtu));
|
|
- if (mtu < dev->min_mtu || mtu > dev->max_mtu)
|
|
|
|
|
|
+ if (mtu < dev->min_mtu) {
|
|
__virtio_clear_bit(vdev, VIRTIO_NET_F_MTU);
|
|
__virtio_clear_bit(vdev, VIRTIO_NET_F_MTU);
|
|
- else
|
|
|
|
|
|
+ } else {
|
|
dev->mtu = mtu;
|
|
dev->mtu = mtu;
|
|
|
|
+ dev->max_mtu = mtu;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
if (vi->any_header_sg)
|
|
if (vi->any_header_sg)
|