diff options
author | Jason Wang <jasowang@redhat.com> | 2013-01-30 19:12:22 +0800 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2013-02-01 11:02:55 -0600 |
commit | b356f76de31e343121cdab3a01b39182edce9519 (patch) | |
tree | 917613c9d0047ba2b4b67a5a4e6146c62b2a62d7 /hw/smc91c111.c | |
parent | 28a65891a0deb10b222890b9eb916ca32cb977bb (diff) |
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 <jasowang@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/smc91c111.c')
-rw-r--r-- | hw/smc91c111.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/smc91c111.c b/hw/smc91c111.c index fe2389bf25..cf79c69b7e 100644 --- a/hw/smc91c111.c +++ b/hw/smc91c111.c @@ -237,7 +237,7 @@ static void smc91c111_do_tx(smc91c111_state *s) smc91c111_release_packet(s, packetnum); else if (s->tx_fifo_done_len < NUM_PACKETS) s->tx_fifo_done[s->tx_fifo_done_len++] = packetnum; - qemu_send_packet(&s->nic->nc, p, len); + qemu_send_packet(qemu_get_queue(s->nic), p, len); } s->tx_fifo_len = 0; smc91c111_update(s); @@ -754,7 +754,7 @@ static int smc91c111_init1(SysBusDevice *dev) qemu_macaddr_default_if_unset(&s->conf.macaddr); s->nic = qemu_new_nic(&net_smc91c111_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); /* ??? Save/restore. */ return 0; } |