diff --git a/drivers/net/rtl8139.c b/drivers/net/rtl8139.c index 1afc6a10..c7978fdf 100644 --- a/drivers/net/rtl8139.c +++ b/drivers/net/rtl8139.c @@ -113,7 +113,8 @@ static err_t rtl8139if_output(struct netif* netif, struct pbuf* p) static void rtl8139if_input(struct netif* netif, struct pbuf* p) { struct eth_hdr *ethhdr; - + err_t err; + /* points to packet payload, which starts with an Ethernet header */ ethhdr = p->payload; @@ -127,8 +128,9 @@ static void rtl8139if_input(struct netif* netif, struct pbuf* p) case ETHTYPE_PPPOE: #endif /* PPPOE_SUPPORT */ /* full packet send to tcpip_thread to process */ - if (mynetif->input(p, mynetif) != ERR_OK) { - LWIP_DEBUGF(NETIF_DEBUG, ("rtl8139if_input: IP input error\n")); + err = mynetif->input(p, mynetif); + if (err != ERR_OK) { + LWIP_DEBUGF(NETIF_DEBUG, ("rtl8139if_input: IP input error %d\n", (int32_t) err)); pbuf_free(p); } break;