• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-13-stable/sys/dev/sbni/

Lines Matching defs:framelen

448 	u_int framelen, frameno, ack;
452 if (check_fhdr(sc, &framelen, &frameno, &ack, &is_first, &crc)) {
453 frame_ok = framelen > 4 ?
454 upload_data(sc, framelen, frameno, is_first, crc) :
455 skip_tail(sc, framelen, crc);
459 framelen = 0;
466 if (framelen > 4)
475 return (!frame_ok || framelen > 4);
489 if (sc->framelen != 0)
506 if (sc->framelen) {
550 slice = min(data_len, sc->framelen - pos);
570 pos = sc->framelen - pos;
577 } while (pos < sc->framelen);
581 upload_data(struct sbni_softc *sc, u_int framelen, u_int frameno,
592 if (sc->inppos + framelen <= ETHER_MAX_LEN) {
593 frame_ok = append_frame_to_pkt(sc, framelen, crc);
596 * if CRC is right but framelen incorrect then transmitter
599 } else if ((frame_ok = skip_tail(sc, framelen, crc)) != 0) {
606 frame_ok = skip_tail(sc, framelen, crc);
637 sc->outpos += sc->framelen;
640 sc->framelen = min(
658 append_frame_to_pkt(struct sbni_softc *sc, u_int framelen, u_int32_t crc)
662 if (sc->inppos + framelen > ETHER_MAX_LEN)
669 sbni_insb(sc, p, framelen);
670 if (calc_crc32(crc, p, framelen) != CRC32_REMAINDER)
673 sc->inppos += framelen - 4;
707 sc->framelen = 0;
725 sc->framelen = min(len, sc->maxframe);
752 sc->framelen = 0;
766 len_field = sc->framelen + 6; /* CRC + frameno + reserved */
806 check_fhdr(struct sbni_softc *sc, u_int *framelen, u_int *frameno,
817 *framelen = (u_int)value;
820 *framelen |= ((u_int)value) << 8;
823 *ack = *framelen & FRAME_ACK_MASK;
824 *is_first = (*framelen & FRAME_FIRST) != 0;
826 if ((*framelen &= FRAME_LEN_MASK) < 6 || *framelen > SBNI_MAX_FRAME - 3)
834 *framelen -= 2;