Revision ae50b274
b/hw/device-hotplug.c | ||
---|---|---|
55 | 55 |
nic = &nd_table[i]; |
56 | 56 |
if (nic->used) { |
57 | 57 |
if (nic->private && match_fn(nic->private, arg)) { |
58 |
if (nic->vlan) { |
|
59 |
VLANClientState *vc; |
|
60 |
vc = qemu_find_vlan_client(nic->vlan, nic->private); |
|
61 |
if (vc) |
|
62 |
qemu_del_vlan_client(vc); |
|
63 |
} |
|
58 |
qemu_del_vlan_client(nic->vc); |
|
64 | 59 |
net_client_uninit(nic); |
65 | 60 |
} |
66 | 61 |
} |
b/hw/dp8393x.c | ||
---|---|---|
890 | 890 |
s->watchdog = qemu_new_timer(vm_clock, dp8393x_watchdog, s); |
891 | 891 |
s->regs[SONIC_SR] = 0x0004; /* only revision recognized by Linux */ |
892 | 892 |
|
893 |
s->vc = qemu_new_vlan_client(nd->vlan, nd->model, nd->name, nic_can_receive, |
|
894 |
nic_receive, NULL, nic_cleanup, s); |
|
893 |
s->vc = nd->vc = qemu_new_vlan_client(nd->vlan, nd->model, nd->name, |
|
894 |
nic_can_receive, nic_receive, NULL, |
|
895 |
nic_cleanup, s); |
|
895 | 896 |
|
896 | 897 |
qemu_format_nic_info_str(s->vc, nd->macaddr); |
897 | 898 |
qemu_register_reset(nic_reset, s); |
b/hw/etraxfs_eth.c | ||
---|---|---|
590 | 590 |
eth->ethregs = cpu_register_io_memory(eth_read, eth_write, eth); |
591 | 591 |
cpu_register_physical_memory (base, 0x5c, eth->ethregs); |
592 | 592 |
|
593 |
eth->vc = qemu_new_vlan_client(nd->vlan, nd->model, nd->name, |
|
594 |
eth_can_receive, eth_receive, NULL,
|
|
595 |
eth_cleanup, eth);
|
|
593 |
eth->vc = nd->vc = qemu_new_vlan_client(nd->vlan, nd->model, nd->name,
|
|
594 |
eth_can_receive, eth_receive,
|
|
595 |
NULL, eth_cleanup, eth);
|
|
596 | 596 |
eth->vc->opaque = eth; |
597 | 597 |
eth->vc->link_status_changed = eth_set_link; |
598 | 598 |
|
b/hw/mcf_fec.c | ||
---|---|---|
462 | 462 |
mcf_fec_writefn, s); |
463 | 463 |
cpu_register_physical_memory(base, 0x400, s->mmio_index); |
464 | 464 |
|
465 |
s->vc = qemu_new_vlan_client(nd->vlan, nd->model, nd->name, |
|
466 |
mcf_fec_can_receive, mcf_fec_receive, NULL,
|
|
467 |
mcf_fec_cleanup, s); |
|
465 |
s->vc = nd->vc = qemu_new_vlan_client(nd->vlan, nd->model, nd->name,
|
|
466 |
mcf_fec_can_receive, mcf_fec_receive,
|
|
467 |
NULL, mcf_fec_cleanup, s);
|
|
468 | 468 |
memcpy(s->macaddr, nd->macaddr, 6); |
469 | 469 |
qemu_format_nic_info_str(s->vc, s->macaddr); |
470 | 470 |
} |
b/hw/mipsnet.c | ||
---|---|---|
263 | 263 |
s->io_base = base; |
264 | 264 |
s->irq = irq; |
265 | 265 |
if (nd && nd->vlan) { |
266 |
s->vc = qemu_new_vlan_client(nd->vlan, nd->model, nd->name, |
|
267 |
mipsnet_can_receive, mipsnet_receive, NULL,
|
|
268 |
mipsnet_cleanup, s); |
|
266 |
s->vc = nd->vc = qemu_new_vlan_client(nd->vlan, nd->model, nd->name,
|
|
267 |
mipsnet_can_receive, mipsnet_receive,
|
|
268 |
NULL, mipsnet_cleanup, s);
|
|
269 | 269 |
} else { |
270 | 270 |
s->vc = NULL; |
271 | 271 |
} |
b/hw/ne2000.c | ||
---|---|---|
759 | 759 |
|
760 | 760 |
ne2000_reset(s); |
761 | 761 |
|
762 |
s->vc = qemu_new_vlan_client(nd->vlan, nd->model, nd->name, |
|
763 |
ne2000_can_receive, ne2000_receive, NULL,
|
|
764 |
isa_ne2000_cleanup, s); |
|
762 |
s->vc = nd->vc = qemu_new_vlan_client(nd->vlan, nd->model, nd->name,
|
|
763 |
ne2000_can_receive, ne2000_receive,
|
|
764 |
NULL, isa_ne2000_cleanup, s);
|
|
765 | 765 |
|
766 | 766 |
qemu_format_nic_info_str(s->vc, s->macaddr); |
767 | 767 |
|
b/hw/qdev.c | ||
---|---|---|
250 | 250 |
{ |
251 | 251 |
NICInfo *nd = dev->nd; |
252 | 252 |
assert(nd); |
253 |
return qemu_new_vlan_client(nd->vlan, nd->model, nd->name, can_receive, |
|
254 |
receive, receive_iov, cleanup, opaque); |
|
253 |
nd->vc = qemu_new_vlan_client(nd->vlan, nd->model, nd->name, can_receive, |
|
254 |
receive, receive_iov, cleanup, opaque); |
|
255 |
return nd->vc; |
|
255 | 256 |
} |
256 | 257 |
|
257 | 258 |
|
b/hw/usb-net.c | ||
---|---|---|
1458 | 1458 |
|
1459 | 1459 |
pstrcpy(s->dev.devname, sizeof(s->dev.devname), |
1460 | 1460 |
"QEMU USB Network Interface"); |
1461 |
s->vc = qemu_new_vlan_client(nd->vlan, nd->model, nd->name, |
|
1462 |
usbnet_can_receive, |
|
1463 |
usbnet_receive, |
|
1464 |
NULL, |
|
1465 |
usbnet_cleanup, s); |
|
1461 |
s->vc = nd->vc = qemu_new_vlan_client(nd->vlan, nd->model, nd->name,
|
|
1462 |
usbnet_can_receive,
|
|
1463 |
usbnet_receive,
|
|
1464 |
NULL,
|
|
1465 |
usbnet_cleanup, s);
|
|
1466 | 1466 |
|
1467 | 1467 |
qemu_format_nic_info_str(s->vc, s->mac); |
1468 | 1468 |
|
b/net.h | ||
---|---|---|
96 | 96 |
const char *name; |
97 | 97 |
const char *devaddr; |
98 | 98 |
VLANState *vlan; |
99 |
VLANClientState *vc; |
|
99 | 100 |
void *private; |
100 | 101 |
int used; |
101 | 102 |
int bootable; |
Also available in: Unified diff