]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/chips/cc2420/csma/CC2420CsmaP.nc
- commit reorg of 2420 stack to support Ieee154 messaging component
[tinyos-2.x.git] / tos / chips / cc2420 / csma / CC2420CsmaP.nc
index 7c0ef75deda6505e04ea073b4edda864e4807adc..82f4412ed12b6cf044a659ffa5cf12a5898e5b40 100644 (file)
@@ -160,7 +160,7 @@ implementation {
 
   command void* Send.getPayload(message_t* m, uint8_t len) {
     if (len <= call Send.maxPayloadLength()) {
-      return (void* COUNT_NOK(len))m->data;
+      return (void* COUNT_NOK(len ))(CC2420_PAYLOAD(m));
     }
     else {
       return NULL;
@@ -168,7 +168,7 @@ implementation {
   }
 
   command uint8_t Send.maxPayloadLength() {
-    return TOSH_DATA_LENGTH;
+    return TOSH_DATA_LENGTH + AM_OVERHEAD;
   }
 
   /**************** RadioBackoff Commands ****************/