-@@ -375,6 +396,8 @@
- void (*feedback)(struct atm_vcc *vcc,struct sk_buff *skb,
- unsigned long start,unsigned long dest,int len);
- int (*change_qos)(struct atm_vcc *vcc,struct atm_qos *qos,int flags);
-+ void (*free_rx_skb)(struct atm_vcc *vcc, struct sk_buff *skb);
-+ /* @@@ temporary hack */
- int (*proc_read)(struct atm_dev *dev,loff_t *pos,char *page);
- struct module *owner;
- };
-@@ -389,6 +412,7 @@
-
- struct atm_skb_data {
- struct atm_vcc *vcc; /* ATM VCC */
-+ int iovcnt; /* 0 for "normal" operation */
- unsigned long atm_options; /* ATM layer options */
- };
-
-@@ -404,7 +428,7 @@
- void shutdown_atm_dev(struct atm_dev *dev);
- void vcc_insert_socket(struct sock *sk);
- void vcc_remove_socket(struct sock *sk);
--
-+void bind_vcc(struct atm_vcc *vcc,struct atm_dev *dev);
-
- /*
- * This is approximately the algorithm used by alloc_skb.
-diff -urN linux.old/include/linux/atm.h linux.dev/include/linux/atm.h
---- linux.old/include/linux/atm.h 2005-08-22 23:18:50.877539920 +0200
-+++ linux.dev/include/linux/atm.h 2005-08-22 23:17:42.448942648 +0200
-@@ -135,9 +135,12 @@
- unsigned char traffic_class; /* traffic class (ATM_UBR, ...) */
- int max_pcr; /* maximum PCR in cells per second */
- int pcr; /* desired PCR in cells per second */
-+ int scr; /* desired SCR in cells per second */
- int min_pcr; /* minimum PCR in cells per second */
- int max_cdv; /* maximum CDV in microseconds */
- int max_sdu; /* maximum SDU in bytes */
-+ /* Ron remove for old tiatm driver 1.00.09 */
-+ //int mbs; /* Maximum Burst size */
- /* extra params for ABR */
- unsigned int icr; /* Initial Cell Rate (24-bit) */
- unsigned int tbe; /* Transient Buffer Exposure (24-bit) */
-diff -urN linux.old/net/atm/clip.c linux.dev/net/atm/clip.c
---- linux.old/net/atm/clip.c 2005-08-22 23:18:50.877539920 +0200
-+++ linux.dev/net/atm/clip.c 2005-08-22 23:17:42.449942496 +0200
-@@ -722,7 +722,7 @@
- set_bit(ATM_VF_META,&vcc->flags);
- set_bit(ATM_VF_READY,&vcc->flags);
- /* allow replies and avoid getting closed if signaling dies */
-- vcc->dev = &atmarpd_dev;
-+ bind_vcc(vcc, &atmarpd_dev);
- vcc_insert_socket(vcc->sk);
- vcc->push = NULL;
- vcc->pop = NULL; /* crash */
-diff -urN linux.old/net/atm/common.c linux.dev/net/atm/common.c
---- linux.old/net/atm/common.c 2005-08-22 23:18:50.878539768 +0200
-+++ linux.dev/net/atm/common.c 2005-08-22 23:17:42.449942496 +0200
-@@ -385,7 +385,7 @@
- error = 0;
- if (!try_inc_mod_count(dev->ops->owner))
- return -ENODEV;
-- vcc->dev = dev;
-+ bind_vcc(vcc, dev);
- vcc_insert_socket(vcc->sk);
- switch (vcc->qos.aal) {
- case ATM_AAL0:
-@@ -427,7 +427,7 @@
- if (dev->ops->owner)
- __MOD_DEC_USE_COUNT(dev->ops->owner);
- /* ensure we get dev module ref count correct */
-- vcc->dev = NULL;
-+ bind_vcc(vcc, NULL);
- return error;
-
- }
-@@ -460,8 +460,10 @@
- vcc->qos.rxtp.max_pcr,vcc->qos.rxtp.max_sdu,
- vcc->qos.aal == ATM_AAL5 ? "" : vcc->qos.aal == ATM_AAL0 ? "" :
- " ??? code ",vcc->qos.aal == ATM_AAL0 ? 0 : vcc->qos.aal);
-+#if 0
- if (!test_bit(ATM_VF_HASQOS, &vcc->flags))
- return -EBADFD;
-+#endif
- if (vcc->qos.txtp.traffic_class == ATM_ANYCLASS ||
- vcc->qos.rxtp.traffic_class == ATM_ANYCLASS)
- return -EINVAL;
-diff -urN linux.old/net/atm/lec.c linux.dev/net/atm/lec.c
---- linux.old/net/atm/lec.c 2005-08-22 23:18:50.879539616 +0200
-+++ linux.dev/net/atm/lec.c 2005-08-22 23:17:42.450942344 +0200
-@@ -811,7 +811,7 @@
- lec_arp_init(priv);
- priv->itfnum = i; /* LANE2 addition */
- priv->lecd = vcc;
-- vcc->dev = &lecatm_dev;
-+ bind_vcc(vcc, &lecatm_dev);
- vcc_insert_socket(vcc->sk);
-
- vcc->proto_data = dev_lec[i];
-diff -urN linux.old/net/atm/mpc.c linux.dev/net/atm/mpc.c
---- linux.old/net/atm/mpc.c 2005-08-22 23:18:50.880539464 +0200
-+++ linux.dev/net/atm/mpc.c 2005-08-22 23:17:42.451942192 +0200
-@@ -787,7 +787,7 @@
- }
-
- mpc->mpoad_vcc = vcc;
-- vcc->dev = &mpc_dev;
-+ bind_vcc(vcc, &mpc_dev);
- vcc_insert_socket(vcc->sk);
- set_bit(ATM_VF_META,&vcc->flags);
- set_bit(ATM_VF_READY,&vcc->flags);
-diff -urN linux.old/net/atm/pvc.c linux.dev/net/atm/pvc.c
---- linux.old/net/atm/pvc.c 2005-08-22 23:18:50.880539464 +0200
-+++ linux.dev/net/atm/pvc.c 2005-08-22 23:17:42.451942192 +0200
-@@ -38,10 +38,12 @@
- if (addr->sap_family != AF_ATMPVC) return -EAFNOSUPPORT;
- lock_sock(sk);
- vcc = ATM_SD(sock);
-+#if 0
- if (!test_bit(ATM_VF_HASQOS, &vcc->flags)) {
- error = -EBADFD;
- goto out;
- }
-+#endif
- if (test_bit(ATM_VF_PARTIAL,&vcc->flags)) {
- if (vcc->vpi != ATM_VPI_UNSPEC) addr->sap_addr.vpi = vcc->vpi;
- if (vcc->vci != ATM_VCI_UNSPEC) addr->sap_addr.vci = vcc->vci;
-diff -urN linux.old/net/atm/resources.c linux.dev/net/atm/resources.c
---- linux.old/net/atm/resources.c 2005-08-22 23:18:50.880539464 +0200
-+++ linux.dev/net/atm/resources.c 2005-08-22 23:17:42.452942040 +0200
-@@ -398,8 +398,23 @@
- return error;
- }
-
-+void bind_vcc(struct atm_vcc *vcc,struct atm_dev *dev)
-+{
-+ vcc->dev = dev;
-+ if (dev) {
-+ vcc->next = NULL;
-+ vcc->prev = dev->last;
-+ if (dev->vccs)
-+ dev->last->next = vcc;
-+ else
-+ dev->vccs = vcc;
-+ dev->last = vcc;
-+ }
-+}
-+
-
- EXPORT_SYMBOL(atm_dev_register);
- EXPORT_SYMBOL(atm_dev_deregister);
- EXPORT_SYMBOL(atm_dev_lookup);
-+EXPORT_SYMBOL(bind_vcc);
- EXPORT_SYMBOL(shutdown_atm_dev);
-diff -urN linux.old/net/atm/signaling.c linux.dev/net/atm/signaling.c
---- linux.old/net/atm/signaling.c 2005-08-22 23:18:50.881539312 +0200
-+++ linux.dev/net/atm/signaling.c 2005-08-22 23:17:42.452942040 +0200
-@@ -251,7 +251,7 @@
- if (sigd) return -EADDRINUSE;
- DPRINTK("sigd_attach\n");
- sigd = vcc;
-- vcc->dev = &sigd_dev;
-+ bind_vcc(vcc, &sigd_dev);
- vcc_insert_socket(vcc->sk);
- set_bit(ATM_VF_META,&vcc->flags);
- set_bit(ATM_VF_READY,&vcc->flags);
-diff -urN linux.old/net/atm/svc.c linux.dev/net/atm/svc.c
---- linux.old/net/atm/svc.c 2005-08-22 23:18:50.881539312 +0200
-+++ linux.dev/net/atm/svc.c 2005-08-22 23:17:42.452942040 +0200
-@@ -141,10 +141,12 @@
- clear_bit(ATM_VF_BOUND,&vcc->flags);
- /* failing rebind will kill old binding */
- /* @@@ check memory (de)allocation on rebind */
-+#if 0
- if (!test_bit(ATM_VF_HASQOS,&vcc->flags)) {
- error = -EBADFD;
- goto out;
- }
-+#endif
- vcc->local = *addr;
- vcc->reply = WAITING;
- add_wait_queue(&vcc->sleep,&wait);
-@@ -212,10 +214,12 @@
- error = -EAFNOSUPPORT;
- goto out;
- }
-+#if 0
- if (!test_bit(ATM_VF_HASQOS, &vcc->flags)) {
- error = -EBADFD;
- goto out;
- }
-+#endif
- if (vcc->qos.txtp.traffic_class == ATM_ANYCLASS ||
- vcc->qos.rxtp.traffic_class == ATM_ANYCLASS) {
- error = -EINVAL;