I can tell you two things:
You can't really take a low-level driver for version x and dump it into version y without hassle. It should work, but you also should read the docs because there can always be, and there have been, changes. There is some slight difference with the way 2.0.0 handles incoming frames in comparison with how 1.4.1 did. A 1.4.1 driver will only get IPv4 and ARP; a 2.0.0 driver will get everything. That would explain that "not for us" message you see.
If you diff ethernetif.c:
<   switch (htons(ethhdr->type)) {
<   /* IP or ARP packet? */
<   case ETHTYPE_IP:
<   case ETHTYPE_ARP:
< #if PPPOE_SUPPORT
<   /* PPPoE packet? */
<   case ETHTYPE_PPPOEDISC:
<   case ETHTYPE_PPPOE:
< #endif /* PPPOE_SUPPORT */
<     /* full packet send to tcpip_thread to process */
<     if (netif->input(p, netif)!=ERR_OK)
<      { LWIP_DEBUGF(NETIF_DEBUG, ("ethernetif_input: IP input error\n"));
<        pbuf_free(p);
<        p = NULL;
<      }
<     break;
<
<   default:
<     pbuf_free(p);
<     p = NULL;
<     break;
---
>   /* if no packet could be read, silently ignore this */
>   if (p != NULL) {
> /* pass all packets to ethernet_input, which decides what packets it supports */
>     if (netif->input(p, netif) != ERR_OK) {
>       LWIP_DEBUGF(NETIF_DEBUG, ("ethernetif_input: IP input error\n"));
>       pbuf_free(p);
>       p = NULL;
>     }
280c295
<

You need to check the code in the ethernetif department and modify your layer-2 driver to work with 2.0.0. I can't help any further because I still didn't do it with my driver.


_______________________________________________
lwip-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to