From: Malcolm Priestley <tvboxspy@gmail.com>
To: gregkh@linuxfoundation.org
Cc: linux-wireless@vger.kernel.org, Malcolm Priestley <tvboxspy@gmail.com>
Subject: [PATCH 3/6] staging: vt6656: ETHbIsBufferCrc32Ok replace CRCdwGetCrc32
Date: Wed, 21 May 2014 21:09:41 +0100 [thread overview]
Message-ID: <1400702984-3221-3-git-send-email-tvboxspy@gmail.com> (raw)
In-Reply-To: <1400702984-3221-1-git-send-email-tvboxspy@gmail.com>
CRCdwGetCrc32 is a bitwise not of ether_crc_le.
Replace with ether_crc_le.
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
---
drivers/staging/vt6656/tether.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/vt6656/tether.c b/drivers/staging/vt6656/tether.c
index 1db1e84..ada3e7e 100644
--- a/drivers/staging/vt6656/tether.c
+++ b/drivers/staging/vt6656/tether.c
@@ -51,11 +51,11 @@
*/
bool ETHbIsBufferCrc32Ok(u8 * pbyBuffer, unsigned int cbFrameLength)
{
- u32 dwCRC;
+ u32 n_crc = ~ether_crc_le(cbFrameLength - 4, pbyBuffer);
- dwCRC = CRCdwGetCrc32(pbyBuffer, cbFrameLength - 4);
- if (cpu_to_le32(*((u32 *)(pbyBuffer + cbFrameLength - 4))) != dwCRC)
+ if (le32_to_cpu(*((__le32 *)(pbyBuffer + cbFrameLength - 4))) != n_crc)
return false;
+
return true;
}
--
1.9.1
next prev parent reply other threads:[~2014-05-21 20:10 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-21 20:09 [PATCH 1/6] staging: vt6656: iocmd.h remove dead code Malcolm Priestley
2014-05-21 20:09 ` [PATCH 2/6] staging: vt6656: iowpa.h removed " Malcolm Priestley
2014-05-21 20:09 ` Malcolm Priestley [this message]
2014-05-21 20:09 ` [PATCH 4/6] staging: vt6656: s_vSWencryption replace CRCdwGetCrc32Ex Malcolm Priestley
2014-05-21 20:09 ` [PATCH 5/6] staging: vt6656: remove dead code tcrc.c/h Malcolm Priestley
2014-05-21 20:09 ` [PATCH 6/6] staging: vt6656: dead code remove diversity code Malcolm Priestley
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=1400702984-3221-3-git-send-email-tvboxspy@gmail.com \
--to=tvboxspy@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-wireless@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).