27 #include <linux/ctype.h>
28 #include <linux/sysctl.h>
53 static int max_discovery_slots = 16;
54 static int min_discovery_slots = 1;
57 static int max_slot_timeout = 160;
58 static int min_slot_timeout = 20;
59 static int max_max_baud_rate = 16000000;
60 static int min_max_baud_rate = 2400;
61 static int max_min_tx_turn_time = 10000;
62 static int min_min_tx_turn_time;
63 static int max_max_tx_data_size = 2048;
64 static int min_max_tx_data_size = 64;
65 static int max_max_tx_window = 7;
66 static int min_max_tx_window = 1;
67 static int max_max_noreply_time = 40;
68 static int min_max_noreply_time = 3;
69 static int max_warn_noreply_time = 3;
70 static int min_warn_noreply_time = 1;
71 static int max_lap_keepalive_time = 10000;
72 static int min_lap_keepalive_time = 100;
77 void __user *
buffer,
size_t *lenp, loff_t *ppos)
82 if (ret == 0 && write) {
93 static int do_discovery(
ctl_table *table,
int write,
94 void __user *buffer,
size_t *lenp, loff_t *ppos)
118 .maxlen =
sizeof(
int),
123 .procname =
"devname",
127 .proc_handler = do_devname,
129 #ifdef CONFIG_IRDA_DEBUG
133 .maxlen =
sizeof(
int),
138 #ifdef CONFIG_IRDA_FAST_RR
140 .procname =
"fast_poll_increase",
142 .maxlen =
sizeof(
int),
148 .procname =
"discovery_slots",
150 .maxlen =
sizeof(
int),
153 .extra1 = &min_discovery_slots,
154 .extra2 = &max_discovery_slots
157 .procname =
"discovery_timeout",
159 .maxlen =
sizeof(
int),
164 .procname =
"slot_timeout",
166 .maxlen =
sizeof(
int),
169 .extra1 = &min_slot_timeout,
170 .extra2 = &max_slot_timeout
173 .procname =
"max_baud_rate",
175 .maxlen =
sizeof(
int),
178 .extra1 = &min_max_baud_rate,
179 .extra2 = &max_max_baud_rate
182 .procname =
"min_tx_turn_time",
184 .maxlen =
sizeof(
int),
187 .extra1 = &min_min_tx_turn_time,
188 .extra2 = &max_min_tx_turn_time
191 .procname =
"max_tx_data_size",
193 .maxlen =
sizeof(
int),
196 .extra1 = &min_max_tx_data_size,
197 .extra2 = &max_max_tx_data_size
200 .procname =
"max_tx_window",
202 .maxlen =
sizeof(
int),
205 .extra1 = &min_max_tx_window,
206 .extra2 = &max_max_tx_window
209 .procname =
"max_noreply_time",
211 .maxlen =
sizeof(
int),
214 .extra1 = &min_max_noreply_time,
215 .extra2 = &max_max_noreply_time
218 .procname =
"warn_noreply_time",
220 .maxlen =
sizeof(
int),
223 .extra1 = &min_warn_noreply_time,
224 .extra2 = &max_warn_noreply_time
227 .procname =
"lap_keepalive_time",
229 .maxlen =
sizeof(
int),
232 .extra1 = &min_lap_keepalive_time,
233 .extra2 = &max_lap_keepalive_time
249 if (!irda_table_header)