virtio-net-s390: switch to the new API.

Here the virtio-net-s390 is modified for the new API. The device
virtio-net-s390 extends virtio-s390-device as before. It creates and
connects a virtio-net-device during the init. The properties are not modified.

Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>
Tested-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Message-id: 1365690602-22729-5-git-send-email-fred.konrad@greensocs.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
KONRAD Frederic 2013-04-11 16:29:59 +02:00 committed by Anthony Liguori
parent e37da3945f
commit 74b4fe3d79
2 changed files with 30 additions and 12 deletions

View file

@ -89,9 +89,7 @@ struct VirtIOS390Device {
ram_addr_t feat_offs;
uint8_t feat_len;
VirtIODevice *vdev;
NICConf nic;
uint32_t host_features;
virtio_net_conf net;
VirtIORNGConf rng;
VirtioBusState bus;
};
@ -151,4 +149,15 @@ typedef struct VirtIOSerialS390 {
VirtIOSerial vdev;
} VirtIOSerialS390;
/* virtio-net-s390 */
#define TYPE_VIRTIO_NET_S390 "virtio-net-s390"
#define VIRTIO_NET_S390(obj) \
OBJECT_CHECK(VirtIONetS390, (obj), TYPE_VIRTIO_NET_S390)
typedef struct VirtIONetS390 {
VirtIOS390Device parent_obj;
VirtIONet vdev;
} VirtIONetS390;
#endif