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>
This commit is contained in:
Fea.Wang 2024-06-13 09:35:01 +08:00 committed by Edgar E. Iglesias
parent 8e25dddaf9
commit 3a6d374b75
1 changed files with 1 additions and 1 deletions

View File

@ -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