Lines Matching refs:inbits
578 static inline void hdlc_frag(struct bc_state *bcs, unsigned inbits) in hdlc_frag() argument
586 dev_notice(bcs->cs->dev, "received partial byte (%d bits)\n", inbits); in hdlc_frag()
635 unsigned seqlen, inbyte, inbits; in hdlc_unpack() local
651 inbits = ubc->inbits; in hdlc_unpack()
671 inbits = 0; in hdlc_unpack()
676 inbits = 7 - lead1; in hdlc_unpack()
682 inbits--; in hdlc_unpack()
693 inbyte |= c << inbits; in hdlc_unpack()
698 } else if (likely(seqlen == 6 && inbits == 7 - lead1 && in hdlc_unpack()
699 trail1 + 1 == inbits && in hdlc_unpack()
710 if (inbits > 7 - lead1) { in hdlc_unpack()
711 hdlc_frag(bcs, inbits + lead1 - 7); in hdlc_unpack()
714 if (inbits < 7 - lead1) in hdlc_unpack()
725 inbits = 0; in hdlc_unpack()
730 inbits = 7 - lead1; in hdlc_unpack()
736 inbits--; in hdlc_unpack()
755 if (inbits) { in hdlc_unpack()
756 hdlc_frag(bcs, inbits); in hdlc_unpack()
757 inbits = 0; in hdlc_unpack()
774 inbyte |= c << inbits; in hdlc_unpack()
775 inbits += 7; in hdlc_unpack()
786 inbyte |= c << inbits; in hdlc_unpack()
787 inbits += 7; in hdlc_unpack()
806 inbyte |= c << inbits; in hdlc_unpack()
807 inbits += 6; in hdlc_unpack()
809 if (inbits >= 8) { in hdlc_unpack()
810 inbits -= 8; in hdlc_unpack()
824 ubc->inbits = inbits; in hdlc_unpack()