diff options
author | Doug Brown <doug@schmorgal.com> | 2024-09-13 15:31:49 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2024-09-13 15:31:49 +0100 |
commit | 12d60ca09e5150b785d067566f49e330c68b2985 (patch) | |
tree | 94a02eefa0cd0ff38e9084ccf6f3701dd18326a2 /tests/functional/qemu_test | |
parent | be243e9ddb8f0ba149a1c51faee035c303be7eeb (diff) | |
download | qemu-12d60ca09e5150b785d067566f49e330c68b2985.zip qemu-12d60ca09e5150b785d067566f49e330c68b2985.tar.gz qemu-12d60ca09e5150b785d067566f49e330c68b2985.tar.bz2 |
hw/net/can/xlnx-versal-canfd: Simplify DLC conversions
Use QEMU's helper functions can_dlc2len() and can_len2dlc() for
translating between the raw DLC value and the SocketCAN length value.
This also has the side effect of correctly handling received CAN FD
frames with a DLC of 0-8, which was broken previously.
Signed-off-by: Doug Brown <doug@schmorgal.com>
Reviewed-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
Reviewed-by: Francisco Iglesias <francisco.iglesias@amd.com>
Message-id: 20240827034927.66659-7-doug@schmorgal.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'tests/functional/qemu_test')
0 files changed, 0 insertions, 0 deletions