From: mmaroti Date: Sun, 21 Mar 2010 23:57:02 +0000 (+0000) Subject: fix the max packet length assert X-Git-Url: https://oss.titaniummirror.com/gitweb/?p=tinyos-2.x.git;a=commitdiff_plain;h=8e1f9df3ad23a51121f1fc1b62f688f3a4d10628 fix the max packet length assert 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/ --- diff --git a/tos/chips/rf2xx/rf212/RF212DriverLayerP.nc b/tos/chips/rf2xx/rf212/RF212DriverLayerP.nc index 218066ea..43cf19cb 100644 --- a/tos/chips/rf2xx/rf212/RF212DriverLayerP.nc +++ b/tos/chips/rf2xx/rf212/RF212DriverLayerP.nc @@ -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); } diff --git a/tos/chips/rf2xx/rf230/RF230DriverHwAckP.nc b/tos/chips/rf2xx/rf230/RF230DriverHwAckP.nc index 790e79ed..71dc3caa 100644 --- a/tos/chips/rf2xx/rf230/RF230DriverHwAckP.nc +++ b/tos/chips/rf2xx/rf230/RF230DriverHwAckP.nc @@ -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); } diff --git a/tos/chips/rf2xx/rf230/RF230DriverLayerP.nc b/tos/chips/rf2xx/rf230/RF230DriverLayerP.nc index 114ac13d..b1a2670e 100644 --- a/tos/chips/rf2xx/rf230/RF230DriverLayerP.nc +++ b/tos/chips/rf2xx/rf230/RF230DriverLayerP.nc @@ -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); }