Lines Matching full:can

3  * proc.c - procfs support for Protocol family CAN core module
48 #include <linux/can/can-ml.h>
49 #include <linux/can/core.h>
81 struct can_pkg_stats *pkg_stats = net->can.pkg_stats; in can_init_stats()
82 struct can_rcv_lists_stats *rcv_lists_stats = net->can.rcv_lists_stats; in can_init_stats()
109 printk(KERN_ERR "can: calc_rate: count exceeded! %ld\n", in calc_rate()
121 struct net *net = from_timer(net, t, can.stattimer); in can_stat_update()
122 struct can_pkg_stats *pkg_stats = net->can.pkg_stats; in can_stat_update()
180 mod_timer(&net->can.stattimer, round_jiffies(jiffies + HZ)); in can_stat_update()
215 struct can_pkg_stats *pkg_stats = net->can.pkg_stats; in can_stats_proc_show()
216 struct can_rcv_lists_stats *rcv_lists_stats = net->can.rcv_lists_stats; in can_stats_proc_show()
225 if (net->can.stattimer.function == can_stat_update) { in can_stats_proc_show()
277 struct can_rcv_lists_stats *rcv_lists_stats = net->can.rcv_lists_stats; in can_reset_stats_proc_show()
278 struct can_pkg_stats *pkg_stats = net->can.pkg_stats; in can_reset_stats_proc_show()
282 if (net->can.stattimer.function == can_stat_update) { in can_reset_stats_proc_show()
319 /* receive list for 'all' CAN devices (dev == NULL) */ in can_rcvlist_proc_show()
320 dev_rcv_lists = net->can.rx_alldev_list; in can_rcvlist_proc_show()
323 /* receive list for registered CAN devices */ in can_rcvlist_proc_show()
371 /* sff receive list for 'all' CAN devices (dev == NULL) */ in can_rcvlist_sff_proc_show()
372 dev_rcv_lists = net->can.rx_alldev_list; in can_rcvlist_sff_proc_show()
376 /* sff receive list for registered CAN devices */ in can_rcvlist_sff_proc_show()
402 /* eff receive list for 'all' CAN devices (dev == NULL) */ in can_rcvlist_eff_proc_show()
403 dev_rcv_lists = net->can.rx_alldev_list; in can_rcvlist_eff_proc_show()
407 /* eff receive list for registered CAN devices */ in can_rcvlist_eff_proc_show()
423 * can_init_proc - create main CAN proc directory and procfs entries
427 /* create /proc/net/can directory */ in can_init_proc()
428 net->can.proc_dir = proc_net_mkdir(net, "can", net->proc_net); in can_init_proc()
430 if (!net->can.proc_dir) { in can_init_proc()
431 printk(KERN_INFO "can: failed to create /proc/net/can . " in can_init_proc()
437 net->can.pde_stats = proc_create_net_single(CAN_PROC_STATS, 0644, in can_init_proc()
438 net->can.proc_dir, can_stats_proc_show, NULL); in can_init_proc()
439 net->can.pde_reset_stats = proc_create_net_single(CAN_PROC_RESET_STATS, in can_init_proc()
440 0644, net->can.proc_dir, can_reset_stats_proc_show, in can_init_proc()
442 net->can.pde_rcvlist_err = proc_create_net_single(CAN_PROC_RCVLIST_ERR, in can_init_proc()
443 0644, net->can.proc_dir, can_rcvlist_proc_show, in can_init_proc()
445 net->can.pde_rcvlist_all = proc_create_net_single(CAN_PROC_RCVLIST_ALL, in can_init_proc()
446 0644, net->can.proc_dir, can_rcvlist_proc_show, in can_init_proc()
448 net->can.pde_rcvlist_fil = proc_create_net_single(CAN_PROC_RCVLIST_FIL, in can_init_proc()
449 0644, net->can.proc_dir, can_rcvlist_proc_show, in can_init_proc()
451 net->can.pde_rcvlist_inv = proc_create_net_single(CAN_PROC_RCVLIST_INV, in can_init_proc()
452 0644, net->can.proc_dir, can_rcvlist_proc_show, in can_init_proc()
454 net->can.pde_rcvlist_eff = proc_create_net_single(CAN_PROC_RCVLIST_EFF, in can_init_proc()
455 0644, net->can.proc_dir, can_rcvlist_eff_proc_show, NULL); in can_init_proc()
456 net->can.pde_rcvlist_sff = proc_create_net_single(CAN_PROC_RCVLIST_SFF, in can_init_proc()
457 0644, net->can.proc_dir, can_rcvlist_sff_proc_show, NULL); in can_init_proc()
461 * can_remove_proc - remove procfs entries and main CAN proc directory
465 if (!net->can.proc_dir) in can_remove_proc()
468 if (net->can.pde_stats) in can_remove_proc()
469 remove_proc_entry(CAN_PROC_STATS, net->can.proc_dir); in can_remove_proc()
471 if (net->can.pde_reset_stats) in can_remove_proc()
472 remove_proc_entry(CAN_PROC_RESET_STATS, net->can.proc_dir); in can_remove_proc()
474 if (net->can.pde_rcvlist_err) in can_remove_proc()
475 remove_proc_entry(CAN_PROC_RCVLIST_ERR, net->can.proc_dir); in can_remove_proc()
477 if (net->can.pde_rcvlist_all) in can_remove_proc()
478 remove_proc_entry(CAN_PROC_RCVLIST_ALL, net->can.proc_dir); in can_remove_proc()
480 if (net->can.pde_rcvlist_fil) in can_remove_proc()
481 remove_proc_entry(CAN_PROC_RCVLIST_FIL, net->can.proc_dir); in can_remove_proc()
483 if (net->can.pde_rcvlist_inv) in can_remove_proc()
484 remove_proc_entry(CAN_PROC_RCVLIST_INV, net->can.proc_dir); in can_remove_proc()
486 if (net->can.pde_rcvlist_eff) in can_remove_proc()
487 remove_proc_entry(CAN_PROC_RCVLIST_EFF, net->can.proc_dir); in can_remove_proc()
489 if (net->can.pde_rcvlist_sff) in can_remove_proc()
490 remove_proc_entry(CAN_PROC_RCVLIST_SFF, net->can.proc_dir); in can_remove_proc()
492 remove_proc_entry("can", net->proc_net); in can_remove_proc()