]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/chips/cc2420/transmit/CC2420TransmitP.nc
- commit reorg of 2420 stack to support Ieee154 messaging component
[tinyos-2.x.git] / tos / chips / cc2420 / transmit / CC2420TransmitP.nc
index d51cd72dccc3415fcd2c052b1b7efe2bdfc48e5b..09917c96f38e5541fdaa7113df3fe5e5859669bd 100644 (file)
@@ -106,11 +106,16 @@ implementation {
     CC2420_ABORT_PERIOD = 320
   };
 
+#ifdef CC2420_HW_SECURITY
   uint16_t startTime = 0;
   norace uint8_t secCtrlMode = 0;
   norace uint8_t nonceValue[16] = {0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01};
   norace uint8_t skip;
   norace uint16_t CTR_SECCTRL0, CTR_SECCTRL1;
+  uint8_t securityChecked = 0;
+  
+  void securityCheck();
+#endif
   
   norace message_t * ONE_NOK m_msg;
   
@@ -120,8 +125,6 @@ implementation {
   
   cc2420_transmit_state_t m_state = S_STOPPED;
 
-  uint8_t securityChecked = 0;
-  
   bool m_receiving = FALSE;
   
   uint16_t m_prev_time;
@@ -147,7 +150,6 @@ implementation {
   error_t resend( bool cca );
   void loadTXFIFO();
   void attemptSend();
-  void securityCheck();
   void congestionBackoff();
   error_t acquireSpiResource();
   error_t releaseSpiResource();
@@ -550,7 +552,9 @@ implementation {
         return FAIL;
       }
       
+#ifdef CC2420_HW_SECURITY
       securityChecked = 0;
+#endif
       m_state = S_LOAD;
       m_cca = cca;
       m_msg = p_msg;