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/mcf_fec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'hw/mcf_fec.c') diff --git a/hw/mcf_fec.c b/hw/mcf_fec.c index 2423f64..8a90bf8 100644 --- a/hw/mcf_fec.c +++ b/hw/mcf_fec.c @@ -174,7 +174,7 @@ static void mcf_fec_do_tx(mcf_fec_state *s) if (bd.flags & FEC_BD_L) { /* Last buffer in frame. */ DPRINTF("Sending packet\n"); - qemu_send_packet(&s->nic->nc, frame, len); + qemu_send_packet(qemu_get_queue(s->nic), frame, len); ptr = frame; frame_size = 0; s->eir |= FEC_INT_TXF; @@ -476,5 +476,5 @@ void mcf_fec_init(MemoryRegion *sysmem, NICInfo *nd, s->nic = qemu_new_nic(&net_mcf_fec_info, &s->conf, nd->model, nd->name, 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); } -- cgit v1.1