diff options
author | Jan Kiszka <jan.kiszka@siemens.com> | 2011-07-20 12:20:22 +0200 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2011-07-23 10:19:50 -0500 |
commit | 6eed18568d985f5e091e96205f5ebf50fb823f4e (patch) | |
tree | b2069a38fe9ff3a6baa5efdde005555582bbca57 /hw/dp8393x.c | |
parent | 44e798d3959e6face1adc0b2fd1873b25f66a5e7 (diff) |
net: Consistently use qemu_macaddr_default_if_unset
Drop the open-coded MAC assignment from net_init_nic and replace it with
standard qemu_macaddr_default_if_unset which is also used by qdev. That
avoid creating colliding MACs when instantiating NICs via different
mechanisms.
This change requires to store the MAC as MACAddr in NICInfo, and the
remaining nd_table users need to be updated.
Based on suggestion by Peter Maydell.
CC: Markus Armbruster <armbru@redhat.com>
CC: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/dp8393x.c')
-rw-r--r-- | hw/dp8393x.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/dp8393x.c b/hw/dp8393x.c index c332dd59d2..1bcd8eeba9 100644 --- a/hw/dp8393x.c +++ b/hw/dp8393x.c @@ -898,7 +898,7 @@ void dp83932_init(NICInfo *nd, target_phys_addr_t base, int it_shift, s->watchdog = qemu_new_timer_ns(vm_clock, dp8393x_watchdog, s); s->regs[SONIC_SR] = 0x0004; /* only revision recognized by Linux */ - memcpy(s->conf.macaddr.a, nd->macaddr, sizeof(s->conf.macaddr)); + s->conf.macaddr = nd->macaddr; s->conf.vlan = nd->vlan; s->conf.peer = nd->netdev; |