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/mipsnet.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'hw/mipsnet.c') diff --git a/hw/mipsnet.c b/hw/mipsnet.c index feac8159ee..15761b1d5d 100644 --- a/hw/mipsnet.c +++ b/hw/mipsnet.c @@ -173,7 +173,7 @@ static void mipsnet_ioport_write(void *opaque, hwaddr addr, if (s->tx_written == s->tx_count) { /* Send buffer. */ trace_mipsnet_send(s->tx_count); - qemu_send_packet(&s->nic->nc, s->tx_buffer, s->tx_count); + qemu_send_packet(qemu_get_queue(s->nic), s->tx_buffer, s->tx_count); s->tx_count = s->tx_written = 0; s->intctl |= MIPSNET_INTCTL_TXDONE; s->busy = 1; @@ -241,7 +241,7 @@ static int mipsnet_sysbus_init(SysBusDevice *dev) s->nic = qemu_new_nic(&net_mipsnet_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); return 0; } -- cgit v1.2.3-55-g7522