From cc1f0f45425d0cca41ad421623f92bebc93a21a9 Mon Sep 17 00:00:00 2001 From: Jason Wang Date: Wed, 30 Jan 2013 19:12:23 +0800 Subject: 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 Signed-off-by: Anthony Liguori --- hw/pcnet-pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hw/pcnet-pci.c') diff --git a/hw/pcnet-pci.c b/hw/pcnet-pci.c index 54a849daae..26c90bf372 100644 --- a/hw/pcnet-pci.c +++ b/hw/pcnet-pci.c @@ -266,7 +266,7 @@ static void pci_physical_memory_read(void *dma_opaque, hwaddr addr, static void pci_pcnet_cleanup(NetClientState *nc) { - PCNetState *d = DO_UPCAST(NICState, nc, nc)->opaque; + PCNetState *d = qemu_get_nic_opaque(nc); pcnet_common_cleanup(d); } -- cgit v1.2.3