Lines Matching refs:xor
89 struct canfd_frame xor; member
95 u8 xor; member
103 struct cgw_csum_xor xor; member
107 void (*xor)(struct canfd_frame *cf, member
108 struct cgw_csum_xor *xor);
164 MODFUNC(mod_xor_id, cf->can_id ^= mod->modframe.xor.can_id)
165 MODFUNC(mod_xor_len, cf->len ^= mod->modframe.xor.len)
166 MODFUNC(mod_xor_flags, cf->flags ^= mod->modframe.xor.flags)
167 MODFUNC(mod_xor_data, *(u64 *)cf->data ^= *(u64 *)mod->modframe.xor.data)
194 *(u64 *)(cf->data + i) ^= *(u64 *)(mod->modframe.xor.data + i); in mod_xor_fddata()
320 static void cgw_csum_xor_rel(struct canfd_frame *cf, struct cgw_csum_xor *xor) in cgw_csum_xor_rel() argument
322 int from = calc_idx(xor->from_idx, cf->len); in cgw_csum_xor_rel()
323 int to = calc_idx(xor->to_idx, cf->len); in cgw_csum_xor_rel()
324 int res = calc_idx(xor->result_idx, cf->len); in cgw_csum_xor_rel()
325 u8 val = xor->init_xor_val; in cgw_csum_xor_rel()
342 static void cgw_csum_xor_pos(struct canfd_frame *cf, struct cgw_csum_xor *xor) in cgw_csum_xor_pos() argument
344 u8 val = xor->init_xor_val; in cgw_csum_xor_pos()
347 for (i = xor->from_idx; i <= xor->to_idx; i++) in cgw_csum_xor_pos()
350 cf->data[xor->result_idx] = val; in cgw_csum_xor_pos()
353 static void cgw_csum_xor_neg(struct canfd_frame *cf, struct cgw_csum_xor *xor) in cgw_csum_xor_neg() argument
355 u8 val = xor->init_xor_val; in cgw_csum_xor_neg()
358 for (i = xor->from_idx; i >= xor->to_idx; i--) in cgw_csum_xor_neg()
361 cf->data[xor->result_idx] = val; in cgw_csum_xor_neg()
552 if (gwj->mod.csumfunc.xor) in can_can_gw_rcv()
553 (*gwj->mod.csumfunc.xor)(cf, &gwj->mod.csum.xor); in can_can_gw_rcv()
664 if (gwj->mod.modtype.xor) { in cgw_put_job()
665 memcpy(&mb.cf, &gwj->mod.modframe.xor, sizeof(mb.cf)); in cgw_put_job()
666 mb.modtype = gwj->mod.modtype.xor; in cgw_put_job()
694 if (gwj->mod.modtype.xor) { in cgw_put_job()
695 memcpy(&mb.cf, &gwj->mod.modframe.xor, sizeof(mb.cf)); in cgw_put_job()
696 mb.modtype = gwj->mod.modtype.xor; in cgw_put_job()
720 if (gwj->mod.csumfunc.xor) { in cgw_put_job()
722 &gwj->mod.csum.xor) < 0) in cgw_put_job()
862 canfdframecpy(&mod->modframe.xor, &mb.cf); in cgw_parse_attr()
863 mod->modtype.xor = mb.modtype; in cgw_parse_attr()
934 canframecpy(&mod->modframe.xor, &mb.cf); in cgw_parse_attr()
935 mod->modtype.xor = mb.modtype; in cgw_parse_attr()
997 nla_memcpy(&mod->csum.xor, tb[CGW_CS_XOR], in cgw_parse_attr()
1005 mod->csumfunc.xor = cgw_csum_xor_rel; in cgw_parse_attr()
1007 mod->csumfunc.xor = cgw_csum_xor_pos; in cgw_parse_attr()
1009 mod->csumfunc.xor = cgw_csum_xor_neg; in cgw_parse_attr()