From 015f425075467e87ac4edf5d4b2eecbc87802d3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carl-Benedikt=20Kr=C3=BCger?= Date: Tue, 2 Aug 2011 13:34:31 +0200 Subject: [PATCH] merge && test for master --- drivers/net/mmnif.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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;