Lines Matching full:fcs
535 int fcs, i, count, c, proto; in ppp_async_encode() local
546 fcs = ap->tfcs; in ppp_async_encode()
568 fcs = PPP_INITFCS; in ppp_async_encode()
575 fcs = PPP_FCS(fcs, 0xff); in ppp_async_encode()
577 fcs = PPP_FCS(fcs, 0x03); in ppp_async_encode()
582 * Once we put in the last byte, we need to put in the FCS in ppp_async_encode()
591 fcs = PPP_FCS(fcs, c); in ppp_async_encode()
601 ap->tfcs = fcs; in ppp_async_encode()
606 * We have finished the packet. Add the FCS and flag. in ppp_async_encode()
608 fcs = ~fcs; in ppp_async_encode()
609 c = fcs & 0xff; in ppp_async_encode()
611 c = (fcs >> 8) & 0xff; in ppp_async_encode()
773 unsigned int len, fcs, proto; in process_input_packet() local
782 /* check the FCS */ in process_input_packet()
787 fcs = PPP_INITFCS; in process_input_packet()
789 fcs = PPP_FCS(fcs, *p++); in process_input_packet()
790 if (fcs != PPP_GOODFCS) in process_input_packet()
791 goto err; /* bad FCS */ in process_input_packet()
957 int dlen, fcs, i, code; in async_lcp_peek() local
976 fcs = PPP_INITFCS; in async_lcp_peek()
978 fcs = PPP_FCS(fcs, data[i]); in async_lcp_peek()
982 ap->lcp_fcs = fcs; in async_lcp_peek()
987 fcs ^= ap->lcp_fcs; in async_lcp_peek()
989 if (fcs != 0) in async_lcp_peek()