Answering myself ... On 21.10.20 11:21, Oliver Hartkopp wrote:
With CAN_CTRLMODE_RAW_DLC enabled the CAN driver would ... - fill can_dlc and raw_dlc at reception time - will use raw_dlc instead of can_dlc at tx time - will use can_dlc if raw_dlc == 0 at tx time
To be more compatible to non raw dlc CAN frame sources the tx handling could also be like this:
if ((can_dlc == CAN_MAX_DLEN) && (raw_dlc >= CAN_MAX_DLC && raw_dlc <= CAN_MAX_RAW_DLC)) => use raw_dlc