diff options
Diffstat (limited to 'include/linux/can/dev.h')
| -rw-r--r-- | include/linux/can/dev.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/can/dev.h b/include/linux/can/dev.h index 6992afc6ba7f..c05ff0f9f9a5 100644 --- a/include/linux/can/dev.h +++ b/include/linux/can/dev.h | |||
| @@ -99,6 +99,12 @@ inval_skb: | |||
| 99 | return 1; | 99 | return 1; |
| 100 | } | 100 | } |
| 101 | 101 | ||
| 102 | static inline bool can_is_canfd_skb(const struct sk_buff *skb) | ||
| 103 | { | ||
| 104 | /* the CAN specific type of skb is identified by its data length */ | ||
| 105 | return skb->len == CANFD_MTU; | ||
| 106 | } | ||
| 107 | |||
| 102 | /* get data length from can_dlc with sanitized can_dlc */ | 108 | /* get data length from can_dlc with sanitized can_dlc */ |
| 103 | u8 can_dlc2len(u8 can_dlc); | 109 | u8 can_dlc2len(u8 can_dlc); |
| 104 | 110 | ||
| @@ -121,6 +127,9 @@ void unregister_candev(struct net_device *dev); | |||
| 121 | int can_restart_now(struct net_device *dev); | 127 | int can_restart_now(struct net_device *dev); |
| 122 | void can_bus_off(struct net_device *dev); | 128 | void can_bus_off(struct net_device *dev); |
| 123 | 129 | ||
| 130 | void can_change_state(struct net_device *dev, struct can_frame *cf, | ||
| 131 | enum can_state tx_state, enum can_state rx_state); | ||
| 132 | |||
| 124 | void can_put_echo_skb(struct sk_buff *skb, struct net_device *dev, | 133 | void can_put_echo_skb(struct sk_buff *skb, struct net_device *dev, |
| 125 | unsigned int idx); | 134 | unsigned int idx); |
| 126 | unsigned int can_get_echo_skb(struct net_device *dev, unsigned int idx); | 135 | unsigned int can_get_echo_skb(struct net_device *dev, unsigned int idx); |
