Lines Matching refs:crc
265 static u16 ipack_crc_byte(u16 crc, u8 c) in ipack_crc_byte() argument
269 crc ^= c << 8; in ipack_crc_byte()
271 crc = (crc << 1) ^ ((crc & 0x8000) ? 0x1021 : 0); in ipack_crc_byte()
272 return crc; in ipack_crc_byte()
282 u16 crc; in ipack_calc_crc1() local
285 crc = 0xffff; in ipack_calc_crc1()
288 crc = ipack_crc_byte(crc, c); in ipack_calc_crc1()
290 crc = ~crc; in ipack_calc_crc1()
291 return crc & 0xff; in ipack_calc_crc1()
297 u16 crc; in ipack_calc_crc2() local
300 crc = 0xffff; in ipack_calc_crc2()
303 crc = ipack_crc_byte(crc, c); in ipack_calc_crc2()
305 crc = ~crc; in ipack_calc_crc2()
306 return crc; in ipack_calc_crc2()
312 u8 crc; in ipack_parse_id1() local
318 crc = ipack_calc_crc1(dev); in ipack_parse_id1()
319 dev->id_crc_correct = (crc == id[11]); in ipack_parse_id1()
322 id[11], crc); in ipack_parse_id1()
329 u16 flags, crc; in ipack_parse_id2() local
337 crc = ipack_calc_crc2(dev); in ipack_parse_id2()
338 dev->id_crc_correct = (crc == be16_to_cpu(id[12])); in ipack_parse_id2()
341 id[11], crc); in ipack_parse_id2()