diff --git a/drivers/net/mmnif.c b/drivers/net/mmnif.c index 6dbfba1a..d1409ba0 100644 --- a/drivers/net/mmnif.c +++ b/drivers/net/mmnif.c @@ -517,7 +517,6 @@ void* mmnif_retrigger(void* e) while(active) { sleep(1); - DEBUGPRINTF("mmnif_retrigger(): \n"); mmnif_irqhandler(); } return NULL; @@ -738,13 +737,15 @@ err_t mmnif_tx(struct netif* netif, struct pbuf* p) if (mmnif->tx_queue > MMNIF_TX_QUEUELEN) { DEBUGPRINTF("mmnif_tx(): too many packets at once for tx_queue\n"); - goto drop_packet; + mmnif->tx_queue--; + goto drop_packet_fast; } if (p->tot_len > MMNIF_TX_BUFFERLEN) { DEBUGPRINTF("mmnif_tx(): packet is longer than 1792 bytes\n"); - goto drop_packet; + mmnif->tx_queue--; + goto drop_packet_fast; } /* check if the pbuf consists only of one element @@ -862,7 +863,8 @@ drop_packet: /* packet is lost. clean up and gather stats */ pending--; mmnif_write_rx_pending(dest_ip, pending); - mmnif_unlock_rx_hdr(dest_ip); + mmnif_unlock_rx_hdr(dest_ip); +drop_packet_fast: LINK_STATS_INC(link.drop);