aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/can/dev.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/can/dev.h')
-rw-r--r--include/linux/can/dev.h9
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
102static 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 */
103u8 can_dlc2len(u8 can_dlc); 109u8 can_dlc2len(u8 can_dlc);
104 110
@@ -121,6 +127,9 @@ void unregister_candev(struct net_device *dev);
121int can_restart_now(struct net_device *dev); 127int can_restart_now(struct net_device *dev);
122void can_bus_off(struct net_device *dev); 128void can_bus_off(struct net_device *dev);
123 129
130void can_change_state(struct net_device *dev, struct can_frame *cf,
131 enum can_state tx_state, enum can_state rx_state);
132
124void can_put_echo_skb(struct sk_buff *skb, struct net_device *dev, 133void can_put_echo_skb(struct sk_buff *skb, struct net_device *dev,
125 unsigned int idx); 134 unsigned int idx);
126unsigned int can_get_echo_skb(struct net_device *dev, unsigned int idx); 135unsigned int can_get_echo_skb(struct net_device *dev, unsigned int idx);