virtio-net: fix ring handling in receive
virtio-net: fix ring handling in receive

A bug crept in while doing the virtio 1.0 enablement in
commit 6e4d62c2 (virtio-net: enable virtio 1.0)

+       idx = virtio_modern16_to_cpu(&virtiodev, vq_rx.used->idx);

[...]

-       vq_rx.avail->ring[vq_rx.avail->idx % vq_rx.size] = id - 1;
+       vq_rx.avail->ring[idx % vq_rx.size] = virtio_cpu_to_modern16(&virtiodev, id - 1);
        sync();
-       vq_rx.avail->idx += 1;
+       vq_rx.avail->idx = virtio_cpu_to_modern16(&virtiodev, idx + 1);

Should be using avail->idx in place of used->idx.

Signed-off-by: Nikunj A Dadhania <e2f4a5db9b4735182a88051d1e7a3599f9eac9db@linux.vnet.ibm.com>
Reviewed-by: Thomas Huth <9e65be74847981e55b2564b6266c57d86d3bac05@redhat.com>
Signed-off-by: Alexey Kardashevskiy <ac1fc56530d7d037e1ea666f130daca22d72f964@ozlabs.ru>

open-power-host-os/slof,open-power-host-os/slof,open-power-host-os/slof,aik/SLOF,qemu/SLOF,open-power-host-os/slof,stefanberger/SLOF-tpm,aik/SLOF,stefanberger/SLOF-tpm,qemu/SLOF,qemu/SLOF,aik/SLOF,stefanberger/SLOF-tpm