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:
parent
026076e1f4
commit
cea299d79a
1 changed files with 8 additions and 9 deletions
|
@ -28,7 +28,7 @@
|
||||||
*
|
*
|
||||||
* This file is part of the Contiki operating system.
|
* 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.
|
* This code is almost device independent and should be easy to port.
|
||||||
|
@ -647,17 +647,16 @@ PROCESS_THREAD(cc2420_process, ev, data)
|
||||||
packetbuf_clear();
|
packetbuf_clear();
|
||||||
packetbuf_set_attr(PACKETBUF_ATTR_TIMESTAMP, last_packet_timestamp);
|
packetbuf_set_attr(PACKETBUF_ATTR_TIMESTAMP, last_packet_timestamp);
|
||||||
len = cc2420_read(packetbuf_dataptr(), PACKETBUF_SIZE);
|
len = cc2420_read(packetbuf_dataptr(), PACKETBUF_SIZE);
|
||||||
if(len > 0) {
|
|
||||||
packetbuf_set_datalen(len);
|
|
||||||
|
|
||||||
NETSTACK_RDC.input();
|
packetbuf_set_datalen(len);
|
||||||
|
|
||||||
|
NETSTACK_RDC.input();
|
||||||
#if CC2420_TIMETABLE_PROFILING
|
#if CC2420_TIMETABLE_PROFILING
|
||||||
TIMETABLE_TIMESTAMP(cc2420_timetable, "end");
|
TIMETABLE_TIMESTAMP(cc2420_timetable, "end");
|
||||||
timetable_aggregate_compute_detailed(&aggregate_time,
|
timetable_aggregate_compute_detailed(&aggregate_time,
|
||||||
&cc2420_timetable);
|
&cc2420_timetable);
|
||||||
timetable_clear(&cc2420_timetable);
|
timetable_clear(&cc2420_timetable);
|
||||||
#endif /* CC2420_TIMETABLE_PROFILING */
|
#endif /* CC2420_TIMETABLE_PROFILING */
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
PROCESS_END();
|
PROCESS_END();
|
||||||
|
|
Loading…
Reference in a new issue