Lines Matching refs:fcs
168 #define CRC10_FCS(fcs, c) ((((fcs) << 8) & 0x3ff) ^ crc10_table[((fcs) >> 2) & 0xff] ^ (c))
174 * @fcs: starting FCS
176 * Perform a memcpy and calculate fcs using ppp 10bit CRC algorithm. Return
179 static inline __u16 fcs_compute10(unsigned char *sp, int len, __u16 fcs)
181 for (; len-- > 0; fcs = CRC10_FCS(fcs, *sp++));
182 return fcs;
191 __u16 fcs;
204 fcs = fcs_compute10(data, length, CRC10_INITFCS);
205 if (fcs) {
206 dev_err(&port->dev, "%s - bad CRC %x\n", __func__, fcs);
230 __u16 fcs;
251 /* compute fcs and insert into trailer */
252 fcs = fcs_compute10(buf, pkt_len, CRC10_INITFCS);
253 buf[pkt_len - 2] |= fcs >> 8;
254 buf[pkt_len - 1] |= fcs & 0xff;