]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/chips/cc2420/CC2420ActiveMessageP.nc
Remove bogus 'tab:4' and 'tab:2' markers.
[tinyos-2.x.git] / tos / chips / cc2420 / CC2420ActiveMessageP.nc
index d6a6fbd09466c775e56b74a8b92295d260370179..6203e840f99d4481d10575a26925c7536bec39de 100644 (file)
@@ -1,4 +1,4 @@
-/*                                                                     tab:4
+/*
  * "Copyright (c) 2005 Stanford University. All rights reserved.
  *
  * Permission to use, copy, modify, and distribute this software and
@@ -199,18 +199,18 @@ implementation {
   /***************** RadioBackoff ***********************/
 
   async event void SubBackoff.requestInitialBackoff(message_t *msg) {
-    signal RadioBackoff.requestInitialBackoff[((cc2420_header_t*)(msg->data - 
-                                        sizeof(cc2420_header_t)))->type](msg);
+    signal RadioBackoff.requestInitialBackoff[(TCAST(cc2420_header_t* ONE,
+        (uint8_t*)msg + offsetof(message_t, data) - sizeof(cc2420_header_t)))->type](msg);
   }
 
   async event void SubBackoff.requestCongestionBackoff(message_t *msg) {
-    signal RadioBackoff.requestCongestionBackoff[((cc2420_header_t*)(msg->data - 
-        sizeof(cc2420_header_t)))->type](msg);
+    signal RadioBackoff.requestCongestionBackoff[(TCAST(cc2420_header_t* ONE,
+        (uint8_t*)msg + offsetof(message_t, data) - sizeof(cc2420_header_t)))->type](msg);
   }
   async event void SubBackoff.requestCca(message_t *msg) {
     // Lower layers than this do not configure the CCA settings
-    signal RadioBackoff.requestCca[((cc2420_header_t*)(msg->data - 
-        sizeof(cc2420_header_t)))->type](msg);
+    signal RadioBackoff.requestCca[(TCAST(cc2420_header_t* ONE,
+        (uint8_t*)msg + offsetof(message_t, data) - sizeof(cc2420_header_t)))->type](msg);
   }
 
   async command void RadioBackoff.setInitialBackoff[am_id_t amId](uint16_t backoffTime) {