diff --git a/drivers/net/rtl8139.c b/drivers/net/rtl8139.c index d798e31a..469f332e 100644 --- a/drivers/net/rtl8139.c +++ b/drivers/net/rtl8139.c @@ -178,8 +178,10 @@ static void rtl_rx_inthandler(struct netif* netif) #if ETH_PAD_SIZE pbuf_header(p, ETH_PAD_SIZE); /* reclaim the padding word */ #endif - rtl8139if_input(netif, p); LINK_STATS_INC(link.recv); + + // forward packet to LwIP + rtl8139if_input(netif, p); } else { LWIP_DEBUGF(NETIF_DEBUG, ("rtl8139if_rx_inthandler: not enough memory!\n")); rtl8139if->rx_pos += (rtl8139if->rx_pos + length) % RX_BUF_LEN; @@ -289,7 +291,7 @@ err_t rtl8139if_init(struct netif* netif) memset(rtl8139if, 0, sizeof(rtl1839if_t)); /* allocate the receive buffer */ - rtl8139if->rx_buffer = mem_allocation(RX_BUF_LEN + 1500 /*MTU*/ + 16 /* header size */, MAP_KERNEL_SPACE|MAP_NO_CACHE); + rtl8139if->rx_buffer = mem_allocation(RX_BUF_LEN + 1500 /* MTU */ + 16 /* header size */, MAP_KERNEL_SPACE|MAP_NO_CACHE); if (!(rtl8139if->rx_buffer)) { LWIP_DEBUGF(NETIF_DEBUG, ("rtl8139if_init: out of memory\n")); kfree(rtl8139if, sizeof(rtl1839if_t));