From: mmaroti Date: Fri, 8 May 2009 14:42:21 +0000 (+0000) Subject: Apply bug fixes related to BLIP submitted by Lars Schor X-Git-Tag: rc_6_tinyos_2_1_1~392 X-Git-Url: https://oss.titaniummirror.com/gitweb/?p=tinyos-2.x.git;a=commitdiff_plain;h=82224deda747984e2c63677d9f5bab60c02c51aa Apply bug fixes related to BLIP submitted by Lars Schor --- diff --git a/tos/chips/rf2xx/layers/IEEE154MessageLayerP.nc b/tos/chips/rf2xx/layers/IEEE154MessageLayerP.nc index 56379e3b..bd90a8c0 100644 --- a/tos/chips/rf2xx/layers/IEEE154MessageLayerP.nc +++ b/tos/chips/rf2xx/layers/IEEE154MessageLayerP.nc @@ -390,7 +390,10 @@ implementation event message_t* SubReceive.receive(message_t* msg) { - return signal Ieee154Receive.receive(msg, - getPayload(msg), call Packet.payloadLength(msg)); + if( call Ieee154Packet.isForMe(msg) ) + return signal Ieee154Receive.receive(msg, + getPayload(msg), call Packet.payloadLength(msg)); + else + return msg; } } diff --git a/tos/chips/rf2xx/rf212/RF212DriverLayerP.nc b/tos/chips/rf2xx/rf212/RF212DriverLayerP.nc index d76e1628..a2ac7dea 100644 --- a/tos/chips/rf2xx/rf212/RF212DriverLayerP.nc +++ b/tos/chips/rf2xx/rf212/RF212DriverLayerP.nc @@ -492,10 +492,8 @@ implementation if( timesync != 0 ) *(timesync_relative_t*)timesync = (*(timesync_absolute_t*)timesync) - time32; - do { + while( length-- != 0 ) call FastSpiByte.splitReadWrite(*(data++)); - } - while( --length != 0 ); // wait for the SPI transfer to finish call FastSpiByte.splitRead(); @@ -959,10 +957,6 @@ implementation async command uint8_t PacketLinkQuality.get(message_t* msg) { - // we have some bug in BLIP, so fix it here - if( getMeta(msg)->lqi > 120 ) - return 120; - return getMeta(msg)->lqi; } diff --git a/tos/chips/rf2xx/rf212/RF212Ieee154MessageC.nc b/tos/chips/rf2xx/rf212/RF212Ieee154MessageC.nc index 765afbe2..bfeda975 100644 --- a/tos/chips/rf2xx/rf212/RF212Ieee154MessageC.nc +++ b/tos/chips/rf2xx/rf212/RF212Ieee154MessageC.nc @@ -110,7 +110,7 @@ implementation components MessageBufferLayerC; MessageBufferLayerC.RadioSend -> CollisionAvoidanceLayerC; MessageBufferLayerC.RadioReceive -> UniqueLayerC; - MessageBufferLayerC.RadioState -> CollisionAvoidanceLayerC; + MessageBufferLayerC.RadioState -> RF212DriverLayerC; RadioChannel = MessageBufferLayerC; // -------- UniqueLayer receive part (wired twice) diff --git a/tos/chips/rf2xx/rf230/RF230DriverLayerP.nc b/tos/chips/rf2xx/rf230/RF230DriverLayerP.nc index 662b5a41..a46b90bc 100644 --- a/tos/chips/rf2xx/rf230/RF230DriverLayerP.nc +++ b/tos/chips/rf2xx/rf230/RF230DriverLayerP.nc @@ -503,10 +503,8 @@ implementation if( timesync != 0 ) *(timesync_relative_t*)timesync = (*(timesync_absolute_t*)timesync) - time32; - do { + while( length-- != 0 ) call FastSpiByte.splitReadWrite(*(data++)); - } - while( --length != 0 ); // wait for the SPI transfer to finish call FastSpiByte.splitRead(); diff --git a/tos/chips/rf2xx/rf230/RF230Ieee154MessageC.nc b/tos/chips/rf2xx/rf230/RF230Ieee154MessageC.nc index 856e2fa0..553af9b8 100644 --- a/tos/chips/rf2xx/rf230/RF230Ieee154MessageC.nc +++ b/tos/chips/rf2xx/rf230/RF230Ieee154MessageC.nc @@ -110,7 +110,7 @@ implementation components MessageBufferLayerC; MessageBufferLayerC.RadioSend -> CollisionAvoidanceLayerC; MessageBufferLayerC.RadioReceive -> UniqueLayerC; - MessageBufferLayerC.RadioState -> CollisionAvoidanceLayerC; + MessageBufferLayerC.RadioState -> RF230DriverLayerC; RadioChannel = MessageBufferLayerC; // -------- UniqueLayer receive part (wired twice)