aboutsummaryrefslogtreecommitdiffstats
path: root/net/netrom
diff options
context:
space:
mode:
Diffstat (limited to 'net/netrom')
-rw-r--r--net/netrom/af_netrom.c29
-rw-r--r--net/netrom/nr_dev.c1
-rw-r--r--net/netrom/nr_in.c1
-rw-r--r--net/netrom/nr_loopback.c1
-rw-r--r--net/netrom/nr_out.c1
-rw-r--r--net/netrom/nr_route.c80
-rw-r--r--net/netrom/nr_subr.c1
-rw-r--r--net/netrom/sysctl_net_netrom.c30
8 files changed, 40 insertions, 104 deletions
diff --git a/net/netrom/af_netrom.c b/net/netrom/af_netrom.c
index 7a834952f67f..fa07f044b599 100644
--- a/net/netrom/af_netrom.c
+++ b/net/netrom/af_netrom.c
@@ -15,6 +15,7 @@
15#include <linux/types.h> 15#include <linux/types.h>
16#include <linux/socket.h> 16#include <linux/socket.h>
17#include <linux/in.h> 17#include <linux/in.h>
18#include <linux/slab.h>
18#include <linux/kernel.h> 19#include <linux/kernel.h>
19#include <linux/sched.h> 20#include <linux/sched.h>
20#include <linux/timer.h> 21#include <linux/timer.h>
@@ -425,12 +426,13 @@ static struct proto nr_proto = {
425 .obj_size = sizeof(struct nr_sock), 426 .obj_size = sizeof(struct nr_sock),
426}; 427};
427 428
428static int nr_create(struct net *net, struct socket *sock, int protocol) 429static int nr_create(struct net *net, struct socket *sock, int protocol,
430 int kern)
429{ 431{
430 struct sock *sk; 432 struct sock *sk;
431 struct nr_sock *nr; 433 struct nr_sock *nr;
432 434
433 if (net != &init_net) 435 if (!net_eq(net, &init_net))
434 return -EAFNOSUPPORT; 436 return -EAFNOSUPPORT;
435 437
436 if (sock->type != SOCK_SEQPACKET || protocol != 0) 438 if (sock->type != SOCK_SEQPACKET || protocol != 0)
@@ -1266,28 +1268,13 @@ static int nr_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
1266 1268
1267static void *nr_info_start(struct seq_file *seq, loff_t *pos) 1269static void *nr_info_start(struct seq_file *seq, loff_t *pos)
1268{ 1270{
1269 struct sock *s;
1270 struct hlist_node *node;
1271 int i = 1;
1272
1273 spin_lock_bh(&nr_list_lock); 1271 spin_lock_bh(&nr_list_lock);
1274 if (*pos == 0) 1272 return seq_hlist_start_head(&nr_list, *pos);
1275 return SEQ_START_TOKEN;
1276
1277 sk_for_each(s, node, &nr_list) {
1278 if (i == *pos)
1279 return s;
1280 ++i;
1281 }
1282 return NULL;
1283} 1273}
1284 1274
1285static void *nr_info_next(struct seq_file *seq, void *v, loff_t *pos) 1275static void *nr_info_next(struct seq_file *seq, void *v, loff_t *pos)
1286{ 1276{
1287 ++*pos; 1277 return seq_hlist_next(v, &nr_list, pos);
1288
1289 return (v == SEQ_START_TOKEN) ? sk_head(&nr_list)
1290 : sk_next((struct sock *)v);
1291} 1278}
1292 1279
1293static void nr_info_stop(struct seq_file *seq, void *v) 1280static void nr_info_stop(struct seq_file *seq, void *v)
@@ -1297,7 +1284,7 @@ static void nr_info_stop(struct seq_file *seq, void *v)
1297 1284
1298static int nr_info_show(struct seq_file *seq, void *v) 1285static int nr_info_show(struct seq_file *seq, void *v)
1299{ 1286{
1300 struct sock *s = v; 1287 struct sock *s = sk_entry(v);
1301 struct net_device *dev; 1288 struct net_device *dev;
1302 struct nr_sock *nr; 1289 struct nr_sock *nr;
1303 const char *devname; 1290 const char *devname;
@@ -1372,7 +1359,7 @@ static const struct file_operations nr_info_fops = {
1372}; 1359};
1373#endif /* CONFIG_PROC_FS */ 1360#endif /* CONFIG_PROC_FS */
1374 1361
1375static struct net_proto_family nr_family_ops = { 1362static const struct net_proto_family nr_family_ops = {
1376 .family = PF_NETROM, 1363 .family = PF_NETROM,
1377 .create = nr_create, 1364 .create = nr_create,
1378 .owner = THIS_MODULE, 1365 .owner = THIS_MODULE,
diff --git a/net/netrom/nr_dev.c b/net/netrom/nr_dev.c
index 7aa11b01b2e2..64e6dde9749d 100644
--- a/net/netrom/nr_dev.c
+++ b/net/netrom/nr_dev.c
@@ -19,6 +19,7 @@
19#include <linux/fcntl.h> 19#include <linux/fcntl.h>
20#include <linux/in.h> 20#include <linux/in.h>
21#include <linux/if_ether.h> /* For the statistics structure. */ 21#include <linux/if_ether.h> /* For the statistics structure. */
22#include <linux/slab.h>
22 23
23#include <asm/system.h> 24#include <asm/system.h>
24#include <asm/uaccess.h> 25#include <asm/uaccess.h>
diff --git a/net/netrom/nr_in.c b/net/netrom/nr_in.c
index 68176483617f..6d4ef6d65b3d 100644
--- a/net/netrom/nr_in.c
+++ b/net/netrom/nr_in.c
@@ -16,6 +16,7 @@
16#include <linux/string.h> 16#include <linux/string.h>
17#include <linux/sockios.h> 17#include <linux/sockios.h>
18#include <linux/net.h> 18#include <linux/net.h>
19#include <linux/slab.h>
19#include <net/ax25.h> 20#include <net/ax25.h>
20#include <linux/inet.h> 21#include <linux/inet.h>
21#include <linux/netdevice.h> 22#include <linux/netdevice.h>
diff --git a/net/netrom/nr_loopback.c b/net/netrom/nr_loopback.c
index f324d5df4186..94d4e922af53 100644
--- a/net/netrom/nr_loopback.c
+++ b/net/netrom/nr_loopback.c
@@ -7,6 +7,7 @@
7 * Copyright Tomi Manninen OH2BNS (oh2bns@sral.fi) 7 * Copyright Tomi Manninen OH2BNS (oh2bns@sral.fi)
8 */ 8 */
9#include <linux/types.h> 9#include <linux/types.h>
10#include <linux/slab.h>
10#include <linux/socket.h> 11#include <linux/socket.h>
11#include <linux/timer.h> 12#include <linux/timer.h>
12#include <net/ax25.h> 13#include <net/ax25.h>
diff --git a/net/netrom/nr_out.c b/net/netrom/nr_out.c
index e3e6c44e1890..607fddb4fdbb 100644
--- a/net/netrom/nr_out.c
+++ b/net/netrom/nr_out.c
@@ -16,6 +16,7 @@
16#include <linux/string.h> 16#include <linux/string.h>
17#include <linux/sockios.h> 17#include <linux/sockios.h>
18#include <linux/net.h> 18#include <linux/net.h>
19#include <linux/slab.h>
19#include <net/ax25.h> 20#include <net/ax25.h>
20#include <linux/inet.h> 21#include <linux/inet.h>
21#include <linux/netdevice.h> 22#include <linux/netdevice.h>
diff --git a/net/netrom/nr_route.c b/net/netrom/nr_route.c
index 4eb1ac9a7679..44059d0c8dd1 100644
--- a/net/netrom/nr_route.c
+++ b/net/netrom/nr_route.c
@@ -17,6 +17,7 @@
17#include <linux/string.h> 17#include <linux/string.h>
18#include <linux/sockios.h> 18#include <linux/sockios.h>
19#include <linux/net.h> 19#include <linux/net.h>
20#include <linux/slab.h>
20#include <net/ax25.h> 21#include <net/ax25.h>
21#include <linux/inet.h> 22#include <linux/inet.h>
22#include <linux/netdevice.h> 23#include <linux/netdevice.h>
@@ -597,15 +598,15 @@ struct net_device *nr_dev_first(void)
597{ 598{
598 struct net_device *dev, *first = NULL; 599 struct net_device *dev, *first = NULL;
599 600
600 read_lock(&dev_base_lock); 601 rcu_read_lock();
601 for_each_netdev(&init_net, dev) { 602 for_each_netdev_rcu(&init_net, dev) {
602 if ((dev->flags & IFF_UP) && dev->type == ARPHRD_NETROM) 603 if ((dev->flags & IFF_UP) && dev->type == ARPHRD_NETROM)
603 if (first == NULL || strncmp(dev->name, first->name, 3) < 0) 604 if (first == NULL || strncmp(dev->name, first->name, 3) < 0)
604 first = dev; 605 first = dev;
605 } 606 }
606 if (first) 607 if (first)
607 dev_hold(first); 608 dev_hold(first);
608 read_unlock(&dev_base_lock); 609 rcu_read_unlock();
609 610
610 return first; 611 return first;
611} 612}
@@ -617,16 +618,17 @@ struct net_device *nr_dev_get(ax25_address *addr)
617{ 618{
618 struct net_device *dev; 619 struct net_device *dev;
619 620
620 read_lock(&dev_base_lock); 621 rcu_read_lock();
621 for_each_netdev(&init_net, dev) { 622 for_each_netdev_rcu(&init_net, dev) {
622 if ((dev->flags & IFF_UP) && dev->type == ARPHRD_NETROM && ax25cmp(addr, (ax25_address *)dev->dev_addr) == 0) { 623 if ((dev->flags & IFF_UP) && dev->type == ARPHRD_NETROM &&
624 ax25cmp(addr, (ax25_address *)dev->dev_addr) == 0) {
623 dev_hold(dev); 625 dev_hold(dev);
624 goto out; 626 goto out;
625 } 627 }
626 } 628 }
627 dev = NULL; 629 dev = NULL;
628out: 630out:
629 read_unlock(&dev_base_lock); 631 rcu_read_unlock();
630 return dev; 632 return dev;
631} 633}
632 634
@@ -842,12 +844,13 @@ int nr_route_frame(struct sk_buff *skb, ax25_cb *ax25)
842 dptr = skb_push(skb, 1); 844 dptr = skb_push(skb, 1);
843 *dptr = AX25_P_NETROM; 845 *dptr = AX25_P_NETROM;
844 846
845 ax25s = ax25_send_frame(skb, 256, (ax25_address *)dev->dev_addr, &nr_neigh->callsign, nr_neigh->digipeat, nr_neigh->dev); 847 ax25s = nr_neigh->ax25;
846 if (nr_neigh->ax25 && ax25s) { 848 nr_neigh->ax25 = ax25_send_frame(skb, 256,
847 /* We were already holding this ax25_cb */ 849 (ax25_address *)dev->dev_addr,
850 &nr_neigh->callsign,
851 nr_neigh->digipeat, nr_neigh->dev);
852 if (ax25s)
848 ax25_cb_put(ax25s); 853 ax25_cb_put(ax25s);
849 }
850 nr_neigh->ax25 = ax25s;
851 854
852 dev_put(dev); 855 dev_put(dev);
853 ret = (nr_neigh->ax25 != NULL); 856 ret = (nr_neigh->ax25 != NULL);
@@ -861,33 +864,13 @@ int nr_route_frame(struct sk_buff *skb, ax25_cb *ax25)
861 864
862static void *nr_node_start(struct seq_file *seq, loff_t *pos) 865static void *nr_node_start(struct seq_file *seq, loff_t *pos)
863{ 866{
864 struct nr_node *nr_node;
865 struct hlist_node *node;
866 int i = 1;
867
868 spin_lock_bh(&nr_node_list_lock); 867 spin_lock_bh(&nr_node_list_lock);
869 if (*pos == 0) 868 return seq_hlist_start_head(&nr_node_list, *pos);
870 return SEQ_START_TOKEN;
871
872 nr_node_for_each(nr_node, node, &nr_node_list) {
873 if (i == *pos)
874 return nr_node;
875 ++i;
876 }
877
878 return NULL;
879} 869}
880 870
881static void *nr_node_next(struct seq_file *seq, void *v, loff_t *pos) 871static void *nr_node_next(struct seq_file *seq, void *v, loff_t *pos)
882{ 872{
883 struct hlist_node *node; 873 return seq_hlist_next(v, &nr_node_list, pos);
884 ++*pos;
885
886 node = (v == SEQ_START_TOKEN)
887 ? nr_node_list.first
888 : ((struct nr_node *)v)->node_node.next;
889
890 return hlist_entry(node, struct nr_node, node_node);
891} 874}
892 875
893static void nr_node_stop(struct seq_file *seq, void *v) 876static void nr_node_stop(struct seq_file *seq, void *v)
@@ -904,7 +887,9 @@ static int nr_node_show(struct seq_file *seq, void *v)
904 seq_puts(seq, 887 seq_puts(seq,
905 "callsign mnemonic w n qual obs neigh qual obs neigh qual obs neigh\n"); 888 "callsign mnemonic w n qual obs neigh qual obs neigh qual obs neigh\n");
906 else { 889 else {
907 struct nr_node *nr_node = v; 890 struct nr_node *nr_node = hlist_entry(v, struct nr_node,
891 node_node);
892
908 nr_node_lock(nr_node); 893 nr_node_lock(nr_node);
909 seq_printf(seq, "%-9s %-7s %d %d", 894 seq_printf(seq, "%-9s %-7s %d %d",
910 ax2asc(buf, &nr_node->callsign), 895 ax2asc(buf, &nr_node->callsign),
@@ -947,31 +932,13 @@ const struct file_operations nr_nodes_fops = {
947 932
948static void *nr_neigh_start(struct seq_file *seq, loff_t *pos) 933static void *nr_neigh_start(struct seq_file *seq, loff_t *pos)
949{ 934{
950 struct nr_neigh *nr_neigh;
951 struct hlist_node *node;
952 int i = 1;
953
954 spin_lock_bh(&nr_neigh_list_lock); 935 spin_lock_bh(&nr_neigh_list_lock);
955 if (*pos == 0) 936 return seq_hlist_start_head(&nr_neigh_list, *pos);
956 return SEQ_START_TOKEN;
957
958 nr_neigh_for_each(nr_neigh, node, &nr_neigh_list) {
959 if (i == *pos)
960 return nr_neigh;
961 }
962 return NULL;
963} 937}
964 938
965static void *nr_neigh_next(struct seq_file *seq, void *v, loff_t *pos) 939static void *nr_neigh_next(struct seq_file *seq, void *v, loff_t *pos)
966{ 940{
967 struct hlist_node *node; 941 return seq_hlist_next(v, &nr_neigh_list, pos);
968 ++*pos;
969
970 node = (v == SEQ_START_TOKEN)
971 ? nr_neigh_list.first
972 : ((struct nr_neigh *)v)->neigh_node.next;
973
974 return hlist_entry(node, struct nr_neigh, neigh_node);
975} 942}
976 943
977static void nr_neigh_stop(struct seq_file *seq, void *v) 944static void nr_neigh_stop(struct seq_file *seq, void *v)
@@ -987,8 +954,9 @@ static int nr_neigh_show(struct seq_file *seq, void *v)
987 if (v == SEQ_START_TOKEN) 954 if (v == SEQ_START_TOKEN)
988 seq_puts(seq, "addr callsign dev qual lock count failed digipeaters\n"); 955 seq_puts(seq, "addr callsign dev qual lock count failed digipeaters\n");
989 else { 956 else {
990 struct nr_neigh *nr_neigh = v; 957 struct nr_neigh *nr_neigh;
991 958
959 nr_neigh = hlist_entry(v, struct nr_neigh, neigh_node);
992 seq_printf(seq, "%05d %-9s %-4s %3d %d %3d %3d", 960 seq_printf(seq, "%05d %-9s %-4s %3d %d %3d %3d",
993 nr_neigh->number, 961 nr_neigh->number,
994 ax2asc(buf, &nr_neigh->callsign), 962 ax2asc(buf, &nr_neigh->callsign),
diff --git a/net/netrom/nr_subr.c b/net/netrom/nr_subr.c
index 04e7d0d2fd8f..6a947ae50dbd 100644
--- a/net/netrom/nr_subr.c
+++ b/net/netrom/nr_subr.c
@@ -15,6 +15,7 @@
15#include <linux/string.h> 15#include <linux/string.h>
16#include <linux/sockios.h> 16#include <linux/sockios.h>
17#include <linux/net.h> 17#include <linux/net.h>
18#include <linux/slab.h>
18#include <net/ax25.h> 19#include <net/ax25.h>
19#include <linux/inet.h> 20#include <linux/inet.h>
20#include <linux/netdevice.h> 21#include <linux/netdevice.h>
diff --git a/net/netrom/sysctl_net_netrom.c b/net/netrom/sysctl_net_netrom.c
index 7b49591fe87c..1e0fa9e57aac 100644
--- a/net/netrom/sysctl_net_netrom.c
+++ b/net/netrom/sysctl_net_netrom.c
@@ -36,143 +36,119 @@ static struct ctl_table_header *nr_table_header;
36 36
37static ctl_table nr_table[] = { 37static ctl_table nr_table[] = {
38 { 38 {
39 .ctl_name = NET_NETROM_DEFAULT_PATH_QUALITY,
40 .procname = "default_path_quality", 39 .procname = "default_path_quality",
41 .data = &sysctl_netrom_default_path_quality, 40 .data = &sysctl_netrom_default_path_quality,
42 .maxlen = sizeof(int), 41 .maxlen = sizeof(int),
43 .mode = 0644, 42 .mode = 0644,
44 .proc_handler = proc_dointvec_minmax, 43 .proc_handler = proc_dointvec_minmax,
45 .strategy = sysctl_intvec,
46 .extra1 = &min_quality, 44 .extra1 = &min_quality,
47 .extra2 = &max_quality 45 .extra2 = &max_quality
48 }, 46 },
49 { 47 {
50 .ctl_name = NET_NETROM_OBSOLESCENCE_COUNT_INITIALISER,
51 .procname = "obsolescence_count_initialiser", 48 .procname = "obsolescence_count_initialiser",
52 .data = &sysctl_netrom_obsolescence_count_initialiser, 49 .data = &sysctl_netrom_obsolescence_count_initialiser,
53 .maxlen = sizeof(int), 50 .maxlen = sizeof(int),
54 .mode = 0644, 51 .mode = 0644,
55 .proc_handler = proc_dointvec_minmax, 52 .proc_handler = proc_dointvec_minmax,
56 .strategy = sysctl_intvec,
57 .extra1 = &min_obs, 53 .extra1 = &min_obs,
58 .extra2 = &max_obs 54 .extra2 = &max_obs
59 }, 55 },
60 { 56 {
61 .ctl_name = NET_NETROM_NETWORK_TTL_INITIALISER,
62 .procname = "network_ttl_initialiser", 57 .procname = "network_ttl_initialiser",
63 .data = &sysctl_netrom_network_ttl_initialiser, 58 .data = &sysctl_netrom_network_ttl_initialiser,
64 .maxlen = sizeof(int), 59 .maxlen = sizeof(int),
65 .mode = 0644, 60 .mode = 0644,
66 .proc_handler = proc_dointvec_minmax, 61 .proc_handler = proc_dointvec_minmax,
67 .strategy = sysctl_intvec,
68 .extra1 = &min_ttl, 62 .extra1 = &min_ttl,
69 .extra2 = &max_ttl 63 .extra2 = &max_ttl
70 }, 64 },
71 { 65 {
72 .ctl_name = NET_NETROM_TRANSPORT_TIMEOUT,
73 .procname = "transport_timeout", 66 .procname = "transport_timeout",
74 .data = &sysctl_netrom_transport_timeout, 67 .data = &sysctl_netrom_transport_timeout,
75 .maxlen = sizeof(int), 68 .maxlen = sizeof(int),
76 .mode = 0644, 69 .mode = 0644,
77 .proc_handler = proc_dointvec_minmax, 70 .proc_handler = proc_dointvec_minmax,
78 .strategy = sysctl_intvec,
79 .extra1 = &min_t1, 71 .extra1 = &min_t1,
80 .extra2 = &max_t1 72 .extra2 = &max_t1
81 }, 73 },
82 { 74 {
83 .ctl_name = NET_NETROM_TRANSPORT_MAXIMUM_TRIES,
84 .procname = "transport_maximum_tries", 75 .procname = "transport_maximum_tries",
85 .data = &sysctl_netrom_transport_maximum_tries, 76 .data = &sysctl_netrom_transport_maximum_tries,
86 .maxlen = sizeof(int), 77 .maxlen = sizeof(int),
87 .mode = 0644, 78 .mode = 0644,
88 .proc_handler = proc_dointvec_minmax, 79 .proc_handler = proc_dointvec_minmax,
89 .strategy = sysctl_intvec,
90 .extra1 = &min_n2, 80 .extra1 = &min_n2,
91 .extra2 = &max_n2 81 .extra2 = &max_n2
92 }, 82 },
93 { 83 {
94 .ctl_name = NET_NETROM_TRANSPORT_ACKNOWLEDGE_DELAY,
95 .procname = "transport_acknowledge_delay", 84 .procname = "transport_acknowledge_delay",
96 .data = &sysctl_netrom_transport_acknowledge_delay, 85 .data = &sysctl_netrom_transport_acknowledge_delay,
97 .maxlen = sizeof(int), 86 .maxlen = sizeof(int),
98 .mode = 0644, 87 .mode = 0644,
99 .proc_handler = proc_dointvec_minmax, 88 .proc_handler = proc_dointvec_minmax,
100 .strategy = sysctl_intvec,
101 .extra1 = &min_t2, 89 .extra1 = &min_t2,
102 .extra2 = &max_t2 90 .extra2 = &max_t2
103 }, 91 },
104 { 92 {
105 .ctl_name = NET_NETROM_TRANSPORT_BUSY_DELAY,
106 .procname = "transport_busy_delay", 93 .procname = "transport_busy_delay",
107 .data = &sysctl_netrom_transport_busy_delay, 94 .data = &sysctl_netrom_transport_busy_delay,
108 .maxlen = sizeof(int), 95 .maxlen = sizeof(int),
109 .mode = 0644, 96 .mode = 0644,
110 .proc_handler = proc_dointvec_minmax, 97 .proc_handler = proc_dointvec_minmax,
111 .strategy = sysctl_intvec,
112 .extra1 = &min_t4, 98 .extra1 = &min_t4,
113 .extra2 = &max_t4 99 .extra2 = &max_t4
114 }, 100 },
115 { 101 {
116 .ctl_name = NET_NETROM_TRANSPORT_REQUESTED_WINDOW_SIZE,
117 .procname = "transport_requested_window_size", 102 .procname = "transport_requested_window_size",
118 .data = &sysctl_netrom_transport_requested_window_size, 103 .data = &sysctl_netrom_transport_requested_window_size,
119 .maxlen = sizeof(int), 104 .maxlen = sizeof(int),
120 .mode = 0644, 105 .mode = 0644,
121 .proc_handler = proc_dointvec_minmax, 106 .proc_handler = proc_dointvec_minmax,
122 .strategy = sysctl_intvec,
123 .extra1 = &min_window, 107 .extra1 = &min_window,
124 .extra2 = &max_window 108 .extra2 = &max_window
125 }, 109 },
126 { 110 {
127 .ctl_name = NET_NETROM_TRANSPORT_NO_ACTIVITY_TIMEOUT,
128 .procname = "transport_no_activity_timeout", 111 .procname = "transport_no_activity_timeout",
129 .data = &sysctl_netrom_transport_no_activity_timeout, 112 .data = &sysctl_netrom_transport_no_activity_timeout,
130 .maxlen = sizeof(int), 113 .maxlen = sizeof(int),
131 .mode = 0644, 114 .mode = 0644,
132 .proc_handler = proc_dointvec_minmax, 115 .proc_handler = proc_dointvec_minmax,
133 .strategy = sysctl_intvec,
134 .extra1 = &min_idle, 116 .extra1 = &min_idle,
135 .extra2 = &max_idle 117 .extra2 = &max_idle
136 }, 118 },
137 { 119 {
138 .ctl_name = NET_NETROM_ROUTING_CONTROL,
139 .procname = "routing_control", 120 .procname = "routing_control",
140 .data = &sysctl_netrom_routing_control, 121 .data = &sysctl_netrom_routing_control,
141 .maxlen = sizeof(int), 122 .maxlen = sizeof(int),
142 .mode = 0644, 123 .mode = 0644,
143 .proc_handler = proc_dointvec_minmax, 124 .proc_handler = proc_dointvec_minmax,
144 .strategy = sysctl_intvec,
145 .extra1 = &min_route, 125 .extra1 = &min_route,
146 .extra2 = &max_route 126 .extra2 = &max_route
147 }, 127 },
148 { 128 {
149 .ctl_name = NET_NETROM_LINK_FAILS_COUNT,
150 .procname = "link_fails_count", 129 .procname = "link_fails_count",
151 .data = &sysctl_netrom_link_fails_count, 130 .data = &sysctl_netrom_link_fails_count,
152 .maxlen = sizeof(int), 131 .maxlen = sizeof(int),
153 .mode = 0644, 132 .mode = 0644,
154 .proc_handler = proc_dointvec_minmax, 133 .proc_handler = proc_dointvec_minmax,
155 .strategy = sysctl_intvec,
156 .extra1 = &min_fails, 134 .extra1 = &min_fails,
157 .extra2 = &max_fails 135 .extra2 = &max_fails
158 }, 136 },
159 { 137 {
160 .ctl_name = NET_NETROM_RESET,
161 .procname = "reset", 138 .procname = "reset",
162 .data = &sysctl_netrom_reset_circuit, 139 .data = &sysctl_netrom_reset_circuit,
163 .maxlen = sizeof(int), 140 .maxlen = sizeof(int),
164 .mode = 0644, 141 .mode = 0644,
165 .proc_handler = proc_dointvec_minmax, 142 .proc_handler = proc_dointvec_minmax,
166 .strategy = sysctl_intvec,
167 .extra1 = &min_reset, 143 .extra1 = &min_reset,
168 .extra2 = &max_reset 144 .extra2 = &max_reset
169 }, 145 },
170 { .ctl_name = 0 } 146 { }
171}; 147};
172 148
173static struct ctl_path nr_path[] = { 149static struct ctl_path nr_path[] = {
174 { .procname = "net", .ctl_name = CTL_NET, }, 150 { .procname = "net", },
175 { .procname = "netrom", .ctl_name = NET_NETROM, }, 151 { .procname = "netrom", },
176 { } 152 { }
177}; 153};
178 154