aboutsummaryrefslogtreecommitdiff
path: root/hw/musicpal.c
diff options
context:
space:
mode:
authorJason Wang <jasowang@redhat.com>2013-01-30 19:12:23 +0800
committerAnthony Liguori <aliguori@us.ibm.com>2013-02-01 11:03:00 -0600
commitcc1f0f45425d0cca41ad421623f92bebc93a21a9 (patch)
tree8015fb30e1da7eab59fbbf236f790500a47cbea0 /hw/musicpal.c
parentb356f76de31e343121cdab3a01b39182edce9519 (diff)
net: introduce qemu_get_nic()
To support multiqueue, this patch introduces a helper qemu_get_nic() to get NICState from a NetClientState. 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/musicpal.c')
-rw-r--r--hw/musicpal.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/musicpal.c b/hw/musicpal.c
index 9e22f69fdf..272cb80303 100644
--- a/hw/musicpal.c
+++ b/hw/musicpal.c
@@ -190,7 +190,7 @@ static int eth_can_receive(NetClientState *nc)
static ssize_t eth_receive(NetClientState *nc, const uint8_t *buf, size_t size)
{
- mv88w8618_eth_state *s = DO_UPCAST(NICState, nc, nc)->opaque;
+ mv88w8618_eth_state *s = qemu_get_nic_opaque(nc);
uint32_t desc_addr;
mv88w8618_rx_desc desc;
int i;
@@ -369,7 +369,7 @@ static const MemoryRegionOps mv88w8618_eth_ops = {
static void eth_cleanup(NetClientState *nc)
{
- mv88w8618_eth_state *s = DO_UPCAST(NICState, nc, nc)->opaque;
+ mv88w8618_eth_state *s = qemu_get_nic_opaque(nc);
s->nic = NULL;
}