diff options
Diffstat (limited to 'hw/xen_nic.c')
-rw-r--r-- | hw/xen_nic.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/hw/xen_nic.c b/hw/xen_nic.c index dc12110dba..d5b39eadd3 100644 --- a/hw/xen_nic.c +++ b/hw/xen_nic.c @@ -185,9 +185,11 @@ static void net_tx_packets(struct XenNetDev *netdev) } memcpy(tmpbuf, page + txreq.offset, txreq.size); net_checksum_calculate(tmpbuf, txreq.size); - qemu_send_packet(&netdev->nic->nc, tmpbuf, txreq.size); + qemu_send_packet(qemu_get_queue(netdev->nic), tmpbuf, + txreq.size); } else { - qemu_send_packet(&netdev->nic->nc, page + txreq.offset, txreq.size); + qemu_send_packet(qemu_get_queue(netdev->nic), + page + txreq.offset, txreq.size); } xc_gnttab_munmap(netdev->xendev.gnttabdev, page, 1); net_tx_response(netdev, &txreq, NETIF_RSP_OKAY); @@ -329,7 +331,8 @@ static int net_init(struct XenDevice *xendev) netdev->nic = qemu_new_nic(&net_xen_info, &netdev->conf, "xen", NULL, netdev); - snprintf(netdev->nic->nc.info_str, sizeof(netdev->nic->nc.info_str), + snprintf(qemu_get_queue(netdev->nic)->info_str, + sizeof(qemu_get_queue(netdev->nic)->info_str), "nic: xenbus vif macaddr=%s", netdev->mac); /* fill info */ @@ -405,7 +408,7 @@ static void net_disconnect(struct XenDevice *xendev) netdev->rxs = NULL; } if (netdev->nic) { - qemu_del_net_client(&netdev->nic->nc); + qemu_del_net_client(qemu_get_queue(netdev->nic)); netdev->nic = NULL; } } @@ -414,7 +417,7 @@ static void net_event(struct XenDevice *xendev) { struct XenNetDev *netdev = container_of(xendev, struct XenNetDev, xendev); net_tx_packets(netdev); - qemu_flush_queued_packets(&netdev->nic->nc); + qemu_flush_queued_packets(qemu_get_queue(netdev->nic)); } static int net_free(struct XenDevice *xendev) |