1 diff -urN linux.orig/net/irda/irsysctl.c linux/net/irda/irsysctl.c
2 --- linux.orig/net/irda/irsysctl.c Fri Feb 27 18:28:04 2004
3 +++ linux/net/irda/irsysctl.c Wed Jan 14 19:36:40 2004
6 enum { DISCOVERY=1, DEVNAME, DEBUG, FAST_POLL, DISCOVERY_SLOTS,
7 DISCOVERY_TIMEOUT, SLOT_TIMEOUT, MAX_BAUD_RATE, MIN_TX_TURN_TIME,
8 - MAX_NOREPLY_TIME, WARN_NOREPLY_TIME, LAP_KEEPALIVE_TIME, SPECIFIC_DEV };
9 + MAX_TX_WINDOW, MAX_NOREPLY_TIME, WARN_NOREPLY_TIME,
10 + LAP_KEEPALIVE_TIME, SPECIFIC_DEV };
12 extern int sysctl_discovery;
13 extern int sysctl_discovery_slots;
15 extern char sysctl_devname[];
16 extern int sysctl_max_baud_rate;
17 extern int sysctl_min_tx_turn_time;
18 +extern int sysctl_max_tx_window;
19 extern int sysctl_max_noreply_time;
20 extern int sysctl_warn_noreply_time;
21 extern int sysctl_lap_keepalive_time;
23 static int min_max_baud_rate = 2400;
24 static int max_min_tx_turn_time = 10000; /* See qos.c - IrLAP spec */
25 static int min_min_tx_turn_time = 0;
26 +static int max_max_tx_window=7;
27 +static int min_max_tx_window=1;
28 static int max_max_noreply_time = 40; /* See qos.c - IrLAP spec */
29 static int min_max_noreply_time = 3;
30 static int max_warn_noreply_time = 3; /* 3s == standard */
32 { MIN_TX_TURN_TIME, "min_tx_turn_time", &sysctl_min_tx_turn_time,
33 sizeof(int), 0644, NULL, &proc_dointvec_minmax, &sysctl_intvec,
34 NULL, &min_min_tx_turn_time, &max_min_tx_turn_time },
35 + { MAX_TX_WINDOW, "max_tx_window", &sysctl_max_tx_window,
36 + sizeof(int), 0644, NULL, &proc_dointvec_minmax, &sysctl_intvec,
37 + NULL, &min_max_tx_window, &max_max_tx_window },
38 { MAX_NOREPLY_TIME, "max_noreply_time", &sysctl_max_noreply_time,
39 sizeof(int), 0644, NULL, &proc_dointvec_minmax, &sysctl_intvec,
40 NULL, &min_max_noreply_time, &max_max_noreply_time },
41 diff -urN linux.orig/net/irda/parameters.c linux/net/irda/parameters.c
42 --- linux.orig/net/irda/parameters.c Sat Nov 10 01:22:17 2001
43 +++ linux/net/irda/parameters.c Wed Jan 14 19:34:23 2004
51 p.pi = pi; /* In case handler needs to know */
52 p.pl = buf[1]; /* Extract lenght of value */
53 p.pv.i = 0; /* Clear value */
57 /* Check if buffer is long enough for parsing */
59 WARNING(__FUNCTION__ "(), buffer to short for parsing! "
61 "Expected %d bytes, but value had %d bytes!\n",
62 type & PV_MASK, p.pl);
64 - /* Skip parameter */
65 + if((p.pl < (type & PV_MASK)) || (type & PV_BIG_ENDIAN)) {
68 + extract_len = type & PV_MASK;
74 + switch (extract_len) {
76 n += irda_param_unpack(buf+2, "b", &p.pv.i);
78 diff -urN linux.orig/net/irda/qos.c linux/net/irda/qos.c
79 --- linux.orig/net/irda/qos.c Fri Feb 27 18:28:04 2004
80 +++ linux/net/irda/qos.c Wed Jan 14 18:18:20 2004
83 unsigned sysctl_min_tx_turn_time = 10;
85 +unsigned sysctl_max_tx_window = 7;
87 * Specific device list limits some negotiation parameters at the connection
88 * with listed peer devices.
91 int index = 15; /* Current MSB */
98 break; /* Found it! */
100 qos->max_turn_time.value = 500;
103 + if(qos->window_size.value > sysctl_max_tx_window)
104 + qos->window_size.value = sysctl_max_tx_window;
107 * The data size must be adjusted according to the baud rate and max