Skip to content

Commit

Permalink
can/netlink: add CAN_CTRLMODE_ONE_SHOT
Browse files Browse the repository at this point in the history
This patch adds the flag CAN_CTRLMODE_ONE_SHOT. It is used as mask
or flag in the "struct can_ctrlmode".

It allows userspace via netlink to set a CAN controller into the special
"one-shot" mode. In this mode, if supported by the CAN controller, it
tries only once to deliver a CAN frame and aborts it if an error
(e.g.: arbitration lost) happens.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Acked-by: Wolfgang Grandegger <wg@grandegger.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Marc Kleine-Budde authored and David S. Miller committed Jan 4, 2010
1 parent 20dd385 commit c1c5523
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions include/linux/can/netlink.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ struct can_ctrlmode {
#define CAN_CTRLMODE_LOOPBACK 0x1 /* Loopback mode */
#define CAN_CTRLMODE_LISTENONLY 0x2 /* Listen-only mode */
#define CAN_CTRLMODE_3_SAMPLES 0x4 /* Triple sampling mode */
#define CAN_CTRLMODE_ONE_SHOT 0x8 /* One-Shot mode */

/*
* CAN device statistics
Expand Down

0 comments on commit c1c5523

Please sign in to comment.