]> git.proxmox.com Git - qemu.git/commitdiff
zap DeviceState->nd
authorGerd Hoffmann <kraxel@redhat.com>
Wed, 21 Oct 2009 13:25:41 +0000 (15:25 +0200)
committerAnthony Liguori <aliguori@us.ibm.com>
Tue, 27 Oct 2009 17:28:41 +0000 (12:28 -0500)
No users left.
Also cleanup obsolete helper functions.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
hw/pci.c
hw/qdev.c
hw/qdev.h
net.h

index fe2c4bd3d3541a2b3f81caa18ba97a6d65d80cf8..553febbdea766473d4bbb917714a06d4206a5291 100644 (file)
--- a/hw/pci.c
+++ b/hw/pci.c
@@ -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;
index e81d6621c12da0fe66a3c4e876093fb461d84992..373ddfcae5d84dfe4618b8a2a06854925f7b03f2 100644 (file)
--- a/hw/qdev.c
+++ b/hw/qdev.c
@@ -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);
index 77075a8e0388d92a175a06da7499dc5ab53a6554..9c8f9e2ece082bb02e7ddaec409b23fab4692469 100644 (file)
--- a/hw/qdev.h
+++ b/hw/qdev.h
@@ -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;
 };
 
diff --git a/net.h b/net.h
index f2d10f0c91869f8defa5a019d8ad137c866a0972..c96f29142d331eea2ca2d6e38286996e318225c6 100644 (file)
--- a/net.h
+++ b/net.h
@@ -164,13 +164,6 @@ void net_host_device_remove(Monitor *mon, const QDict *qdict);
 #define SMBD_COMMAND "/usr/sbin/smbd"
 #endif
 
-void qdev_get_macaddr(DeviceState *dev, uint8_t *macaddr);
-VLANClientState *qdev_get_vlan_client(DeviceState *dev,
-                                      NetCanReceive *can_receive,
-                                      NetReceive *receive,
-                                      NetReceiveIOV *receive_iov,
-                                      NetCleanup *cleanup,
-                                      void *opaque);
 void qdev_set_nic_properties(DeviceState *dev, NICInfo *nd);
 
 #endif