diff -ur --new-file old/linux/Documentation/Configure.help new/linux/Documentation/Configure.help --- old/linux/Documentation/Configure.help Thu Apr 22 20:09:51 1999 +++ new/linux/Documentation/Configure.help Thu Apr 22 20:10:45 1999 @@ -3499,6 +3499,21 @@ during revalidation. If this configuration option is set to "yes", packets to such neighbours are silently discarded instead. +LAN Emulation (LANE) support +CONFIG_ATM_LANE + LAN Emulation emulates services of existing LANs across an ATM network. + Besides operating as a normal ATM end station client, Linux LANE client + can also act as an proxy client bridging packets between ELAN and + Ethernet segments. You need LANE if you want to try MPOA. + +Multi-Protocol Over ATM (MPOA) support +CONFIG_ATM_MPOA + Multi-Protocol Over ATM allows ATM edge devices such as routers, + bridges and ATM attached hosts establish direct ATM VCs across + subnetwork boundaries. These shortcut connections bypass routers + enhancing overall network performance. + + Application REQUested IP over ATM CONFIG_AREQUIPA Arequipa is a mechanism to create ATM connections under application diff -ur --new-file old/linux/drivers/atm/eni.c new/linux/drivers/atm/eni.c --- old/linux/drivers/atm/eni.c Thu Apr 22 20:09:53 1999 +++ new/linux/drivers/atm/eni.c Thu Apr 22 20:10:45 1999 @@ -1657,6 +1657,7 @@ DPRINTK(">eni_init\n"); dev->ci_range.vpi_bits = 0; dev->ci_range.vci_bits = NR_VCI_LD; + dev->link_rate = ATM_OC3_PCR; eni_dev = ENI_DEV(dev); pci_dev = eni_dev->pci_dev; real_base = pci_dev->base_address[0] & MEM_VALID; /* strip flags */ diff -ur --new-file old/linux/drivers/atm/nicstar.c new/linux/drivers/atm/nicstar.c --- old/linux/drivers/atm/nicstar.c Thu Apr 22 20:09:53 1999 +++ new/linux/drivers/atm/nicstar.c Thu Apr 22 20:10:45 1999 @@ -594,7 +594,7 @@ if (mac[i] == NULL) nicstar_init_eprom(card->membase); - if (request_irq(pcidev->irq, &ns_irq_handler, SA_INTERRUPT, "nicstar", card) != 0) + if (request_irq(pcidev->irq, &ns_irq_handler, SA_INTERRUPT | SA_SHIRQ, "nicstar", card) != 0) { printk("nicstar%d: can't allocate IRQ.\n", i); error = 9; @@ -871,6 +871,7 @@ card->atmdev->dev_data = card; card->atmdev->ci_range.vpi_bits = card->vpibits; card->atmdev->ci_range.vci_bits = card->vcibits; + card->atmdev->link_rate = card->max_pcr; num_cards++; @@ -1517,6 +1518,7 @@ } vcc->flags |= ATM_VF_READY; + MOD_INC_USE_COUNT; return 0; } @@ -1644,6 +1646,7 @@ vcc->dev_data = NULL; vcc->flags &= ~(ATM_VF_PARTIAL | ATM_VF_ADDR); + MOD_DEC_USE_COUNT; #ifdef RX_DEBUG { @@ -2186,10 +2189,11 @@ if (ns_rsqe_crcerr(rsqe) || len + 8 > iovb->len || len + (47 + 8) < iovb->len) { - if (ns_rsqe_crcerr(rsqe)) - printk("nicstar%d: AAL5 CRC error.\n", card->index); + printk("nicstar%d: AAL5 CRC error", card->index); + if (len + 8 > iovb->len || len + (47 + 8) < iovb->len) + printk(" - PDU size mismatch.\n"); else - printk("nicstar%d: AAL5 PDU size mismatch.\n", card->index); + printk(".\n"); vcc->stats->rx_err++; recycle_iovec_rx_bufs(card, (struct iovec *) iovb->data, ATM_SKB(iovb)->iovcnt); diff -ur --new-file old/linux/drivers/atm/nicstar.h new/linux/drivers/atm/nicstar.h --- old/linux/drivers/atm/nicstar.h Thu Apr 22 20:09:53 1999 +++ new/linux/drivers/atm/nicstar.h Thu Apr 22 20:10:45 1999 @@ -27,7 +27,7 @@ /* Options ********************************************************************/ -#define NS_MAX_CARDS 1 /* Maximum number of NICStAR based cards +#define NS_MAX_CARDS 4 /* Maximum number of NICStAR based cards controlled by the device driver. Must be <= 5 */ @@ -99,7 +99,7 @@ #define NS_IOREMAP_SIZE 4096 -#define IDT_25_PCR (25600000/270*260/8/53) +#define IDT_25_PCR ((25600000 / 8 - 8000) / 54) #define BUF_SM 0x00000000 /* These two are used for push_rxbufs() */ #define BUF_LG 0x00000001 /* CMD, Write_FreeBufQ, LBUF bit */ diff -ur --new-file old/linux/drivers/atm/zatm.c new/linux/drivers/atm/zatm.c --- old/linux/drivers/atm/zatm.c Thu Apr 22 20:09:53 1999 +++ new/linux/drivers/atm/zatm.c Thu Apr 22 20:10:46 1999 @@ -1,6 +1,6 @@ /* drivers/atm/zatm.c - ZeitNet ZN122x device driver */ -/* Written 1995-1998 by Werner Almesberger, EPFL LRC/ICA */ +/* Written 1995-1999 by Werner Almesberger, EPFL LRC/ICA */ #include @@ -1481,6 +1481,7 @@ for (rx = 1; rx < vccs; rx <<= 1) ld++; dev->ci_range.vpi_bits = 0; /* @@@ no VPI for now */ dev->ci_range.vci_bits = ld; + dev->link_rate = ATM_OC3_PCR; zatm_dev->chans = vccs; /* ??? */ curr = rx*RX_SIZE/4; DPRINTK("RX pool 0x%08lx\n",curr); diff -ur --new-file old/linux/include/linux/atmdev.h new/linux/include/linux/atmdev.h --- old/linux/include/linux/atmdev.h Thu Apr 22 20:09:53 1999 +++ new/linux/include/linux/atmdev.h Thu Apr 22 20:10:47 1999 @@ -19,6 +19,9 @@ bits per cell: /8/53 max cell rate: 353207.547 cells/sec */ +#define ATM_PDU_OVHD 0 /* number of bytes to charge against buffer + quota per PDU */ + #define ATM_SD(s) ((s)->sk->protinfo.af_atm) @@ -36,6 +39,8 @@ }; +#define ATM_GETLINKRATE _IOW('a',ATMIOC_ITF+1,struct atmif_sioc) + /* get link rate */ #define ATM_GETNAMES _IOW('a',ATMIOC_ITF+3,struct atm_iobuf) /* get interface names (numbers) */ #define ATM_GETTYPE _IOW('a',ATMIOC_ITF+4,struct atmif_sioc) @@ -251,6 +256,7 @@ struct atm_cirange ci_range; /* VPI/VCI range */ struct atm_dev_stats stats; /* statistics */ char signal; /* signal status (ATM_PHY_SIG_*) */ + int link_rate; /* link rate (default: OC3) */ #ifdef CONFIG_PROC_FS struct proc_dir_entry *proc_entry; /* proc entry */ char *proc_name; /* proc entry name */ @@ -330,6 +336,18 @@ static __inline__ int atm_pdu2truesize(int pdu_size) { return (pdu_size+15) & ~15; +} + + +static __inline__ void atm_force_charge(struct atm_vcc *vcc,int truesize) +{ + atomic_add(truesize+ATM_PDU_OVHD,&vcc->rx_inuse); +} + + +static __inline__ void atm_return(struct atm_vcc *vcc,int truesize) +{ + atomic_sub(truesize+ATM_PDU_OVHD,&vcc->rx_inuse); } diff -ur --new-file old/linux/net/atm/Makefile new/linux/net/atm/Makefile --- old/linux/net/atm/Makefile Thu Apr 22 20:09:54 1999 +++ new/linux/net/atm/Makefile Thu Apr 22 20:10:48 1999 @@ -16,7 +16,7 @@ ifeq ($(CONFIG_ATM),y) O_OBJS = addr.o pvc.o raw.o signaling.o svc.o # party.o -OX_OBJS = common.o misc.o resources.o +OX_OBJS = common.o atm_misc.o resources.o ifeq ($(CONFIG_MMU_HACKS),y) O_OBJS += mmuio.o diff -ur --new-file old/linux/net/atm/atm_misc.c new/linux/net/atm/atm_misc.c --- old/linux/net/atm/atm_misc.c Thu Jan 1 01:00:00 1970 +++ new/linux/net/atm/atm_misc.c Thu Apr 22 20:10:48 1999 @@ -0,0 +1,124 @@ +/* net/atm/atm_misc.c - Various functions for use by ATM drivers */ + +/* Written 1995-1999 by Werner Almesberger, EPFL ICA */ + + +#include +#include +#include +#include +#include +#include +#include + +#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; + atm_return(vcc,truesize); + vcc->stats->rx_drop++; + return 0; +} + + +static int check_ci(struct atm_vcc *vcc,short vpi,int vci) +{ + struct atm_vcc *walk; + + for (walk = vcc->dev->vccs; walk; walk = walk->next) + if ((walk->flags & ATM_VF_ADDR) && walk->vpi == vpi && + walk->vci == vci && ((walk->qos.txtp.traffic_class != + ATM_NONE && vcc->qos.txtp.traffic_class != ATM_NONE) || + (walk->qos.rxtp.traffic_class != ATM_NONE && + vcc->qos.rxtp.traffic_class != ATM_NONE))) + return -EADDRINUSE; + /* allow VCCs with same VPI/VCI iff they don't collide on + TX/RX (but we may refuse such sharing for other reasons, + e.g. if protocol requires to have both channels) */ + return 0; +} + + +int atm_find_ci(struct atm_vcc *vcc,short *vpi,int *vci) +{ + static short p = 0; /* poor man's per-device cache */ + static int c = 0; + short old_p; + int old_c; + + if (*vpi != ATM_VPI_ANY && *vci != ATM_VCI_ANY) + return check_ci(vcc,*vpi,*vci); + /* last scan may have left values out of bounds for current device */ + if (*vpi != ATM_VPI_ANY) p = *vpi; + else if (p >= 1 << vcc->dev->ci_range.vpi_bits) p = 0; + if (*vci != ATM_VCI_ANY) c = *vci; + else if (c < ATM_NOT_RSV_VCI || c >= 1 << vcc->dev->ci_range.vci_bits) + c = ATM_NOT_RSV_VCI; + old_p = p; + old_c = c; + do { + if (!check_ci(vcc,p,c)) { + *vpi = p; + *vci = c; + return 0; + } + if (*vci == ATM_VCI_ANY) { + c++; + if (c >= 1 << vcc->dev->ci_range.vci_bits) + c = ATM_NOT_RSV_VCI; + } + if ((c == ATM_NOT_RSV_VCI || *vci != ATM_VCI_ANY) && + *vpi == ATM_VPI_ANY) { + p++; + if (p >= 1 << vcc->dev->ci_range.vpi_bits) p = 0; + } + } + while (old_p != p || old_c != c); + return -EADDRINUSE; +} + + +/* + * atm_pcr_goal returns the positive PCR if it should be rounded up, the + * negative PCR if it should be rounded down, and zero if the maximum available + * bandwidth should be used. + * + * The rules are as follows (* = maximum, - = absent (0), x = value "x", + * (x+ = x or next value above x, x- = x or next value below): + * + * min max pcr result min max pcr result + * - - - * (UBR only) x - - x+ + * - - * * x - * * + * - - z z- x - z z- + * - * - * x * - x+ + * - * * * x * * * + * - * z z- x * z z- + * - y - y- x y - x+ + * - y * y- x y * y- + * - y z z- x y z z- + * + * All non-error cases can be converted with the following simple set of rules: + * + * if pcr == z then z- + * else if min == x && pcr == - then x+ + * else if max == y then y- + * else * + */ + + +int atm_pcr_goal(struct atm_trafprm *tp) +{ + if (tp->pcr && tp->pcr != ATM_MAX_PCR) return -tp->pcr; + if (tp->min_pcr && !tp->pcr) return tp->min_pcr; + if (tp->max_pcr != ATM_MAX_PCR) return -tp->max_pcr; + return 0; +} + + +EXPORT_SYMBOL(atm_charge); +EXPORT_SYMBOL(atm_return); +EXPORT_SYMBOL(atm_find_ci); +EXPORT_SYMBOL(atm_pcr_goal); diff -ur --new-file old/linux/net/atm/clip.c new/linux/net/atm/clip.c --- old/linux/net/atm/clip.c Thu Apr 22 20:09:54 1999 +++ new/linux/net/atm/clip.c Thu Apr 22 20:10:48 1999 @@ -1,6 +1,6 @@ /* net/atm/clip.c - RFC1577 Classical IP over ATM */ -/* Written 1995-1998 by Werner Almesberger, EPFL LRC/ICA */ +/* Written 1995-1999 by Werner Almesberger, EPFL LRC/ICA */ #include @@ -63,7 +63,7 @@ ctrl->type = type; ctrl->itf_num = itf; ctrl->ip = ip; - atomic_add(skb->truesize+ATM_PDU_OVHD,&atmarpd->rx_inuse); + atm_force_charge(atmarpd,skb->truesize); skb_queue_tail(&atmarpd->recvq,skb); wake_up(&atmarpd->sleep); return 0; @@ -544,7 +544,9 @@ void *dev) { /* ignore non-CLIP devices */ - if (((struct device *) dev)->init != clip_init) return NOTIFY_DONE; + if (((struct device *) dev)->type != ARPHRD_ATM || + ((struct device *) dev)->init != clip_init) + return NOTIFY_DONE; switch (event) { case NETDEV_UP: DPRINTK("clip_device_event NETDEV_UP\n"); @@ -555,7 +557,8 @@ (void) to_atmarpd(act_down,PRIV(dev)->number,0); break; case NETDEV_CHANGE: - DPRINTK("clip_device_event NETDEV_CHANGE\n"); + case NETDEV_CHANGEMTU: + DPRINTK("clip_device_event NETDEV_CHANGE*\n"); (void) to_atmarpd(act_change,PRIV(dev)->number,0); break; case NETDEV_REBOOT: @@ -564,7 +567,7 @@ /* ignore */ break; default: - printk(KERN_ERR "clip_device_event: unknown event " + printk(KERN_WARNING "clip_device_event: unknown event " "%ld\n",event); break; } @@ -572,6 +575,25 @@ } +static int clip_inet_event(struct notifier_block *this,unsigned long event, + void *ifa) +{ + struct in_device *in_dev; + + in_dev = ((struct in_ifaddr *) ifa)->ifa_dev; + if (!in_dev || !in_dev->dev) { + printk(KERN_WARNING "clip_inet_event: no device\n"); + return NOTIFY_DONE; + } + /* + * Transitions are of the down-change-up type, so it's sufficient to + * handle the change on up. + */ + if (event != NETDEV_UP) return NOTIFY_DONE; + return clip_device_event(this,NETDEV_CHANGE,in_dev->dev); +} + + static struct notifier_block clip_dev_notifier = { clip_device_event, NULL, @@ -580,6 +602,14 @@ +static struct notifier_block clip_inet_notifier = { + clip_inet_event, + NULL, + 0 +}; + + + static void atmarpd_close(struct atm_vcc *vcc) { struct sk_buff *skb; @@ -587,6 +617,7 @@ DPRINTK("atmarpd_close\n"); atmarpd = NULL; /* assumed to be atomic */ barrier(); + unregister_inetaddr_notifier(&clip_inet_notifier); unregister_netdevice_notifier(&clip_dev_notifier); wake_up(&atmarpd_sleep); if (skb_peek(&vcc->recvq)) @@ -646,7 +677,10 @@ vcc->push = NULL; vcc->pop = NULL; /* crash */ vcc->push_oam = NULL; /* crash */ - register_netdevice_notifier(&clip_dev_notifier); + if (register_netdevice_notifier(&clip_dev_notifier)) + printk(KERN_ERR "register_netdevice_notifier failed\n"); + if (register_inetaddr_notifier(&clip_inet_notifier)) + printk(KERN_ERR "register_inetaddr_notifier failed\n"); for (dev = clip_devs; dev; dev = PRIV(dev)->next) if (dev->flags & IFF_UP) (void) to_atmarpd(act_up,PRIV(dev)->number,0); diff -ur --new-file old/linux/net/atm/common.c new/linux/net/atm/common.c --- old/linux/net/atm/common.c Thu Apr 22 20:09:54 1999 +++ new/linux/net/atm/common.c Thu Apr 22 20:10:48 1999 @@ -1,6 +1,6 @@ /* net/atm/common.c - ATM sockets (common part for PVC and SVC) */ -/* Written 1995-1998 by Werner Almesberger, EPFL LRC/ICA */ +/* Written 1995-1999 by Werner Almesberger, EPFL LRC/ICA */ #include @@ -733,6 +733,11 @@ case ATM_GETCIRANGE: size = sizeof(struct atm_cirange); if (copy_to_user(buf,&dev->ci_range,size)) + return -EFAULT; + break; + case ATM_GETLINKRATE: + size = sizeof(int); + if (copy_to_user(buf,&dev->link_rate,size)) return -EFAULT; break; case ATM_RSTADDR: diff -ur --new-file old/linux/net/atm/misc.c new/linux/net/atm/misc.c --- old/linux/net/atm/misc.c Thu Apr 22 20:09:54 1999 +++ new/linux/net/atm/misc.c Thu Jan 1 01:00:00 1970 @@ -1,184 +0,0 @@ -/* net/atm/misc.c - Various functions for use by ATM drivers */ - -/* Written 1995-1999 by Werner Almesberger, EPFL ICA */ - - -#include -#include -#include -#include -#include -#include -#include -#include - -#include "tunable.h" - - -int atm_charge(struct atm_vcc *vcc,int truesize) -{ - atomic_add(truesize+ATM_PDU_OVHD,&vcc->rx_inuse); - if (atomic_read(&vcc->rx_inuse) <= vcc->rx_quota) return 1; - atomic_sub(truesize+ATM_PDU_OVHD,&vcc->rx_inuse); - vcc->stats->rx_drop++; - return 0; -} - - -void atm_return(struct atm_vcc *vcc,int truesize) -{ - atomic_sub(truesize+ATM_PDU_OVHD,&vcc->rx_inuse); -} - - -static int check_ci(struct atm_vcc *vcc,short vpi,int vci) -{ - struct atm_vcc *walk; - - for (walk = vcc->dev->vccs; walk; walk = walk->next) - if ((walk->flags & ATM_VF_ADDR) && walk->vpi == vpi && - walk->vci == vci && ((walk->qos.txtp.traffic_class != - ATM_NONE && vcc->qos.txtp.traffic_class != ATM_NONE) || - (walk->qos.rxtp.traffic_class != ATM_NONE && - vcc->qos.rxtp.traffic_class != ATM_NONE))) - return -EADDRINUSE; - /* allow VCCs with same VPI/VCI iff they don't collide on - TX/RX (but we may refuse such sharing for other reasons, - e.g. if protocol requires to have both channels) */ - return 0; -} - - -int atm_find_ci(struct atm_vcc *vcc,short *vpi,int *vci) -{ - static short p = 0; /* poor man's per-device cache */ - static int c = 0; - short old_p; - int old_c; - - if (*vpi != ATM_VPI_ANY && *vci != ATM_VCI_ANY) - return check_ci(vcc,*vpi,*vci); - /* last scan may have left values out of bounds for current device */ - if (*vpi != ATM_VPI_ANY) p = *vpi; - else if (p >= 1 << vcc->dev->ci_range.vpi_bits) p = 0; - if (*vci != ATM_VCI_ANY) c = *vci; - else if (c < ATM_NOT_RSV_VCI || c >= 1 << vcc->dev->ci_range.vci_bits) - c = ATM_NOT_RSV_VCI; - old_p = p; - old_c = c; - do { - if (!check_ci(vcc,p,c)) { - *vpi = p; - *vci = c; - return 0; - } - if (*vci == ATM_VCI_ANY) { - c++; - if (c >= 1 << vcc->dev->ci_range.vci_bits) - c = ATM_NOT_RSV_VCI; - } - if ((c == ATM_NOT_RSV_VCI || *vci != ATM_VCI_ANY) && - *vpi == ATM_VPI_ANY) { - p++; - if (p >= 1 << vcc->dev->ci_range.vpi_bits) p = 0; - } - } - while (old_p != p || old_c != c); - return -EADDRINUSE; -} - - -/* - * atm_pcr_goal returns the positive PCR if it should be rounded up, the - * negative PCR if it should be rounded down, and zero if the maximum available - * bandwidth should be used. - * - * The rules are as follows (* = maximum, - = absent (0), x = value "x", - * (x+ = x or next value above x, x- = x or next value below): - * - * min max pcr result min max pcr result - * - - - * (UBR only) x - - x+ - * - - * * x - * * - * - - z z- x - z z- - * - * - * x * - x+ - * - * * * x * * * - * - * z z- x * z z- - * - y - y- x y - x+ - * - y * y- x y * y- - * - y z z- x y z z- - * - * All non-error cases can be converted with the following simple set of rules: - * - * if pcr == z then z- - * else if min == x && pcr == - then x+ - * else if max == y then y- - * else * - */ - - -int atm_pcr_goal(struct atm_trafprm *tp) -{ - if (tp->pcr && tp->pcr != ATM_MAX_PCR) return -tp->pcr; - if (tp->min_pcr && !tp->pcr) return tp->min_pcr; - if (tp->max_pcr != ATM_MAX_PCR) return -tp->max_pcr; - return 0; -} - - -EXPORT_SYMBOL(atm_charge); -EXPORT_SYMBOL(atm_return); -EXPORT_SYMBOL(atm_find_ci); -EXPORT_SYMBOL(atm_pcr_goal); - - -#ifdef URGL_THIS_WOULD_HAVE_BEEN_FAR_TOO_MESSY - -int atm_get_trafprm(struct atm_vcc *vcc,const struct atm_trafprm *tp, - int (*try_trafprm)(struct atm_vcc *vcc,struct atm_trafprm *up, - int flags) -{ - struct atm_trafprm curr,backup; - - curr = *tp; - if (!curr.max_pcr && !curr.min_pcr && !curr.pcr) return -EINVAL; - if (!curr.max_pcr) curr.max_pcr = ATM_MAX_PCR; - if (curr.min_pcr == ATM_MAX_PCR) return -EINVAL; - if (curr.min_pcr > curr.max_pcr && curr.max_pcr != ATM_MAX_PCR) - return -EINVAL; - if (curr.min_pcr > curr.pcr && curr.pcr != ATM_MAX_PCR) return -EINVAL; - if (curr.pcr > curr.max_pcr && curr.max_pcr != ATM_MAX_PCR) - return -EINVAL; - if (curr.traffic_class == ATM_UBR && curr.min_pcr) { - if (!curr.pcr) curr.pcr = curr.min_pcr; - curr.min_pcr = 0; - } - if (curr.traffic_class == ATM_CBR && curr.pcr == ATM_MAX_PCR) - curr.pcr = vcc->dev->available_bw; - if (curr.pcr) { - backup = curr; - error = try_trafprm(vcc,&curr,ATM_TP_PCR_DOWN); - if (!error && curr.pcr >= curr.min_pcr) return 0; - curr = backup; - error = try_trafprm(vcc,&curr,ATM_TP_PCR_UP); - if (error) return error; - if (curr.pcr > curr.max_pcr && curr.max_pcr != ATM_MAX_PCR) - return -EAGAIN; - return 0; - } - if (curr.min_pcr) { - if ( - curr.pcr = curr.min_pcr; - error = try_trafprm(vcc,&curr,ATM_TP_PCR_UP); - if (error) return error; - if (curr.pcr > curr.max_pcr && curr.max_pcr != ATM_MAX_PCR) - return -EAGAIN; - return 0; - } - curr.pcr = curr.max_pcr == ATM_MAX_PCR || - curr.max_pcr > vcc->dev->available_bw ? curr.max_pcr; - error = try_trafprm(vcc,&curr,ATM_TP_PCR_DOWN); - if (error) return error; - ... -} - -#endif diff -ur --new-file old/linux/net/atm/pvc.c new/linux/net/atm/pvc.c --- old/linux/net/atm/pvc.c Thu Apr 22 20:09:54 1999 +++ new/linux/net/atm/pvc.c Thu Apr 22 20:10:48 1999 @@ -34,7 +34,7 @@ static int pvc_shutdown(struct socket *sock,int how) { - return -EOPNOTSUPP; + return 0; } diff -ur --new-file old/linux/net/atm/resources.c new/linux/net/atm/resources.c --- old/linux/net/atm/resources.c Thu Apr 22 20:09:54 1999 +++ new/linux/net/atm/resources.c Thu Apr 22 20:10:48 1999 @@ -1,6 +1,6 @@ /* net/atm/resources.c - Staticly allocated resources */ -/* Written 1995-1999 by Werner Almesberger, EPFL LRC */ +/* Written 1995-1999 by Werner Almesberger, EPFL LRC/ICA */ #include @@ -36,6 +36,7 @@ dev->type = type; dev->prev = last_dev; dev->signal = ATM_PHY_SIG_UNKNOWN; + dev->link_rate = ATM_OC3_PCR; dev->next = NULL; if (atm_devs) last_dev->next = dev; else atm_devs = dev; diff -ur --new-file old/linux/net/atm/signaling.c new/linux/net/atm/signaling.c --- old/linux/net/atm/signaling.c Thu Apr 22 20:09:54 1999 +++ new/linux/net/atm/signaling.c Thu Apr 22 20:10:48 1999 @@ -1,6 +1,6 @@ /* net/atm/signaling.c - ATM signaling */ -/* Written 1995-1998 by Werner Almesberger, EPFL LRC/ICA */ +/* Written 1995-1999 by Werner Almesberger, EPFL LRC/ICA */ #include /* error codes */ @@ -54,7 +54,7 @@ return; #endif } - atomic_add(skb->truesize+ATM_PDU_OVHD,&sigd->rx_inuse); + atm_force_charge(sigd,skb->truesize); skb_queue_tail(&sigd->recvq,skb); wake_up(&sigd->sleep); } diff -ur --new-file old/linux/net/atm/svc.c new/linux/net/atm/svc.c --- old/linux/net/atm/svc.c Thu Apr 22 20:09:54 1999 +++ new/linux/net/atm/svc.c Thu Apr 22 20:10:48 1999 @@ -56,7 +56,7 @@ static int svc_shutdown(struct socket *sock,int how) { - return -EOPNOTSUPP; + return 0; } diff -ur --new-file old/linux/net/atm/tunable.h new/linux/net/atm/tunable.h --- old/linux/net/atm/tunable.h Thu Apr 22 20:09:54 1999 +++ new/linux/net/atm/tunable.h Thu Apr 22 20:10:48 1999 @@ -1,6 +1,6 @@ /* net/atm/tunable.h - Tunable parameters of ATM support */ -/* Written 1995-1997 by Werner Almesberger, EPFL LRC */ +/* Written 1995-1999 by Werner Almesberger, EPFL LRC/ICA */ #ifndef NET_ATM_TUNABLE_H @@ -19,8 +19,5 @@ #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 */ - -#define ATM_PDU_OVHD 0 /* number of bytes to charge against buffer - quota per PDU */ #endif .