diff options
Diffstat (limited to 'include/linux/can/netlink.h')
-rw-r--r-- | include/linux/can/netlink.h | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/include/linux/can/netlink.h b/include/linux/can/netlink.h index 9ecbb7871c0e..3250de935e1a 100644 --- a/include/linux/can/netlink.h +++ b/include/linux/can/netlink.h | |||
@@ -70,6 +70,14 @@ enum can_state { | |||
70 | }; | 70 | }; |
71 | 71 | ||
72 | /* | 72 | /* |
73 | * CAN bus error counters | ||
74 | */ | ||
75 | struct can_berr_counter { | ||
76 | __u16 txerr; | ||
77 | __u16 rxerr; | ||
78 | }; | ||
79 | |||
80 | /* | ||
73 | * CAN controller mode | 81 | * CAN controller mode |
74 | */ | 82 | */ |
75 | struct can_ctrlmode { | 83 | struct can_ctrlmode { |
@@ -77,9 +85,11 @@ struct can_ctrlmode { | |||
77 | __u32 flags; | 85 | __u32 flags; |
78 | }; | 86 | }; |
79 | 87 | ||
80 | #define CAN_CTRLMODE_LOOPBACK 0x1 /* Loopback mode */ | 88 | #define CAN_CTRLMODE_LOOPBACK 0x01 /* Loopback mode */ |
81 | #define CAN_CTRLMODE_LISTENONLY 0x2 /* Listen-only mode */ | 89 | #define CAN_CTRLMODE_LISTENONLY 0x02 /* Listen-only mode */ |
82 | #define CAN_CTRLMODE_3_SAMPLES 0x4 /* Triple sampling mode */ | 90 | #define CAN_CTRLMODE_3_SAMPLES 0x04 /* Triple sampling mode */ |
91 | #define CAN_CTRLMODE_ONE_SHOT 0x08 /* One-Shot mode */ | ||
92 | #define CAN_CTRLMODE_BERR_REPORTING 0x10 /* Bus-error reporting */ | ||
83 | 93 | ||
84 | /* | 94 | /* |
85 | * CAN device statistics | 95 | * CAN device statistics |
@@ -105,6 +115,7 @@ enum { | |||
105 | IFLA_CAN_CTRLMODE, | 115 | IFLA_CAN_CTRLMODE, |
106 | IFLA_CAN_RESTART_MS, | 116 | IFLA_CAN_RESTART_MS, |
107 | IFLA_CAN_RESTART, | 117 | IFLA_CAN_RESTART, |
118 | IFLA_CAN_BERR_COUNTER, | ||
108 | __IFLA_CAN_MAX | 119 | __IFLA_CAN_MAX |
109 | }; | 120 | }; |
110 | 121 | ||