diff --git a/drivers/net/mmnif.c b/drivers/net/mmnif.c index 5408ac1b..4e0d4b8a 100644 --- a/drivers/net/mmnif.c +++ b/drivers/net/mmnif.c @@ -760,7 +760,7 @@ err_t mmnif_tx(struct netif* netif, struct pbuf* p) /* get the palce the router core is looking for the packet */ /* lock the dest_ip mm_rx_buffer_hdr */ - mmnif_lock_rx_hdr(dest_ip); +retry: mmnif_lock_rx_hdr(dest_ip); /* read and edit needed values */ queued = mmnif_read_rx_queue(dest_ip); @@ -772,13 +772,13 @@ err_t mmnif_tx(struct netif* netif, struct pbuf* p) mmnif_write_rx_pending(dest_ip,pending); /* and unlock the dest_ip mm_rx_buffer_hdr */ - mmnif_unlock_rx_hdr(dest_ip); + mmnif_unlock_rx_hdr(dest_ip); /* check if there is a space in the queue without overwriting another packet */ if ((queued + pending) > MMNIF_RX_QUEUELEN) { DEBUGPRINTF("mmnif_tx(): too many packet's at once for the remote queue : q:%d p:%d\n",queued , pending); - goto drop_packet; + goto retry; } pos = (pos + queued + pending -1) % MMNIF_RX_QUEUELEN;