diff options
Diffstat (limited to 'hw/rtl8139.c')
-rw-r--r-- | hw/rtl8139.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/hw/rtl8139.c b/hw/rtl8139.c index d99f35c130..ea2ca25182 100644 --- a/hw/rtl8139.c +++ b/hw/rtl8139.c @@ -1170,8 +1170,9 @@ static void rtl8139_reset_rxring(RTL8139State *s, uint32_t bufferSize) s->RxBufAddr = 0; } -static void rtl8139_reset(RTL8139State *s) +static void rtl8139_reset(void *opaque) { + RTL8139State *s = opaque; int i; /* restore MAC address */ @@ -3473,6 +3474,7 @@ static void pci_rtl8139_init(PCIDevice *dev) s->pci_dev = (PCIDevice *)d; qdev_get_macaddr(&dev->qdev, s->macaddr); + qemu_register_reset(rtl8139_reset, 0, s); rtl8139_reset(s); s->vc = qdev_get_vlan_client(&dev->qdev, rtl8139_receive, rtl8139_can_receive, |