Networking with BSP NDS
gwenhael.goavec
gwenj at trabucayre.com
Sat May 9 17:30:06 UTC 2009
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);
}
More information about the users
mailing list