diff --git a/src/network/network.c b/src/network/network.c index f2f34eec5..45de94937 100644 --- a/src/network/network.c +++ b/src/network/network.c @@ -314,7 +314,7 @@ network_rx_queue(void *priv) netpkt_t *tx_queued_pkt = NULL; if (network_rx_pause || !thread_test_mutex(network_mutex)) { - timer_on_auto(&network_rx_queue_timer, 0.762939453125 * 2.0 * 128.0); + timer_on_auto(&network_rx_queue_timer, 0.762939453125 * 2.0 * 64.0); return; } @@ -323,12 +323,15 @@ network_rx_queue(void *priv) if ((queued_pkt != NULL) && (queued_pkt->len > 0)) { network_dump_packet(queued_pkt); ret = net_cards[network_card].rx(queued_pkt->priv, queued_pkt->data, queued_pkt->len); - if (queued_pkt->len >= 128) - timer_on_auto(&network_rx_queue_timer, 0.762939453125 * 2.0 * ((double) queued_pkt->len)); - else - timer_on_auto(&network_rx_queue_timer, 0.762939453125 * 2.0 * 128.0); + if (ret) { + if (queued_pkt->len >= 128) + timer_on_auto(&network_rx_queue_timer, 0.762939453125 * 2.0 * ((double) queued_pkt->len)); + else + timer_on_auto(&network_rx_queue_timer, 0.762939453125 * 2.0 * 128.0); + } else + timer_on_auto(&network_rx_queue_timer, 0.762939453125 * 2.0 * 64.0); } else - timer_on_auto(&network_rx_queue_timer, 0.762939453125 * 2.0 * 128.0); + timer_on_auto(&network_rx_queue_timer, 0.762939453125 * 2.0 * 64.0); if (ret) queued_pkt = NULL; network_queue_advance(0);