patch-2.1.71 linux/net/ax25/ax25_out.c

Next file: linux/net/core/dev.c
Previous file: linux/net/ax25/ax25_ds_subr.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.70/linux/net/ax25/ax25_out.c linux/net/ax25/ax25_out.c
@@ -27,6 +27,9 @@
  *			Joerg(DL1BKE)	Fixed a problem with buffer allocation
  *					for fragments.
  *	AX.25 037	Jonathan(G4KLX)	New timer architecture.
+ *			Joerg(DL1BKE)	Fixed DAMA Slave mode: will work
+ *					on non-DAMA interfaces like AX25L2V2
+ *					again (this behaviour is _required_).
  */
 
 #include <linux/config.h>
@@ -196,9 +199,22 @@
 		skb_queue_tail(&ax25->write_queue, skb);	  /* Throw it on the queue */
 	}
 
-	if (ax25->ax25_dev->values[AX25_VALUES_PROTOCOL] == AX25_PROTO_STD_SIMPLEX ||
-	    ax25->ax25_dev->values[AX25_VALUES_PROTOCOL] == AX25_PROTO_STD_DUPLEX)
-		ax25_kick(ax25);
+	switch (ax25->ax25_dev->values[AX25_VALUES_PROTOCOL]) {
+		case AX25_PROTO_STD_SIMPLEX:
+		case AX25_PROTO_STD_DUPLEX:
+			ax25_kick(ax25);
+			break;
+
+#ifdef CONFIG_AX25_DAMA_SLAVE
+		/* 
+		 * A DAMA slave is _required_ to work as normal AX.25L2V2
+		 * if no DAMA master is available.
+		 */
+		case AX25_PROTO_DAMA_SLAVE:
+			if (!ax25->ax25_dev->dama.slave) ax25_kick(ax25);
+			break;
+#endif
+	}
 }
 
 /* 

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