diff --git a/drivers/net/mmnif.c b/drivers/net/mmnif.c index 3c208323..cecacee2 100644 --- a/drivers/net/mmnif.c +++ b/drivers/net/mmnif.c @@ -738,7 +738,7 @@ err_t mmnif_tx(struct netif* netif, struct pbuf* p) /* 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\n"); + DEBUGPRINTF("mmnif_tx(): too many packet's at once for the remote queue : q:%d p:%d\n",queued , pending); goto drop_packet; } @@ -763,16 +763,16 @@ err_t mmnif_tx(struct netif* netif, struct pbuf* p) dest_intr = mmnif_read_rx_inv_intr(dest_ip); - mmnif_write_rx_queue(dest_ip, queued); - mmnif_write_rx_pending(dest_ip, pending); - - mmnif_unlock_rx_hdr(dest_ip); - #ifdef DEBUG_MMNIF DEBUGPRINTF("\n SEND 0x%.8X\n",(char*)mpb_start_address + (dest_ip -1)*mpb_size + 2 + pos * 1792); hex_dump(p->tot_len +2, p->payload); #endif + mmnif_write_rx_queue(dest_ip, queued); + mmnif_write_rx_pending(dest_ip, pending); + + mmnif_unlock_rx_hdr(dest_ip); + /* if driver is not in polling mode inform core that a message has arrived */ if (dest_intr) mmnif_trigger_irq(dest_ip);