mirror of https://github.com/xemu-project/xemu.git
hw/net/can/xlnx-versal-canfd: Fix CAN FD flag check
When checking the QEMU_CAN_FRMF_TYPE_FD flag, we need to ignore other potentially set flags. Before this change, received CAN FD frames from SocketCAN weren't being recognized as CAN FD. 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-3-doug@schmorgal.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
2215e297b9
commit
cd1e485fac
|
@ -1003,7 +1003,7 @@ static void store_rx_sequential(XlnxVersalCANFDState *s,
|
|||
|
||||
dlc = frame->can_dlc;
|
||||
|
||||
if (frame->flags == QEMU_CAN_FRMF_TYPE_FD) {
|
||||
if (frame->flags & QEMU_CAN_FRMF_TYPE_FD) {
|
||||
is_canfd_frame = true;
|
||||
|
||||
/* Store dlc value in Xilinx specific format. */
|
||||
|
|
Loading…
Reference in New Issue