patch-2.1.25 linux/net/ax25/ax25_timer.c
Next file: linux/net/ax25/sysctl_net_ax25.c
Previous file: linux/net/ax25/ax25_subr.c
Back to the patch index
Back to the overall index
- Lines: 70
- Date:
Sun Feb 2 15:18:48 1997
- Orig file:
v2.1.24/linux/net/ax25/ax25_timer.c
- Orig date:
Sun Feb 2 15:46:22 1997
diff -u --recursive --new-file v2.1.24/linux/net/ax25/ax25_timer.c linux/net/ax25/ax25_timer.c
@@ -49,37 +49,20 @@
static void ax25_timer(unsigned long);
/*
- * Linux set/reset timer routines
+ * Linux set timer
*/
void ax25_set_timer(ax25_cb *ax25)
{
unsigned long flags;
- save_flags(flags);
- cli();
- del_timer(&ax25->timer);
- restore_flags(flags);
-
- ax25->timer.next = ax25->timer.prev = NULL;
- ax25->timer.data = (unsigned long)ax25;
- ax25->timer.function = &ax25_timer;
-
- ax25->timer.expires = jiffies + 10;
- add_timer(&ax25->timer);
-}
-
-static void ax25_reset_timer(ax25_cb *ax25)
-{
- unsigned long flags;
-
- save_flags(flags);
- cli();
+ save_flags(flags); cli();
del_timer(&ax25->timer);
restore_flags(flags);
ax25->timer.data = (unsigned long)ax25;
ax25->timer.function = &ax25_timer;
ax25->timer.expires = jiffies + 10;
+
add_timer(&ax25->timer);
}
@@ -158,7 +141,7 @@
ax25->sk->dead = 1;
}
- ax25_reset_timer(ax25);
+ ax25_set_timer(ax25);
return;
}
@@ -207,9 +190,8 @@
/* dl1bke 960114: DAMA T1 timeouts are handled in ax25_dama_slave_transmit */
/* nevertheless we have to re-enqueue the timer struct... */
-
if (ax25->t1timer == 0 || --ax25->t1timer > 0) {
- ax25_reset_timer(ax25);
+ ax25_set_timer(ax25);
return;
}
@@ -229,7 +211,7 @@
* Thus we'll have to do parts of our T1 handling in
* ax25_enquiry_response().
*/
-void ax25_t1_timeout(ax25_cb * ax25)
+void ax25_t1_timeout(ax25_cb *ax25)
{
switch (ax25->state) {
case AX25_STATE_1:
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov