Commit 7d5ad15d authored by Peter Maydell's avatar Peter Maydell
Browse files

Merge remote-tracking branch 'remotes/stefanha/tags/net-pull-request' into staging



# gpg: Signature made Mon 12 Jan 2015 10:27:41 GMT using RSA key ID 81AB73C8
# gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>"
# gpg:                 aka "Stefan Hajnoczi <stefanha@gmail.com>"

* remotes/stefanha/tags/net-pull-request:
  hw/net/xen_nic.c: Set 'netdev->mac' to NULL after free it
  hw/net/xen_nic.c: Need free 'netdev->nic' in net_free() instead of net_disconnect()
  hw/net/xen_nic.c: Free 'netdev->txs' when map 'netdev->rxs' fails
  net: remove all cleanup methods from NIC NetClientInfos

Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
parents 5435f1d7 a39d97c7
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -218,13 +218,6 @@ static ssize_t aw_emac_receive(NetClientState *nc, const uint8_t *buf,
    return size;
}

static void aw_emac_cleanup(NetClientState *nc)
{
    AwEmacState *s = qemu_get_nic_opaque(nc);

    s->nic = NULL;
}

static void aw_emac_reset(DeviceState *dev)
{
    AwEmacState *s = AW_EMAC(dev);
@@ -433,7 +426,6 @@ static NetClientInfo net_aw_emac_info = {
    .size = sizeof(NICState),
    .can_receive = aw_emac_can_receive,
    .receive = aw_emac_receive,
    .cleanup = aw_emac_cleanup,
    .link_status_changed = aw_emac_set_link,
};

+0 −9
Original line number Diff line number Diff line
@@ -1209,14 +1209,6 @@ static const MemoryRegionOps gem_ops = {
    .endianness = DEVICE_LITTLE_ENDIAN,
};

static void gem_cleanup(NetClientState *nc)
{
    GemState *s = qemu_get_nic_opaque(nc);

    DB_PRINT("\n");
    s->nic = NULL;
}

static void gem_set_link(NetClientState *nc)
{
    DB_PRINT("\n");
@@ -1228,7 +1220,6 @@ static NetClientInfo net_gem_info = {
    .size = sizeof(NICState),
    .can_receive = gem_can_receive,
    .receive = gem_receive,
    .cleanup = gem_cleanup,
    .link_status_changed = gem_set_link,
};

+0 −11
Original line number Diff line number Diff line
@@ -859,22 +859,11 @@ static void nic_reset(void *opaque)
    dp8393x_update_irq(s);
}

static void nic_cleanup(NetClientState *nc)
{
    dp8393xState *s = qemu_get_nic_opaque(nc);

    timer_del(s->watchdog);
    timer_free(s->watchdog);

    g_free(s);
}

static NetClientInfo net_dp83932_info = {
    .type = NET_CLIENT_OPTIONS_KIND_NIC,
    .size = sizeof(NICState),
    .can_receive = nic_can_receive,
    .receive = nic_receive,
    .cleanup = nic_cleanup,
};

void dp83932_init(NICInfo *nd, hwaddr base, int it_shift,
+0 −9
Original line number Diff line number Diff line
@@ -1502,14 +1502,6 @@ e1000_mmio_setup(E1000State *d)
    memory_region_init_io(&d->io, OBJECT(d), &e1000_io_ops, d, "e1000-io", IOPORT_SIZE);
}

static void
e1000_cleanup(NetClientState *nc)
{
    E1000State *s = qemu_get_nic_opaque(nc);

    s->nic = NULL;
}

static void
pci_e1000_uninit(PCIDevice *dev)
{
@@ -1528,7 +1520,6 @@ static NetClientInfo net_e1000_info = {
    .can_receive = e1000_can_receive,
    .receive = e1000_receive,
    .receive_iov = e1000_receive_iov,
    .cleanup = e1000_cleanup,
    .link_status_changed = e1000_set_link_status,
};

+0 −8
Original line number Diff line number Diff line
@@ -1832,13 +1832,6 @@ static const VMStateDescription vmstate_eepro100 = {
    }
};

static void nic_cleanup(NetClientState *nc)
{
    EEPRO100State *s = qemu_get_nic_opaque(nc);

    s->nic = NULL;
}

static void pci_nic_uninit(PCIDevice *pci_dev)
{
    EEPRO100State *s = DO_UPCAST(EEPRO100State, dev, pci_dev);
@@ -1853,7 +1846,6 @@ static NetClientInfo net_eepro100_info = {
    .size = sizeof(NICState),
    .can_receive = nic_can_receive,
    .receive = nic_receive,
    .cleanup = nic_cleanup,
};

static int e100_nic_init(PCIDevice *pci_dev)
Loading