aboutsummaryrefslogtreecommitdiff
path: root/hw/milkymist-minimac2.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/milkymist-minimac2.c')
-rw-r--r--hw/milkymist-minimac2.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/milkymist-minimac2.c b/hw/milkymist-minimac2.c
index 2a8a4efa46..9992dcceaf 100644
--- a/hw/milkymist-minimac2.c
+++ b/hw/milkymist-minimac2.c
@@ -280,7 +280,7 @@ static void update_rx_interrupt(MilkymistMinimac2State *s)
static ssize_t minimac2_rx(NetClientState *nc, const uint8_t *buf, size_t size)
{
- MilkymistMinimac2State *s = DO_UPCAST(NICState, nc, nc)->opaque;
+ MilkymistMinimac2State *s = qemu_get_nic_opaque(nc);
uint32_t r_count;
uint32_t r_state;
@@ -410,7 +410,7 @@ static const MemoryRegionOps minimac2_ops = {
static int minimac2_can_rx(NetClientState *nc)
{
- MilkymistMinimac2State *s = DO_UPCAST(NICState, nc, nc)->opaque;
+ MilkymistMinimac2State *s = qemu_get_nic_opaque(nc);
if (s->regs[R_STATE0] == STATE_LOADED) {
return 1;
@@ -424,7 +424,7 @@ static int minimac2_can_rx(NetClientState *nc)
static void minimac2_cleanup(NetClientState *nc)
{
- MilkymistMinimac2State *s = DO_UPCAST(NICState, nc, nc)->opaque;
+ MilkymistMinimac2State *s = qemu_get_nic_opaque(nc);
s->nic = NULL;
}