[Tinyos-2-commits] CVS: tinyos-2.x/tos/chips/cc2420/receive CC2420ReceiveP.nc, 1.15, 1.16

David Gay idgay at users.sourceforge.net
Fri Jul 25 09:27:54 PDT 2008


Update of /cvsroot/tinyos/tinyos-2.x/tos/chips/cc2420/receive
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv750

Modified Files:
	CC2420ReceiveP.nc 
Log Message:
proper fix for short packets

Index: CC2420ReceiveP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/chips/cc2420/receive/CC2420ReceiveP.nc,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** CC2420ReceiveP.nc	10 Jul 2008 21:46:14 -0000	1.15
--- CC2420ReceiveP.nc	25 Jul 2008 16:27:52 -0000	1.16
***************
*** 215,219 ****
          if(rxFrameLength <= MAC_PACKET_SIZE) {
            if(rxFrameLength > 0) {
!             if(rxFrameLength >= CC2420_SIZE) {
                // This packet has an FCF byte plus at least one more byte to read
                call RXFIFO.continueRead(buf + 1, SACK_HEADER_LENGTH);
--- 215,219 ----
          if(rxFrameLength <= MAC_PACKET_SIZE) {
            if(rxFrameLength > 0) {
!             if(rxFrameLength > SACK_HEADER_LENGTH) {
                // This packet has an FCF byte plus at least one more byte to read
                call RXFIFO.continueRead(buf + 1, SACK_HEADER_LENGTH);
***************
*** 335,339 ****
      metadata->rssi = buf[ length - 1 ];
      
!     if(passesAddressCheck(m_p_rx_buf)) {
        m_p_rx_buf = signal Receive.receive( m_p_rx_buf, m_p_rx_buf->data, 
  					   length - CC2420_SIZE);
--- 335,339 ----
      metadata->rssi = buf[ length - 1 ];
      
!     if (passesAddressCheck(m_p_rx_buf) && length >= CC2420_SIZE) {
        m_p_rx_buf = signal Receive.receive( m_p_rx_buf, m_p_rx_buf->data, 
  					   length - CC2420_SIZE);



More information about the Tinyos-2-commits mailing list