{
        return (struct trh_hdr *)skb_mac_header(skb);
 }
-#ifdef CONFIG_SYSCTL
-extern struct ctl_table tr_table[];
-#endif
 #endif
 
 /* This is an Token-Ring LLC structure */
 
 #
 
 # Check the p8022 selections against net/core/Makefile.
-obj-$(CONFIG_SYSCTL)   += sysctl_net_802.o
 obj-$(CONFIG_LLC)      += p8022.o psnap.o
-obj-$(CONFIG_TR)       += p8022.o psnap.o tr.o sysctl_net_802.o
+obj-$(CONFIG_TR)       += p8022.o psnap.o tr.o
 obj-$(CONFIG_NET_FC)   +=                 fc.o
 obj-$(CONFIG_FDDI)     +=                 fddi.o
 obj-$(CONFIG_HIPPI)    +=                 hippi.o
 
+++ /dev/null
-/* -*- linux-c -*-
- *             sysctl_net_802.c: sysctl interface to net 802 subsystem.
- *
- *             Begun April 1, 1996, Mike Shaver.
- *             Added /proc/sys/net/802 directory entry (empty =) ). [MS]
- *
- *             This program is free software; you can redistribute it and/or
- *             modify it under the terms of the GNU General Public License
- *             as published by the Free Software Foundation; either version
- *             2 of the License, or (at your option) any later version.
- */
-
-#include <linux/mm.h>
-#include <linux/if_tr.h>
-#include <linux/sysctl.h>
-
-#ifdef CONFIG_TR
-extern int sysctl_tr_rif_timeout;
-#endif
-
-struct ctl_table tr_table[] = {
-#ifdef CONFIG_TR
-       {
-               .ctl_name       = NET_TR_RIF_TIMEOUT,
-               .procname       = "rif_timeout",
-               .data           = &sysctl_tr_rif_timeout,
-               .maxlen         = sizeof(int),
-               .mode           = 0644,
-               .proc_handler   = &proc_dointvec
-       },
-#endif /* CONFIG_TR */
-       { 0 },
-};
 
 #include <linux/proc_fs.h>
 #include <linux/seq_file.h>
 #include <linux/init.h>
+#include <linux/sysctl.h>
 #include <net/arp.h>
 #include <net/net_namespace.h>
 
        return alloc_netdev(sizeof_priv, "tr%d", tr_setup);
 }
 
+#ifdef CONFIG_SYSCTL
+static struct ctl_table tr_table[] = {
+       {
+               .ctl_name       = NET_TR_RIF_TIMEOUT,
+               .procname       = "rif_timeout",
+               .data           = &sysctl_tr_rif_timeout,
+               .maxlen         = sizeof(int),
+               .mode           = 0644,
+               .proc_handler   = &proc_dointvec
+       },
+       { 0 },
+};
+
+static __initdata struct ctl_path tr_path[] = {
+       { .procname = "net", .ctl_name = CTL_NET, },
+       { .procname = "token-ring", .ctl_name = NET_TR, },
+       { }
+};
+#endif
+
 /*
  *     Called during bootup.  We don't actually have to initialise
  *     too much for this.
        rif_timer.expires  = jiffies + sysctl_tr_rif_timeout;
        setup_timer(&rif_timer, rif_check_expire, 0);
        add_timer(&rif_timer);
-
+#ifdef CONFIG_SYSCTL
+       register_sysctl_paths(tr_path, tr_table);
+#endif
        proc_net_fops_create(&init_net, "tr_rif", S_IRUGO, &rif_seq_fops);
        return 0;
 }
 
 #endif
 
 struct ctl_table net_table[] = {
-#ifdef CONFIG_TR
-       {
-               .ctl_name       = NET_TR,
-               .procname       = "token-ring",
-               .mode           = 0555,
-               .child          = tr_table,
-       },
-#endif
        { 0 },
 };