]> oss.titaniummirror.com Git - tinyos-2.x.git/commitdiff
Apply bug fixes related to BLIP submitted by Lars Schor
authormmaroti <mmaroti>
Fri, 8 May 2009 14:42:21 +0000 (14:42 +0000)
committermmaroti <mmaroti>
Fri, 8 May 2009 14:42:21 +0000 (14:42 +0000)
tos/chips/rf2xx/layers/IEEE154MessageLayerP.nc
tos/chips/rf2xx/rf212/RF212DriverLayerP.nc
tos/chips/rf2xx/rf212/RF212Ieee154MessageC.nc
tos/chips/rf2xx/rf230/RF230DriverLayerP.nc
tos/chips/rf2xx/rf230/RF230Ieee154MessageC.nc

index 56379e3b2d331edf97963be8a3e65270357baa89..bd90a8c0e7de643f7224369e4ec4df53b0a747bb 100644 (file)
@@ -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;
        }
 }
index d76e1628fc9096953961a5c20252d48795997308..a2ac7dea3baed0cfcb9f219c03cc5c340a57b846 100644 (file)
@@ -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;
        }
 
index 765afbe281c64aa128abf3107ddd652fbb96be24..bfeda9754b838887ea36fc1bfcf3a9b56e45a01d 100644 (file)
@@ -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)
index 662b5a413664b92aba3186698e76ff3fd7ea7a71..a46b90bc3e6b615030a713508358eb1e1ca4d5d0 100644 (file)
@@ -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();
index 856e2fa07916d7da50d592caee71c7a620a6d0b9..553af9b889690fc74ebfdd6ada7e69a9fa717362 100644 (file)
@@ -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)