aboutsummaryrefslogtreecommitdiffstats
path: root/net/802/tr.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/802/tr.c')
-rw-r--r--net/802/tr.c25
1 files changed, 24 insertions, 1 deletions
diff --git a/net/802/tr.c b/net/802/tr.c
index 151855dd4599..3f16b1720554 100644
--- a/net/802/tr.c
+++ b/net/802/tr.c
@@ -35,6 +35,7 @@
35#include <linux/proc_fs.h> 35#include <linux/proc_fs.h>
36#include <linux/seq_file.h> 36#include <linux/seq_file.h>
37#include <linux/init.h> 37#include <linux/init.h>
38#include <linux/sysctl.h>
38#include <net/arp.h> 39#include <net/arp.h>
39#include <net/net_namespace.h> 40#include <net/net_namespace.h>
40 41
@@ -634,6 +635,26 @@ struct net_device *alloc_trdev(int sizeof_priv)
634 return alloc_netdev(sizeof_priv, "tr%d", tr_setup); 635 return alloc_netdev(sizeof_priv, "tr%d", tr_setup);
635} 636}
636 637
638#ifdef CONFIG_SYSCTL
639static struct ctl_table tr_table[] = {
640 {
641 .ctl_name = NET_TR_RIF_TIMEOUT,
642 .procname = "rif_timeout",
643 .data = &sysctl_tr_rif_timeout,
644 .maxlen = sizeof(int),
645 .mode = 0644,
646 .proc_handler = &proc_dointvec
647 },
648 { 0 },
649};
650
651static __initdata struct ctl_path tr_path[] = {
652 { .procname = "net", .ctl_name = CTL_NET, },
653 { .procname = "token-ring", .ctl_name = NET_TR, },
654 { }
655};
656#endif
657
637/* 658/*
638 * Called during bootup. We don't actually have to initialise 659 * Called during bootup. We don't actually have to initialise
639 * too much for this. 660 * too much for this.
@@ -644,7 +665,9 @@ static int __init rif_init(void)
644 rif_timer.expires = jiffies + sysctl_tr_rif_timeout; 665 rif_timer.expires = jiffies + sysctl_tr_rif_timeout;
645 setup_timer(&rif_timer, rif_check_expire, 0); 666 setup_timer(&rif_timer, rif_check_expire, 0);
646 add_timer(&rif_timer); 667 add_timer(&rif_timer);
647 668#ifdef CONFIG_SYSCTL
669 register_sysctl_paths(tr_path, tr_table);
670#endif
648 proc_net_fops_create(&init_net, "tr_rif", S_IRUGO, &rif_seq_fops); 671 proc_net_fops_create(&init_net, "tr_rif", S_IRUGO, &rif_seq_fops);
649 return 0; 672 return 0;
650} 673}