From b356f76de31e343121cdab3a01b39182edce9519 Mon Sep 17 00:00:00 2001 From: Jason Wang Date: Wed, 30 Jan 2013 19:12:22 +0800 Subject: net: introduce qemu_get_queue() To support multiqueue, the patch introduce a helper qemu_get_queue() which is used to get the NetClientState of a device. The following patches would refactor this helper to support multiqueue. Signed-off-by: Jason Wang Signed-off-by: Anthony Liguori --- hw/stellaris_enet.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'hw/stellaris_enet.c') diff --git a/hw/stellaris_enet.c b/hw/stellaris_enet.c index 5e9053fa26..99d473006e 100644 --- a/hw/stellaris_enet.c +++ b/hw/stellaris_enet.c @@ -259,7 +259,8 @@ static void stellaris_enet_write(void *opaque, hwaddr offset, memset(&s->tx_fifo[s->tx_frame_len], 0, 60 - s->tx_frame_len); s->tx_fifo_len = 60; } - qemu_send_packet(&s->nic->nc, s->tx_fifo, s->tx_frame_len); + qemu_send_packet(qemu_get_queue(s->nic), s->tx_fifo, + s->tx_frame_len); s->tx_frame_len = -1; s->ris |= SE_INT_TXEMP; stellaris_enet_update(s); @@ -412,7 +413,7 @@ static int stellaris_enet_init(SysBusDevice *dev) s->nic = qemu_new_nic(&net_stellaris_enet_info, &s->conf, object_get_typename(OBJECT(dev)), dev->qdev.id, s); - qemu_format_nic_info_str(&s->nic->nc, s->conf.macaddr.a); + qemu_format_nic_info_str(qemu_get_queue(s->nic), s->conf.macaddr.a); stellaris_enet_reset(s); register_savevm(&s->busdev.qdev, "stellaris_enet", -1, 1, -- cgit 1.4.1