Lines Matching full:crc
443 u_int32_t crc; in recv_frame() local
447 crc = CRC32_INITIAL; in recv_frame()
448 if (check_fhdr(sc, &framelen, &frameno, &ack, &is_first, &crc)) { in recv_frame()
450 upload_data(sc, framelen, frameno, is_first, crc) : in recv_frame()
451 skip_tail(sc, framelen, crc); in recv_frame()
477 u_int32_t crc; in send_frame() local
480 crc = CRC32_INITIAL; in send_frame()
495 send_frame_header(sc, &crc); in send_frame()
503 download_data(sc, &crc); in send_frame()
508 sbni_outsb(sc, (u_char *)&crc, sizeof crc); in send_frame()
578 u_int is_first, u_int32_t crc) in upload_data() argument
589 frame_ok = append_frame_to_pkt(sc, framelen, crc); in upload_data()
592 * if CRC is right but framelen incorrect then transmitter in upload_data()
595 } else if ((frame_ok = skip_tail(sc, framelen, crc)) != 0) { in upload_data()
602 frame_ok = skip_tail(sc, framelen, crc); in upload_data()
654 append_frame_to_pkt(struct sbni_softc *sc, u_int framelen, u_int32_t crc) in append_frame_to_pkt() argument
666 if (calc_crc32(crc, p, framelen) != CRC32_REMAINDER) in append_frame_to_pkt()
757 u_int32_t crc; in send_frame_header() local
761 crc = *crc_p; in send_frame_header()
762 len_field = sc->framelen + 6; /* CRC + frameno + reserved */ in send_frame_header()
775 crc = CRC32(value, crc); in send_frame_header()
778 crc = CRC32(value, crc); in send_frame_header()
781 crc = CRC32(sc->tx_frameno, crc); in send_frame_header()
783 crc = CRC32(0, crc); in send_frame_header()
784 *crc_p = crc; in send_frame_header()
789 * it won't store, but CRC will be calculated
793 skip_tail(struct sbni_softc *sc, u_int tail_len, u_int32_t crc) in skip_tail() argument
796 crc = CRC32(sbni_inb(sc, DAT), crc); in skip_tail()
798 return (crc == CRC32_REMAINDER); in skip_tail()
805 u_int32_t crc; in check_fhdr() local
808 crc = *crc_p; in check_fhdr()
814 crc = CRC32(value, crc); in check_fhdr()
817 crc = CRC32(value, crc); in check_fhdr()
827 crc = CRC32(value, crc); in check_fhdr()
829 crc = CRC32(sbni_inb(sc, DAT), crc); /* reserved byte */ in check_fhdr()
832 *crc_p = crc; in check_fhdr()
1173 calc_crc32(u_int32_t crc, caddr_t p, u_int len) in calc_crc32() argument
1176 crc = CRC32(*p++, crc); in calc_crc32()
1178 return (crc); in calc_crc32()