patch-2.1.44 linux/net/ax25/ax25_in.c

Next file: linux/net/ax25/ax25_ip.c
Previous file: linux/net/ax25/ax25_iface.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.43/linux/net/ax25/ax25_in.c linux/net/ax25/ax25_in.c
@@ -1,5 +1,5 @@
 /*
- *	AX.25 release 036
+ *	AX.25 release 037
  *
  *	This code REQUIRES 2.1.15 or higher/ NET3.038
  *
@@ -35,6 +35,7 @@
  *	AX.25 035	Hans(PE1AYX)	Fixed interface to IP layer.
  *	AX.25 036	Jonathan(G4KLX)	Move DAMA code into own file.
  *			Joerg(DL1BKE)	Fixed DAMA Slave.
+ *	AX.25 037	Jonathan(G4KLX)	New timer architecture.
  */
 
 #include <linux/config.h>
@@ -136,7 +137,7 @@
 
 	if (skb == NULL) return 0;
 
-	ax25->idletimer = ax25->idle;
+	ax25_start_idletimer(ax25);
 
 	pid = *skb->data;
 
@@ -193,8 +194,6 @@
 	if (ax25->state == AX25_STATE_0)
 		return 0;
 
-	del_timer(&ax25->timer);
-
 	switch (ax25->ax25_dev->values[AX25_VALUES_PROTOCOL]) {
 		case AX25_PROTO_STD_SIMPLEX:
 		case AX25_PROTO_STD_DUPLEX:
@@ -211,8 +210,6 @@
 #endif
 	}
 
-	ax25_set_timer(ax25);
-
 	return queued;
 }
 
@@ -413,7 +410,6 @@
 		}
 
 		ax25_fillin_cb(ax25, ax25_dev);
-		ax25->idletimer = ax25->idle;
 	}
 
 	ax25->source_addr = dest;
@@ -453,12 +449,13 @@
 		ax25_dama_on(ax25);
 #endif
 
-	ax25->t3timer = ax25->t3;
-	ax25->state   = AX25_STATE_3;
+	ax25->state = AX25_STATE_3;
 
 	ax25_insert_socket(ax25);
 
-	ax25_set_timer(ax25);
+	ax25_start_heartbeat(ax25);
+	ax25_start_t3timer(ax25);
+	ax25_start_idletimer(ax25);
 
 	if (sk != NULL) {
 		if (!sk->dead)

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov