Lines Matching refs:crc
58 static inline u16 mcp251xfd_crc16_byte(u16 crc, const u8 data) in mcp251xfd_crc16_byte() argument
60 u8 index = (crc >> 8) ^ data; in mcp251xfd_crc16_byte()
62 return (crc << 8) ^ mcp251xfd_crc16_table[index]; in mcp251xfd_crc16_byte()
65 static u16 mcp251xfd_crc16(u16 crc, u8 const *buffer, size_t len) in mcp251xfd_crc16() argument
68 crc = mcp251xfd_crc16_byte(crc, *buffer++); in mcp251xfd_crc16()
70 return crc; in mcp251xfd_crc16()
75 u16 crc = 0xffff; in mcp251xfd_crc16_compute() local
77 return mcp251xfd_crc16(crc, data, data_size); in mcp251xfd_crc16_compute()
83 u16 crc; in mcp251xfd_crc16_compute2() local
85 crc = mcp251xfd_crc16_compute(cmd, cmd_size); in mcp251xfd_crc16_compute2()
86 crc = mcp251xfd_crc16(crc, data, data_size); in mcp251xfd_crc16_compute2()
88 return crc; in mcp251xfd_crc16_compute2()