summaryrefslogtreecommitdiffstats
path: root/net/ax25
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1998-03-17 22:05:47 +0000
committerRalf Baechle <ralf@linux-mips.org>1998-03-17 22:05:47 +0000
commit27cfca1ec98e91261b1a5355d10a8996464b63af (patch)
tree8e895a53e372fa682b4c0a585b9377d67ed70d0e /net/ax25
parent6a76fb7214c477ccf6582bd79c5b4ccc4f9c41b1 (diff)
Look Ma' what I found on my harddisk ...
o New faster syscalls for 2.1.x, too o Upgrade to 2.1.89. Don't try to run this. It's flaky as hell. But feel free to debug ...
Diffstat (limited to 'net/ax25')
-rw-r--r--net/ax25/.cvsignore1
-rw-r--r--net/ax25/Config.in32
-rw-r--r--net/ax25/af_ax25.c8
-rw-r--r--net/ax25/ax25_ds_subr.c1
-rw-r--r--net/ax25/ax25_in.c44
-rw-r--r--net/ax25/ax25_ip.c6
-rw-r--r--net/ax25/ax25_out.c9
-rw-r--r--net/ax25/ax25_route.c2
-rw-r--r--net/ax25/ax25_subr.c10
-rw-r--r--net/ax25/sysctl_net_ax25.c1
10 files changed, 72 insertions, 42 deletions
diff --git a/net/ax25/.cvsignore b/net/ax25/.cvsignore
index 4671378ae..857dd22e9 100644
--- a/net/ax25/.cvsignore
+++ b/net/ax25/.cvsignore
@@ -1 +1,2 @@
.depend
+.*.flags
diff --git a/net/ax25/Config.in b/net/ax25/Config.in
new file mode 100644
index 000000000..6bf4a9ead
--- /dev/null
+++ b/net/ax25/Config.in
@@ -0,0 +1,32 @@
+#
+# Amateur Radio protocols and AX.25 device configuration
+#
+# 19971130 Now in an own category to make correct compilation of the
+# AX.25 stuff easier...
+# Joerg Reuter DL1BKE <jreuter@poboxes.com>
+# 19980129 Moved to net/ax25/Config.in, sourcing device drivers.
+
+mainmenu_option next_comment
+comment 'Amateur Radio support'
+bool 'Amateur Radio support' CONFIG_HAMRADIO
+
+if [ "$CONFIG_HAMRADIO" != "n" ] ; then
+ if [ "$CONFIG_NET" != "n" ] ; then
+ comment 'Packet Radio protocols'
+ tristate 'Amateur Radio AX.25 Level 2 protocol' CONFIG_AX25
+ if [ "$CONFIG_AX25" != "n" ]; then
+ bool ' AX.25 DAMA Slave support' CONFIG_AX25_DAMA_SLAVE
+# bool ' AX.25 DAMA Master support' CONFIG_AX25_DAMA_MASTER
+ dep_tristate ' Amateur Radio NET/ROM protocol' CONFIG_NETROM $CONFIG_AX25
+ dep_tristate ' Amateur Radio X.25 PLP (Rose)' CONFIG_ROSE $CONFIG_AX25
+ fi
+
+ if [ "$CONFIG_AX25" != "n" ]; then
+ source drivers/net/hamradio/Config.in
+ fi
+ fi
+
+ source drivers/char/hfmodem/Config.in
+fi
+
+endmenu
diff --git a/net/ax25/af_ax25.c b/net/ax25/af_ax25.c
index c12b9fd13..3a4196b3f 100644
--- a/net/ax25/af_ax25.c
+++ b/net/ax25/af_ax25.c
@@ -368,7 +368,7 @@ void ax25_send_to_raw(struct sock *sk, struct sk_buff *skb, int proto)
return;
if (sock_queue_rcv_skb(sk, copy) != 0)
- kfree_skb(copy, FREE_READ);
+ kfree_skb(copy);
}
sk = sk->next;
@@ -418,7 +418,7 @@ void ax25_destroy_socket(ax25_cb *ax25) /* Not static as it's used by the timer
skb->sk->protinfo.ax25->state = AX25_STATE_0;
}
- kfree_skb(skb, FREE_READ);
+ kfree_skb(skb);
}
}
@@ -1241,7 +1241,7 @@ static int ax25_accept(struct socket *sock, struct socket *newsock, int flags)
/* Now attach up the new socket */
skb->sk = NULL;
- kfree_skb(skb, FREE_READ);
+ kfree_skb(skb);
sk->ack_backlog--;
newsock->sk = newsk;
@@ -1385,7 +1385,7 @@ static int ax25_sendmsg(struct socket *sock, struct msghdr *msg, int len, struct
if (sk->type == SOCK_SEQPACKET) {
/* Connected mode sockets go via the LAPB machine */
if (sk->state != TCP_ESTABLISHED) {
- kfree_skb(skb, FREE_WRITE);
+ kfree_skb(skb);
return -ENOTCONN;
}
diff --git a/net/ax25/ax25_ds_subr.c b/net/ax25/ax25_ds_subr.c
index 941a41f99..3844f3964 100644
--- a/net/ax25/ax25_ds_subr.c
+++ b/net/ax25/ax25_ds_subr.c
@@ -155,7 +155,6 @@ static void ax25_kiss_cmd(ax25_dev *ax25_dev, unsigned char cmd, unsigned char p
*p++ = cmd;
*p++ = param;
- skb->arp = 1;
skb->dev = ax25_dev->dev;
skb->protocol = htons(ETH_P_AX25);
diff --git a/net/ax25/ax25_in.c b/net/ax25/ax25_in.c
index a17109bff..79fef3dcb 100644
--- a/net/ax25/ax25_in.c
+++ b/net/ax25/ax25_in.c
@@ -85,7 +85,7 @@ static int ax25_rx_fragment(ax25_cb *ax25, struct sk_buff *skb)
if (ax25->fragno == 0) {
if ((skbn = alloc_skb(AX25_MAX_HEADER_LEN + ax25->fraglen, GFP_ATOMIC)) == NULL) {
while ((skbo = skb_dequeue(&ax25->frag_queue)) != NULL)
- kfree_skb(skbo, FREE_READ);
+ kfree_skb(skbo);
return 1;
}
@@ -97,13 +97,13 @@ static int ax25_rx_fragment(ax25_cb *ax25, struct sk_buff *skb)
/* Copy data from the fragments */
while ((skbo = skb_dequeue(&ax25->frag_queue)) != NULL) {
memcpy(skb_put(skbn, skbo->len), skbo->data, skbo->len);
- kfree_skb(skbo, FREE_READ);
+ kfree_skb(skbo);
}
ax25->fraglen = 0;
if (ax25_rx_iframe(ax25, skbn) == 0)
- kfree_skb(skbn, FREE_READ);
+ kfree_skb(skbn);
}
return 1;
@@ -113,7 +113,7 @@ static int ax25_rx_fragment(ax25_cb *ax25, struct sk_buff *skb)
/* First fragment received */
if (*skb->data & AX25_SEG_FIRST) {
while ((skbo = skb_dequeue(&ax25->frag_queue)) != NULL)
- kfree_skb(skbo, FREE_READ);
+ kfree_skb(skbo);
ax25->fragno = *skb->data & AX25_SEG_REM;
skb_pull(skb, 1); /* skip fragno */
ax25->fraglen = skb->len;
@@ -149,7 +149,7 @@ int ax25_rx_iframe(ax25_cb *ax25, struct sk_buff *skb)
*/
struct sk_buff *skbn = skb_copy(skb, GFP_ATOMIC);
if (skbn != NULL) {
- kfree_skb(skb, FREE_READ);
+ kfree_skb(skb);
skb = skbn;
}
@@ -234,12 +234,12 @@ static int ax25_rcv(struct sk_buff *skb, struct device *dev, ax25_address *dev_a
skb->h.raw = skb->data;
if ((ax25_dev = ax25_dev_ax25dev(dev)) == NULL) {
- kfree_skb(skb, FREE_READ);
+ kfree_skb(skb);
return 0;
}
if (call_in_firewall(PF_AX25, skb->dev, skb->h.raw, NULL, &skb) != FW_ACCEPT) {
- kfree_skb(skb, FREE_READ);
+ kfree_skb(skb);
return 0;
}
@@ -248,7 +248,7 @@ static int ax25_rcv(struct sk_buff *skb, struct device *dev, ax25_address *dev_a
*/
if (ax25_addr_parse(skb->data, skb->len, &src, &dest, &dp, &type, &dama) == NULL) {
- kfree_skb(skb, FREE_READ);
+ kfree_skb(skb);
return 0;
}
@@ -279,7 +279,7 @@ static int ax25_rcv(struct sk_buff *skb, struct device *dev, ax25_address *dev_a
ax25_send_to_raw(raw, skb, skb->data[1]);
if (!mine && ax25cmp(&dest, (ax25_address *)dev->broadcast) != 0) {
- kfree_skb(skb, FREE_READ);
+ kfree_skb(skb);
return 0;
}
@@ -308,22 +308,22 @@ static int ax25_rcv(struct sk_buff *skb, struct device *dev, ax25_address *dev_a
/* Now find a suitable dgram socket */
if ((sk = ax25_find_socket(&dest, &src, SOCK_DGRAM)) != NULL) {
if (atomic_read(&sk->rmem_alloc) >= sk->rcvbuf) {
- kfree_skb(skb, FREE_READ);
+ kfree_skb(skb);
} else {
/*
* Remove the control and PID.
*/
skb_pull(skb, 2);
if (sock_queue_rcv_skb(sk, skb) != 0)
- kfree_skb(skb, FREE_READ);
+ kfree_skb(skb);
}
} else {
- kfree_skb(skb, FREE_READ);
+ kfree_skb(skb);
}
break;
default:
- kfree_skb(skb, FREE_READ); /* Will scan SOCK_AX25 RAW sockets */
+ kfree_skb(skb); /* Will scan SOCK_AX25 RAW sockets */
break;
}
@@ -336,7 +336,7 @@ static int ax25_rcv(struct sk_buff *skb, struct device *dev, ax25_address *dev_a
* silently ignore them. For now we stay quiet.
*/
if (ax25_dev->values[AX25_VALUES_CONMODE] == 0) {
- kfree_skb(skb, FREE_READ);
+ kfree_skb(skb);
return 0;
}
@@ -353,7 +353,7 @@ static int ax25_rcv(struct sk_buff *skb, struct device *dev, ax25_address *dev_a
* do no further work
*/
if (ax25_process_rx_frame(ax25, skb, type, dama) == 0)
- kfree_skb(skb, FREE_READ);
+ kfree_skb(skb);
return 0;
}
@@ -370,7 +370,7 @@ static int ax25_rcv(struct sk_buff *skb, struct device *dev, ax25_address *dev_a
if ((*skb->data & ~AX25_PF) != AX25_DM && mine)
ax25_return_dm(dev, &src, &dest, &dp);
- kfree_skb(skb, FREE_READ);
+ kfree_skb(skb);
return 0;
}
@@ -384,7 +384,7 @@ static int ax25_rcv(struct sk_buff *skb, struct device *dev, ax25_address *dev_a
if (sk != NULL) {
if (sk->ack_backlog == sk->max_ack_backlog || (make = ax25_make_new(sk, ax25_dev)) == NULL) {
if (mine) ax25_return_dm(dev, &src, &dest, &dp);
- kfree_skb(skb, FREE_READ);
+ kfree_skb(skb);
return 0;
}
@@ -399,13 +399,13 @@ static int ax25_rcv(struct sk_buff *skb, struct device *dev, ax25_address *dev_a
sk->ack_backlog++;
} else {
if (!mine) {
- kfree_skb(skb, FREE_READ);
+ kfree_skb(skb);
return 0;
}
if ((ax25 = ax25_create_cb()) == NULL) {
ax25_return_dm(dev, &src, &dest, &dp);
- kfree_skb(skb, FREE_READ);
+ kfree_skb(skb);
return 0;
}
@@ -419,7 +419,7 @@ static int ax25_rcv(struct sk_buff *skb, struct device *dev, ax25_address *dev_a
* Sort out any digipeated paths.
*/
if (dp.ndigi != 0 && ax25->digipeat == NULL && (ax25->digipeat = kmalloc(sizeof(ax25_digi), GFP_ATOMIC)) == NULL) {
- kfree_skb(skb, FREE_READ);
+ kfree_skb(skb);
ax25_destroy_socket(ax25);
return 0;
}
@@ -461,7 +461,7 @@ static int ax25_rcv(struct sk_buff *skb, struct device *dev, ax25_address *dev_a
if (!sk->dead)
sk->data_ready(sk, skb->len);
} else {
- kfree_skb(skb, FREE_READ);
+ kfree_skb(skb);
}
return 0;
@@ -475,7 +475,7 @@ int ax25_kiss_rcv(struct sk_buff *skb, struct device *dev, struct packet_type *p
skb->sk = NULL; /* Initially we don't know who it's for */
if ((*skb->data & 0x0F) != 0) {
- kfree_skb(skb, FREE_READ); /* Not a KISS data frame */
+ kfree_skb(skb); /* Not a KISS data frame */
return 0;
}
diff --git a/net/ax25/ax25_ip.c b/net/ax25/ax25_ip.c
index a50822b90..c285b4641 100644
--- a/net/ax25/ax25_ip.c
+++ b/net/ax25/ax25_ip.c
@@ -140,14 +140,14 @@ int ax25_rebuild_header(struct sk_buff *skb)
* gets fixed.
*/
if ((ourskb = skb_copy(skb, GFP_ATOMIC)) == NULL) {
- kfree_skb(skb, FREE_WRITE);
+ kfree_skb(skb);
return 1;
}
if (skb->sk != NULL)
skb_set_owner_w(ourskb, skb->sk);
- kfree_skb(skb, FREE_WRITE);
+ kfree_skb(skb);
skb_pull(ourskb, AX25_HEADER_LEN - 1); /* Keep PID */
@@ -169,7 +169,7 @@ int ax25_rebuild_header(struct sk_buff *skb)
if (route->digipeat != NULL) {
if ((ourskb = ax25_rt_build_path(skb, src, dst, route->digipeat)) == NULL) {
- kfree_skb(skb, FREE_WRITE);
+ kfree_skb(skb);
return 1;
}
diff --git a/net/ax25/ax25_out.c b/net/ax25/ax25_out.c
index 787a645de..71eb5cfc3 100644
--- a/net/ax25/ax25_out.c
+++ b/net/ax25/ax25_out.c
@@ -194,7 +194,7 @@ void ax25_output(ax25_cb *ax25, int paclen, struct sk_buff *skb)
skb_queue_tail(&ax25->write_queue, skbn); /* Throw it on the queue */
}
- kfree_skb(skb, FREE_WRITE);
+ kfree_skb(skb);
} else {
skb_queue_tail(&ax25->write_queue, skb); /* Throw it on the queue */
}
@@ -347,14 +347,14 @@ void ax25_transmit_buffer(ax25_cb *ax25, struct sk_buff *skb, int type)
if (skb_headroom(skb) < headroom) {
if ((skbn = skb_realloc_headroom(skb, headroom)) == NULL) {
printk(KERN_CRIT "AX.25: ax25_transmit_buffer - out of memory\n");
- kfree_skb(skb, FREE_WRITE);
+ kfree_skb(skb);
return;
}
if (skb->sk != NULL)
skb_set_owner_w(skbn, skb->sk);
- kfree_skb(skb, FREE_WRITE);
+ kfree_skb(skb);
skb = skbn;
}
@@ -376,13 +376,12 @@ void ax25_queue_xmit(struct sk_buff *skb)
unsigned char *ptr;
if (call_out_firewall(PF_AX25, skb->dev, skb->data, NULL, &skb) != FW_ACCEPT) {
- kfree_skb(skb, FREE_WRITE);
+ kfree_skb(skb);
return;
}
skb->protocol = htons(ETH_P_AX25);
skb->dev = ax25_fwd_dev(skb->dev);
- skb->arp = 1;
ptr = skb_push(skb, 1);
*ptr = 0x00; /* KISS */
diff --git a/net/ax25/ax25_route.c b/net/ax25/ax25_route.c
index 911b54834..0dedcc88e 100644
--- a/net/ax25/ax25_route.c
+++ b/net/ax25/ax25_route.c
@@ -421,7 +421,7 @@ struct sk_buff *ax25_rt_build_path(struct sk_buff *skb, ax25_address *src, ax25_
if (skb->sk != NULL)
skb_set_owner_w(skbn, skb->sk);
- kfree_skb(skb, FREE_WRITE);
+ kfree_skb(skb);
skb = skbn;
}
diff --git a/net/ax25/ax25_subr.c b/net/ax25/ax25_subr.c
index 98a977182..948ff4719 100644
--- a/net/ax25/ax25_subr.c
+++ b/net/ax25/ax25_subr.c
@@ -64,16 +64,16 @@ void ax25_clear_queues(ax25_cb *ax25)
struct sk_buff *skb;
while ((skb = skb_dequeue(&ax25->write_queue)) != NULL)
- kfree_skb(skb, FREE_WRITE);
+ kfree_skb(skb);
while ((skb = skb_dequeue(&ax25->ack_queue)) != NULL)
- kfree_skb(skb, FREE_WRITE);
+ kfree_skb(skb);
while ((skb = skb_dequeue(&ax25->reseq_queue)) != NULL)
- kfree_skb(skb, FREE_READ);
+ kfree_skb(skb);
while ((skb = skb_dequeue(&ax25->frag_queue)) != NULL)
- kfree_skb(skb, FREE_READ);
+ kfree_skb(skb);
}
/*
@@ -91,7 +91,7 @@ void ax25_frames_acked(ax25_cb *ax25, unsigned short nr)
if (ax25->va != nr) {
while (skb_peek(&ax25->ack_queue) != NULL && ax25->va != nr) {
skb = skb_dequeue(&ax25->ack_queue);
- kfree_skb(skb, FREE_WRITE);
+ kfree_skb(skb);
ax25->va = (ax25->va + 1) % ax25->modulus;
}
}
diff --git a/net/ax25/sysctl_net_ax25.c b/net/ax25/sysctl_net_ax25.c
index 000203aaf..2a88a9716 100644
--- a/net/ax25/sysctl_net_ax25.c
+++ b/net/ax25/sysctl_net_ax25.c
@@ -8,7 +8,6 @@
#include <linux/config.h>
#include <linux/mm.h>
#include <linux/sysctl.h>
-#include <linux/config.h>
#include <net/ax25.h>
static int min_ipdefmode[] = {0}, max_ipdefmode[] = {1};