Lines Matching refs:crc
590 uint16_t crc; in ppp_check_fcs() local
597 crc = crc16_ccitt(0xffff, buf->data, buf->len); in ppp_check_fcs()
602 crc = crc16_ccitt(crc, buf->data, buf->len); in ppp_check_fcs()
606 if (crc != 0xf0b8) { in ppp_check_fcs()
607 LOG_DBG("Invalid FCS (0x%x)", crc); in ppp_check_fcs()
764 uint16_t crc; in calc_fcs() local
775 crc = crc16_ccitt(0xffff, (const uint8_t *)&c, sizeof(c)); in calc_fcs()
778 crc = crc16_ccitt(crc, (const uint8_t *)&protocol, in calc_fcs()
783 crc = crc16_ccitt(crc, buf->data, buf->len); in calc_fcs()
787 crc ^= 0xffff; in calc_fcs()
788 *fcs = crc; in calc_fcs()