summaryrefslogtreecommitdiff
path: root/ANDROID_3.4.5/include/linux/can/dev.h
diff options
context:
space:
mode:
authorSrikant Patnaik2015-01-11 12:28:04 +0530
committerSrikant Patnaik2015-01-11 12:28:04 +0530
commit871480933a1c28f8a9fed4c4d34d06c439a7a422 (patch)
tree8718f573808810c2a1e8cb8fb6ac469093ca2784 /ANDROID_3.4.5/include/linux/can/dev.h
parent9d40ac5867b9aefe0722bc1f110b965ff294d30d (diff)
downloadFOSSEE-netbook-kernel-source-871480933a1c28f8a9fed4c4d34d06c439a7a422.tar.gz
FOSSEE-netbook-kernel-source-871480933a1c28f8a9fed4c4d34d06c439a7a422.tar.bz2
FOSSEE-netbook-kernel-source-871480933a1c28f8a9fed4c4d34d06c439a7a422.zip
Moved, renamed, and deleted files
The original directory structure was scattered and unorganized. Changes are basically to make it look like kernel structure.
Diffstat (limited to 'ANDROID_3.4.5/include/linux/can/dev.h')
-rw-r--r--ANDROID_3.4.5/include/linux/can/dev.h102
1 files changed, 0 insertions, 102 deletions
diff --git a/ANDROID_3.4.5/include/linux/can/dev.h b/ANDROID_3.4.5/include/linux/can/dev.h
deleted file mode 100644
index 5d2efe7e..00000000
--- a/ANDROID_3.4.5/include/linux/can/dev.h
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * linux/can/dev.h
- *
- * Definitions for the CAN network device driver interface
- *
- * Copyright (C) 2006 Andrey Volkov <avolkov@varma-el.com>
- * Varma Electronics Oy
- *
- * Copyright (C) 2008 Wolfgang Grandegger <wg@grandegger.com>
- *
- */
-
-#ifndef CAN_DEV_H
-#define CAN_DEV_H
-
-#include <linux/can.h>
-#include <linux/can/netlink.h>
-#include <linux/can/error.h>
-
-/*
- * CAN mode
- */
-enum can_mode {
- CAN_MODE_STOP = 0,
- CAN_MODE_START,
- CAN_MODE_SLEEP
-};
-
-/*
- * CAN common private data
- */
-struct can_priv {
- struct can_device_stats can_stats;
-
- struct can_bittiming bittiming;
- struct can_bittiming_const *bittiming_const;
- struct can_clock clock;
-
- enum can_state state;
- u32 ctrlmode;
- u32 ctrlmode_supported;
-
- int restart_ms;
- struct timer_list restart_timer;
-
- int (*do_set_bittiming)(struct net_device *dev);
- int (*do_set_mode)(struct net_device *dev, enum can_mode mode);
- int (*do_get_state)(const struct net_device *dev,
- enum can_state *state);
- int (*do_get_berr_counter)(const struct net_device *dev,
- struct can_berr_counter *bec);
-
- unsigned int echo_skb_max;
- struct sk_buff **echo_skb;
-};
-
-/*
- * get_can_dlc(value) - helper macro to cast a given data length code (dlc)
- * to __u8 and ensure the dlc value to be max. 8 bytes.
- *
- * To be used in the CAN netdriver receive path to ensure conformance with
- * ISO 11898-1 Chapter 8.4.2.3 (DLC field)
- */
-#define get_can_dlc(i) (min_t(__u8, (i), 8))
-
-/* Drop a given socketbuffer if it does not contain a valid CAN frame. */
-static inline int can_dropped_invalid_skb(struct net_device *dev,
- struct sk_buff *skb)
-{
- const struct can_frame *cf = (struct can_frame *)skb->data;
-
- if (unlikely(skb->len != sizeof(*cf) || cf->can_dlc > 8)) {
- kfree_skb(skb);
- dev->stats.tx_dropped++;
- return 1;
- }
-
- return 0;
-}
-
-struct net_device *alloc_candev(int sizeof_priv, unsigned int echo_skb_max);
-void free_candev(struct net_device *dev);
-
-int open_candev(struct net_device *dev);
-void close_candev(struct net_device *dev);
-
-int register_candev(struct net_device *dev);
-void unregister_candev(struct net_device *dev);
-
-int can_restart_now(struct net_device *dev);
-void can_bus_off(struct net_device *dev);
-
-void can_put_echo_skb(struct sk_buff *skb, struct net_device *dev,
- unsigned int idx);
-unsigned int can_get_echo_skb(struct net_device *dev, unsigned int idx);
-void can_free_echo_skb(struct net_device *dev, unsigned int idx);
-
-struct sk_buff *alloc_can_skb(struct net_device *dev, struct can_frame **cf);
-struct sk_buff *alloc_can_err_skb(struct net_device *dev,
- struct can_frame **cf);
-
-#endif /* CAN_DEV_H */