aboutsummaryrefslogtreecommitdiffstats
path: root/net/llc/llc_station.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@mandriva.com>2005-09-22 03:30:44 -0400
committerArnaldo Carvalho de Melo <acme@mandriva.com>2005-09-22 03:30:44 -0400
commit590232a7150674b2036291eaefce085f3f9659c8 (patch)
treef14ca696cc9eead769933d24d04105928260f028 /net/llc/llc_station.c
parent54fb7f25f19a4539d3ec012e410439913650dc06 (diff)
[LLC]: Add sysctl support for the LLC timeouts
Signed-off-by: Jochen Friedrich <jochen@scram.de> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Diffstat (limited to 'net/llc/llc_station.c')
-rw-r--r--net/llc/llc_station.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/net/llc/llc_station.c b/net/llc/llc_station.c
index 85a7ac276141..2d764b0382ce 100644
--- a/net/llc/llc_station.c
+++ b/net/llc/llc_station.c
@@ -50,6 +50,10 @@ struct llc_station {
50 struct sk_buff_head mac_pdu_q; 50 struct sk_buff_head mac_pdu_q;
51}; 51};
52 52
53#define LLC_STATION_ACK_TIME (3 * HZ)
54
55int sysctl_llc_station_ack_timeout = LLC_STATION_ACK_TIME;
56
53/* Types of events (possible values in 'ev->type') */ 57/* Types of events (possible values in 'ev->type') */
54#define LLC_STATION_EV_TYPE_SIMPLE 1 58#define LLC_STATION_EV_TYPE_SIMPLE 1
55#define LLC_STATION_EV_TYPE_CONDITION 2 59#define LLC_STATION_EV_TYPE_CONDITION 2
@@ -218,7 +222,8 @@ static void llc_station_send_pdu(struct sk_buff *skb)
218 222
219static int llc_station_ac_start_ack_timer(struct sk_buff *skb) 223static int llc_station_ac_start_ack_timer(struct sk_buff *skb)
220{ 224{
221 mod_timer(&llc_main_station.ack_timer, jiffies + LLC_ACK_TIME * HZ); 225 mod_timer(&llc_main_station.ack_timer,
226 jiffies + sysctl_llc_station_ack_timeout);
222 return 0; 227 return 0;
223} 228}
224 229
@@ -687,7 +692,8 @@ int __init llc_station_init(void)
687 init_timer(&llc_main_station.ack_timer); 692 init_timer(&llc_main_station.ack_timer);
688 llc_main_station.ack_timer.data = (unsigned long)&llc_main_station; 693 llc_main_station.ack_timer.data = (unsigned long)&llc_main_station;
689 llc_main_station.ack_timer.function = llc_station_ack_tmr_cb; 694 llc_main_station.ack_timer.function = llc_station_ack_tmr_cb;
690 695 llc_main_station.ack_timer.expires = jiffies +
696 sysctl_llc_station_ack_timeout;
691 skb = alloc_skb(0, GFP_ATOMIC); 697 skb = alloc_skb(0, GFP_ATOMIC);
692 if (!skb) 698 if (!skb)
693 goto out; 699 goto out;
@@ -695,7 +701,6 @@ int __init llc_station_init(void)
695 llc_set_station_handler(llc_station_rcv); 701 llc_set_station_handler(llc_station_rcv);
696 ev = llc_station_ev(skb); 702 ev = llc_station_ev(skb);
697 memset(ev, 0, sizeof(*ev)); 703 memset(ev, 0, sizeof(*ev));
698 llc_main_station.ack_timer.expires = jiffies + 3 * HZ;
699 llc_main_station.maximum_retry = 1; 704 llc_main_station.maximum_retry = 1;
700 llc_main_station.state = LLC_STATION_STATE_DOWN; 705 llc_main_station.state = LLC_STATION_STATE_DOWN;
701 ev->type = LLC_STATION_EV_TYPE_SIMPLE; 706 ev->type = LLC_STATION_EV_TYPE_SIMPLE;