Lines Matching defs:crc
10 #include <linux/crc-ccitt.h>
270 u16 crc;
276 crc = crc_ccitt(0xffff, skb->data, skb->len);
277 crc = ~crc;
278 skb_put_u8(skb, crc & 0xff);
279 skb_put_u8(skb, crc >> 8);
330 u16 crc;
333 crc = crc_ccitt(0xffff, buf, len - 2);
334 crc = ~crc;
336 if (buf[len - 2] != (crc & 0xff) || buf[len - 1] != (crc >> 8)) {
338 crc, buf[len - 1], buf[len - 2]);
340 print_hex_dump(KERN_DEBUG, "crc: ", DUMP_PREFIX_NONE,
467 * The frame format is len-data-crc, and corruption can occur anywhere while
478 * the bus. This is the reason why we check the crc here.
604 u16 crc;
606 /* calculate local crc for the data we want to check */
607 crc = crc_ccitt(0xffff, data, datalen);
615 /* tell the chip the memory region to which our crc applies */
623 * and give our local crc. Chip will calculate its own crc for the
626 put_unaligned_be16(crc, &frame.be_crc);