virtio-net: fix cross-endianness support
authorAurelien Jarno <aurelien@aurel32.net>
Tue, 25 Jan 2011 10:55:14 +0000 (11:55 +0100)
committerAurelien Jarno <aurelien@aurel32.net>
Sat, 29 Jan 2011 14:07:56 +0000 (15:07 +0100)
commit393332a96726834231c30c4229037d4c5edb0dfb
treeb34693b6d9e6b061f3f028ad0f1b6832dcf43402
parentc1a4ae10c69f916344ee604f32cadda5297960bb
virtio-net: fix cross-endianness support

virtio-net used to work on cross-endianness configurations, but doesn't
anymore with recent guest kernels, as the new features don't handle
endianness correctly.

This patch fixes wrong conversion, and add missing ones to make
virtio-net working. Tested on the following configurations:
- i386 guest on x86_64 host
- ppc guest on x86_64 host
- i386 guest on mips host
- ppc guest on mips host

Cc: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
hw/virtio-net.c