summaryrefslogtreecommitdiffstats
path: root/net/atm
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-02-23 00:40:54 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-02-23 00:40:54 +0000
commit529c593ece216e4aaffd36bd940cb94f1fa63129 (patch)
tree78f1c0b805f5656aa7b0417a043c5346f700a2cf /net/atm
parent0bd079751d25808d1972baee5c4eaa1db2227257 (diff)
Merge with 2.3.43. I did ignore all modifications to the qlogicisp.c
driver due to the Origin A64 hacks.
Diffstat (limited to 'net/atm')
-rw-r--r--net/atm/atm_misc.c6
-rw-r--r--net/atm/clip.c55
-rw-r--r--net/atm/common.c127
-rw-r--r--net/atm/lec.c114
-rw-r--r--net/atm/mpc.c25
-rw-r--r--net/atm/mpoa_caches.c5
-rw-r--r--net/atm/mpoa_proc.c7
-rw-r--r--net/atm/proc.c128
-rw-r--r--net/atm/raw.c11
-rw-r--r--net/atm/resources.c2
-rw-r--r--net/atm/signaling.c33
-rw-r--r--net/atm/signaling.h4
-rw-r--r--net/atm/svc.c3
-rw-r--r--net/atm/tunable.h16
14 files changed, 221 insertions, 315 deletions
diff --git a/net/atm/atm_misc.c b/net/atm/atm_misc.c
index 2a3a891b8..9e2785ed6 100644
--- a/net/atm/atm_misc.c
+++ b/net/atm/atm_misc.c
@@ -10,13 +10,11 @@
#include <asm/atomic.h>
#include <asm/errno.h>
-#include "tunable.h"
-
int atm_charge(struct atm_vcc *vcc,int truesize)
{
atm_force_charge(vcc,truesize);
- if (atomic_read(&vcc->rx_inuse) <= vcc->rx_quota) return 1;
+ if (atomic_read(&vcc->rx_inuse) <= vcc->sk->rcvbuf) return 1;
atm_return(vcc,truesize);
vcc->stats->rx_drop++;
return 0;
@@ -29,7 +27,7 @@ struct sk_buff *atm_alloc_charge(struct atm_vcc *vcc,int pdu_size,
int guess = atm_guess_pdu2truesize(pdu_size);
atm_force_charge(vcc,guess);
- if (atomic_read(&vcc->rx_inuse) <= vcc->rx_quota) {
+ if (atomic_read(&vcc->rx_inuse) <= vcc->sk->rcvbuf) {
struct sk_buff *skb = alloc_skb(pdu_size,gfp_flags);
if (skb) {
diff --git a/net/atm/clip.c b/net/atm/clip.c
index 3e7a6ea16..f7e008dd1 100644
--- a/net/atm/clip.c
+++ b/net/atm/clip.c
@@ -1,6 +1,6 @@
/* net/atm/clip.c - RFC1577 Classical IP over ATM */
-/* Written 1995-1999 by Werner Almesberger, EPFL LRC/ICA */
+/* Written 1995-2000 by Werner Almesberger, EPFL LRC/ICA */
#include <linux/config.h>
@@ -30,7 +30,6 @@
#include <asm/atomic.h>
#include "common.h"
-#include "tunable.h"
#include "resources.h"
#include "ipcommon.h"
#include <net/atmclip.h>
@@ -219,6 +218,18 @@ void clip_push(struct atm_vcc *vcc,struct sk_buff *skb)
}
+static void clip_pop(struct atm_vcc *vcc,struct sk_buff *skb)
+{
+ DPRINTK("clip_pop(vcc %p)\n",vcc);
+ CLIP_VCC(vcc)->old_pop(vcc,skb);
+ /* skb->dev == NULL in outbound ARP packets */
+ if (atm_may_send(vcc,0) && skb->dev) {
+ skb->dev->tbusy = 0;
+ mark_bh(NET_BH);
+ }
+}
+
+
static void clip_neigh_destroy(struct neighbour *neigh)
{
DPRINTK("clip_neigh_destroy (neigh %p)\n",neigh);
@@ -346,6 +357,7 @@ int clip_encap(struct atm_vcc *vcc,int mode)
static int clip_start_xmit(struct sk_buff *skb,struct net_device *dev)
{
struct atmarp_entry *entry;
+ struct atm_vcc *vcc;
DPRINTK("clip_start_xmit (skb %p)\n",skb);
if (!skb->dst) {
@@ -381,9 +393,8 @@ return 0;
return 0;
}
DPRINTK("neigh %p, vccs %p\n",entry,entry->vccs);
- ATM_SKB(skb)->vcc = entry->vccs->vcc;
- DPRINTK("using neighbour %p, vcc %p\n",skb->dst->neighbour,
- ATM_SKB(skb)->vcc);
+ ATM_SKB(skb)->vcc = vcc = entry->vccs->vcc;
+ DPRINTK("using neighbour %p, vcc %p\n",skb->dst->neighbour,vcc);
if (entry->vccs->encap) {
void *here;
@@ -391,15 +402,15 @@ return 0;
memcpy(here,llc_oui,sizeof(llc_oui));
((u16 *) here)[3] = skb->protocol;
}
- atomic_add(skb->truesize,&ATM_SKB(skb)->vcc->tx_inuse);
+ atomic_add(skb->truesize,&vcc->tx_inuse);
+ dev->tbusy = !atm_may_send(vcc,0);
ATM_SKB(skb)->iovcnt = 0;
- ATM_SKB(skb)->atm_options = ATM_SKB(skb)->vcc->atm_options;
+ ATM_SKB(skb)->atm_options = vcc->atm_options;
entry->vccs->last_use = jiffies;
- DPRINTK("atm_skb(%p)->vcc(%p)->dev(%p)\n",skb,ATM_SKB(skb)->vcc,
- ATM_SKB(skb)->vcc->dev);
+ DPRINTK("atm_skb(%p)->vcc(%p)->dev(%p)\n",skb,vcc,vcc->dev);
PRIV(dev)->stats.tx_packets++;
PRIV(dev)->stats.tx_bytes += skb->len;
- (void) ATM_SKB(skb)->vcc->dev->ops->send(ATM_SKB(skb)->vcc,skb);
+ (void) vcc->dev->ops->send(vcc,skb);
return 0;
}
@@ -428,9 +439,11 @@ int clip_mkip(struct atm_vcc *vcc,int timeout)
clip_vcc->last_use = jiffies;
clip_vcc->idle_timeout = timeout*HZ;
clip_vcc->old_push = vcc->push;
+ clip_vcc->old_pop = vcc->pop;
save_flags(flags);
cli();
vcc->push = clip_push;
+ vcc->pop = clip_pop;
skb_migrate(&vcc->recvq,&copy);
restore_flags(flags);
/* re-process everything received between connection setup and MKIP */
@@ -511,7 +524,12 @@ static int clip_init(struct net_device *dev)
dev->hard_header_len = RFC1483LLC_LEN;
dev->mtu = RFC1626_MTU;
dev->addr_len = 0;
- dev->tx_queue_len = 0;
+ dev->tx_queue_len = 100; /* "normal" queue */
+ /* When using a "real" qdisc, the qdisc determines the queue */
+ /* length. tx_queue_len is only used for the default case, */
+ /* without any more elaborate queuing. 100 is a reasonable */
+ /* compromise between decent burst-tolerance and protection */
+ /* against memory hogs. */
dev->flags = 0;
dev_init_buffers(dev); /* is this ever supposed to be used ? */
return 0;
@@ -641,20 +659,7 @@ static void atmarpd_close(struct atm_vcc *vcc)
static struct atmdev_ops atmarpd_dev_ops = {
- NULL, /* no dev_close */
- NULL, /* no open */
- atmarpd_close, /* close */
- NULL, /* no ioctl */
- NULL, /* no getsockopt */
- NULL, /* no setsockopt */
- NULL, /* send */
- NULL, /* no sg_send */
- NULL, /* no send_oam */
- NULL, /* no phy_put */
- NULL, /* no phy_get */
- NULL, /* no feedback */
- NULL, /* no change_qos */
- NULL /* no free_rx_skb */
+ close: atmarpd_close,
};
diff --git a/net/atm/common.c b/net/atm/common.c
index cd1572010..c4288203c 100644
--- a/net/atm/common.c
+++ b/net/atm/common.c
@@ -1,6 +1,6 @@
/* net/atm/common.c - ATM sockets (common part for PVC and SVC) */
-/* Written 1995-1999 by Werner Almesberger, EPFL LRC/ICA */
+/* Written 1995-2000 by Werner Almesberger, EPFL LRC/ICA */
#include <linux/config.h>
@@ -24,11 +24,6 @@
#include <asm/uaccess.h>
#include <asm/poll.h>
-#ifdef CONFIG_MMU_HACKS
-#include <linux/mmuio.h>
-#include <linux/uio.h>
-#endif
-
#if defined(CONFIG_ATM_LANE) || defined(CONFIG_ATM_LANE_MODULE)
#include <linux/atmlec.h>
#include "lec.h"
@@ -62,7 +57,6 @@ EXPORT_SYMBOL(atm_tcp_ops);
#include "resources.h" /* atm_find_dev */
#include "common.h" /* prototypes */
#include "protocols.h" /* atm_init_<transport> */
-#include "tunable.h" /* tunable parameters */
#include "addr.h" /* address registry */
#ifdef CONFIG_ATM_CLIP
#include <net/atmclip.h> /* for clip_create */
@@ -81,10 +75,9 @@ static struct sk_buff *alloc_tx(struct atm_vcc *vcc,unsigned int size)
{
struct sk_buff *skb;
- if (atomic_read(&vcc->tx_inuse) && size+atomic_read(&vcc->tx_inuse)+
- ATM_PDU_OVHD > vcc->tx_quota) {
- DPRINTK("Sorry: tx_inuse = %d, size = %d, tx_quota = %ld\n",
- atomic_read(&vcc->tx_inuse),size,vcc->tx_quota);
+ if (atomic_read(&vcc->tx_inuse) && !atm_may_send(vcc,size)) {
+ DPRINTK("Sorry: tx_inuse = %d, size = %d, sndbuf = %d\n",
+ atomic_read(&vcc->tx_inuse),size,vcc->sk->sndbuf);
return NULL;
}
while (!(skb = alloc_skb(size,GFP_KERNEL))) schedule();
@@ -103,15 +96,13 @@ int atm_create(struct socket *sock,int protocol,int family)
if (sock->type == SOCK_STREAM) return -EINVAL;
if (!(sk = alloc_atm_vcc_sk(family))) return -ENOMEM;
vcc = sk->protinfo.af_atm;
- vcc->flags = ATM_VF_SCRX | ATM_VF_SCTX;
+ vcc->flags = 0;
vcc->dev = NULL;
vcc->family = sock->ops->family;
vcc->alloc_tx = alloc_tx;
vcc->callback = NULL;
memset(&vcc->local,0,sizeof(struct sockaddr_atmsvc));
memset(&vcc->remote,0,sizeof(struct sockaddr_atmsvc));
- vcc->tx_quota = ATM_TXBQ_DEF;
- vcc->rx_quota = ATM_RXBQ_DEF;
atomic_set(&vcc->tx_inuse,0);
atomic_set(&vcc->rx_inuse,0);
vcc->push = NULL;
@@ -382,19 +373,9 @@ int atm_recvmsg(struct socket *sock,struct msghdr *m,int total_len,
else vcc->dev->ops->free_rx_skb(vcc, skb);
return error ? error : eff_len;
}
-#ifdef CONFIG_MMU_HACKS
- if (vcc->flags & ATM_VF_SCRX) {
- mmucp_tofs((unsigned long) buff,eff_len,skb,
- (unsigned long) skb->data);
- return eff_len;
- }
- else
-#endif
- {
- error = copy_to_user(buff,skb->data,eff_len) ? -EFAULT : 0;
- if (!vcc->dev->ops->free_rx_skb) kfree_skb(skb);
- else vcc->dev->ops->free_rx_skb(vcc, skb);
- }
+ error = copy_to_user(buff,skb->data,eff_len) ? -EFAULT : 0;
+ if (!vcc->dev->ops->free_rx_skb) kfree_skb(skb);
+ else vcc->dev->ops->free_rx_skb(vcc, skb);
return error ? error : eff_len;
}
@@ -419,39 +400,6 @@ int atm_sendmsg(struct socket *sock,struct msghdr *m,int total_len,
if (!(vcc->flags & ATM_VF_READY)) return -EPIPE;
if (!size) return 0;
/* verify_area is done by net/socket.c */
-#ifdef CONFIG_MMU_HACKS
- if ((vcc->flags & ATM_VF_SCTX) && vcc->dev->ops->sg_send &&
- vcc->dev->ops->sg_send(vcc,(unsigned long) buff,size)) {
- int res,max_iov;
-
- max_iov = 2+size/PAGE_SIZE;
- /*
- * Doesn't use alloc_tx yet - this will change later. @@@
- */
- while (!(skb = alloc_skb(sizeof(struct iovec)*max_iov,
- GFP_KERNEL))) {
- if (m->msg_flags & MSG_DONTWAIT) return -EAGAIN;
- interruptible_sleep_on(&vcc->wsleep);
- if (signal_pending(current)) return -ERESTARTSYS;
- }
- skb_put(skb,size);
- res = lock_user((unsigned long) buff,size,max_iov,
- (struct iovec *) skb->data);
- if (res < 0) {
- kfree_skb(skb);
- if (res != -EAGAIN) return res;
- }
- else {
- DPRINTK("res is %d\n",res);
- DPRINTK("Asnd %d += %d\n",vcc->tx_inuse,skb->truesize);
- atomic_add(skb->truesize+ATM_PDU_OVHD,&vcc->tx_inuse);
- ATM_SKB(skb)->iovcnt = res;
- error = vcc->dev->ops->send(vcc,skb);
- /* FIXME: security: may send up to 3 "garbage" bytes */
- return error ? error : size;
- }
- }
-#endif
eff = (size+3) & ~3; /* align to word boundary */
while (!(skb = vcc->alloc_tx(vcc,eff))) {
if (m->msg_flags & MSG_DONTWAIT) return -EAGAIN;
@@ -461,6 +409,7 @@ int atm_sendmsg(struct socket *sock,struct msghdr *m,int total_len,
return vcc->reply;
if (!(vcc->flags & ATM_VF_READY)) return -EPIPE;
}
+ skb->dev = NULL; /* for paths shared with net_device interfaces */
ATM_SKB(skb)->iovcnt = 0;
ATM_SKB(skb)->atm_options = vcc->atm_options;
if (copy_from_user(skb_put(skb,size),buff,size)) {
@@ -488,7 +437,7 @@ unsigned int atm_poll(struct file *file,struct socket *sock,poll_table *wait)
if (sock->state != SS_CONNECTING) {
if (vcc->qos.txtp.traffic_class != ATM_NONE &&
vcc->qos.txtp.max_sdu+atomic_read(&vcc->tx_inuse)+
- ATM_PDU_OVHD <= vcc->tx_quota)
+ ATM_PDU_OVHD <= vcc->sk->sndbuf)
mask |= POLLOUT | POLLWRNORM;
}
else if (vcc->reply != WAITING) {
@@ -527,13 +476,13 @@ int atm_ioctl(struct socket *sock,unsigned int cmd,unsigned long arg)
vcc = ATM_SD(sock);
switch (cmd) {
- case TIOCOUTQ:
+ case SIOCOUTQ:
if (sock->state != SS_CONNECTED ||
!(vcc->flags & ATM_VF_READY)) return -EINVAL;
- return put_user(vcc->tx_quota-
+ return put_user(vcc->sk->sndbuf-
atomic_read(&vcc->tx_inuse)-ATM_PDU_OVHD,
(int *) arg) ? -EFAULT : 0;
- case TIOCINQ:
+ case SIOCINQ:
{
struct sk_buff *skb;
@@ -569,30 +518,13 @@ int atm_ioctl(struct socket *sock,unsigned int cmd,unsigned long arg)
return copy_to_user((void *) arg,&vcc->timestamp,
sizeof(struct timeval)) ? -EFAULT : 0;
case ATM_SETSC:
- if (arg & ~(ATM_VF_SCRX | ATM_VF_SCTX)) return -EINVAL;
- /* @@@ race condition - should split flags into
- "volatile" and non-volatile part */
- vcc->flags = (vcc->flags & ~(ATM_VF_SCRX |
- ATM_VF_SCTX)) | arg;
+ printk(KERN_WARNING "ATM_SETSC is obsolete\n");
return 0;
case ATMSIGD_CTRL:
if (!capable(CAP_NET_ADMIN)) return -EPERM;
error = sigd_attach(vcc);
if (!error) sock->state = SS_CONNECTED;
return error;
-#ifdef WE_DONT_SUPPORT_P2MP_YET
- case ATM_CREATE_LEAF:
- {
- struct socket *session;
-
- if (!(session = sockfd_lookup(arg,&error)))
- return error;
- if (sock->ops->family != PF_ATMSVC ||
- session->ops->family != PF_ATMSVC)
- return -EPROTOTYPE;
- return create_leaf(sock,session);
- }
-#endif
#ifdef CONFIG_ATM_CLIP
case SIOCMKCLIP:
if (!capable(CAP_NET_ADMIN)) return -EPERM;
@@ -746,7 +678,8 @@ int atm_ioctl(struct socket *sock,unsigned int cmd,unsigned long arg)
default:
if (!dev->ops->ioctl) return -EINVAL;
size = dev->ops->ioctl(dev,cmd,buf);
- if (size < 0) return size;
+ if (size < 0)
+ return size == -ENOIOCTLCMD ? -EINVAL : size;
}
if (!size) return 0;
return put_user(size,&((struct atmif_sioc *) arg)->length) ?
@@ -805,22 +738,6 @@ static int atm_do_setsockopt(struct socket *sock,int level,int optname,
vcc = ATM_SD(sock);
switch (optname) {
- case SO_SNDBUF:
- if (get_user(value,(unsigned long *) optval))
- return -EFAULT;
- if (!value) value = ATM_TXBQ_DEF;
- if (value < ATM_TXBQ_MIN) value = ATM_TXBQ_MIN;
- if (value > ATM_TXBQ_MAX) value = ATM_TXBQ_MAX;
- vcc->tx_quota = value;
- return 0;
- case SO_RCVBUF:
- if (get_user(value,(unsigned long *) optval))
- return -EFAULT;
- if (!value) value = ATM_RXBQ_DEF;
- if (value < ATM_RXBQ_MIN) value = ATM_RXBQ_MIN;
- if (value > ATM_RXBQ_MAX) value = ATM_RXBQ_MAX;
- vcc->rx_quota = value;
- return 0;
case SO_ATMQOS:
{
struct atm_qos qos;
@@ -859,18 +776,6 @@ static int atm_do_getsockopt(struct socket *sock,int level,int optname,
vcc = ATM_SD(sock);
switch (optname) {
- case SO_SNDBUF:
- return put_user(vcc->tx_quota,(unsigned long *) optval)
- ? -EFAULT : 0;
- case SO_RCVBUF:
- return put_user(vcc->rx_quota,(unsigned long *) optval)
- ? -EFAULT : 0;
- case SO_BCTXOPT:
- /* fall through */
- case SO_BCRXOPT:
- printk(KERN_WARNING "Warning: SO_BCTXOPT/SO_BCRXOPT "
- "are obsolete\n");
- break;
case SO_ATMQOS:
if (!(vcc->flags & ATM_VF_HASQOS)) return -EINVAL;
return copy_to_user(optval,&vcc->qos,sizeof(vcc->qos)) ?
diff --git a/net/atm/lec.c b/net/atm/lec.c
index 67e8c33b4..5b0e9138f 100644
--- a/net/atm/lec.c
+++ b/net/atm/lec.c
@@ -39,7 +39,6 @@
#include "lec.h"
#include "lec_arpc.h"
-#include "tunable.h"
#include "resources.h" /* for bind_vcc() */
#if 0
@@ -60,7 +59,7 @@ static int lec_open(struct net_device *dev);
static int lec_send_packet(struct sk_buff *skb, struct net_device *dev);
static int lec_close(struct net_device *dev);
static struct net_device_stats *lec_get_stats(struct net_device *dev);
-static int lec_init(struct net_device *dev);
+static void lec_init(struct net_device *dev);
static __inline__ struct lec_arp_table* lec_arp_find(struct lec_priv *priv,
unsigned char *mac_addr);
static __inline__ int lec_arp_remove(struct lec_arp_table **lec_arp_tables,
@@ -79,9 +78,6 @@ static struct lane2_ops lane2_ops = {
NULL /* associate indicator, spec 3.1.5 */
};
-/* will be lec0, lec1, lec2 etc. */
-static char myname[] = "lecxx";
-
static unsigned char bus_mac[ETH_ALEN] = {0xff,0xff,0xff,0xff,0xff,0xff};
/* Device structures */
@@ -262,6 +258,17 @@ lec_send_packet(struct sk_buff *skb, struct net_device *dev)
lec_h = (struct lecdatahdr_8023*)skb->data;
lec_h->le_header = htons(priv->lecid);
+#ifdef CONFIG_TR
+ /* Ugly. Use this to realign Token Ring packets for
+ * e.g. PCA-200E driver. */
+ if (priv->is_trdev) {
+ skb2 = skb_realloc_headroom(skb, LEC_HEADER_LEN);
+ kfree_skb(skb);
+ if (skb2 == NULL) return 0;
+ skb = skb2;
+ }
+#endif
+
#if DUMP_PACKETS > 0
printk("%s: send datalen:%ld lecid:%4.4x\n", dev->name,
skb->len, priv->lecid);
@@ -466,6 +473,7 @@ lec_atm_send(struct atm_vcc *vcc, struct sk_buff *skb)
if (dev->change_mtu(dev, mesg->content.config.mtu))
printk("%s: change_mtu to %d failed\n", dev->name,
mesg->content.config.mtu);
+ priv->is_proxy = mesg->content.config.is_proxy;
break;
case l_flush_tran_id:
lec_set_flush_tran_id(priv, mesg->content.normal.atm_addr,
@@ -540,24 +548,8 @@ lec_atm_close(struct atm_vcc *vcc)
}
static struct atmdev_ops lecdev_ops = {
- NULL, /*dev_close*/
- NULL, /*open*/
- lec_atm_close, /*close*/
- NULL, /*ioctl*/
- NULL, /*getsockopt */
- NULL, /*setsockopt */
- lec_atm_send, /*send */
- NULL, /*sg_send */
-#if 0 /* these are disabled in <linux/atmdev.h> too */
- NULL, /*poll */
- NULL, /*send_iovec*/
-#endif
- NULL, /*send_oam*/
- NULL, /*phy_put*/
- NULL, /*phy_get*/
- NULL, /*feedback*/
- NULL, /* change_qos*/
- NULL /* free_rx_skb*/
+ close: lec_atm_close,
+ send: lec_atm_send
};
static struct atm_dev lecatm_dev = {
@@ -626,17 +618,9 @@ static int lec_change_mtu(struct net_device *dev, int new_mtu)
return 0;
}
-static int
+static void
lec_init(struct net_device *dev)
{
- struct lec_priv *priv;
-
- priv = (struct lec_priv *)dev->priv;
- if (priv->is_trdev) {
-#ifdef CONFIG_TR
- init_trdev(dev, 0);
-#endif
- } else ether_setup(dev);
dev->change_mtu = lec_change_mtu;
dev->open = lec_open;
dev->stop = lec_close;
@@ -646,7 +630,7 @@ lec_init(struct net_device *dev)
dev->set_multicast_list = NULL;
dev->do_ioctl = NULL;
printk("%s: Initialized!\n",dev->name);
- return 0;
+ return;
}
static unsigned char lec_ctrl_magic[] = {
@@ -660,7 +644,6 @@ lec_push(struct atm_vcc *vcc, struct sk_buff *skb)
{
struct net_device *dev = (struct net_device *)vcc->proto_data;
struct lec_priv *priv = (struct lec_priv *)dev->priv;
- struct lecdatahdr_8023 *hdr;
#if DUMP_PACKETS >0
int i=0;
@@ -696,9 +679,10 @@ lec_push(struct atm_vcc *vcc, struct sk_buff *skb)
skb_queue_tail(&vcc->recvq, skb);
wake_up(&vcc->sleep);
} else { /* Data frame, queue to protocol handlers */
+ unsigned char *dst;
+
atm_return(vcc,skb->truesize);
- hdr = (struct lecdatahdr_8023 *)skb->data;
- if (hdr->le_header == htons(priv->lecid) ||
+ if (*(uint16_t *)skb->data == htons(priv->lecid) ||
!priv->lecd) {
/* Probably looping back, or if lecd is missing,
lecd has gone down */
@@ -706,7 +690,19 @@ lec_push(struct atm_vcc *vcc, struct sk_buff *skb)
dev_kfree_skb(skb);
return;
}
- if (priv->lec_arp_empty_ones) { /* FILTER DATA!!!! */
+#ifdef CONFIG_TR
+ if (priv->is_trdev) dst = ((struct lecdatahdr_8025 *)skb->data)->h_dest;
+ else
+#endif
+ dst = ((struct lecdatahdr_8023 *)skb->data)->h_dest;
+
+ if (!(dst[0]&0x01) && /* Never filter Multi/Broadcast */
+ !priv->is_proxy && /* Proxy wants all the packets */
+ memcmp(dst, dev->dev_addr, sizeof(dev->dev_addr))) {
+ dev_kfree_skb(skb);
+ return;
+ }
+ if (priv->lec_arp_empty_ones) {
lec_arp_check_empties(priv, vcc, skb);
}
skb->dev = dev;
@@ -757,7 +753,7 @@ lec_mcast_attach(struct atm_vcc *vcc, int arg)
int
lecd_attach(struct atm_vcc *vcc, int arg)
{
- int i, result;
+ int i;
struct lec_priv *priv;
if (arg<0)
@@ -772,30 +768,28 @@ lecd_attach(struct atm_vcc *vcc, int arg)
return -EINVAL;
#endif
if (!dev_lec[i]) {
- dev_lec[i] = (struct net_device*)
- kmalloc(sizeof(struct net_device)+sizeof(myname)+1,
- GFP_KERNEL);
- if (!dev_lec[i])
- return -ENOMEM;
- memset(dev_lec[i],0,sizeof(struct net_device)+sizeof(myname)+1);
+ int is_trdev, size;
- dev_lec[i]->priv = kmalloc(sizeof(struct lec_priv), GFP_KERNEL);
- if (!dev_lec[i]->priv)
+ is_trdev = 0;
+ if (i >= (MAX_LEC_ITF - NUM_TR_DEVS))
+ is_trdev = 1;
+
+ size = sizeof(struct lec_priv);
+#ifdef CONFIG_TR
+ if (is_trdev)
+ dev_lec[i] = init_trdev(NULL, size);
+ else
+#endif
+ dev_lec[i] = init_etherdev(NULL, size);
+ if (!dev_lec[i])
return -ENOMEM;
- memset(dev_lec[i]->priv,0,sizeof(struct lec_priv));
- priv = (struct lec_priv *)dev_lec[i]->priv;
- if (i >= (MAX_LEC_ITF - NUM_TR_DEVS))
- priv->is_trdev = 1;
-
- dev_lec[i]->name = (char*)(dev_lec[i]+1);
- sprintf(dev_lec[i]->name, "lec%d",i);
- dev_lec[i]->init = lec_init;
- if ((result = register_netdev(dev_lec[i])) !=0)
- return result;
- sprintf(dev_lec[i]->name, "lec%d", i); /* init_trdev globbers device name */
+ priv = dev_lec[i]->priv;
+ priv->is_trdev = is_trdev;
+ sprintf(dev_lec[i]->name, "lec%d", i);
+ lec_init(dev_lec[i]);
} else {
- priv = (struct lec_priv *)dev_lec[i]->priv;
+ priv = dev_lec[i]->priv;
if (priv->lecd)
return -EADDRINUSE;
}
@@ -874,7 +868,6 @@ void cleanup_module(void)
#endif
} else
unregister_netdev(dev_lec[i]);
- kfree(dev_lec[i]->priv);
kfree(dev_lec[i]);
dev_lec[i] = NULL;
}
@@ -1535,7 +1528,7 @@ lec_arp_expire_vcc(unsigned long data)
if (entry)
entry->next = to_remove->next;
}
- if (!entry)
+ if (!entry) {
if (to_remove == priv->lec_no_forward) {
priv->lec_no_forward = to_remove->next;
} else {
@@ -1545,6 +1538,7 @@ lec_arp_expire_vcc(unsigned long data)
if (entry)
entry->next = to_remove->next;
}
+ }
lec_arp_clear_vccs(to_remove);
kfree(to_remove);
}
diff --git a/net/atm/mpc.c b/net/atm/mpc.c
index dc00d23c1..b9247334f 100644
--- a/net/atm/mpc.c
+++ b/net/atm/mpc.c
@@ -27,7 +27,6 @@
#include "lec.h"
#include "mpc.h"
-#include "tunable.h"
#include "resources.h" /* for bind_vcc() */
/*
@@ -326,7 +325,7 @@ static void stop_mpc(struct mpoa_client *mpc)
return;
}
-static const char *mpoa_device_type_string (char type)
+static const char * __attribute__ ((unused)) mpoa_device_type_string(char type)
{
switch(type) {
case NON_MPOA:
@@ -623,7 +622,8 @@ static void mpc_vcc_close(struct atm_vcc *vcc, struct net_device *dev)
dprintk("mpoa: (%s) mpc_vcc_close:\n", dev->name);
in_entry = mpc->in_ops->search_by_vcc(vcc, mpc);
if (in_entry) {
- unsigned char *ip = (unsigned char *)&in_entry->ctrl_info.in_dst_ip;
+ unsigned char *ip __attribute__ ((unused)) =
+ (unsigned char *)&in_entry->ctrl_info.in_dst_ip;
dprintk("mpoa: (%s) mpc_vcc_close: ingress SVC closed ip = %u.%u.%u.%u\n",
mpc->dev->name, ip[0], ip[1], ip[2], ip[3]);
in_entry->shortcut = NULL;
@@ -726,21 +726,8 @@ static void mpc_push(struct atm_vcc *vcc, struct sk_buff *skb)
}
static struct atmdev_ops mpc_ops = { /* only send is required */
- NULL, /* dev_close */
- NULL, /* open */
- mpoad_close, /* close */
- NULL, /* ioctl */
- NULL, /* getsockopt */
- NULL, /* setsockopt */
- msg_from_mpoad, /* send */
- NULL, /* sg_send */
- NULL, /* send_oam */
- NULL, /* phy_put */
- NULL, /* phy_get */
- NULL, /* feedback */
- NULL, /* change_qos */
- NULL, /* free_rx_skb */
- NULL /* proc_read */
+ close: mpoad_close,
+ send: msg_from_mpoad
};
static struct atm_dev mpc_dev = {
@@ -1074,7 +1061,7 @@ static void MPOA_trigger_rcvd(struct k_message *msg, struct mpoa_client *client)
*/
static void check_qos_and_open_shortcut(struct k_message *msg, struct mpoa_client *client, in_cache_entry *entry){
uint32_t dst_ip = msg->content.in_info.in_dst_ip;
- unsigned char *ip = (unsigned char *)&dst_ip;
+ unsigned char *ip __attribute__ ((unused)) = (unsigned char *)&dst_ip;
struct atm_mpoa_qos *qos = atm_mpoa_search_qos(dst_ip);
eg_cache_entry *eg_entry = client->eg_ops->search_by_src_ip(dst_ip, client);
if(eg_entry && eg_entry->shortcut){
diff --git a/net/atm/mpoa_caches.c b/net/atm/mpoa_caches.c
index 67d22231c..8b94fb055 100644
--- a/net/atm/mpoa_caches.c
+++ b/net/atm/mpoa_caches.c
@@ -87,7 +87,7 @@ static in_cache_entry *new_in_cache_entry(uint32_t dst_ip,
struct mpoa_client *client)
{
unsigned long flags;
- unsigned char *ip = (unsigned char *)&dst_ip;
+ unsigned char *ip __attribute__ ((unused)) = (unsigned char *)&dst_ip;
in_cache_entry* entry = kmalloc(sizeof(in_cache_entry), GFP_KERNEL);
if (entry == NULL) {
@@ -149,7 +149,8 @@ static int cache_hit( in_cache_entry * entry, struct mpoa_client *mpc)
if( entry->count > mpc->parameters.mpc_p1 &&
entry->entry_state == INGRESS_INVALID){
- unsigned char *ip = (unsigned char *)&entry->ctrl_info.in_dst_ip;
+ unsigned char *ip __attribute__ ((unused)) =
+ (unsigned char *)&entry->ctrl_info.in_dst_ip;
dprintk("mpoa: (%s) mpoa_caches.c: threshold exceeded for ip %u.%u.%u.%u, sending MPOA res req\n", mpc->dev->name, ip[0], ip[1], ip[2], ip[3]);
entry->entry_state = INGRESS_RESOLVING;
diff --git a/net/atm/mpoa_proc.c b/net/atm/mpoa_proc.c
index 63ca5016f..c779b18eb 100644
--- a/net/atm/mpoa_proc.c
+++ b/net/atm/mpoa_proc.c
@@ -41,9 +41,8 @@ static int parse_qos(const char *buff, int len);
* Define allowed FILE OPERATIONS
*/
static struct file_operations mpc_file_operations = {
- NULL, /* lseek */
- proc_mpc_read, /* read */
- proc_mpc_write, /* write */
+ read: proc_mpc_read,
+ write: proc_mpc_write,
};
/*
@@ -143,7 +142,7 @@ static ssize_t proc_mpc_read(struct file *file, char *buff,
while(eg_entry != NULL){
for(i=0;i<ATM_ESA_LEN;i++){
length += sprintf((char *)page + length,"%02x",eg_entry->ctrl_info.in_MPC_data_ATM_addr[i]);}
- length += sprintf((char *)page + length,"\n%-16lu%s%-14lu%-15u",ntohl(eg_entry->ctrl_info.cache_id), egress_state_string(eg_entry->entry_state), (eg_entry->ctrl_info.holding_time-(now.tv_sec-eg_entry->tv.tv_sec)), eg_entry->packets_rcvd);
+ length += sprintf((char *)page + length,"\n%-16lu%s%-14lu%-15u",(unsigned long) ntohl(eg_entry->ctrl_info.cache_id), egress_state_string(eg_entry->entry_state), (eg_entry->ctrl_info.holding_time-(now.tv_sec-eg_entry->tv.tv_sec)), eg_entry->packets_rcvd);
/* latest IP address */
temp = (unsigned char *)&eg_entry->latest_ip_addr;
diff --git a/net/atm/proc.c b/net/atm/proc.c
index 503e762d7..b67ae428a 100644
--- a/net/atm/proc.c
+++ b/net/atm/proc.c
@@ -1,6 +1,6 @@
/* net/atm/proc.c - ATM /proc interface */
-/* Written 1995-1999 by Werner Almesberger, EPFL LRC/ICA */
+/* Written 1995-2000 by Werner Almesberger, EPFL LRC/ICA */
/*
* The mechanism used here isn't designed for speed but rather for convenience
@@ -56,13 +56,11 @@ static ssize_t proc_spec_atm_read(struct file *file,char *buf,size_t count,
loff_t *pos);
static struct file_operations proc_dev_atm_operations = {
- NULL, /* lseek */
- proc_dev_atm_read, /* read */
+ read: proc_dev_atm_read,
};
static struct file_operations proc_spec_atm_operations = {
- NULL, /* lseek */
- proc_spec_atm_read, /* read */
+ read: proc_spec_atm_read,
};
static struct inode_operations proc_dev_atm_inode_operations = {
@@ -73,10 +71,11 @@ static struct inode_operations proc_spec_atm_inode_operations = {
&proc_spec_atm_operations, /* default ATM directory file-ops */
};
+
static void add_stats(char *buf,const char *aal,
const struct atm_aal_stats *stats)
{
- sprintf(strchr(buf,0),"%s ( %ld %ld %ld %ld %ld )",aal,stats->tx,
+ sprintf(strchr(buf,0),"%s ( %d %d %d %d %d )",aal,stats->tx,
stats->tx_err,stats->rx,stats->rx_err,stats->rx_drop);
}
@@ -112,7 +111,7 @@ static int svc_addr(char *buf,struct sockaddr_atmsvc *addr)
len = strlen(addr->sas_addr.pub);
buf += len;
if (*addr->sas_addr.pub) {
- *buf += '+';
+ *buf++ = '+';
len++;
}
}
@@ -209,12 +208,39 @@ static const char *vcc_state(struct atm_vcc *vcc)
}
+static void vc_info(struct atm_vcc *vcc,char *buf)
+{
+ char *here;
+
+ here = buf+sprintf(buf,"%p ",vcc);
+ if (!vcc->dev) here += sprintf(here,"Unassigned ");
+ else here += sprintf(here,"%3d %3d %5d ",vcc->dev->number,vcc->vpi,
+ vcc->vci);
+ switch (vcc->family) {
+ case AF_ATMPVC:
+ here += sprintf(here,"PVC");
+ break;
+ case AF_ATMSVC:
+ here += sprintf(here,"SVC");
+ break;
+ default:
+ here += sprintf(here,"%3d",vcc->family);
+ }
+ here += sprintf(here," %04x %5d %7d/%7d %7d/%7d\n",vcc->flags,
+ vcc->reply,
+ atomic_read(&vcc->tx_inuse),vcc->sk->sndbuf,
+ atomic_read(&vcc->rx_inuse),vcc->sk->rcvbuf);
+}
+
+
static void svc_info(struct atm_vcc *vcc,char *buf)
{
char *here;
int i;
- if (!vcc->dev) sprintf(buf,"Unassigned ");
+ if (!vcc->dev)
+ sprintf(buf,sizeof(void *) == 4 ? "N/A@%p%6s" : "N/A@%p%2s",
+ vcc,"");
else sprintf(buf,"%3d %3d %5d ",vcc->dev->number,vcc->vpi,vcc->vci);
here = strchr(buf,0);
here += sprintf(here,"%-10s ",vcc_state(vcc));
@@ -253,7 +279,6 @@ static void
lec_info(struct lec_arp_table *entry, char *buf)
{
int j, offset=0;
-
for(j=0;j<ETH_ALEN;j++) {
offset+=sprintf(buf+offset,"%2.2x",0xff&entry->mac_addr[j]);
@@ -322,6 +347,34 @@ static int atm_pvc_info(loff_t pos,char *buf)
return 0;
}
+
+static int atm_vc_info(loff_t pos,char *buf)
+{
+ struct atm_dev *dev;
+ struct atm_vcc *vcc;
+ int left;
+
+ if (!pos)
+ return sprintf(buf,sizeof(void *) == 4 ? "%-8s%s" : "%-16s%s",
+ "Address"," Itf VPI VCI Fam Flags Reply Send buffer"
+ " Recv buffer\n");
+ left = pos-1;
+ for (dev = atm_devs; dev; dev = dev->next)
+ for (vcc = dev->vccs; vcc; vcc = vcc->next)
+ if (!left--) {
+ vc_info(vcc,buf);
+ return strlen(buf);
+ }
+ for (vcc = nodev_vccs; vcc; vcc = vcc->next)
+ if (!left--) {
+ vc_info(vcc,buf);
+ return strlen(buf);
+ }
+
+ return 0;
+}
+
+
static int atm_svc_info(loff_t pos,char *buf)
{
struct atm_dev *dev;
@@ -388,6 +441,7 @@ static int atm_lec_info(loff_t pos,char *buf)
struct lec_arp_table *entry;
int i, count, d, e;
struct net_device **dev_lec;
+
if (!pos) {
return sprintf(buf,"Itf MAC ATM destination"
" Status Flags "
@@ -449,7 +503,8 @@ static ssize_t proc_dev_atm_read(struct file *file,char *buf,size_t count,
if (count < 0) return -EINVAL;
page = get_free_page(GFP_KERNEL);
if (!page) return -ENOMEM;
- dev = ((struct proc_dir_entry *)file->f_dentry->d_inode->u.generic_ip)->data;
+ dev = ((struct proc_dir_entry *) file->f_dentry->d_inode->u.generic_ip)
+ ->data;
if (!dev->ops->proc_read)
length = -EINVAL;
else {
@@ -464,13 +519,15 @@ static ssize_t proc_dev_atm_read(struct file *file,char *buf,size_t count,
return length;
}
+
static ssize_t proc_spec_atm_read(struct file *file,char *buf,size_t count,
loff_t *pos)
{
unsigned long page;
int length;
int (*info)(loff_t,char *);
- info = ((struct proc_dir_entry *)file->f_dentry->d_inode->u.generic_ip)->data;
+ info = ((struct proc_dir_entry *) file->f_dentry->d_inode->u.generic_ip)
+ ->data;
if (count < 0) return -EINVAL;
page = get_free_page(GFP_KERNEL);
@@ -485,9 +542,11 @@ static ssize_t proc_spec_atm_read(struct file *file,char *buf,size_t count,
return length;
}
+
struct proc_dir_entry *atm_proc_root;
EXPORT_SYMBOL(atm_proc_root);
+
int atm_proc_dev_register(struct atm_dev *dev)
{
int digits,num;
@@ -520,48 +579,41 @@ void atm_proc_dev_deregister(struct atm_dev *dev)
kfree(dev->proc_name);
}
+
+#define CREATE_ENTRY(name) \
+ name = create_proc_entry(#name,0,atm_proc_root); \
+ if (!name) goto cleanup; \
+ name->data = atm_##name##_info; \
+ name->ops = &proc_spec_atm_inode_operations
+
+
int __init atm_proc_init(void)
{
- struct proc_dir_entry *dev=NULL,*pvc=NULL,*svc=NULL,*arp=NULL,*lec=NULL;
+ struct proc_dir_entry *devices = NULL,*pvc = NULL,*svc = NULL;
+ struct proc_dir_entry *arp = NULL,*lec = NULL,*vc = NULL;
+
atm_proc_root = proc_mkdir("atm", &proc_root);
if (!atm_proc_root)
return -ENOMEM;
- dev = create_proc_entry("devices",0,atm_proc_root);
- if (!dev)
- goto cleanup;
- dev->data = atm_devices_info;
- dev->ops = &proc_spec_atm_inode_operations;
- pvc = create_proc_entry("pvc",0,atm_proc_root);
- if (!pvc)
- goto cleanup;
- pvc->data = atm_pvc_info;
- pvc->ops = &proc_spec_atm_inode_operations;
- svc = create_proc_entry("svc",0,atm_proc_root);
- if (!svc)
- goto cleanup;
- svc->data = atm_svc_info;
- svc->ops = &proc_spec_atm_inode_operations;
+ CREATE_ENTRY(devices);
+ CREATE_ENTRY(pvc);
+ CREATE_ENTRY(svc);
+ CREATE_ENTRY(vc);
#ifdef CONFIG_ATM_CLIP
- arp = create_proc_entry("arp",0,atm_proc_root);
- if (!arp)
- goto cleanup;
- arp->data = atm_arp_info;
- arp->ops = &proc_spec_atm_inode_operations;
+ CREATE_ENTRY(arp);
#endif
#if defined(CONFIG_ATM_LANE) || defined(CONFIG_ATM_LANE_MODULE)
- lec = create_proc_entry("lec",0,atm_proc_root);
- if (!lec)
- goto cleanup;
- lec->data = atm_lec_info;
- lec->ops = &proc_spec_atm_inode_operations;
+ CREATE_ENTRY(lec);
#endif
return 0;
+
cleanup:
- if (dev) remove_proc_entry("devices",atm_proc_root);
+ if (devices) remove_proc_entry("devices",atm_proc_root);
if (pvc) remove_proc_entry("pvc",atm_proc_root);
if (svc) remove_proc_entry("svc",atm_proc_root);
if (arp) remove_proc_entry("arp",atm_proc_root);
if (lec) remove_proc_entry("lec",atm_proc_root);
+ if (vc) remove_proc_entry("vc",atm_proc_root);
remove_proc_entry("atm",&proc_root);
return -ENOMEM;
}
diff --git a/net/atm/raw.c b/net/atm/raw.c
index d93baa0ec..0db4aabb6 100644
--- a/net/atm/raw.c
+++ b/net/atm/raw.c
@@ -3,7 +3,6 @@
/* Written 1995-1999 by Werner Almesberger, EPFL LRC/ICA */
-#include <linux/config.h>
#include <linux/module.h>
#include <linux/sched.h>
#include <linux/atmdev.h>
@@ -11,14 +10,8 @@
#include <linux/skbuff.h>
#include <linux/mm.h>
-#ifdef CONFIG_MMU_HACKS
-#include <linux/mmuio.h>
-#include <linux/uio.h>
-#endif
-
#include "common.h"
#include "protocols.h"
-#include "tunable.h" /* tunable parameters */
#if 0
@@ -43,10 +36,6 @@ void atm_push_raw(struct atm_vcc *vcc,struct sk_buff *skb)
static void atm_pop_raw(struct atm_vcc *vcc,struct sk_buff *skb)
{
-#ifdef CONFIG_MMU_HACKS
- if (ATM_SKB(skb)->iovcnt)
- unlock_user(ATM_SKB(skb)->iovcnt,(struct iovec *) skb->data);
-#endif
DPRINTK("APopR (%d) %d -= %d\n",vcc->vci,vcc->tx_inuse,skb->truesize);
atomic_sub(skb->truesize+ATM_PDU_OVHD,&vcc->tx_inuse);
dev_kfree_skb(skb);
diff --git a/net/atm/resources.c b/net/atm/resources.c
index 1a799433a..116682f5b 100644
--- a/net/atm/resources.c
+++ b/net/atm/resources.c
@@ -145,8 +145,10 @@ struct sock *alloc_atm_vcc_sk(int family)
sk_free(sk);
return NULL;
}
+ sock_init_data(NULL,sk);
sk->destruct = atm_free_sock;
memset(vcc,0,sizeof(*vcc));
+ vcc->sk = sk;
if (nodev_vccs) nodev_vccs->prev = vcc;
vcc->prev = NULL;
vcc->next = nodev_vccs;
diff --git a/net/atm/signaling.c b/net/atm/signaling.c
index 6c0ef9f0f..46e22d50c 100644
--- a/net/atm/signaling.c
+++ b/net/atm/signaling.c
@@ -1,6 +1,6 @@
/* net/atm/signaling.c - ATM signaling */
-/* Written 1995-1999 by Werner Almesberger, EPFL LRC/ICA */
+/* Written 1995-2000 by Werner Almesberger, EPFL LRC/ICA */
#include <linux/errno.h> /* error codes */
@@ -13,7 +13,6 @@
#include <linux/atmsvc.h>
#include <linux/atmdev.h>
-#include "tunable.h"
#include "resources.h"
#include "signaling.h"
@@ -92,8 +91,9 @@ static int sigd_send(struct atm_vcc *vcc,struct sk_buff *skb)
msg = (struct atmsvc_msg *) skb->data;
atomic_sub(skb->truesize+ATM_PDU_OVHD,&vcc->tx_inuse);
- DPRINTK("sigd_send %d (0x%lx)\n",(int) msg->type,msg->vcc);
- vcc = (struct atm_vcc *) msg->vcc;
+ DPRINTK("sigd_send %d (0x%lx)\n",(int) msg->type,
+ (unsigned long) msg->vcc);
+ vcc = *(struct atm_vcc **) &msg->vcc;
switch (msg->type) {
case as_okay:
vcc->reply = msg->reply;
@@ -118,7 +118,7 @@ static int sigd_send(struct atm_vcc *vcc,struct sk_buff *skb)
vcc->reply = msg->reply;
break;
case as_indicate:
- vcc = (struct atm_vcc *) msg->listen_vcc;
+ vcc = *(struct atm_vcc **) &msg->listen_vcc;
DPRINTK("as_indicate!!!\n");
if (!vcc->backlog_quota) {
sigd_enq(0,as_reject,vcc,NULL,NULL);
@@ -152,7 +152,7 @@ static int sigd_send(struct atm_vcc *vcc,struct sk_buff *skb)
void sigd_enq(struct atm_vcc *vcc,enum atmsvc_msg_type type,
- const struct atm_vcc *listen_vcc,const struct sockaddr_atmpvc *pvc,
+ struct atm_vcc *listen_vcc,const struct sockaddr_atmpvc *pvc,
const struct sockaddr_atmsvc *svc)
{
struct sk_buff *skb;
@@ -162,9 +162,10 @@ void sigd_enq(struct atm_vcc *vcc,enum atmsvc_msg_type type,
while (!(skb = alloc_skb(sizeof(struct atmsvc_msg),GFP_KERNEL)))
schedule();
msg = (struct atmsvc_msg *) skb_put(skb,sizeof(struct atmsvc_msg));
+ memset(msg,0,sizeof(*msg));
msg->type = type;
- msg->vcc = (unsigned long) vcc;
- msg->listen_vcc = (unsigned long) listen_vcc;
+ *(struct atm_vcc **) &msg->vcc = vcc;
+ *(struct atm_vcc **) &msg->listen_vcc = listen_vcc;
msg->reply = 0; /* other ISP applications may use this field */
if (vcc) {
msg->qos = vcc->qos;
@@ -210,20 +211,8 @@ static void sigd_close(struct atm_vcc *vcc)
static struct atmdev_ops sigd_dev_ops = {
- NULL, /* no dev_close */
- NULL, /* no open */
- sigd_close, /* close */
- NULL, /* no ioctl */
- NULL, /* no getsockopt */
- NULL, /* no setsockopt */
- sigd_send, /* send */
- NULL, /* no sg_send */
- NULL, /* no send_oam */
- NULL, /* no phy_put */
- NULL, /* no phy_get */
- NULL, /* no feedback */
- NULL, /* no change_qos */
- NULL /* no free_rx_skb */
+ close: sigd_close,
+ send: sigd_send
};
diff --git a/net/atm/signaling.h b/net/atm/signaling.h
index 117e8431e..dbb8c21e1 100644
--- a/net/atm/signaling.h
+++ b/net/atm/signaling.h
@@ -1,6 +1,6 @@
/* net/atm/signaling.h - ATM signaling */
-/* Written 1995-1999 by Werner Almesberger, EPFL LRC/ICA */
+/* Written 1995-2000 by Werner Almesberger, EPFL LRC/ICA */
#ifndef NET_ATM_SIGNALING_H
@@ -18,7 +18,7 @@ extern struct atm_vcc *sigd; /* needed in svc_release */
void sigd_enq(struct atm_vcc *vcc,enum atmsvc_msg_type type,
- const struct atm_vcc *listen_vcc,const struct sockaddr_atmpvc *pvc,
+ struct atm_vcc *listen_vcc,const struct sockaddr_atmpvc *pvc,
const struct sockaddr_atmsvc *svc);
int sigd_attach(struct atm_vcc *vcc);
void signaling_init(void);
diff --git a/net/atm/svc.c b/net/atm/svc.c
index 778ce1856..82ea22072 100644
--- a/net/atm/svc.c
+++ b/net/atm/svc.c
@@ -1,6 +1,6 @@
/* net/atm/svc.c - ATM SVC sockets */
-/* Written 1995-1999 by Werner Almesberger, EPFL LRC/ICA */
+/* Written 1995-2000 by Werner Almesberger, EPFL LRC/ICA */
#include <linux/string.h>
@@ -253,6 +253,7 @@ static int svc_accept(struct socket *sock,struct socket *newsock,int flags)
new_vcc->qos = msg->qos;
new_vcc->flags |= ATM_VF_HASQOS;
new_vcc->remote = msg->svc;
+ new_vcc->local = msg->local;
new_vcc->sap = msg->sap;
error = atm_connect(newsock,msg->pvc.sap_addr.itf,
msg->pvc.sap_addr.vpi,msg->pvc.sap_addr.vci);
diff --git a/net/atm/tunable.h b/net/atm/tunable.h
deleted file mode 100644
index 75071f75a..000000000
--- a/net/atm/tunable.h
+++ /dev/null
@@ -1,16 +0,0 @@
-/* net/atm/tunable.h - Tunable parameters of ATM support */
-
-/* Written 1995-1999 by Werner Almesberger, EPFL LRC/ICA */
-
-
-#ifndef NET_ATM_TUNABLE_H
-#define NET_ATM_TUNABLE_H
-
-#define ATM_RXBQ_DEF ( 64*1024) /* default RX buffer quota, in bytes */
-#define ATM_TXBQ_DEF ( 64*1024) /* default TX buffer quota, in bytes */
-#define ATM_RXBQ_MIN ( 1*1024) /* RX buffer minimum, in bytes */
-#define ATM_TXBQ_MIN ( 1*1024) /* TX buffer minimum, in bytes */
-#define ATM_RXBQ_MAX (1024*1024) /* RX buffer quota limit, in bytes */
-#define ATM_TXBQ_MAX (1024*1024) /* TX buffer quota limit, in bytes */
-
-#endif