Networking with BSP NDS

Sebastian Huber sebastian.huber at embedded-brains.de
Sun May 10 09:59:36 UTC 2009


Hi,

I guess that this is related to the implicit IP header structure 
alignment constraint. See also lpc24xx_eth_new_mbuf() in

http://www.rtems.com/cgi-bin/cvsweb.cgi/rtems/c/src/lib/libbsp/arm/lpc24xx/network/network.c?rev=1.1

or

http://www.rtems.com/ml/rtems-users/2008/october/msg00001.html

gwenhael.goavec wrote:
> Hi,
> At present, I test the Nintendo DS with RTEMS.
> Globally everything seems working well.
> But network communication seems having a bug.
> After having used ethereal, It's possible to
> say the convertion between mbuf and ip is bad (wifi's
> driver  made bad convertion for the incoming packet). on
> the function ip_input(), struct ip has packet source on the
> destination variable. This is only true for IP packet, with
> ARP's packets everything is good. If I use m_pullup()
> function to modify mbuf, networking work correctly.(see
> bellow for the patch). I'm not sure this is the better way
> for correcting this bug.
>
> Someone could explain me how to correct this bug
> with a better manner?
>
> Thank you very much
>
> Gwenhaël
>
>
> --- a/c/src/lib/libbsp/arm/nds/wifi/wifi.c	2008-04-16 20:37:33.000000000
> +0200 +++ b/c/src/lib/libbsp/arm/nds/wifi/wifi.c	2009-05-09
> 09:39:44.000000000 +0200 @@ -175,7 +175,7 @@
>        eh = mtod (m, struct ether_header *);
>        m->m_data += sizeof (struct ether_header);
>        m->m_len = m->m_pkthdr.len = m->m_len - sizeof (struct ether_header);
> -
> +	m = m_pullup(m,20);
>        /* push the packet into the stack */
>        ether_input (ifp, eh, m);
>      }
>
>
> _______________________________________________
> rtems-users mailing list
> rtems-users at rtems.org
> http://www.rtems.org/mailman/listinfo/rtems-users
>   




More information about the users mailing list