From 6a95cc0109157bc1fc7925fa1380a6e4ab54e400 Mon Sep 17 00:00:00 2001 From: idgay Date: Tue, 3 Jun 2008 20:32:09 +0000 Subject: [PATCH] remove bogus state check --- tos/chips/cc1000/CC1000SendReceiveP.nc | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/tos/chips/cc1000/CC1000SendReceiveP.nc b/tos/chips/cc1000/CC1000SendReceiveP.nc index 62ca40b0..a9485a89 100644 --- a/tos/chips/cc1000/CC1000SendReceiveP.nc +++ b/tos/chips/cc1000/CC1000SendReceiveP.nc @@ -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(); -- 2.39.2