From 8e1f9df3ad23a51121f1fc1b62f688f3a4d10628 Mon Sep 17 00:00:00 2001 From: mmaroti Date: Sun, 21 Mar 2010 23:57:02 +0000 Subject: [PATCH] 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/ --- tos/chips/rf2xx/rf212/RF212DriverLayerP.nc | 2 +- tos/chips/rf2xx/rf230/RF230DriverHwAckP.nc | 2 +- tos/chips/rf2xx/rf230/RF230DriverLayerP.nc | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) 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); } -- 2.39.2