aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorFea.Wang <fea.wang@sifive.com>2024-06-13 09:35:01 +0800
committerEdgar E. Iglesias <edgar.iglesias@amd.com>2024-06-18 14:52:05 +0200
commit3a6d374b754b4b345195ff6846eeaffedc96a7c5 (patch)
treedb09550c4de038977e276978f0c09496fd49c794 /hw
parent8e25dddaf93bd9b2fa79e4b5229e7b3a97a86b7f (diff)
hw/net: Fix the transmission return size
Fix the transmission return size because not all bytes could be transmitted successfully. So, return a successful length instead of a constant value. Signed-off-by: Fea.Wang <fea.wang@sifive.com> Reviewed-by: Edgar E. Iglesias <edgar.iglesias@amd.com> Reviewed-by: Frank Chang <frank.chang@sifive.com> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@amd.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/net/xilinx_axienet.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/net/xilinx_axienet.c b/hw/net/xilinx_axienet.c
index 7d1fd37b4a..05d41bd548 100644
--- a/hw/net/xilinx_axienet.c
+++ b/hw/net/xilinx_axienet.c
@@ -847,7 +847,7 @@ static ssize_t eth_rx(NetClientState *nc, const uint8_t *buf, size_t size)
axienet_eth_rx_notify(s);
enet_update_irq(s);
- return size;
+ return s->rxpos;
}
static size_t