diff options
author | Peter Crosthwaite <peter.crosthwaite@xilinx.com> | 2013-02-28 18:23:15 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2013-02-28 18:49:24 +0000 |
commit | 1c5d07909aea7657c7c6b24223460150526369ba (patch) | |
tree | 58676fcdb2864ffb157209fea5567d8e25f68e43 /hw/cadence_gem.c | |
parent | e3f9d31c9899cc94e124b042d7d5353dbfd812ca (diff) |
cadence_gem: factor out can_rx() logic replication
The gem_receive() function replicates the logic for whether or not the device
can rx. Just call the actual gem_can_receive() function in place.
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Message-id: bf7f93969f3e01fbc76d68d2955307fdbad11bb1.1360901435.git.peter.crosthwaite@xilinx.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/cadence_gem.c')
-rw-r--r-- | hw/cadence_gem.c | 2 |
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; } |