Call upper layers even if packet reception failed - this allows the RDC layer to shut off the radio even if a malformed packet was received.

This commit is contained in:
adamdunkels 2011-01-09 21:09:28 +00:00
parent 026076e1f4
commit cea299d79a

View file

@ -28,7 +28,7 @@
*
* This file is part of the Contiki operating system.
*
* @(#)$Id: cc2420.c,v 1.62 2010/12/16 22:40:52 adamdunkels Exp $
* @(#)$Id: cc2420.c,v 1.63 2011/01/09 21:09:28 adamdunkels Exp $
*/
/*
* This code is almost device independent and should be easy to port.
@ -647,7 +647,7 @@ PROCESS_THREAD(cc2420_process, ev, data)
packetbuf_clear();
packetbuf_set_attr(PACKETBUF_ATTR_TIMESTAMP, last_packet_timestamp);
len = cc2420_read(packetbuf_dataptr(), PACKETBUF_SIZE);
if(len > 0) {
packetbuf_set_datalen(len);
NETSTACK_RDC.input();
@ -658,7 +658,6 @@ PROCESS_THREAD(cc2420_process, ev, data)
timetable_clear(&cc2420_timetable);
#endif /* CC2420_TIMETABLE_PROFILING */
}
}
PROCESS_END();
}