summaryrefslogtreecommitdiffstats
path: root/drivers/staging/brcm80211/util/bcmotp.c
diff options
context:
space:
mode:
authorArend van Spriel <arend@broadcom.com>2011-05-03 11:35:53 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2011-05-03 12:42:45 -0700
commit9a189f763e6a4c4a630efdeb393559ff7b59b8c3 (patch)
tree609b0d93c582a821d63c045b2ca426c9530f7c3b /drivers/staging/brcm80211/util/bcmotp.c
parent13f401cb5320a027ab79c53f5089b0a0c8bd5adb (diff)
downloadop-kernel-dev-9a189f763e6a4c4a630efdeb393559ff7b59b8c3.zip
op-kernel-dev-9a189f763e6a4c4a630efdeb393559ff7b59b8c3.tar.gz
staging: brcm80211: replace hndcrc16 with crc-ccitt function
The implementation of hndcrc16 is identical to that of the crc-ccitt function available in linux kernel library functions. The driver now uses the crc-ccitt function. Cc: devel@linuxdriverproject.org Cc: linux-wireless@vger.kernel.org Cc: Brett Rudley <brudley@broadcom.com> Cc: Henry Ptasinski <henryp@broadcom.com> Cc: Roland Vossen <rvossen@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/brcm80211/util/bcmotp.c')
-rw-r--r--drivers/staging/brcm80211/util/bcmotp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/staging/brcm80211/util/bcmotp.c b/drivers/staging/brcm80211/util/bcmotp.c
index 2421785..d09628b 100644
--- a/drivers/staging/brcm80211/util/bcmotp.c
+++ b/drivers/staging/brcm80211/util/bcmotp.c
@@ -19,6 +19,7 @@
#include <linux/string.h>
#include <linux/module.h>
#include <linux/pci.h>
+#include <linux/crc-ccitt.h>
#include <bcmdefs.h>
#include <bcmdevs.h>
@@ -779,8 +780,8 @@ static int hndotp_nvread(void *oh, char *data, uint *len)
/* Bad length, try to find another chunk anyway */
rsz = 6;
}
- if (hndcrc16((u8 *) &rawotp[i], rsz,
- CRC16_INIT_VALUE) == CRC16_GOOD_VALUE) {
+ if (crc_ccitt(CRC16_INIT_VALUE, (u8 *) &rawotp[i], rsz) ==
+ CRC16_GOOD_VALUE) {
/* Good crc, copy the vars */
gchunks++;
dsz = rsz - 6;
OpenPOWER on IntegriCloud