]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/chips/cc1000/CC1000SendReceiveP.nc
Remove bogus 'tab:4' and 'tab:2' markers.
[tinyos-2.x.git] / tos / chips / cc1000 / CC1000SendReceiveP.nc
index 62ca40b0f2de6da1a943fb7d9f76427080646700..19700e066bfe7083e3c3c6d1262fcd3fdafc4655 100644 (file)
@@ -1,6 +1,6 @@
 // $Id$
 
-/*                                                                     tab:4
+/*
  * "Copyright (c) 2000-2005 The Regents of the University  of California.  
  * All rights reserved.
  *
@@ -568,22 +568,16 @@ implementation
   }
 
   void packetReceiveDone() {
-    message_t* pBuf;
     uint16_t snr;
-    atomic {
-      if (radioState != RECEIVED_STATE) {
-       return;
-      }
-      pBuf = rxBufPtr;
-    }
-    snr = (uint16_t) getMetadata(pBuf)->strength_or_preamble;
+
+    snr = (uint16_t) getMetadata(rxBufPtr)->strength_or_preamble;
     /* Higher signal strengths have lower voltages. So see if we're
        CC1000_WHITE_BIT_THRESH *below* the noise floor. */
     if ((snr + CC1000_WHITE_BIT_THRESH) < ((call CC1000Squelch.get()))) {
-      getMetadata(pBuf)->metadataBits |= CC1000_WHITE_BIT;
+      getMetadata(rxBufPtr)->metadataBits |= CC1000_WHITE_BIT;
     }
     else {
-      getMetadata(pBuf)->metadataBits &= ~CC1000_WHITE_BIT;
+      getMetadata(rxBufPtr)->metadataBits &= ~CC1000_WHITE_BIT;
     }
     
     post signalPacketReceived();