]> oss.titaniummirror.com Git - tinyos-2.x.git/commitdiff
fix the max packet length assert
authormmaroti <mmaroti>
Sun, 21 Mar 2010 23:57:02 +0000 (23:57 +0000)
committermmaroti <mmaroti>
Sun, 21 Mar 2010 23:57:02 +0000 (23:57 +0000)
Committed on the Free edition of March Hare Software CVSNT Server.
Upgrade to CVS Suite for more features and support:
http://march-hare.com/cvsnt/

tos/chips/rf2xx/rf212/RF212DriverLayerP.nc
tos/chips/rf2xx/rf230/RF230DriverHwAckP.nc
tos/chips/rf2xx/rf230/RF230DriverLayerP.nc

index 218066ea714d07ea5a64b54c4eb21b5c870c42a6..43cf19cb078ad62aa2d40238845be7664dba197e 100644 (file)
@@ -866,7 +866,7 @@ implementation
 
        async command uint8_t RadioPacket.maxPayloadLength()
        {
-               ASSERT( call Config.maxPayloadLength() <= 125 );
+               ASSERT( call Config.maxPayloadLength() - sizeof(rf230_header_t) <= 125 );
 
                return call Config.maxPayloadLength() - sizeof(rf212_header_t);
        }
index 790e79ed9dff0df02328d912c874f6b5de74d01d..71dc3caa55256a9f72aecd66b9769f17ff9e1436 100644 (file)
@@ -886,7 +886,7 @@ tasklet_async command uint8_t RadioState.getChannel()
 
        async command uint8_t RadioPacket.maxPayloadLength()
        {
-               ASSERT( call Config.maxPayloadLength() <= 125 );
+               ASSERT( call Config.maxPayloadLength() - sizeof(rf230_header_t) <= 125 );
 
                return call Config.maxPayloadLength() - sizeof(rf230_header_t);
        }
index 114ac13dd4f4b206534b44330deb726662b11b96..b1a2670e54654fa37b533e705417711c5bb69720 100644 (file)
@@ -880,7 +880,7 @@ implementation
 
        async command uint8_t RadioPacket.maxPayloadLength()
        {
-               ASSERT( call Config.maxPayloadLength() <= 125 );
+               ASSERT( call Config.maxPayloadLength() - sizeof(rf230_header_t) <= 125 );
 
                return call Config.maxPayloadLength() - sizeof(rf230_header_t);
        }