projects
/
platform
/
kernel
/
linux-starfive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
acff76f
)
can: gs_usb: gs_can_open(): allow loopback and listen only at the same time
author
Marc Kleine-Budde
<mkl@pengutronix.de>
Thu, 29 Sep 2022 07:58:30 +0000
(09:58 +0200)
committer
Marc Kleine-Budde
<mkl@pengutronix.de>
Thu, 20 Oct 2022 09:57:40 +0000
(11:57 +0200)
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>
drivers/net/can/usb/gs_usb.c
patch
|
blob
|
history
diff --git
a/drivers/net/can/usb/gs_usb.c
b/drivers/net/can/usb/gs_usb.c
index
384847b
..
aa6c84b
100644
(file)
--- a/
drivers/net/can/usb/gs_usb.c
+++ b/
drivers/net/can/usb/gs_usb.c
@@
-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