diff options
Diffstat (limited to 'hw')
-rw-r--r-- | hw/pci.c | 9 | ||||
-rw-r--r-- | hw/qdev.c | 22 | ||||
-rw-r--r-- | hw/qdev.h | 1 |
3 files changed, 1 insertions, 31 deletions
@@ -859,14 +859,7 @@ PCIDevice *pci_nic_init(NICInfo *nd, const char *default_model, dev = &pci_dev->qdev; if (nd->name) dev->id = qemu_strdup(nd->name); - if (qdev_prop_exists(dev, "mac")) { - /* qdev-ified */ - qdev_set_nic_properties(dev, nd); - } else { - /* legacy */ - dev->nd = nd; - nd->private = dev; - } + qdev_set_nic_properties(dev, nd); if (qdev_init(dev) < 0) return NULL; return pci_dev; @@ -361,28 +361,6 @@ void qdev_connect_gpio_out(DeviceState * dev, int n, qemu_irq pin) dev->gpio_out[n] = pin; } -VLANClientState *qdev_get_vlan_client(DeviceState *dev, - NetCanReceive *can_receive, - NetReceive *receive, - NetReceiveIOV *receive_iov, - NetCleanup *cleanup, - void *opaque) -{ - NICInfo *nd = dev->nd; - assert(nd); - nd->vc = qemu_new_vlan_client(nd->vlan, nd->netdev, - nd->model, nd->name, - can_receive, receive, receive_iov, - cleanup, opaque); - return nd->vc; -} - - -void qdev_get_macaddr(DeviceState *dev, uint8_t *macaddr) -{ - memcpy(macaddr, dev->nd->macaddr, 6); -} - void qdev_set_nic_properties(DeviceState *dev, NICInfo *nd) { qdev_prop_set_macaddr(dev, "mac", nd->macaddr); @@ -39,7 +39,6 @@ struct DeviceState { qemu_irq *gpio_in; QLIST_HEAD(, BusState) child_bus; int num_child_bus; - NICInfo *nd; QLIST_ENTRY(DeviceState) sibling; }; |