summaryrefslogtreecommitdiffstats
path: root/net/ax25
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1997-12-16 05:34:03 +0000
committerRalf Baechle <ralf@linux-mips.org>1997-12-16 05:34:03 +0000
commit967c65a99059fd459b956c1588ce0ba227912c4e (patch)
tree8224d013ff5d255420713d05610c7efebd204d2a /net/ax25
parente20c1cc1656a66a2773bca4591a895cbc12696ff (diff)
Merge with Linux 2.1.72, part 1.
Diffstat (limited to 'net/ax25')
-rw-r--r--net/ax25/af_ax25.c2
-rw-r--r--net/ax25/ax25_ds_subr.c8
-rw-r--r--net/ax25/ax25_ip.c1
-rw-r--r--net/ax25/ax25_out.c35
-rw-r--r--net/ax25/ax25_subr.c1
5 files changed, 35 insertions, 12 deletions
diff --git a/net/ax25/af_ax25.c b/net/ax25/af_ax25.c
index 2fa92c4ad..c12b9fd13 100644
--- a/net/ax25/af_ax25.c
+++ b/net/ax25/af_ax25.c
@@ -954,6 +954,7 @@ static int ax25_release(struct socket *sock, struct socket *peer)
#ifdef AX25_CONFIG_DAMA_SLAVE
case AX25_PROTO_DAMA_SLAVE:
ax25_stop_t3timer(sk->protinfo.ax25);
+ ax25_stop_idletimer(sk->protinfo.ax25);
break;
#endif
}
@@ -1412,7 +1413,6 @@ static int ax25_sendmsg(struct socket *sock, struct msghdr *msg, int len, struct
/* Datagram frames go straight out of the door as UI */
skb->dev = sk->protinfo.ax25->ax25_dev->dev;
- skb->priority = SOPRI_NORMAL;
ax25_queue_xmit(skb);
diff --git a/net/ax25/ax25_ds_subr.c b/net/ax25/ax25_ds_subr.c
index 89ca64f3f..941a41f99 100644
--- a/net/ax25/ax25_ds_subr.c
+++ b/net/ax25/ax25_ds_subr.c
@@ -115,7 +115,10 @@ void ax25_ds_enquiry_response(ax25_cb *ax25)
if (ax25o->state == AX25_STATE_1 || ax25o->state == AX25_STATE_2 || skb_peek(&ax25o->ack_queue) != NULL)
ax25_ds_t1_timeout(ax25o);
- ax25_start_t3timer(ax25o);
+ /* do not start T3 for listening sockets (tnx DD8NE) */
+
+ if (ax25o->state != AX25_STATE_0)
+ ax25_start_t3timer(ax25o);
}
}
@@ -154,7 +157,6 @@ static void ax25_kiss_cmd(ax25_dev *ax25_dev, unsigned char cmd, unsigned char p
skb->arp = 1;
skb->dev = ax25_dev->dev;
- skb->priority = SOPRI_NORMAL;
skb->protocol = htons(ETH_P_AX25);
dev_queue_xmit(skb);
@@ -211,8 +213,8 @@ void ax25_dama_on(ax25_cb *ax25)
void ax25_dama_off(ax25_cb *ax25)
{
- ax25_dev_dama_off(ax25->ax25_dev);
ax25->condition &= ~AX25_COND_DAMA_MODE;
+ ax25_dev_dama_off(ax25->ax25_dev);
}
#endif
diff --git a/net/ax25/ax25_ip.c b/net/ax25/ax25_ip.c
index 3a8594fba..a50822b90 100644
--- a/net/ax25/ax25_ip.c
+++ b/net/ax25/ax25_ip.c
@@ -177,7 +177,6 @@ int ax25_rebuild_header(struct sk_buff *skb)
}
skb->dev = dev;
- skb->priority = SOPRI_NORMAL;
ax25_queue_xmit(skb);
diff --git a/net/ax25/ax25_out.c b/net/ax25/ax25_out.c
index 4550302d7..787a645de 100644
--- a/net/ax25/ax25_out.c
+++ b/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>
@@ -58,8 +61,16 @@ ax25_cb *ax25_send_frame(struct sk_buff *skb, int paclen, ax25_address *src, ax2
ax25_dev *ax25_dev;
ax25_cb *ax25;
- if (skb == NULL)
- return 0;
+ /*
+ * Take the default packet length for the device if zero is
+ * specified.
+ */
+ if (paclen == 0) {
+ if ((ax25_dev = ax25_dev_ax25dev(dev)) == NULL)
+ return NULL;
+
+ paclen = ax25_dev->values[AX25_VALUES_PACLEN];
+ }
/*
* Look for an existing connection.
@@ -188,9 +199,22 @@ void ax25_output(ax25_cb *ax25, int paclen, struct sk_buff *skb)
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
+ }
}
/*
@@ -339,7 +363,6 @@ void ax25_transmit_buffer(ax25_cb *ax25, struct sk_buff *skb, int type)
ax25_addr_build(ptr, &ax25->source_addr, &ax25->dest_addr, ax25->digipeat, type, ax25->modulus);
skb->dev = ax25->ax25_dev->dev;
- skb->priority = SOPRI_NORMAL;
ax25_queue_xmit(skb);
}
diff --git a/net/ax25/ax25_subr.c b/net/ax25/ax25_subr.c
index 39dfd7d42..98a977182 100644
--- a/net/ax25/ax25_subr.c
+++ b/net/ax25/ax25_subr.c
@@ -252,7 +252,6 @@ void ax25_return_dm(struct device *dev, ax25_address *src, ax25_address *dest, a
dptr += ax25_addr_build(dptr, dest, src, &retdigi, AX25_RESPONSE, AX25_MODULUS);
skb->dev = dev;
- skb->priority = SOPRI_NORMAL;
ax25_queue_xmit(skb);
}