From ea3d08367e4dd799aa6df26078ed840371f0a9d2 Mon Sep 17 00:00:00 2001 From: OBattler Date: Thu, 30 Apr 2020 00:57:11 +0200 Subject: [PATCH] Set minimum network queue period to 128 byte period. --- src/network/network.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/network/network.c b/src/network/network.c index 93957b60c..2e9fee693 100644 --- a/src/network/network.c +++ b/src/network/network.c @@ -302,9 +302,12 @@ network_queue(void *priv) network_queue_get(&pkt); if (pkt.len > 0) { net_cards[network_card].rx(pkt.priv, pkt.data, pkt.len); - timer_on_auto(&network_queue_timer, 0.762939453125 * 2.0 * ((double) pkt.len)); + if (pkt.len >= 128) + timer_on_auto(&network_queue_timer, 0.762939453125 * 2.0 * ((double) pkt.len)); + else + timer_on_auto(&network_queue_timer, 0.762939453125 * 2.0 * 128.0); } else - timer_on_auto(&network_queue_timer, 0.762939453125 * 2.0); + timer_on_auto(&network_queue_timer, 0.762939453125 * 2.0 * 128.0); network_queue_advance(); network_busy(0);