/* function prototypes for the CAN networklayer core (af_can.c) */
-void can_debug_skb(struct sk_buff *skb);
-void can_debug_cframe(const char *msg, struct can_frame *cframe, ...);
-
int can_proto_register(struct can_proto *cp);
int can_proto_unregister(struct can_proto *cp);
unsigned long timeval2jiffies(struct timeval *tv, int round_up);
+#ifdef CONFIG_CAN_DEBUG_CORE
+void can_debug_skb(struct sk_buff *skb);
+void can_debug_cframe(const char *msg, struct can_frame *cframe, ...);
+#define DBG(args...) (debug & 1 ? \
+ (printk(KERN_DEBUG "can-%s %s: ", \
+ IDENT, __func__), printk(args)) : 0)
+#define DBG_FRAME(args...) (debug & 2 ? can_debug_cframe(args) : 0)
+#define DBG_SKB(skb) (debug & 4 ? can_debug_skb(skb) : 0)
+#else
+#define DBG(args...)
+#define DBG_FRAME(args...)
+#define DBG_SKB(skb)
+#endif
+
#endif /* CAN_CORE_H */
#include <linux/can/version.h> /* for RCSID. Removed by mkpatch script */
RCSID("$Id$");
-#define IDENT "af_can"
+#define IDENT "core"
static __initdata const char banner[] =
KERN_INFO "CAN: Controller Area Network PF_CAN core " CAN_VERSION "\n";
int stats_timer = 1; /* default: on */
module_param(stats_timer, int, S_IRUGO);
+MODULE_PARM_DESC(stats_timer, "enable timer for statistics (default:on)");
#ifdef CONFIG_CAN_DEBUG_CORE
static int debug = 0;
module_param(debug, int, S_IRUGO);
-#define DBG(args...) (debug & 1 ? \
- (printk(KERN_DEBUG "CAN %s: ", __func__), \
- printk(args)) : 0)
-#define DBG_FRAME(args...) (debug & 2 ? can_debug_cframe(args) : 0)
-#define DBG_SKB(skb) (debug & 4 ? can_debug_skb(skb) : 0)
-#else
-#define DBG(args...)
-#define DBG_FRAME(args...)
-#define DBG_SKB(skb)
+MODULE_PARM_DESC(debug, "debug print mask: 1:debug, 2:frames, 4:skbs");
#endif
static __init int can_init(void);
#include <linux/can/version.h> /* for RCSID. Removed by mkpatch script */
RCSID("$Id$");
-#ifdef CONFIG_CAN_DEBUG_CORE
-static int debug = 0;
-module_param(debug, int, S_IRUGO);
-#define DBG(args...) (debug & 1 ? \
- (printk(KERN_DEBUG "BCM %s: ", __func__), \
- printk(args)) : 0)
-#define DBG_FRAME(args...) (debug & 2 ? can_debug_cframe(args) : 0)
-#define DBG_SKB(skb) (debug & 4 ? can_debug_skb(skb) : 0)
-#else
-#define DBG(args...)
-#define DBG_FRAME(args...)
-#define DBG_SKB(skb)
-#endif
-
/* use of last_frames[index].can_dlc */
#define RX_RECV 0x40 /* received data for this element */
#define RX_THR 0x80 /* element not been sent due to throttle feature */
MODULE_LICENSE("Dual BSD/GPL");
MODULE_AUTHOR("Oliver Hartkopp <oliver.hartkopp@volkswagen.de>");
+#ifdef CONFIG_CAN_DEBUG_CORE
+static int debug = 0;
+module_param(debug, int, S_IRUGO);
+MODULE_PARM_DESC(debug, "debug print mask: 1:debug, 2:frames, 4:skbs");
+#endif
+
#define GET_U64(p) (*(u64*)(p)->data) /* easy access */
struct bcm_op {
#ifdef CONFIG_CAN_DEBUG_CORE
static int debug = 0;
module_param(debug, int, S_IRUGO);
-#define DBG(args...) (debug & 1 ? \
- (printk(KERN_DEBUG "RAW %s: ", __func__), \
- printk(args)) : 0)
-#define DBG_SKB(skb) (debug & 4 ? can_debug_skb(skb) : 0)
-#else
-#define DBG(args...)
-#define DBG_SKB(skb)
+MODULE_PARM_DESC(debug, "debug print mask: 1:debug, 2:frames, 4:skbs");
#endif
static int raw_init(struct sock *sk);