]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/chips/cc2420/csma/CC2420CsmaP.nc
Adding in cc2420 security support codes
[tinyos-2.x.git] / tos / chips / cc2420 / csma / CC2420CsmaP.nc
index e67f921763774af7c11d0e2492e7a9973083b020..7c0ef75deda6505e04ea073b4edda864e4807adc 100644 (file)
@@ -134,7 +134,11 @@ implementation {
     }
 
     header->length = len + CC2420_SIZE;
+#ifdef CC2420_HW_SECURITY
+    header->fcf &= ((1 << IEEE154_FCF_ACK_REQ)|(1 << IEEE154_FCF_SECURITY_ENABLED));
+#else
     header->fcf &= 1 << IEEE154_FCF_ACK_REQ;
+#endif
     header->fcf |= ( ( IEEE154_TYPE_DATA << IEEE154_FCF_FRAME_TYPE ) |
                     ( 1 << IEEE154_FCF_INTRAPAN ) |
                     ( IEEE154_ADDR_SHORT << IEEE154_FCF_DEST_ADDR_MODE ) |