aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hw/cadence_gem.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/cadence_gem.c b/hw/cadence_gem.c
index e6032ea44f..966ab4f8a8 100644
--- a/hw/cadence_gem.c
+++ b/hw/cadence_gem.c
@@ -615,7 +615,7 @@ static ssize_t gem_receive(NetClientState *nc, const uint8_t *buf, size_t size)
s = qemu_get_nic_opaque(nc);
/* Do nothing if receive is not enabled. */
- if (!(s->regs[GEM_NWCTRL] & GEM_NWCTRL_RXENA)) {
+ if (!gem_can_receive(nc)) {
return -1;
}