aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hw/net/lan9118.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/hw/net/lan9118.c b/hw/net/lan9118.c
index 456ae38..f1cba55 100644
--- a/hw/net/lan9118.c
+++ b/hw/net/lan9118.c
@@ -696,6 +696,14 @@ static void do_tx_packet(lan9118_state *s)
n = (s->tx_status_fifo_head + s->tx_status_fifo_used) & 511;
s->tx_status_fifo[n] = status;
s->tx_status_fifo_used++;
+
+ /*
+ * Generate TSFL interrupt if TX FIFO level exceeds the level
+ * specified in the FIFO_INT TX Status Level field.
+ */
+ if (s->tx_status_fifo_used > ((s->fifo_int >> 16) & 0xff)) {
+ s->int_sts |= TSFL_INT;
+ }
if (s->tx_status_fifo_used == 512) {
s->int_sts |= TSFF_INT;
/* TODO: Stop transmission. */