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.h20
1 files changed, 12 insertions, 8 deletions
diff --git a/include/linux/can/dev.h b/include/linux/can/dev.h
index 5824b20b5fcb..1ed2a5cc03f5 100644
--- a/include/linux/can/dev.h
+++ b/include/linux/can/dev.h
@@ -29,8 +29,6 @@ enum can_mode {
29/* 29/*
30 * CAN common private data 30 * CAN common private data
31 */ 31 */
32#define CAN_ECHO_SKB_MAX 4
33
34struct can_priv { 32struct can_priv {
35 struct can_device_stats can_stats; 33 struct can_device_stats can_stats;
36 34
@@ -44,15 +42,16 @@ struct can_priv {
44 int restart_ms; 42 int restart_ms;
45 struct timer_list restart_timer; 43 struct timer_list restart_timer;
46 44
47 struct sk_buff *echo_skb[CAN_ECHO_SKB_MAX];
48
49 int (*do_set_bittiming)(struct net_device *dev); 45 int (*do_set_bittiming)(struct net_device *dev);
50 int (*do_set_mode)(struct net_device *dev, enum can_mode mode); 46 int (*do_set_mode)(struct net_device *dev, enum can_mode mode);
51 int (*do_get_state)(const struct net_device *dev, 47 int (*do_get_state)(const struct net_device *dev,
52 enum can_state *state); 48 enum can_state *state);
49
50 unsigned int echo_skb_max;
51 struct sk_buff **echo_skb;
53}; 52};
54 53
55struct net_device *alloc_candev(int sizeof_priv); 54struct net_device *alloc_candev(int sizeof_priv, unsigned int echo_skb_max);
56void free_candev(struct net_device *dev); 55void free_candev(struct net_device *dev);
57 56
58int open_candev(struct net_device *dev); 57int open_candev(struct net_device *dev);
@@ -64,8 +63,13 @@ void unregister_candev(struct net_device *dev);
64int can_restart_now(struct net_device *dev); 63int can_restart_now(struct net_device *dev);
65void can_bus_off(struct net_device *dev); 64void can_bus_off(struct net_device *dev);
66 65
67void can_put_echo_skb(struct sk_buff *skb, struct net_device *dev, int idx); 66void can_put_echo_skb(struct sk_buff *skb, struct net_device *dev,
68void can_get_echo_skb(struct net_device *dev, int idx); 67 unsigned int idx);
69void can_free_echo_skb(struct net_device *dev, int idx); 68void can_get_echo_skb(struct net_device *dev, unsigned int idx);
69void can_free_echo_skb(struct net_device *dev, unsigned int idx);
70
71struct sk_buff *alloc_can_skb(struct net_device *dev, struct can_frame **cf);
72struct sk_buff *alloc_can_err_skb(struct net_device *dev,
73 struct can_frame **cf);
70 74
71#endif /* CAN_DEV_H */ 75#endif /* CAN_DEV_H */