]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
can/netlink: add CAN_CTRLMODE_ONE_SHOT
authorMarc Kleine-Budde <mkl@pengutronix.de>
Wed, 23 Dec 2009 01:27:48 +0000 (01:27 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 4 Jan 2010 05:31:03 +0000 (21:31 -0800)
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>
include/linux/can/netlink.h

index 9ecbb7871c0ed039c036f999ea3d14047c29a381..c818335fbb132e6d2d7a82fd6638702c305a5f22 100644 (file)
@@ -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