Lines Matching refs:cnt
261 static inline int check_crc_ccitt(const unsigned char *buf, int cnt) in check_crc_ccitt() argument
263 return (crc_ccitt(0xffff, buf, cnt) & 0xffff) == 0xf0b8; in check_crc_ccitt()
268 static inline int calc_crc_ccitt(const unsigned char *buf, int cnt) in calc_crc_ccitt() argument
270 return (crc_ccitt(0xffff, buf, cnt) ^ 0xffff) & 0xffff; in calc_crc_ccitt()
431 static int transmit(struct baycom_state *bc, int cnt, unsigned char stat) in transmit() argument
461 while (cnt > 0) { in transmit()
464 i = min_t(int, cnt, bc->hdlctx.flags); in transmit()
465 cnt -= i; in transmit()
487 i = min_t(int, cnt, bc->hdlctx.bufcnt); in transmit()
489 cnt -= i; in transmit()
501 i = min_t(int, cnt, bc->hdlctx.flags); in transmit()
503 cnt -= i; in transmit()
518 i = min_t(int, cnt, bc->hdlctx.calibrate); in transmit()
519 cnt -= i; in transmit()
561 static int receive(struct net_device *dev, int cnt) in receive() argument
575 while (cnt > 0) { in receive()
576 cnt2 = (cnt > sizeof(tmp)) ? sizeof(tmp) : cnt; in receive()
577 cnt -= cnt2; in receive()
655 int cnt, cnt2; in epp_bh() local
676 cnt = tmp[0] | (tmp[1] << 8); in epp_bh()
677 cnt &= 0x7fff; in epp_bh()
693 if (receive(dev, cnt)) in epp_bh()
702 cnt = 2048 - 256; in epp_bh()
706 cnt = 2048 - 1793; in epp_bh()
710 cnt = 0; in epp_bh()
714 cnt = 2048 - 1025; in epp_bh()
717 if (transmit(bc, cnt, stat)) in epp_bh()
724 cnt = 1025; in epp_bh()
728 cnt = 1793; in epp_bh()
732 cnt = 256; in epp_bh()
735 if (receive(dev, cnt)) in epp_bh()
740 cnt = 0; in epp_bh()
742 cnt = 256; in epp_bh()
744 cnt = 128; in epp_bh()
745 while (cnt > 0 && stat & EPP_NREF) { in epp_bh()
748 cnt--; in epp_bh()