---
include/linux/can.h | 111 +++++
- include/linux/can/core.h | 77 +++
+ include/linux/can/core.h | 78 +++
include/linux/can/error.h | 93 ++++
net/Kconfig | 1
net/Makefile | 1
net/can/Kconfig | 25 +
net/can/Makefile | 6
- net/can/af_can.c | 970 ++++++++++++++++++++++++++++++++++++++++++++++
+ net/can/af_can.c | 969 ++++++++++++++++++++++++++++++++++++++++++++++
net/can/af_can.h | 120 +++++
net/can/proc.c | 532 +++++++++++++++++++++++++
10 files changed, 1936 insertions(+)
Index: net-2.6.24/include/linux/can.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ net-2.6.24/include/linux/can.h 2007-10-02 12:10:18.000000000 +0200
++++ net-2.6.24/include/linux/can.h 2007-10-05 08:11:15.000000000 +0200
@@ -0,0 +1,111 @@
+/*
+ * linux/can.h
+ * struct sockaddr_can - the sockaddr structure for CAN sockets
+ * @can_family: address family number AF_CAN.
+ * @can_ifindex: CAN network interface index.
-+ * @can_addr: transport protocol specific address, mostly CAN IDs.
++ * @can_addr: protocol specific address information
+ */
+struct sockaddr_can {
+ sa_family_t can_family;
+ int can_ifindex;
+ union {
-+ struct { canid_t rx_id, tx_id; } tp16;
-+ struct { canid_t rx_id, tx_id; } tp20;
-+ struct { canid_t rx_id, tx_id; } mcnet;
-+ struct { canid_t rx_id, tx_id; } isotp;
++ /* transport protocol class address information (e.g. ISOTP) */
++ struct { canid_t rx_id, tx_id; } tp;
++
++ /* reserved for future CAN protocols address information */
+ } can_addr;
+};
+
Index: net-2.6.24/include/linux/can/core.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ net-2.6.24/include/linux/can/core.h 2007-10-02 12:10:18.000000000 +0200
-@@ -0,0 +1,77 @@
++++ net-2.6.24/include/linux/can/core.h 2007-10-05 08:11:15.000000000 +0200
+@@ -0,0 +1,78 @@
+/*
+ * linux/can/core.h
+ *
+#include <linux/skbuff.h>
+#include <linux/netdevice.h>
+
-+#define CAN_VERSION "20071001"
++#define CAN_VERSION "20071004"
+
+/* increment this number each time you change some user-space interface */
+#define CAN_ABI_VERSION "8"
+#ifdef CONFIG_CAN_DEBUG_CORE
+extern void can_debug_skb(struct sk_buff *skb);
+extern void can_debug_cframe(const char *msg, struct can_frame *cframe);
-+#define DBG(fmt, args...) (debug & 1 ? printk(KERN_DEBUG "can-" IDENT \
-+ " %s: " fmt, __func__, ##args) : 0)
-+#define DBG_FRAME(fmt, cf) (debug & 2 ? can_debug_cframe(fmt, cf) : 0)
-+#define DBG_SKB(skb) (debug & 4 ? can_debug_skb(skb) : 0)
++#define DBG(fmt, args...) (DBG_VAR & 1 ? printk( \
++ KERN_DEBUG DBG_PREFIX ": %s: " fmt, \
++ __func__, ##args) : 0)
++#define DBG_FRAME(fmt, cf) (DBG_VAR & 2 ? can_debug_cframe(fmt, cf) : 0)
++#define DBG_SKB(skb) (DBG_VAR & 4 ? can_debug_skb(skb) : 0)
+#else
+#define DBG(fmt, args...)
+#define DBG_FRAME(fmt, cf)
+#endif /* CAN_CORE_H */
Index: net-2.6.24/net/Kconfig
===================================================================
---- net-2.6.24.orig/net/Kconfig 2007-10-02 12:10:09.000000000 +0200
-+++ net-2.6.24/net/Kconfig 2007-10-02 12:10:18.000000000 +0200
+--- net-2.6.24.orig/net/Kconfig 2007-10-05 08:11:10.000000000 +0200
++++ net-2.6.24/net/Kconfig 2007-10-05 08:11:15.000000000 +0200
@@ -218,6 +218,7 @@
endmenu
source "net/rxrpc/Kconfig"
Index: net-2.6.24/net/Makefile
===================================================================
---- net-2.6.24.orig/net/Makefile 2007-10-02 12:10:09.000000000 +0200
-+++ net-2.6.24/net/Makefile 2007-10-02 12:10:18.000000000 +0200
+--- net-2.6.24.orig/net/Makefile 2007-10-05 08:11:10.000000000 +0200
++++ net-2.6.24/net/Makefile 2007-10-05 08:11:15.000000000 +0200
@@ -34,6 +34,7 @@
obj-$(CONFIG_NETROM) += netrom/
obj-$(CONFIG_ROSE) += rose/
Index: net-2.6.24/net/can/Kconfig
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ net-2.6.24/net/can/Kconfig 2007-10-02 12:10:18.000000000 +0200
++++ net-2.6.24/net/can/Kconfig 2007-10-05 11:16:25.000000000 +0200
@@ -0,0 +1,25 @@
+#
+# Controller Area Network (CAN) network layer core configuration
+ tristate "CAN bus subsystem support"
+ ---help---
+ Controller Area Network (CAN) is a slow (up to 1Mbit/s) serial
-+ communications protocol, which was developed by Bosch at
-+ 1991 mainly for automotive, but now widely used in marine
-+ (NMEA2000), industrial and medical applications.
++ communications protocol which was developed by Bosch in
++ 1991, mainly for automotive, but now widely used in marine
++ (NMEA2000), industrial, and medical applications.
+ More information on the CAN network protocol family PF_CAN
+ is contained in <Documentation/networking/can.txt>.
+
-+ If you want CAN support, you should say Y here and also to the
++ If you want CAN support you should say Y here and also to the
+ specific driver for your controller(s) below.
+
+config CAN_DEBUG_CORE
+ depends on CAN
+ ---help---
+ Say Y here if you want the CAN core to produce a bunch of debug
-+ messages to the system log. Select this if you are having a
-+ problem with CAN support and want to see more of what is going on.
++ messages. Select this if you are having a problem with CAN
++ support and want to see more of what is going on.
Index: net-2.6.24/net/can/Makefile
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ net-2.6.24/net/can/Makefile 2007-10-02 12:10:18.000000000 +0200
++++ net-2.6.24/net/can/Makefile 2007-10-05 11:15:08.000000000 +0200
@@ -0,0 +1,6 @@
+#
+# Makefile for the Linux Controller Area Network core.
Index: net-2.6.24/net/can/af_can.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ net-2.6.24/net/can/af_can.c 2007-10-02 12:10:18.000000000 +0200
-@@ -0,0 +1,970 @@
++++ net-2.6.24/net/can/af_can.c 2007-10-05 11:09:07.000000000 +0200
+@@ -0,0 +1,969 @@
+/*
+ * af_can.c - Protocol family CAN core module
+ * (used by different CAN protocol modules)
+
+#include "af_can.h"
+
-+#define IDENT "core"
+static __initdata const char banner[] = KERN_INFO
+ "can: controller area network core (" CAN_VERSION_STRING ")\n";
+
+MODULE_PARM_DESC(stats_timer, "enable timer for statistics (default:on)");
+
+#ifdef CONFIG_CAN_DEBUG_CORE
-+static int debug __read_mostly;
-+module_param(debug, int, S_IRUGO);
++#define DBG_PREFIX "can"
++#define DBG_VAR can_debug
++static int can_debug __read_mostly;
++module_param_named(debug, can_debug, int, S_IRUGO);
+MODULE_PARM_DESC(debug, "debug print mask: 1:debug, 2:frames, 4:skbs");
+#endif
+
+ }
+
+ /*
-+ * Check for bug in CAN protocol implementations:
++ * Check for bugs in CAN protocol implementations:
+ * If no matching list item was found, the list cursor variable next
+ * will be NULL, while r will point to the last item of the list.
+ */
+ DBG("received skbuff on device %s, ptype %04x\n",
+ dev->name, ntohs(pt->type));
+ DBG_SKB(skb);
-+ DBG_FRAME("af_can: can_rcv: received CAN frame",
++ DBG_FRAME("can: can_rcv: received CAN frame",
+ (struct can_frame *)skb->data);
+
+ if (dev->type != ARPHRD_CAN || dev->nd_net != &init_net) {
+ } else
+ stattimer.function = NULL;
+
-+ /* procfs init */
+ can_init_proc();
+
+ /* protocol register */
+ if (stats_timer)
+ del_timer(&stattimer);
+
-+ /* procfs remove */
+ can_remove_proc();
+
+ /* protocol unregister */
Index: net-2.6.24/net/can/af_can.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ net-2.6.24/net/can/af_can.h 2007-10-02 12:10:18.000000000 +0200
++++ net-2.6.24/net/can/af_can.h 2007-10-05 08:11:15.000000000 +0200
@@ -0,0 +1,120 @@
+/*
+ * Copyright (c) 2002-2007 Volkswagen Group Electronic Research
Index: net-2.6.24/net/can/proc.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ net-2.6.24/net/can/proc.c 2007-10-02 12:10:18.000000000 +0200
++++ net-2.6.24/net/can/proc.c 2007-10-05 08:11:15.000000000 +0200
@@ -0,0 +1,532 @@
+/*
+ * proc.c - procfs support for Protocol family CAN core module
Index: net-2.6.24/include/linux/can/error.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ net-2.6.24/include/linux/can/error.h 2007-10-02 12:10:18.000000000 +0200
++++ net-2.6.24/include/linux/can/error.h 2007-10-05 08:11:15.000000000 +0200
@@ -0,0 +1,93 @@
+/*
+ * linux/can/error.h
include/linux/can/raw.h | 31 +
net/can/Kconfig | 11
net/can/Makefile | 3
- net/can/raw.c | 821 ++++++++++++++++++++++++++++++++++++++++++++++++
- 4 files changed, 866 insertions(+)
+ net/can/raw.c | 810 ++++++++++++++++++++++++++++++++++++++++++++++++
+ 4 files changed, 855 insertions(+)
Index: net-2.6.24/include/linux/can/raw.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ net-2.6.24/include/linux/can/raw.h 2007-10-02 08:33:39.000000000 +0200
++++ net-2.6.24/include/linux/can/raw.h 2007-10-05 11:11:41.000000000 +0200
@@ -0,0 +1,31 @@
+/*
+ * linux/can/raw.h
+#endif
Index: net-2.6.24/net/can/Kconfig
===================================================================
---- net-2.6.24.orig/net/can/Kconfig 2007-10-02 06:18:29.000000000 +0200
-+++ net-2.6.24/net/can/Kconfig 2007-10-02 08:35:31.000000000 +0200
+--- net-2.6.24.orig/net/can/Kconfig 2007-10-05 11:11:04.000000000 +0200
++++ net-2.6.24/net/can/Kconfig 2007-10-05 11:12:35.000000000 +0200
@@ -16,6 +16,17 @@
- If you want CAN support, you should say Y here and also to the
+ If you want CAN support you should say Y here and also to the
specific driver for your controller(s) below.
+config CAN_RAW
+ depends on CAN
+ default N
+ ---help---
-+ The Raw CAN protocol option offers access to the CAN bus via
++ The raw CAN protocol option offers access to the CAN bus via
+ the BSD socket API. You probably want to use the raw socket in
+ most cases where no higher level protocol is being used. The raw
-+ socket has several filter options e.g. ID-Masking / Errorframes.
++ socket has several filter options e.g. ID masking / error frames.
+ To receive/send raw CAN messages, use AF_CAN with protocol CAN_RAW.
+
config CAN_DEBUG_CORE
depends on CAN
Index: net-2.6.24/net/can/Makefile
===================================================================
---- net-2.6.24.orig/net/can/Makefile 2007-10-02 06:18:29.000000000 +0200
-+++ net-2.6.24/net/can/Makefile 2007-10-02 08:35:31.000000000 +0200
+--- net-2.6.24.orig/net/can/Makefile 2007-10-05 11:08:05.000000000 +0200
++++ net-2.6.24/net/can/Makefile 2007-10-05 11:11:41.000000000 +0200
@@ -4,3 +4,6 @@
obj-$(CONFIG_CAN) += can.o
Index: net-2.6.24/net/can/raw.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ net-2.6.24/net/can/raw.c 2007-10-02 08:35:48.000000000 +0200
-@@ -0,0 +1,821 @@
++++ net-2.6.24/net/can/raw.c 2007-10-05 11:11:41.000000000 +0200
+@@ -0,0 +1,810 @@
+/*
+ * raw.c - Raw sockets for protocol family CAN
+ *
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/uio.h>
-+#include <linux/poll.h>
+#include <linux/net.h>
+#include <linux/netdevice.h>
+#include <linux/socket.h>
+#include <net/sock.h>
+#include <net/net_namespace.h>
+
-+#define IDENT "raw"
+#define CAN_RAW_VERSION CAN_VERSION
+static __initdata const char banner[] =
+ KERN_INFO "can: raw protocol (rev " CAN_RAW_VERSION ")\n";
+MODULE_AUTHOR("Urs Thuermann <urs.thuermann@volkswagen.de>");
+
+#ifdef CONFIG_CAN_DEBUG_CORE
-+static int debug;
-+module_param(debug, int, S_IRUGO);
++#define DBG_PREFIX "can-raw"
++#define DBG_VAR raw_debug
++static int raw_debug;
++module_param_named(debug, raw_debug, int, S_IRUGO);
+MODULE_PARM_DESC(debug, "debug print mask: 1:debug, 2:frames, 4:skbs");
+#endif
+
+
+ err = can_rx_register(dev, filter[i].can_id,
+ filter[i].can_mask,
-+ raw_rcv, sk, IDENT);
++ raw_rcv, sk, "raw");
+
+ if (err) {
+ /* clean up successfully registered filters */
+
+ if (err_mask)
+ err = can_rx_register(dev, 0, err_mask | CAN_ERR_FLAG,
-+ raw_rcv, sk, IDENT);
++ raw_rcv, sk, "raw");
+
+ return err;
+}
+ return 0;
+}
+
-+static unsigned int raw_poll(struct file *file, struct socket *sock,
-+ poll_table *wait)
-+{
-+ unsigned int mask = 0;
-+
-+ DBG("socket %p\n", sock);
-+
-+ mask = datagram_poll(file, sock, wait);
-+ return mask;
-+}
-+
+static int raw_setsockopt(struct socket *sock, int level, int optname,
+ char __user *optval, int optlen)
+{
+ .socketpair = sock_no_socketpair,
+ .accept = sock_no_accept,
+ .getname = raw_getname,
-+ .poll = raw_poll,
++ .poll = datagram_poll,
+ .ioctl = NULL, /* use can_ioctl() from af_can.c */
+ .listen = sock_no_listen,
+ .shutdown = sock_no_shutdown,
include/linux/can/bcm.h | 65 +
net/can/Kconfig | 13
net/can/Makefile | 3
- net/can/bcm.c | 1774 ++++++++++++++++++++++++++++++++++++++++++++++++
- 4 files changed, 1855 insertions(+)
+ net/can/bcm.c | 1763 ++++++++++++++++++++++++++++++++++++++++++++++++
+ 4 files changed, 1844 insertions(+)
Index: net-2.6.24/include/linux/can/bcm.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ net-2.6.24/include/linux/can/bcm.h 2007-10-02 08:33:40.000000000 +0200
++++ net-2.6.24/include/linux/can/bcm.h 2007-10-05 11:13:17.000000000 +0200
@@ -0,0 +1,65 @@
+/*
+ * linux/can/bcm.h
+#endif /* CAN_BCM_H */
Index: net-2.6.24/net/can/Kconfig
===================================================================
---- net-2.6.24.orig/net/can/Kconfig 2007-10-02 08:33:39.000000000 +0200
-+++ net-2.6.24/net/can/Kconfig 2007-10-02 08:33:40.000000000 +0200
+--- net-2.6.24.orig/net/can/Kconfig 2007-10-05 11:12:35.000000000 +0200
++++ net-2.6.24/net/can/Kconfig 2007-10-05 11:13:49.000000000 +0200
@@ -27,6 +27,19 @@
- socket has several filter options e.g. ID-Masking / Errorframes.
+ socket has several filter options e.g. ID masking / error frames.
To receive/send raw CAN messages, use AF_CAN with protocol CAN_RAW.
+config CAN_BCM
+ default N
+ ---help---
+ The Broadcast Manager offers content filtering, timeout monitoring,
-+ sending of RTR-frames and cyclic CAN messages without permanent user
++ sending of RTR frames, and cyclic CAN messages without permanent user
+ interaction. The BCM can be 'programmed' via the BSD socket API and
+ informs you on demand e.g. only on content updates / timeouts.
+ You probably want to use the bcm socket in most cases where cyclic
depends on CAN
Index: net-2.6.24/net/can/Makefile
===================================================================
---- net-2.6.24.orig/net/can/Makefile 2007-10-02 08:33:39.000000000 +0200
-+++ net-2.6.24/net/can/Makefile 2007-10-02 08:33:40.000000000 +0200
+--- net-2.6.24.orig/net/can/Makefile 2007-10-05 11:11:41.000000000 +0200
++++ net-2.6.24/net/can/Makefile 2007-10-05 11:13:17.000000000 +0200
@@ -7,3 +7,6 @@
obj-$(CONFIG_CAN_RAW) += can-raw.o
Index: net-2.6.24/net/can/bcm.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ net-2.6.24/net/can/bcm.c 2007-10-02 08:35:04.000000000 +0200
-@@ -0,0 +1,1774 @@
++++ net-2.6.24/net/can/bcm.c 2007-10-05 11:13:17.000000000 +0200
+@@ -0,0 +1,1763 @@
+/*
+ * bcm.c - Broadcast Manager to filter/send (cyclic) CAN content
+ *
+#include <linux/list.h>
+#include <linux/proc_fs.h>
+#include <linux/uio.h>
-+#include <linux/poll.h>
+#include <linux/net.h>
+#include <linux/netdevice.h>
+#include <linux/socket.h>
+#define REGMASK(id) ((id & CAN_RTR_FLAG) | ((id & CAN_EFF_FLAG) ? \
+ (CAN_EFF_MASK | CAN_EFF_FLAG) : CAN_SFF_MASK))
+
-+#define IDENT "bcm"
+#define CAN_BCM_VERSION CAN_VERSION
+static __initdata const char banner[] = KERN_INFO
+ "can: broadcast manager protocol (rev " CAN_BCM_VERSION ")\n";
+MODULE_AUTHOR("Oliver Hartkopp <oliver.hartkopp@volkswagen.de>");
+
+#ifdef CONFIG_CAN_DEBUG_CORE
-+static int debug;
-+module_param(debug, int, S_IRUGO);
++#define DBG_PREFIX "can-bcm"
++#define DBG_VAR bcm_debug
++static int bcm_debug;
++module_param_named(debug, bcm_debug, int, S_IRUGO);
+MODULE_PARM_DESC(debug, "debug print mask: 1:debug, 2:frames, 4:skbs");
+#endif
+
+ err = can_rx_register(dev, op->can_id,
+ REGMASK(op->can_id),
+ bcm_rx_handler, op,
-+ IDENT);
++ "bcm");
+
+ op->rx_reg_dev = dev;
+ dev_put(dev);
+ } else
+ err = can_rx_register(NULL, op->can_id,
+ REGMASK(op->can_id),
-+ bcm_rx_handler, op, IDENT);
++ bcm_rx_handler, op, "bcm");
+ if (err) {
+ /* this bcm rx op is broken -> remove it */
+ list_del(&op->list);
+ return size;
+}
+
-+static unsigned int bcm_poll(struct file *file, struct socket *sock,
-+ poll_table *wait)
-+{
-+ unsigned int mask = 0;
-+
-+ DBG("socket %p\n", sock);
-+
-+ mask = datagram_poll(file, sock, wait);
-+ return mask;
-+}
-+
+static struct proto_ops bcm_ops __read_mostly = {
+ .family = PF_CAN,
+ .release = bcm_release,
+ .socketpair = sock_no_socketpair,
+ .accept = sock_no_accept,
+ .getname = sock_no_getname,
-+ .poll = bcm_poll,
++ .poll = datagram_poll,
+ .ioctl = NULL, /* use can_ioctl() from af_can.c */
+ .listen = sock_no_listen,
+ .shutdown = sock_no_shutdown,
+ }
+
+ /* create /proc/net/can-bcm directory */
-+ proc_dir = proc_mkdir("can-"IDENT, init_net.proc_net);
++ proc_dir = proc_mkdir("can-bcm", init_net.proc_net);
+
+ if (proc_dir)
+ proc_dir->owner = THIS_MODULE;
+ can_proto_unregister(&bcm_can_proto);
+
+ if (proc_dir)
-+ proc_net_remove(&init_net, "can-"IDENT);
++ proc_net_remove(&init_net, "can-bcm");
+}
+
+module_init(bcm_module_init);
Index: net-2.6.24/drivers/net/Makefile
===================================================================
---- net-2.6.24.orig/drivers/net/Makefile 2007-09-20 23:46:01.000000000 +0200
-+++ net-2.6.24/drivers/net/Makefile 2007-10-02 12:03:30.000000000 +0200
+--- net-2.6.24.orig/drivers/net/Makefile 2007-10-05 11:08:03.000000000 +0200
++++ net-2.6.24/drivers/net/Makefile 2007-10-05 11:17:41.000000000 +0200
@@ -12,6 +12,7 @@
obj-$(CONFIG_CHELSIO_T1) += chelsio/
obj-$(CONFIG_CHELSIO_T3) += cxgb3/
Index: net-2.6.24/drivers/net/can/Kconfig
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ net-2.6.24/drivers/net/can/Kconfig 2007-10-02 12:03:30.000000000 +0200
++++ net-2.6.24/drivers/net/can/Kconfig 2007-10-05 11:17:41.000000000 +0200
@@ -0,0 +1,25 @@
+menu "CAN Device Drivers"
+ depends on CAN
Index: net-2.6.24/drivers/net/can/Makefile
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ net-2.6.24/drivers/net/can/Makefile 2007-10-02 12:03:30.000000000 +0200
++++ net-2.6.24/drivers/net/can/Makefile 2007-10-05 11:17:41.000000000 +0200
@@ -0,0 +1,5 @@
+#
+# Makefile for the Linux Controller Area Network drivers.
Index: net-2.6.24/drivers/net/can/vcan.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ net-2.6.24/drivers/net/can/vcan.c 2007-10-02 12:03:30.000000000 +0200
++++ net-2.6.24/drivers/net/can/vcan.c 2007-10-05 11:17:41.000000000 +0200
@@ -0,0 +1,207 @@
+/*
+ * vcan.c - Virtual CAN interface
+MODULE_AUTHOR("Urs Thuermann <urs.thuermann@volkswagen.de>");
+
+#ifdef CONFIG_CAN_DEBUG_DEVICES
-+static int debug;
-+module_param(debug, int, S_IRUGO);
++static int vcan_debug;
++module_param_named(debug, vcan_debug, int, S_IRUGO);
+#endif
+
+/* To be moved to linux/can/dev.h */
+#ifdef CONFIG_CAN_DEBUG_DEVICES
-+#define DBG(fmt, args...) (debug & 1 ? \
++#define DBG(fmt, args...) (vcan_debug & 1 ? \
+ printk(KERN_DEBUG "vcan %s: " fmt, \
+ __func__, ##args) : 0)
+#else
+ */
+
+static int echo; /* echo testing. Default: 0 (Off) */
-+module_param(echo, int, S_IRUGO);
++module_param(echo, bool, S_IRUGO);
+MODULE_PARM_DESC(echo, "Echo sent frames (for testing). Default: 0 (Off)");
+
+
+module_exit(vcan_cleanup_module);
Index: net-2.6.24/net/can/Kconfig
===================================================================
---- net-2.6.24.orig/net/can/Kconfig 2007-10-02 12:03:28.000000000 +0200
-+++ net-2.6.24/net/can/Kconfig 2007-10-02 12:03:30.000000000 +0200
+--- net-2.6.24.orig/net/can/Kconfig 2007-10-05 11:17:28.000000000 +0200
++++ net-2.6.24/net/can/Kconfig 2007-10-05 11:18:19.000000000 +0200
@@ -47,3 +47,6 @@
Say Y here if you want the CAN core to produce a bunch of debug
- messages to the system log. Select this if you are having a
- problem with CAN support and want to see more of what is going on.
+ messages. Select this if you are having a problem with CAN
+ support and want to see more of what is going on.
+
+
+source "drivers/net/can/Kconfig"
SUBJECT
-CAN: Add new PF_CAN protocol family, try #9
+CAN: Add new PF_CAN protocol family, try #10
ESUBJECT
Hello Dave, hello Patrick,
-this is the nineth post of the patch series that adds the PF_CAN
+this is the tenth post of the patch series that adds the PF_CAN
protocol family for the Controller Area Network.
-Since our last post we have changed the following:
+We've fixed some cosmetic issues as remarked by Arnaldo:
+
+* Rename our static debug variables to {can,raw,bcm,vcan}_debug.
+* Use module_param_named() so that the module option names remain.
+* Remove raw_poll() and bcm_poll() functions and use datagram_poll instead.
+* Cleanup of can_addr union in sockaddr_can.
+* Change type of echo module parameter to boolean.
+
+Thanks to all reviewers for the constructive feedback!
+
+Regards,
+urs
+
+
+
+The changes in try #9 were:
* Changes suggested by Arnaldo Carvalho de Melo:
- Use gfp_any() instead of checking in_interrupt().
This patch series applies against net-2.6.24 and is derived from Subversion
-revision r511 of http://svn.berlios.de/svnroot/repos/socketcan.
+revision r522 of http://svn.berlios.de/svnroot/repos/socketcan.
It can be found in the directory
http://svn.berlios.de/svnroot/repos/socketcan/trunk/patch-series/<version>.