All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/1] ieee802154-cc2520: Check CRC
@ 2015-12-21  1:15 Brad Campbell
  2015-12-21  1:15 ` [PATCH 1/1] " Brad Campbell
  0 siblings, 1 reply; 5+ messages in thread
From: Brad Campbell @ 2015-12-21  1:15 UTC (permalink / raw)
  To: Varka Bhadram, Alexander Aring, linux-wpan; +Cc: Brad Campbell

After collecting 802.15.4 packets from about 30 devices with the CC2520
driver, I noticed that I was getting a bunch of packets from devices I
didn't recognize. Digging a little deeper, it seems the CC2520 driver
doesn't check that the CRC for incoming packets is correct. Since the
CC2520 does the heavy lifting, adding this is a small change.

I originally thought adding this to the `cc2520_rx()` function made the
most sense, but I couldn't find a clean way to access the last byte of
the skb buffer. However, since the `cc2520_rx()` function already has an
error check when calling `cc2520_read_rxfifo()`, and I'm assuming that
someday `cc2520_read_rxfifo()` will actually calculate the LQI (which
will require reading the last byte of the packet as well), I added
the CRC check to `cc2520_read_rxfifo()`. I can move the check if there
is a better place for it.

I tested this with my 30 node packet receiving application and am no longer
seeing the spurious TX ids or corrupted packets.

Brad Campbell (1):
  ieee802154-cc2520: Check CRC

 drivers/net/ieee802154/cc2520.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

-- 
2.6.3


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-12-21 21:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-21  1:15 [PATCH 0/1] ieee802154-cc2520: Check CRC Brad Campbell
2015-12-21  1:15 ` [PATCH 1/1] " Brad Campbell
2015-12-21 11:54   ` Alexander Aring
2015-12-21 12:57     ` Alexander Aring
     [not found]       ` <385C3987-300B-4E6F-A76A-85189A858790@gmail.com>
2015-12-21 21:48         ` Alexander Aring

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.