Skip to content
Commit 21ce0f5b authored by Clemens Gruber's avatar Clemens Gruber Committed by Zbigniew Jędrzejewski-Szmek
Browse files

network: can: Fix CAN initialization

When introducing CAN-FD support, the .can_fd_mode was not initalized
with -1 and due to cm.mask containing the CAN_CTRLMODE_FD bit, it was
not ignored when FDMode was not configured but instead disabled.
The same thing happened when listen-only mode support was introduced.

On chips that do not support these features, this lead to an error:
can0: Failed to configure CAN link: Operation not supported

Fix it by intializing all the CAN related tristate variables
(.can_listen_only, .can_fd_mode and .can_non_iso) to -1.

(cherry picked from commit f594b5fe)
parent cab5cde8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment