• Home
  • Raw
  • Download

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()
258 static void cgw_csum_xor_rel(struct canfd_frame *cf, struct cgw_csum_xor *xor) in cgw_csum_xor_rel() argument
260 int from = calc_idx(xor->from_idx, cf->len); in cgw_csum_xor_rel()
261 int to = calc_idx(xor->to_idx, cf->len); in cgw_csum_xor_rel()
262 int res = calc_idx(xor->result_idx, cf->len); in cgw_csum_xor_rel()
263 u8 val = xor->init_xor_val; in cgw_csum_xor_rel()
280 static void cgw_csum_xor_pos(struct canfd_frame *cf, struct cgw_csum_xor *xor) in cgw_csum_xor_pos() argument
282 u8 val = xor->init_xor_val; in cgw_csum_xor_pos()
285 for (i = xor->from_idx; i <= xor->to_idx; i++) in cgw_csum_xor_pos()
288 cf->data[xor->result_idx] = val; in cgw_csum_xor_pos()
291 static void cgw_csum_xor_neg(struct canfd_frame *cf, struct cgw_csum_xor *xor) in cgw_csum_xor_neg() argument
293 u8 val = xor->init_xor_val; in cgw_csum_xor_neg()
296 for (i = xor->from_idx; i >= xor->to_idx; i--) in cgw_csum_xor_neg()
299 cf->data[xor->result_idx] = val; in cgw_csum_xor_neg()
490 if (gwj->mod.csumfunc.xor) in can_can_gw_rcv()
491 (*gwj->mod.csumfunc.xor)(cf, &gwj->mod.csum.xor); in can_can_gw_rcv()
602 if (gwj->mod.modtype.xor) { in cgw_put_job()
603 memcpy(&mb.cf, &gwj->mod.modframe.xor, sizeof(mb.cf)); in cgw_put_job()
604 mb.modtype = gwj->mod.modtype.xor; in cgw_put_job()
632 if (gwj->mod.modtype.xor) { in cgw_put_job()
633 memcpy(&mb.cf, &gwj->mod.modframe.xor, sizeof(mb.cf)); in cgw_put_job()
634 mb.modtype = gwj->mod.modtype.xor; in cgw_put_job()
658 if (gwj->mod.csumfunc.xor) { in cgw_put_job()
660 &gwj->mod.csum.xor) < 0) in cgw_put_job()
800 canfdframecpy(&mod->modframe.xor, &mb.cf); in cgw_parse_attr()
801 mod->modtype.xor = mb.modtype; in cgw_parse_attr()
872 canframecpy(&mod->modframe.xor, &mb.cf); in cgw_parse_attr()
873 mod->modtype.xor = mb.modtype; in cgw_parse_attr()
935 nla_memcpy(&mod->csum.xor, tb[CGW_CS_XOR], in cgw_parse_attr()
943 mod->csumfunc.xor = cgw_csum_xor_rel; in cgw_parse_attr()
945 mod->csumfunc.xor = cgw_csum_xor_pos; in cgw_parse_attr()
947 mod->csumfunc.xor = cgw_csum_xor_neg; in cgw_parse_attr()