Searched refs:crc8 (Results 1 - 16 of 16) sorted by relevance

/linux-4.1.27/lib/
H A Dcrc8.c20 #include <linux/crc8.h>
67 * crc8 - calculate a crc8 over the given input data.
72 * crc: previous returned crc8 value.
74 u8 crc8(const u8 table[CRC8_TABLE_SIZE], u8 *pdata, size_t nbytes, u8 crc) crc8() function
82 EXPORT_SYMBOL(crc8); variable
H A DMakefile78 obj-$(CONFIG_CRC8) += crc8.o
/linux-4.1.27/net/can/
H A Dgw.c107 struct cgw_csum_crc8 crc8; member in struct:cf_mod::__anon14087
111 void (*crc8)(struct can_frame *cf, struct cgw_csum_crc8 *crc8); member in struct:cf_mod::__anon14088
255 static void cgw_csum_crc8_rel(struct can_frame *cf, struct cgw_csum_crc8 *crc8) cgw_csum_crc8_rel() argument
257 int from = calc_idx(crc8->from_idx, cf->can_dlc); cgw_csum_crc8_rel()
258 int to = calc_idx(crc8->to_idx, cf->can_dlc); cgw_csum_crc8_rel()
259 int res = calc_idx(crc8->result_idx, cf->can_dlc); cgw_csum_crc8_rel()
260 u8 crc = crc8->init_crc_val; cgw_csum_crc8_rel()
267 for (i = crc8->from_idx; i <= crc8->to_idx; i++) cgw_csum_crc8_rel()
268 crc = crc8->crctab[crc^cf->data[i]]; cgw_csum_crc8_rel()
270 for (i = crc8->from_idx; i >= crc8->to_idx; i--) cgw_csum_crc8_rel()
271 crc = crc8->crctab[crc^cf->data[i]]; cgw_csum_crc8_rel()
274 switch (crc8->profile) { cgw_csum_crc8_rel()
277 crc = crc8->crctab[crc^crc8->profile_data[0]]; cgw_csum_crc8_rel()
281 crc = crc8->crctab[crc^crc8->profile_data[cf->data[1] & 0xF]]; cgw_csum_crc8_rel()
285 crc = crc8->crctab[crc^(cf->can_id & 0xFF)^ cgw_csum_crc8_rel()
291 cf->data[crc8->result_idx] = crc^crc8->final_xor_val; cgw_csum_crc8_rel()
294 static void cgw_csum_crc8_pos(struct can_frame *cf, struct cgw_csum_crc8 *crc8) cgw_csum_crc8_pos() argument
296 u8 crc = crc8->init_crc_val; cgw_csum_crc8_pos()
299 for (i = crc8->from_idx; i <= crc8->to_idx; i++) cgw_csum_crc8_pos()
300 crc = crc8->crctab[crc^cf->data[i]]; cgw_csum_crc8_pos()
302 switch (crc8->profile) { cgw_csum_crc8_pos()
305 crc = crc8->crctab[crc^crc8->profile_data[0]]; cgw_csum_crc8_pos()
309 crc = crc8->crctab[crc^crc8->profile_data[cf->data[1] & 0xF]]; cgw_csum_crc8_pos()
313 crc = crc8->crctab[crc^(cf->can_id & 0xFF)^ cgw_csum_crc8_pos()
318 cf->data[crc8->result_idx] = crc^crc8->final_xor_val; cgw_csum_crc8_pos()
321 static void cgw_csum_crc8_neg(struct can_frame *cf, struct cgw_csum_crc8 *crc8) cgw_csum_crc8_neg() argument
323 u8 crc = crc8->init_crc_val; cgw_csum_crc8_neg()
326 for (i = crc8->from_idx; i >= crc8->to_idx; i--) cgw_csum_crc8_neg()
327 crc = crc8->crctab[crc^cf->data[i]]; cgw_csum_crc8_neg()
329 switch (crc8->profile) { cgw_csum_crc8_neg()
332 crc = crc8->crctab[crc^crc8->profile_data[0]]; cgw_csum_crc8_neg()
336 crc = crc8->crctab[crc^crc8->profile_data[cf->data[1] & 0xF]]; cgw_csum_crc8_neg()
340 crc = crc8->crctab[crc^(cf->can_id & 0xFF)^ cgw_csum_crc8_neg()
345 cf->data[crc8->result_idx] = crc^crc8->final_xor_val; cgw_csum_crc8_neg()
422 if (gwj->mod.csumfunc.crc8) can_can_gw_rcv()
423 (*gwj->mod.csumfunc.crc8)(cf, &gwj->mod.csum.crc8); can_can_gw_rcv()
551 if (gwj->mod.csumfunc.crc8) { cgw_put_job()
553 &gwj->mod.csum.crc8) < 0) cgw_put_job()
725 nla_memcpy(&mod->csum.crc8, tb[CGW_CS_CRC8], cgw_parse_attr()
734 mod->csumfunc.crc8 = cgw_csum_crc8_rel; cgw_parse_attr()
736 mod->csumfunc.crc8 = cgw_csum_crc8_pos; cgw_parse_attr()
738 mod->csumfunc.crc8 = cgw_csum_crc8_neg; cgw_parse_attr()
/linux-4.1.27/include/linux/
H A Dcrc8.h21 /* see usage of this value in crc8() description */
25 * Return value of crc8() indicating valid message+crc. This is true
32 /* required table size for crc8 algorithm */
76 * crc8() - calculate a crc8 over the given input data.
81 * @crc: previous returned crc8 value.
99 u8 crc8(const u8 table[CRC8_TABLE_SIZE], u8 *pdata, size_t nbytes, u8 crc);
/linux-4.1.27/drivers/thunderbolt/
H A Deeprom.c285 tb_sw_warn(sw, "uid crc8 missmatch (expected: %#x, got: %#x)\n", tb_drom_read_uid_only()
426 "drom uid crc8 mismatch (expected: %#x, got: %#x), aborting\n", tb_drom_read()
/linux-4.1.27/drivers/dma/bestcomm/
H A Dbestcomm.c268 0xc0170000, /* FDT[59] - crc8() */
/linux-4.1.27/drivers/net/ethernet/marvell/
H A Dmvneta.c1868 /* Compute crc8 of the specified address, using a unique algorithm ,
1869 * according to hw spec, different than generic crc8 algorithm
1932 unsigned char crc8, mvneta_set_other_mcast_addr()
1939 tbl_offset = (crc8 / 4) * 4; /* Register offset from OMC table base */ mvneta_set_other_mcast_addr()
1940 reg_offset = crc8 % 4; /* Entry offset within the above reg */ mvneta_set_other_mcast_addr()
1977 netdev_info(pp->dev, "No valid Mcast for crc8=0x%02x\n", mvneta_mcast_addr_set()
1985 "After delete there are %d valid Mcast for crc8=0x%02x\n", mvneta_mcast_addr_set()
1931 mvneta_set_other_mcast_addr(struct mvneta_port *pp, unsigned char crc8, int queue) mvneta_set_other_mcast_addr() argument
/linux-4.1.27/drivers/staging/rtl8192e/rtl8192e/
H A Dr819xE_phyreg.h195 /* rate illegal, crc8 fail */
/linux-4.1.27/drivers/staging/rtl8192u/
H A Dr819xU_phyreg.h175 #define rOFDM_PHYCounter2 0xda4 /* rate illegal, crc8 fail */
/linux-4.1.27/drivers/hwmon/
H A Dsht15.c189 * sht15_crc8() - compute crc8
/linux-4.1.27/drivers/net/ethernet/intel/i40e/
H A Di40e_type.h1403 u16 crc8; member in struct:i40e_lldp_variables
/linux-4.1.27/drivers/staging/rtl8712/
H A Drtl871x_mp_phy_regdef.h258 #define rOFDM_PHYCounter2 0xda4 /* rate illegal, crc8 fail */
/linux-4.1.27/drivers/staging/rtl8723au/include/
H A DHal8723APhyReg.h232 #define rOFDM_PHYCounter2 0xda4 /* rate illegal, crc8 fail */
/linux-4.1.27/drivers/staging/rtl8188eu/include/
H A DHal8188EPhyReg.h259 #define rOFDM_PHYCounter2 0xda4 /* rate illegal, crc8 fail */
H A Drtw_mp_phy_regdef.h275 #define rOFDM_PHYCounter2 0xda4 /* rate illegal, crc8 fail */
/linux-4.1.27/drivers/i2c/
H A Di2c-core.c2401 static u8 crc8(u16 data) crc8() function
2419 crc = crc8((crc ^ p[i]) << 8); i2c_smbus_pec()

Completed in 636 milliseconds