Commit 96d5e20138b177f2d79c178a6f994015347e6cca

Authored by aliguori
1 parent 7cb7434b

add missing MAC address to info_str for some NICs (Mark McLoughlin)

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>



git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6219 c046a42c-6fe2-441c-8c8c-71466251a162
hw/mcf_fec.c
@@ -455,4 +455,5 @@ void mcf_fec_init(NICInfo *nd, target_phys_addr_t base, qemu_irq *irq) @@ -455,4 +455,5 @@ void mcf_fec_init(NICInfo *nd, target_phys_addr_t base, qemu_irq *irq)
455 s->vc = qemu_new_vlan_client(nd->vlan, nd->model, 455 s->vc = qemu_new_vlan_client(nd->vlan, nd->model,
456 mcf_fec_receive, mcf_fec_can_receive, s); 456 mcf_fec_receive, mcf_fec_can_receive, s);
457 memcpy(s->macaddr, nd->macaddr, 6); 457 memcpy(s->macaddr, nd->macaddr, 6);
  458 + qemu_format_nic_info_str(n->vc, s->macaddr);
458 } 459 }
hw/smc91c111.c
@@ -706,5 +706,6 @@ void smc91c111_init(NICInfo *nd, uint32_t base, qemu_irq irq) @@ -706,5 +706,6 @@ void smc91c111_init(NICInfo *nd, uint32_t base, qemu_irq irq)
706 706
707 s->vc = qemu_new_vlan_client(nd->vlan, nd->model, 707 s->vc = qemu_new_vlan_client(nd->vlan, nd->model,
708 smc91c111_receive, smc91c111_can_receive, s); 708 smc91c111_receive, smc91c111_can_receive, s);
  709 + qemu_format_nic_info_str(s->vc, s->macaddr);
709 /* ??? Save/restore. */ 710 /* ??? Save/restore. */
710 } 711 }
hw/stellaris_enet.c
@@ -396,9 +396,11 @@ void stellaris_enet_init(NICInfo *nd, uint32_t base, qemu_irq irq) @@ -396,9 +396,11 @@ void stellaris_enet_init(NICInfo *nd, uint32_t base, qemu_irq irq)
396 s->irq = irq; 396 s->irq = irq;
397 memcpy(s->macaddr, nd->macaddr, 6); 397 memcpy(s->macaddr, nd->macaddr, 6);
398 398
399 - if (nd->vlan) 399 + if (nd->vlan) {
400 s->vc = qemu_new_vlan_client(nd->vlan, nd->model, 400 s->vc = qemu_new_vlan_client(nd->vlan, nd->model,
401 stellaris_enet_receive, stellaris_enet_can_receive, s); 401 stellaris_enet_receive, stellaris_enet_can_receive, s);
  402 + qemu_format_nic_info_str(s->vc, s->macaddr);
  403 + }
402 404
403 stellaris_enet_reset(s); 405 stellaris_enet_reset(s);
404 register_savevm("stellaris_enet", -1, 1, 406 register_savevm("stellaris_enet", -1, 1,
hw/virtio-net.c
@@ -318,6 +318,8 @@ PCIDevice *virtio_net_init(PCIBus *bus, NICInfo *nd, int devfn) @@ -318,6 +318,8 @@ PCIDevice *virtio_net_init(PCIBus *bus, NICInfo *nd, int devfn)
318 n->vc = qemu_new_vlan_client(nd->vlan, nd->model, 318 n->vc = qemu_new_vlan_client(nd->vlan, nd->model,
319 virtio_net_receive, virtio_net_can_receive, n); 319 virtio_net_receive, virtio_net_can_receive, n);
320 320
  321 + qemu_format_nic_info_str(n->vc, n->mac);
  322 +
321 n->tx_timer = qemu_new_timer(vm_clock, virtio_net_tx_timer, n); 323 n->tx_timer = qemu_new_timer(vm_clock, virtio_net_tx_timer, n);
322 n->tx_timer_active = 0; 324 n->tx_timer_active = 0;
323 n->mergeable_rx_bufs = 0; 325 n->mergeable_rx_bufs = 0;