Linux IEEE 802.15.4 and 6LoWPAN development
 help / color / mirror / Atom feed
From: Brad Campbell <bradjc5@gmail.com>
To: Varka Bhadram <varkabhadram@gmail.com>,
	Alexander Aring <alex.aring@gmail.com>,
	linux-wpan@vger.kernel.org
Cc: Brad Campbell <bradjc5@gmail.com>
Subject: [PATCH 0/1] ieee802154-cc2520: Check CRC
Date: Sun, 20 Dec 2015 20:15:32 -0500	[thread overview]
Message-ID: <1450660533-38184-1-git-send-email-bradjc5@gmail.com> (raw)

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


             reply	other threads:[~2015-12-21  1:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-21  1:15 Brad Campbell [this message]
2015-12-21  1:15 ` [PATCH 1/1] ieee802154-cc2520: Check CRC 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1450660533-38184-1-git-send-email-bradjc5@gmail.com \
    --to=bradjc5@gmail.com \
    --cc=alex.aring@gmail.com \
    --cc=linux-wpan@vger.kernel.org \
    --cc=varkabhadram@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox