aboutsummaryrefslogtreecommitdiff
path: root/hw/net
diff options
context:
space:
mode:
Diffstat (limited to 'hw/net')
-rw-r--r--hw/net/smc91c111.c1
-rw-r--r--hw/net/spapr_llan.c1
-rw-r--r--hw/net/virtio-net.c8
3 files changed, 6 insertions, 4 deletions
diff --git a/hw/net/smc91c111.c b/hw/net/smc91c111.c
index f5963e2cbe..a8e29b3b42 100644
--- a/hw/net/smc91c111.c
+++ b/hw/net/smc91c111.c
@@ -185,6 +185,7 @@ static void smc91c111_release_packet(smc91c111_state *s, int packet)
s->allocated &= ~(1 << packet);
if (s->tx_alloc == 0x80)
smc91c111_tx_alloc(s);
+ qemu_flush_queued_packets(qemu_get_queue(s->nic));
}
/* Flush the TX FIFO. */
diff --git a/hw/net/spapr_llan.c b/hw/net/spapr_llan.c
index 4ff04113db..1bd6f50aaa 100644
--- a/hw/net/spapr_llan.c
+++ b/hw/net/spapr_llan.c
@@ -531,6 +531,7 @@ static void spapr_vlan_class_init(ObjectClass *klass, void *data)
k->dt_type = "network";
k->dt_compatible = "IBM,l-lan";
k->signal_mask = 0x1;
+ set_bit(DEVICE_CATEGORY_NETWORK, dc->categories);
dc->props = spapr_vlan_properties;
k->rtce_window_size = 0x10000000;
dc->vmsd = &vmstate_spapr_llan;
diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
index 613f144d12..b75c753305 100644
--- a/hw/net/virtio-net.c
+++ b/hw/net/virtio-net.c
@@ -200,16 +200,16 @@ static void rxfilter_notify(NetClientState *nc)
VirtIONet *n = qemu_get_nic_opaque(nc);
if (nc->rxfilter_notify_enabled) {
+ gchar *path = object_get_canonical_path(OBJECT(n->qdev));
if (n->netclient_name) {
event_data = qobject_from_jsonf("{ 'name': %s, 'path': %s }",
- n->netclient_name,
- object_get_canonical_path(OBJECT(n->qdev)));
+ n->netclient_name, path);
} else {
- event_data = qobject_from_jsonf("{ 'path': %s }",
- object_get_canonical_path(OBJECT(n->qdev)));
+ event_data = qobject_from_jsonf("{ 'path': %s }", path);
}
monitor_protocol_event(QEVENT_NIC_RX_FILTER_CHANGED, event_data);
qobject_decref(event_data);
+ g_free(path);
/* disable event notification to avoid events flooding */
nc->rxfilter_notify_enabled = 0;