aboutsummaryrefslogtreecommitdiff
path: root/hw/etraxfs_eth.c
diff options
context:
space:
mode:
authorJason Wang <jasowang@redhat.com>2013-01-30 19:12:22 +0800
committerAnthony Liguori <aliguori@us.ibm.com>2013-02-01 11:02:55 -0600
commitb356f76de31e343121cdab3a01b39182edce9519 (patch)
tree917613c9d0047ba2b4b67a5a4e6146c62b2a62d7 /hw/etraxfs_eth.c
parent28a65891a0deb10b222890b9eb916ca32cb977bb (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/etraxfs_eth.c')
-rw-r--r--hw/etraxfs_eth.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/hw/etraxfs_eth.c b/hw/etraxfs_eth.c
index 0b474c0843..7c4d5880ac 100644
--- a/hw/etraxfs_eth.c
+++ b/hw/etraxfs_eth.c
@@ -555,7 +555,7 @@ static int eth_tx_push(void *opaque, unsigned char *buf, int len, bool eop)
struct fs_eth *eth = opaque;
D(printf("%s buf=%p len=%d\n", __func__, buf, len));
- qemu_send_packet(&eth->nic->nc, buf, len);
+ qemu_send_packet(qemu_get_queue(eth->nic), buf, len);
return len;
}
@@ -616,7 +616,8 @@ static int fs_eth_init(SysBusDevice *dev)
qemu_macaddr_default_if_unset(&s->conf.macaddr);
s->nic = qemu_new_nic(&net_etraxfs_info, &s->conf,
object_get_typename(OBJECT(s)), 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);
+
tdk_init(&s->phy);
mdio_attach(&s->mdio_bus, &s->phy, s->phyaddr);