Lines Matching refs:xor

89 		struct canfd_frame xor;
95 u8 xor;
103 struct cgw_csum_xor xor;
107 void (*xor)(struct canfd_frame *cf,
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);
320 static void cgw_csum_xor_rel(struct canfd_frame *cf, struct cgw_csum_xor *xor)
322 int from = calc_idx(xor->from_idx, cf->len);
323 int to = calc_idx(xor->to_idx, cf->len);
324 int res = calc_idx(xor->result_idx, cf->len);
325 u8 val = xor->init_xor_val;
342 static void cgw_csum_xor_pos(struct canfd_frame *cf, struct cgw_csum_xor *xor)
344 u8 val = xor->init_xor_val;
347 for (i = xor->from_idx; i <= xor->to_idx; i++)
350 cf->data[xor->result_idx] = val;
353 static void cgw_csum_xor_neg(struct canfd_frame *cf, struct cgw_csum_xor *xor)
355 u8 val = xor->init_xor_val;
358 for (i = xor->from_idx; i >= xor->to_idx; i--)
361 cf->data[xor->result_idx] = val;
552 if (gwj->mod.csumfunc.xor)
553 (*gwj->mod.csumfunc.xor)(cf, &gwj->mod.csum.xor);
670 if (gwj->mod.modtype.xor) {
671 memcpy(&mb.cf, &gwj->mod.modframe.xor, sizeof(mb.cf));
672 mb.modtype = gwj->mod.modtype.xor;
700 if (gwj->mod.modtype.xor) {
701 memcpy(&mb.cf, &gwj->mod.modframe.xor, sizeof(mb.cf));
702 mb.modtype = gwj->mod.modtype.xor;
726 if (gwj->mod.csumfunc.xor) {
728 &gwj->mod.csum.xor) < 0)
868 canfdframecpy(&mod->modframe.xor, &mb.cf);
869 mod->modtype.xor = mb.modtype;
940 canframecpy(&mod->modframe.xor, &mb.cf);
941 mod->modtype.xor = mb.modtype;
1003 nla_memcpy(&mod->csum.xor, tb[CGW_CS_XOR],
1011 mod->csumfunc.xor = cgw_csum_xor_rel;
1013 mod->csumfunc.xor = cgw_csum_xor_pos;
1015 mod->csumfunc.xor = cgw_csum_xor_neg;