aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2007-10-18 06:05:33 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-18 17:37:23 -0400
commitf429cd37a21b8efc825bdbb22db7f033564cbc98 (patch)
tree1a6da3cc2c674ebc5b7afabfab16b670658f6038
parentc65f92398ec4ebfcaef91309bf055028a9899d6f (diff)
sysctl: properly register the irda binary sysctl numbers
Grumble. These numbers should have been in sysctl.h from the beginning if we ever expected anyone to use them. Oh well put them there now so we can find them and make maintenance easier. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Acked-by: Samuel Ortiz <samuel@sortiz.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--include/linux/sysctl.h20
-rw-r--r--net/irda/irsysctl.c34
2 files changed, 34 insertions, 20 deletions
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h
index 5ca510b3cbe2..be76464671f0 100644
--- a/include/linux/sysctl.h
+++ b/include/linux/sysctl.h
@@ -238,6 +238,7 @@ enum
238 NET_LLC=18, 238 NET_LLC=18,
239 NET_NETFILTER=19, 239 NET_NETFILTER=19,
240 NET_DCCP=20, 240 NET_DCCP=20,
241 NET_IRDA=412,
241}; 242};
242 243
243/* /proc/sys/kernel/random */ 244/* /proc/sys/kernel/random */
@@ -795,6 +796,25 @@ enum {
795 NET_BRIDGE_NF_FILTER_PPPOE_TAGGED = 5, 796 NET_BRIDGE_NF_FILTER_PPPOE_TAGGED = 5,
796}; 797};
797 798
799/* proc/sys/net/irda */
800enum {
801 NET_IRDA_DISCOVERY=1,
802 NET_IRDA_DEVNAME=2,
803 NET_IRDA_DEBUG=3,
804 NET_IRDA_FAST_POLL=4,
805 NET_IRDA_DISCOVERY_SLOTS=5,
806 NET_IRDA_DISCOVERY_TIMEOUT=6,
807 NET_IRDA_SLOT_TIMEOUT=7,
808 NET_IRDA_MAX_BAUD_RATE=8,
809 NET_IRDA_MIN_TX_TURN_TIME=9,
810 NET_IRDA_MAX_TX_DATA_SIZE=10,
811 NET_IRDA_MAX_TX_WINDOW=11,
812 NET_IRDA_MAX_NOREPLY_TIME=12,
813 NET_IRDA_WARN_NOREPLY_TIME=13,
814 NET_IRDA_LAP_KEEPALIVE_TIME=14,
815};
816
817
798/* CTL_FS names: */ 818/* CTL_FS names: */
799enum 819enum
800{ 820{
diff --git a/net/irda/irsysctl.c b/net/irda/irsysctl.c
index 957e04feb0f7..525343a1c521 100644
--- a/net/irda/irsysctl.c
+++ b/net/irda/irsysctl.c
@@ -31,12 +31,6 @@
31#include <net/irda/irda.h> /* irda_debug */ 31#include <net/irda/irda.h> /* irda_debug */
32#include <net/irda/irias_object.h> 32#include <net/irda/irias_object.h>
33 33
34#define NET_IRDA 412 /* Random number */
35enum { DISCOVERY=1, DEVNAME, DEBUG, FAST_POLL, DISCOVERY_SLOTS,
36 DISCOVERY_TIMEOUT, SLOT_TIMEOUT, MAX_BAUD_RATE, MIN_TX_TURN_TIME,
37 MAX_TX_DATA_SIZE, MAX_TX_WINDOW, MAX_NOREPLY_TIME, WARN_NOREPLY_TIME,
38 LAP_KEEPALIVE_TIME };
39
40extern int sysctl_discovery; 34extern int sysctl_discovery;
41extern int sysctl_discovery_slots; 35extern int sysctl_discovery_slots;
42extern int sysctl_discovery_timeout; 36extern int sysctl_discovery_timeout;
@@ -94,7 +88,7 @@ static int do_devname(ctl_table *table, int write, struct file *filp,
94/* One file */ 88/* One file */
95static ctl_table irda_table[] = { 89static ctl_table irda_table[] = {
96 { 90 {
97 .ctl_name = DISCOVERY, 91 .ctl_name = NET_IRDA_DISCOVERY,
98 .procname = "discovery", 92 .procname = "discovery",
99 .data = &sysctl_discovery, 93 .data = &sysctl_discovery,
100 .maxlen = sizeof(int), 94 .maxlen = sizeof(int),
@@ -102,7 +96,7 @@ static ctl_table irda_table[] = {
102 .proc_handler = &proc_dointvec 96 .proc_handler = &proc_dointvec
103 }, 97 },
104 { 98 {
105 .ctl_name = DEVNAME, 99 .ctl_name = NET_IRDA_DEVNAME,
106 .procname = "devname", 100 .procname = "devname",
107 .data = sysctl_devname, 101 .data = sysctl_devname,
108 .maxlen = 65, 102 .maxlen = 65,
@@ -112,7 +106,7 @@ static ctl_table irda_table[] = {
112 }, 106 },
113#ifdef CONFIG_IRDA_DEBUG 107#ifdef CONFIG_IRDA_DEBUG
114 { 108 {
115 .ctl_name = DEBUG, 109 .ctl_name = NET_IRDA_DEBUG,
116 .procname = "debug", 110 .procname = "debug",
117 .data = &irda_debug, 111 .data = &irda_debug,
118 .maxlen = sizeof(int), 112 .maxlen = sizeof(int),
@@ -122,7 +116,7 @@ static ctl_table irda_table[] = {
122#endif 116#endif
123#ifdef CONFIG_IRDA_FAST_RR 117#ifdef CONFIG_IRDA_FAST_RR
124 { 118 {
125 .ctl_name = FAST_POLL, 119 .ctl_name = NET_IRDA_FAST_POLL,
126 .procname = "fast_poll_increase", 120 .procname = "fast_poll_increase",
127 .data = &sysctl_fast_poll_increase, 121 .data = &sysctl_fast_poll_increase,
128 .maxlen = sizeof(int), 122 .maxlen = sizeof(int),
@@ -131,7 +125,7 @@ static ctl_table irda_table[] = {
131 }, 125 },
132#endif 126#endif
133 { 127 {
134 .ctl_name = DISCOVERY_SLOTS, 128 .ctl_name = NET_IRDA_DISCOVERY_SLOTS,
135 .procname = "discovery_slots", 129 .procname = "discovery_slots",
136 .data = &sysctl_discovery_slots, 130 .data = &sysctl_discovery_slots,
137 .maxlen = sizeof(int), 131 .maxlen = sizeof(int),
@@ -142,7 +136,7 @@ static ctl_table irda_table[] = {
142 .extra2 = &max_discovery_slots 136 .extra2 = &max_discovery_slots
143 }, 137 },
144 { 138 {
145 .ctl_name = DISCOVERY_TIMEOUT, 139 .ctl_name = NET_IRDA_DISCOVERY_TIMEOUT,
146 .procname = "discovery_timeout", 140 .procname = "discovery_timeout",
147 .data = &sysctl_discovery_timeout, 141 .data = &sysctl_discovery_timeout,
148 .maxlen = sizeof(int), 142 .maxlen = sizeof(int),
@@ -150,7 +144,7 @@ static ctl_table irda_table[] = {
150 .proc_handler = &proc_dointvec 144 .proc_handler = &proc_dointvec
151 }, 145 },
152 { 146 {
153 .ctl_name = SLOT_TIMEOUT, 147 .ctl_name = NET_IRDA_SLOT_TIMEOUT,
154 .procname = "slot_timeout", 148 .procname = "slot_timeout",
155 .data = &sysctl_slot_timeout, 149 .data = &sysctl_slot_timeout,
156 .maxlen = sizeof(int), 150 .maxlen = sizeof(int),
@@ -161,7 +155,7 @@ static ctl_table irda_table[] = {
161 .extra2 = &max_slot_timeout 155 .extra2 = &max_slot_timeout
162 }, 156 },
163 { 157 {
164 .ctl_name = MAX_BAUD_RATE, 158 .ctl_name = NET_IRDA_MAX_BAUD_RATE,
165 .procname = "max_baud_rate", 159 .procname = "max_baud_rate",
166 .data = &sysctl_max_baud_rate, 160 .data = &sysctl_max_baud_rate,
167 .maxlen = sizeof(int), 161 .maxlen = sizeof(int),
@@ -172,7 +166,7 @@ static ctl_table irda_table[] = {
172 .extra2 = &max_max_baud_rate 166 .extra2 = &max_max_baud_rate
173 }, 167 },
174 { 168 {
175 .ctl_name = MIN_TX_TURN_TIME, 169 .ctl_name = NET_IRDA_MIN_TX_TURN_TIME,
176 .procname = "min_tx_turn_time", 170 .procname = "min_tx_turn_time",
177 .data = &sysctl_min_tx_turn_time, 171 .data = &sysctl_min_tx_turn_time,
178 .maxlen = sizeof(int), 172 .maxlen = sizeof(int),
@@ -183,7 +177,7 @@ static ctl_table irda_table[] = {
183 .extra2 = &max_min_tx_turn_time 177 .extra2 = &max_min_tx_turn_time
184 }, 178 },
185 { 179 {
186 .ctl_name = MAX_TX_DATA_SIZE, 180 .ctl_name = NET_IRDA_MAX_TX_DATA_SIZE,
187 .procname = "max_tx_data_size", 181 .procname = "max_tx_data_size",
188 .data = &sysctl_max_tx_data_size, 182 .data = &sysctl_max_tx_data_size,
189 .maxlen = sizeof(int), 183 .maxlen = sizeof(int),
@@ -194,7 +188,7 @@ static ctl_table irda_table[] = {
194 .extra2 = &max_max_tx_data_size 188 .extra2 = &max_max_tx_data_size
195 }, 189 },
196 { 190 {
197 .ctl_name = MAX_TX_WINDOW, 191 .ctl_name = NET_IRDA_MAX_TX_WINDOW,
198 .procname = "max_tx_window", 192 .procname = "max_tx_window",
199 .data = &sysctl_max_tx_window, 193 .data = &sysctl_max_tx_window,
200 .maxlen = sizeof(int), 194 .maxlen = sizeof(int),
@@ -205,7 +199,7 @@ static ctl_table irda_table[] = {
205 .extra2 = &max_max_tx_window 199 .extra2 = &max_max_tx_window
206 }, 200 },
207 { 201 {
208 .ctl_name = MAX_NOREPLY_TIME, 202 .ctl_name = NET_IRDA_MAX_NOREPLY_TIME,
209 .procname = "max_noreply_time", 203 .procname = "max_noreply_time",
210 .data = &sysctl_max_noreply_time, 204 .data = &sysctl_max_noreply_time,
211 .maxlen = sizeof(int), 205 .maxlen = sizeof(int),
@@ -216,7 +210,7 @@ static ctl_table irda_table[] = {
216 .extra2 = &max_max_noreply_time 210 .extra2 = &max_max_noreply_time
217 }, 211 },
218 { 212 {
219 .ctl_name = WARN_NOREPLY_TIME, 213 .ctl_name = NET_IRDA_WARN_NOREPLY_TIME,
220 .procname = "warn_noreply_time", 214 .procname = "warn_noreply_time",
221 .data = &sysctl_warn_noreply_time, 215 .data = &sysctl_warn_noreply_time,
222 .maxlen = sizeof(int), 216 .maxlen = sizeof(int),
@@ -227,7 +221,7 @@ static ctl_table irda_table[] = {
227 .extra2 = &max_warn_noreply_time 221 .extra2 = &max_warn_noreply_time
228 }, 222 },
229 { 223 {
230 .ctl_name = LAP_KEEPALIVE_TIME, 224 .ctl_name = NET_IRDA_LAP_KEEPALIVE_TIME,
231 .procname = "lap_keepalive_time", 225 .procname = "lap_keepalive_time",
232 .data = &sysctl_lap_keepalive_time, 226 .data = &sysctl_lap_keepalive_time,
233 .maxlen = sizeof(int), 227 .maxlen = sizeof(int),