Lines Matching full:fcs
532 int fcs, i, count, c, proto; in ppp_async_encode() local
543 fcs = ap->tfcs; in ppp_async_encode()
565 fcs = PPP_INITFCS; in ppp_async_encode()
572 fcs = PPP_FCS(fcs, 0xff); in ppp_async_encode()
574 fcs = PPP_FCS(fcs, 0x03); in ppp_async_encode()
579 * Once we put in the last byte, we need to put in the FCS in ppp_async_encode()
588 fcs = PPP_FCS(fcs, c); in ppp_async_encode()
598 ap->tfcs = fcs; in ppp_async_encode()
603 * We have finished the packet. Add the FCS and flag. in ppp_async_encode()
605 fcs = ~fcs; in ppp_async_encode()
606 c = fcs & 0xff; in ppp_async_encode()
608 c = (fcs >> 8) & 0xff; in ppp_async_encode()
770 unsigned int len, fcs; in process_input_packet() local
779 /* check the FCS */ in process_input_packet()
784 fcs = PPP_INITFCS; in process_input_packet()
786 fcs = PPP_FCS(fcs, *p++); in process_input_packet()
787 if (fcs != PPP_GOODFCS) in process_input_packet()
788 goto err; /* bad FCS */ in process_input_packet()
954 int dlen, fcs, i, code; in async_lcp_peek() local
973 fcs = PPP_INITFCS; in async_lcp_peek()
975 fcs = PPP_FCS(fcs, data[i]); in async_lcp_peek()
979 ap->lcp_fcs = fcs; in async_lcp_peek()
984 fcs ^= ap->lcp_fcs; in async_lcp_peek()
986 if (fcs != 0) in async_lcp_peek()