diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2019-03-04 10:48:39 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2019-03-04 14:19:17 +0100 |
commit | 74de1afbd2ed4262d4105b12641de0c5c487d930 (patch) | |
tree | 925c267bb2196c4d59e8f41060fbd5bf4eeef81e /lib/xymodem.c | |
parent | 990100d9a75b2818a93b834df8bf14aa02c6c8e7 (diff) | |
download | barebox-74de1afbd2ed4262d4105b12641de0c5c487d930.tar.gz barebox-74de1afbd2ed4262d4105b12641de0c5c487d930.tar.xz |
crc: import crc_itu_t() from kernel
Our cyc_crc16() function is the same function as crc_itu_t() in the
Linux kernel. Import and use crc_itu_t() from the Kernel for
consistency.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'lib/xymodem.c')
-rw-r--r-- | lib/xymodem.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/xymodem.c b/lib/xymodem.c index 9e4ce58b60..136741ab4a 100644 --- a/lib/xymodem.c +++ b/lib/xymodem.c @@ -210,7 +210,7 @@ static int check_crc(unsigned char *buf, int len, int crc, int crc_mode) crc8 += buf[i]; return crc8 == crc ? 0 : -EBADMSG; case CRC_CRC16: - crc16 = cyg_crc16(buf, len); + crc16 = crc_itu_t(0, buf, len); xy_dbg("crc16: received = %x, calculated=%x\n", crc, crc16); return crc16 == crc ? 0 : -EBADMSG; case CRC_NONE: |