Datasheet clearly says that RXDIS flag prevents reception, but says nothing about a required presence of RXEN flag.
While at it, fix the style of the following if statement. Signed-off-by: Hervé Poussineau <[email protected]> --- hw/net/dp8393x.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hw/net/dp8393x.c b/hw/net/dp8393x.c index 95a4d3d..b81036a 100644 --- a/hw/net/dp8393x.c +++ b/hw/net/dp8393x.c @@ -622,10 +622,12 @@ static int dp8393x_can_receive(NetClientState *nc) { dp8393xState *s = qemu_get_nic_opaque(nc); - if (!(s->regs[SONIC_CR] & SONIC_CR_RXEN)) + if (s->regs[SONIC_CR] & SONIC_CR_RXDIS) { return 0; - if (s->regs[SONIC_ISR] & SONIC_ISR_RBE) + } + if (s->regs[SONIC_ISR] & SONIC_ISR_RBE) { return 0; + } return 1; } -- 2.1.4
