mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 03:15:31 +09:00
can: gs_usb: gs_can_open(): allow loopback and listen only at the same time
There's no reason why loopback and listen only should not be allowed at the same time. Replace the "else if" by "if" to reflect this in the code. Link: https://lore.kernel.org/all/20221019221016.1659260-2-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
This commit is contained in:
@@ -911,7 +911,8 @@ static int gs_can_open(struct net_device *netdev)
|
||||
/* flags */
|
||||
if (ctrlmode & CAN_CTRLMODE_LOOPBACK)
|
||||
flags |= GS_CAN_MODE_LOOP_BACK;
|
||||
else if (ctrlmode & CAN_CTRLMODE_LISTENONLY)
|
||||
|
||||
if (ctrlmode & CAN_CTRLMODE_LISTENONLY)
|
||||
flags |= GS_CAN_MODE_LISTEN_ONLY;
|
||||
|
||||
/* Controller is not allowed to retry TX
|
||||
|
||||
Reference in New Issue
Block a user