aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/atm/atm_sysfs.c14
-rw-r--r--net/atm/br2684.c4
-rw-r--r--net/atm/common.c34
-rw-r--r--net/atm/common.h2
-rw-r--r--net/atm/ioctl.c2
-rw-r--r--net/atm/lec.c20
-rw-r--r--net/atm/lec.h4
-rw-r--r--net/atm/mpc.c130
-rw-r--r--net/atm/mpc.h44
-rw-r--r--net/atm/mpoa_caches.c4
-rw-r--r--net/atm/mpoa_caches.h98
-rw-r--r--net/atm/mpoa_proc.c88
-rw-r--r--net/atm/proc.c58
-rw-r--r--net/atm/pvc.c4
-rw-r--r--net/atm/raw.c6
-rw-r--r--net/atm/resources.c16
-rw-r--r--net/atm/signaling.h4
-rw-r--r--net/atm/svc.c48
18 files changed, 290 insertions, 290 deletions
diff --git a/net/atm/atm_sysfs.c b/net/atm/atm_sysfs.c
index 62f6ed1f2f98..f094a0879c16 100644
--- a/net/atm/atm_sysfs.c
+++ b/net/atm/atm_sysfs.c
@@ -30,15 +30,15 @@ static ssize_t show_address(struct class_device *cdev, char *buf)
30 30
31static ssize_t show_atmaddress(struct class_device *cdev, char *buf) 31static ssize_t show_atmaddress(struct class_device *cdev, char *buf)
32{ 32{
33 unsigned long flags; 33 unsigned long flags;
34 char *pos = buf; 34 char *pos = buf;
35 struct atm_dev *adev = to_atm_dev(cdev); 35 struct atm_dev *adev = to_atm_dev(cdev);
36 struct atm_dev_addr *aaddr; 36 struct atm_dev_addr *aaddr;
37 int bin[] = { 1, 2, 10, 6, 1 }, *fmt = bin; 37 int bin[] = { 1, 2, 10, 6, 1 }, *fmt = bin;
38 int i, j; 38 int i, j;
39 39
40 spin_lock_irqsave(&adev->lock, flags); 40 spin_lock_irqsave(&adev->lock, flags);
41 list_for_each_entry(aaddr, &adev->local, entry) { 41 list_for_each_entry(aaddr, &adev->local, entry) {
42 for(i = 0, j = 0; i < ATM_ESA_LEN; ++i, ++j) { 42 for(i = 0, j = 0; i < ATM_ESA_LEN; ++i, ++j) {
43 if (j == *fmt) { 43 if (j == *fmt) {
44 pos += sprintf(pos, "."); 44 pos += sprintf(pos, ".");
@@ -49,7 +49,7 @@ static ssize_t show_atmaddress(struct class_device *cdev, char *buf)
49 } 49 }
50 pos += sprintf(pos, "\n"); 50 pos += sprintf(pos, "\n");
51 } 51 }
52 spin_unlock_irqrestore(&adev->lock, flags); 52 spin_unlock_irqrestore(&adev->lock, flags);
53 53
54 return pos - buf; 54 return pos - buf;
55} 55}
@@ -61,7 +61,7 @@ static ssize_t show_carrier(struct class_device *cdev, char *buf)
61 61
62 pos += sprintf(pos, "%d\n", 62 pos += sprintf(pos, "%d\n",
63 adev->signal == ATM_PHY_SIG_LOST ? 0 : 1); 63 adev->signal == ATM_PHY_SIG_LOST ? 0 : 1);
64 64
65 return pos - buf; 65 return pos - buf;
66} 66}
67 67
@@ -86,7 +86,7 @@ static ssize_t show_link_rate(struct class_device *cdev, char *buf)
86 link_rate = adev->link_rate * 8 * 53; 86 link_rate = adev->link_rate * 8 * 53;
87 } 87 }
88 pos += sprintf(pos, "%d\n", link_rate); 88 pos += sprintf(pos, "%d\n", link_rate);
89 89
90 return pos - buf; 90 return pos - buf;
91} 91}
92 92
diff --git a/net/atm/br2684.c b/net/atm/br2684.c
index 83a1c1b1d6cd..f949b5c74ec1 100644
--- a/net/atm/br2684.c
+++ b/net/atm/br2684.c
@@ -182,7 +182,7 @@ static int br2684_xmit_vcc(struct sk_buff *skb, struct br2684_dev *brdev,
182 ATM_SKB(skb)->vcc = atmvcc = brvcc->atmvcc; 182 ATM_SKB(skb)->vcc = atmvcc = brvcc->atmvcc;
183 DPRINTK("atm_skb(%p)->vcc(%p)->dev(%p)\n", skb, atmvcc, atmvcc->dev); 183 DPRINTK("atm_skb(%p)->vcc(%p)->dev(%p)\n", skb, atmvcc, atmvcc->dev);
184 if (!atm_may_send(atmvcc, skb->truesize)) { 184 if (!atm_may_send(atmvcc, skb->truesize)) {
185 /* we free this here for now, because we cannot know in a higher 185 /* we free this here for now, because we cannot know in a higher
186 layer whether the skb point it supplied wasn't freed yet. 186 layer whether the skb point it supplied wasn't freed yet.
187 now, it always is. 187 now, it always is.
188 */ 188 */
@@ -718,7 +718,7 @@ static void *br2684_seq_next(struct seq_file *seq, void *v, loff_t *pos)
718 718
719 ++*pos; 719 ++*pos;
720 720
721 brd = list_entry(brd->br2684_devs.next, 721 brd = list_entry(brd->br2684_devs.next,
722 struct br2684_dev, br2684_devs); 722 struct br2684_dev, br2684_devs);
723 return (&brd->br2684_devs != &br2684_devs) ? brd : NULL; 723 return (&brd->br2684_devs != &br2684_devs) ? brd : NULL;
724} 724}
diff --git a/net/atm/common.c b/net/atm/common.c
index a2878e92c3ab..282d761454ba 100644
--- a/net/atm/common.c
+++ b/net/atm/common.c
@@ -109,11 +109,11 @@ static inline int vcc_writable(struct sock *sk)
109 struct atm_vcc *vcc = atm_sk(sk); 109 struct atm_vcc *vcc = atm_sk(sk);
110 110
111 return (vcc->qos.txtp.max_sdu + 111 return (vcc->qos.txtp.max_sdu +
112 atomic_read(&sk->sk_wmem_alloc)) <= sk->sk_sndbuf; 112 atomic_read(&sk->sk_wmem_alloc)) <= sk->sk_sndbuf;
113} 113}
114 114
115static void vcc_write_space(struct sock *sk) 115static void vcc_write_space(struct sock *sk)
116{ 116{
117 read_lock(&sk->sk_callback_lock); 117 read_lock(&sk->sk_callback_lock);
118 118
119 if (vcc_writable(sk)) { 119 if (vcc_writable(sk)) {
@@ -131,7 +131,7 @@ static struct proto vcc_proto = {
131 .owner = THIS_MODULE, 131 .owner = THIS_MODULE,
132 .obj_size = sizeof(struct atm_vcc), 132 .obj_size = sizeof(struct atm_vcc),
133}; 133};
134 134
135int vcc_create(struct socket *sock, int protocol, int family) 135int vcc_create(struct socket *sock, int protocol, int family)
136{ 136{
137 struct sock *sk; 137 struct sock *sk;
@@ -359,7 +359,7 @@ static int __vcc_connect(struct atm_vcc *vcc, struct atm_dev *dev, short vpi,
359 return error; 359 return error;
360 vcc->dev = dev; 360 vcc->dev = dev;
361 write_lock_irq(&vcc_sklist_lock); 361 write_lock_irq(&vcc_sklist_lock);
362 if (test_bit(ATM_DF_REMOVED, &dev->flags) || 362 if (test_bit(ATM_DF_REMOVED, &dev->flags) ||
363 (error = find_ci(vcc, &vpi, &vci))) { 363 (error = find_ci(vcc, &vpi, &vci))) {
364 write_unlock_irq(&vcc_sklist_lock); 364 write_unlock_irq(&vcc_sklist_lock);
365 goto fail_module_put; 365 goto fail_module_put;
@@ -494,20 +494,20 @@ int vcc_recvmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *msg,
494 if (!skb) 494 if (!skb)
495 return error; 495 return error;
496 496
497 copied = skb->len; 497 copied = skb->len;
498 if (copied > size) { 498 if (copied > size) {
499 copied = size; 499 copied = size;
500 msg->msg_flags |= MSG_TRUNC; 500 msg->msg_flags |= MSG_TRUNC;
501 } 501 }
502 502
503 error = skb_copy_datagram_iovec(skb, 0, msg->msg_iov, copied); 503 error = skb_copy_datagram_iovec(skb, 0, msg->msg_iov, copied);
504 if (error) 504 if (error)
505 return error; 505 return error;
506 sock_recv_timestamp(msg, sk, skb); 506 sock_recv_timestamp(msg, sk, skb);
507 DPRINTK("RcvM %d -= %d\n", atomic_read(&sk->rmem_alloc), skb->truesize); 507 DPRINTK("RcvM %d -= %d\n", atomic_read(&sk->rmem_alloc), skb->truesize);
508 atm_return(vcc, skb->truesize); 508 atm_return(vcc, skb->truesize);
509 skb_free_datagram(sk, skb); 509 skb_free_datagram(sk, skb);
510 return copied; 510 return copied;
511} 511}
512 512
513 513
@@ -675,7 +675,7 @@ static int check_qos(struct atm_qos *qos)
675 int error; 675 int error;
676 676
677 if (!qos->txtp.traffic_class && !qos->rxtp.traffic_class) 677 if (!qos->txtp.traffic_class && !qos->rxtp.traffic_class)
678 return -EINVAL; 678 return -EINVAL;
679 if (qos->txtp.traffic_class != qos->rxtp.traffic_class && 679 if (qos->txtp.traffic_class != qos->rxtp.traffic_class &&
680 qos->txtp.traffic_class && qos->rxtp.traffic_class && 680 qos->txtp.traffic_class && qos->rxtp.traffic_class &&
681 qos->txtp.traffic_class != ATM_ANYCLASS && 681 qos->txtp.traffic_class != ATM_ANYCLASS &&
@@ -786,11 +786,11 @@ static int __init atm_init(void)
786 printk(KERN_ERR "atmsvc_init() failed with %d\n", error); 786 printk(KERN_ERR "atmsvc_init() failed with %d\n", error);
787 goto out_atmpvc_exit; 787 goto out_atmpvc_exit;
788 } 788 }
789 if ((error = atm_proc_init()) < 0) { 789 if ((error = atm_proc_init()) < 0) {
790 printk(KERN_ERR "atm_proc_init() failed with %d\n",error); 790 printk(KERN_ERR "atm_proc_init() failed with %d\n",error);
791 goto out_atmsvc_exit; 791 goto out_atmsvc_exit;
792 } 792 }
793 if ((error = atm_sysfs_init()) < 0) { 793 if ((error = atm_sysfs_init()) < 0) {
794 printk(KERN_ERR "atm_sysfs_init() failed with %d\n",error); 794 printk(KERN_ERR "atm_sysfs_init() failed with %d\n",error);
795 goto out_atmproc_exit; 795 goto out_atmproc_exit;
796 } 796 }
diff --git a/net/atm/common.h b/net/atm/common.h
index a422da7788fb..ad78c9e1117d 100644
--- a/net/atm/common.h
+++ b/net/atm/common.h
@@ -1,5 +1,5 @@
1/* net/atm/common.h - ATM sockets (common part for PVC and SVC) */ 1/* net/atm/common.h - ATM sockets (common part for PVC and SVC) */
2 2
3/* Written 1995-2000 by Werner Almesberger, EPFL LRC/ICA */ 3/* Written 1995-2000 by Werner Almesberger, EPFL LRC/ICA */
4 4
5 5
diff --git a/net/atm/ioctl.c b/net/atm/ioctl.c
index 8c2022c3e81d..8ccee4591f65 100644
--- a/net/atm/ioctl.c
+++ b/net/atm/ioctl.c
@@ -76,7 +76,7 @@ int vcc_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
76 } 76 }
77 skb = skb_peek(&sk->sk_receive_queue); 77 skb = skb_peek(&sk->sk_receive_queue);
78 error = put_user(skb ? skb->len : 0, 78 error = put_user(skb ? skb->len : 0,
79 (int __user *)argp) ? -EFAULT : 0; 79 (int __user *)argp) ? -EFAULT : 0;
80 goto done; 80 goto done;
81 } 81 }
82 case SIOCGSTAMP: /* borrowed from IP */ 82 case SIOCGSTAMP: /* borrowed from IP */
diff --git a/net/atm/lec.c b/net/atm/lec.c
index 3fc0abeeaf34..57dc2ab1b65d 100644
--- a/net/atm/lec.c
+++ b/net/atm/lec.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * lec.c: Lan Emulation driver 2 * lec.c: Lan Emulation driver
3 * 3 *
4 * Marko Kiiskila <mkiiskila@yahoo.com> 4 * Marko Kiiskila <mkiiskila@yahoo.com>
5 */ 5 */
@@ -1457,7 +1457,7 @@ static void lane2_associate_ind(struct net_device *dev, u8 *mac_addr,
1457static void lec_arp_check_expire(struct work_struct *work); 1457static void lec_arp_check_expire(struct work_struct *work);
1458static void lec_arp_expire_arp(unsigned long data); 1458static void lec_arp_expire_arp(unsigned long data);
1459 1459
1460/* 1460/*
1461 * Arp table funcs 1461 * Arp table funcs
1462 */ 1462 */
1463 1463
@@ -1473,9 +1473,9 @@ static void lec_arp_init(struct lec_priv *priv)
1473 for (i = 0; i < LEC_ARP_TABLE_SIZE; i++) { 1473 for (i = 0; i < LEC_ARP_TABLE_SIZE; i++) {
1474 INIT_HLIST_HEAD(&priv->lec_arp_tables[i]); 1474 INIT_HLIST_HEAD(&priv->lec_arp_tables[i]);
1475 } 1475 }
1476 INIT_HLIST_HEAD(&priv->lec_arp_empty_ones); 1476 INIT_HLIST_HEAD(&priv->lec_arp_empty_ones);
1477 INIT_HLIST_HEAD(&priv->lec_no_forward); 1477 INIT_HLIST_HEAD(&priv->lec_no_forward);
1478 INIT_HLIST_HEAD(&priv->mcast_fwds); 1478 INIT_HLIST_HEAD(&priv->mcast_fwds);
1479 spin_lock_init(&priv->lec_arp_lock); 1479 spin_lock_init(&priv->lec_arp_lock);
1480 INIT_DELAYED_WORK(&priv->lec_arp_work, lec_arp_check_expire); 1480 INIT_DELAYED_WORK(&priv->lec_arp_work, lec_arp_check_expire);
1481 schedule_delayed_work(&priv->lec_arp_work, LEC_ARP_REFRESH_INTERVAL); 1481 schedule_delayed_work(&priv->lec_arp_work, LEC_ARP_REFRESH_INTERVAL);
@@ -1770,7 +1770,7 @@ static void lec_arp_destroy(struct lec_priv *priv)
1770 spin_unlock_irqrestore(&priv->lec_arp_lock, flags); 1770 spin_unlock_irqrestore(&priv->lec_arp_lock, flags);
1771} 1771}
1772 1772
1773/* 1773/*
1774 * Find entry by mac_address 1774 * Find entry by mac_address
1775 */ 1775 */
1776static struct lec_arp_table *lec_arp_find(struct lec_priv *priv, 1776static struct lec_arp_table *lec_arp_find(struct lec_priv *priv,
@@ -1949,7 +1949,7 @@ restart:
1949 1949
1950/* 1950/*
1951 * Try to find vcc where mac_address is attached. 1951 * Try to find vcc where mac_address is attached.
1952 * 1952 *
1953 */ 1953 */
1954static struct atm_vcc *lec_arp_resolve(struct lec_priv *priv, 1954static struct atm_vcc *lec_arp_resolve(struct lec_priv *priv,
1955 unsigned char *mac_to_find, int is_rdesc, 1955 unsigned char *mac_to_find, int is_rdesc,
@@ -2075,7 +2075,7 @@ lec_addr_delete(struct lec_priv *priv, unsigned char *atm_addr,
2075} 2075}
2076 2076
2077/* 2077/*
2078 * Notifies: Response to arp_request (atm_addr != NULL) 2078 * Notifies: Response to arp_request (atm_addr != NULL)
2079 */ 2079 */
2080static void 2080static void
2081lec_arp_update(struct lec_priv *priv, unsigned char *mac_addr, 2081lec_arp_update(struct lec_priv *priv, unsigned char *mac_addr,
@@ -2176,7 +2176,7 @@ out:
2176} 2176}
2177 2177
2178/* 2178/*
2179 * Notifies: Vcc setup ready 2179 * Notifies: Vcc setup ready
2180 */ 2180 */
2181static void 2181static void
2182lec_vcc_added(struct lec_priv *priv, struct atmlec_ioc *ioc_data, 2182lec_vcc_added(struct lec_priv *priv, struct atmlec_ioc *ioc_data,
@@ -2380,7 +2380,7 @@ lec_set_flush_tran_id(struct lec_priv *priv,
2380 if (!memcmp(atm_addr, entry->atm_addr, ATM_ESA_LEN)) { 2380 if (!memcmp(atm_addr, entry->atm_addr, ATM_ESA_LEN)) {
2381 entry->flush_tran_id = tran_id; 2381 entry->flush_tran_id = tran_id;
2382 DPRINTK("Set flush transaction id to %lx for %p\n", 2382 DPRINTK("Set flush transaction id to %lx for %p\n",
2383 tran_id, entry); 2383 tran_id, entry);
2384 } 2384 }
2385 } 2385 }
2386 spin_unlock_irqrestore(&priv->lec_arp_lock, flags); 2386 spin_unlock_irqrestore(&priv->lec_arp_lock, flags);
diff --git a/net/atm/lec.h b/net/atm/lec.h
index 99136babd535..b41cda7ea1e1 100644
--- a/net/atm/lec.h
+++ b/net/atm/lec.h
@@ -52,12 +52,12 @@ struct lane2_ops {
52 52
53/* 53/*
54 * ATM LAN Emulation supports both LLC & Dix Ethernet EtherType 54 * ATM LAN Emulation supports both LLC & Dix Ethernet EtherType
55 * frames. 55 * frames.
56 * 56 *
57 * 1. Dix Ethernet EtherType frames encoded by placing EtherType 57 * 1. Dix Ethernet EtherType frames encoded by placing EtherType
58 * field in h_type field. Data follows immediatelly after header. 58 * field in h_type field. Data follows immediatelly after header.
59 * 2. LLC Data frames whose total length, including LLC field and data, 59 * 2. LLC Data frames whose total length, including LLC field and data,
60 * but not padding required to meet the minimum data frame length, 60 * but not padding required to meet the minimum data frame length,
61 * is less than 1536(0x0600) MUST be encoded by placing that length 61 * is less than 1536(0x0600) MUST be encoded by placing that length
62 * in the h_type field. The LLC field follows header immediatelly. 62 * in the h_type field. The LLC field follows header immediatelly.
63 * 3. LLC data frames longer than this maximum MUST be encoded by placing 63 * 3. LLC data frames longer than this maximum MUST be encoded by placing
diff --git a/net/atm/mpc.c b/net/atm/mpc.c
index c18f73715ef9..cb3c004ff022 100644
--- a/net/atm/mpc.c
+++ b/net/atm/mpc.c
@@ -32,7 +32,7 @@
32#include "resources.h" 32#include "resources.h"
33 33
34/* 34/*
35 * mpc.c: Implementation of MPOA client kernel part 35 * mpc.c: Implementation of MPOA client kernel part
36 */ 36 */
37 37
38#if 0 38#if 0
@@ -80,17 +80,17 @@ static struct llc_snap_hdr llc_snap_mpoa_ctrl = {
80 0xaa, 0xaa, 0x03, 80 0xaa, 0xaa, 0x03,
81 {0x00, 0x00, 0x5e}, 81 {0x00, 0x00, 0x5e},
82 {0x00, 0x03} /* For MPOA control PDUs */ 82 {0x00, 0x03} /* For MPOA control PDUs */
83}; 83};
84static struct llc_snap_hdr llc_snap_mpoa_data = { 84static struct llc_snap_hdr llc_snap_mpoa_data = {
85 0xaa, 0xaa, 0x03, 85 0xaa, 0xaa, 0x03,
86 {0x00, 0x00, 0x00}, 86 {0x00, 0x00, 0x00},
87 {0x08, 0x00} /* This is for IP PDUs only */ 87 {0x08, 0x00} /* This is for IP PDUs only */
88}; 88};
89static struct llc_snap_hdr llc_snap_mpoa_data_tagged = { 89static struct llc_snap_hdr llc_snap_mpoa_data_tagged = {
90 0xaa, 0xaa, 0x03, 90 0xaa, 0xaa, 0x03,
91 {0x00, 0x00, 0x00}, 91 {0x00, 0x00, 0x00},
92 {0x88, 0x4c} /* This is for tagged data PDUs */ 92 {0x88, 0x4c} /* This is for tagged data PDUs */
93}; 93};
94 94
95static struct notifier_block mpoa_notifier = { 95static struct notifier_block mpoa_notifier = {
96 mpoa_event_listener, 96 mpoa_event_listener,
@@ -106,12 +106,12 @@ static DEFINE_TIMER(mpc_timer, NULL, 0, 0);
106static struct mpoa_client *find_mpc_by_itfnum(int itf) 106static struct mpoa_client *find_mpc_by_itfnum(int itf)
107{ 107{
108 struct mpoa_client *mpc; 108 struct mpoa_client *mpc;
109 109
110 mpc = mpcs; /* our global linked list */ 110 mpc = mpcs; /* our global linked list */
111 while (mpc != NULL) { 111 while (mpc != NULL) {
112 if (mpc->dev_num == itf) 112 if (mpc->dev_num == itf)
113 return mpc; 113 return mpc;
114 mpc = mpc->next; 114 mpc = mpc->next;
115 } 115 }
116 116
117 return NULL; /* not found */ 117 return NULL; /* not found */
@@ -120,7 +120,7 @@ static struct mpoa_client *find_mpc_by_itfnum(int itf)
120static struct mpoa_client *find_mpc_by_vcc(struct atm_vcc *vcc) 120static struct mpoa_client *find_mpc_by_vcc(struct atm_vcc *vcc)
121{ 121{
122 struct mpoa_client *mpc; 122 struct mpoa_client *mpc;
123 123
124 mpc = mpcs; /* our global linked list */ 124 mpc = mpcs; /* our global linked list */
125 while (mpc != NULL) { 125 while (mpc != NULL) {
126 if (mpc->mpoad_vcc == vcc) 126 if (mpc->mpoad_vcc == vcc)
@@ -134,7 +134,7 @@ static struct mpoa_client *find_mpc_by_vcc(struct atm_vcc *vcc)
134static struct mpoa_client *find_mpc_by_lec(struct net_device *dev) 134static struct mpoa_client *find_mpc_by_lec(struct net_device *dev)
135{ 135{
136 struct mpoa_client *mpc; 136 struct mpoa_client *mpc;
137 137
138 mpc = mpcs; /* our global linked list */ 138 mpc = mpcs; /* our global linked list */
139 while (mpc != NULL) { 139 while (mpc != NULL) {
140 if (mpc->dev == dev) 140 if (mpc->dev == dev)
@@ -190,7 +190,7 @@ struct atm_mpoa_qos *atm_mpoa_search_qos(__be32 dst_ip)
190 } 190 }
191 191
192 return qos; 192 return qos;
193} 193}
194 194
195/* 195/*
196 * Returns 0 for failure 196 * Returns 0 for failure
@@ -245,7 +245,7 @@ static struct net_device *find_lec_by_itfnum(int itf)
245 245
246 sprintf(name, "lec%d", itf); 246 sprintf(name, "lec%d", itf);
247 dev = dev_get_by_name(name); 247 dev = dev_get_by_name(name);
248 248
249 return dev; 249 return dev;
250} 250}
251 251
@@ -265,25 +265,25 @@ static struct mpoa_client *alloc_mpc(void)
265 mpc->parameters.mpc_p2 = MPC_P2; 265 mpc->parameters.mpc_p2 = MPC_P2;
266 memset(mpc->parameters.mpc_p3,0,sizeof(mpc->parameters.mpc_p3)); 266 memset(mpc->parameters.mpc_p3,0,sizeof(mpc->parameters.mpc_p3));
267 mpc->parameters.mpc_p4 = MPC_P4; 267 mpc->parameters.mpc_p4 = MPC_P4;
268 mpc->parameters.mpc_p5 = MPC_P5; 268 mpc->parameters.mpc_p5 = MPC_P5;
269 mpc->parameters.mpc_p6 = MPC_P6; 269 mpc->parameters.mpc_p6 = MPC_P6;
270 270
271 mpcs = mpc; 271 mpcs = mpc;
272 272
273 return mpc; 273 return mpc;
274} 274}
275 275
276/* 276/*
277 * 277 *
278 * start_mpc() puts the MPC on line. All the packets destined 278 * start_mpc() puts the MPC on line. All the packets destined
279 * to the lec underneath us are now being monitored and 279 * to the lec underneath us are now being monitored and
280 * shortcuts will be established. 280 * shortcuts will be established.
281 * 281 *
282 */ 282 */
283static void start_mpc(struct mpoa_client *mpc, struct net_device *dev) 283static void start_mpc(struct mpoa_client *mpc, struct net_device *dev)
284{ 284{
285 285
286 dprintk("mpoa: (%s) start_mpc:\n", mpc->dev->name); 286 dprintk("mpoa: (%s) start_mpc:\n", mpc->dev->name);
287 if (dev->hard_start_xmit == NULL) { 287 if (dev->hard_start_xmit == NULL) {
288 printk("mpoa: (%s) start_mpc: dev->hard_start_xmit == NULL, not starting\n", 288 printk("mpoa: (%s) start_mpc: dev->hard_start_xmit == NULL, not starting\n",
289 dev->name); 289 dev->name);
@@ -297,8 +297,8 @@ static void start_mpc(struct mpoa_client *mpc, struct net_device *dev)
297 297
298static void stop_mpc(struct mpoa_client *mpc) 298static void stop_mpc(struct mpoa_client *mpc)
299{ 299{
300 300
301 dprintk("mpoa: (%s) stop_mpc:", mpc->dev->name); 301 dprintk("mpoa: (%s) stop_mpc:", mpc->dev->name);
302 302
303 /* Lets not nullify lec device's dev->hard_start_xmit */ 303 /* Lets not nullify lec device's dev->hard_start_xmit */
304 if (mpc->dev->hard_start_xmit != mpc_send_packet) { 304 if (mpc->dev->hard_start_xmit != mpc_send_packet) {
@@ -309,7 +309,7 @@ static void stop_mpc(struct mpoa_client *mpc)
309 mpc->dev->hard_start_xmit = mpc->old_hard_start_xmit; 309 mpc->dev->hard_start_xmit = mpc->old_hard_start_xmit;
310 mpc->old_hard_start_xmit = NULL; 310 mpc->old_hard_start_xmit = NULL;
311 /* close_shortcuts(mpc); ??? FIXME */ 311 /* close_shortcuts(mpc); ??? FIXME */
312 312
313 return; 313 return;
314} 314}
315 315
@@ -358,7 +358,7 @@ static void lane2_assoc_ind(struct net_device *dev, uint8_t *mac_addr,
358 uint8_t length, mpoa_device_type, number_of_mps_macs; 358 uint8_t length, mpoa_device_type, number_of_mps_macs;
359 uint8_t *end_of_tlvs; 359 uint8_t *end_of_tlvs;
360 struct mpoa_client *mpc; 360 struct mpoa_client *mpc;
361 361
362 mpoa_device_type = number_of_mps_macs = 0; /* silence gcc */ 362 mpoa_device_type = number_of_mps_macs = 0; /* silence gcc */
363 dprintk("mpoa: (%s) lane2_assoc_ind: received TLV(s), ", dev->name); 363 dprintk("mpoa: (%s) lane2_assoc_ind: received TLV(s), ", dev->name);
364 dprintk("total length of all TLVs %d\n", sizeoftlvs); 364 dprintk("total length of all TLVs %d\n", sizeoftlvs);
@@ -377,7 +377,7 @@ static void lane2_assoc_ind(struct net_device *dev, uint8_t *mac_addr,
377 printk("TLV value extends past its buffer, aborting parse\n"); 377 printk("TLV value extends past its buffer, aborting parse\n");
378 return; 378 return;
379 } 379 }
380 380
381 if (type == 0) { 381 if (type == 0) {
382 printk("mpoa: (%s) lane2_assoc_ind: TLV type was 0, returning\n", dev->name); 382 printk("mpoa: (%s) lane2_assoc_ind: TLV type was 0, returning\n", dev->name);
383 return; 383 return;
@@ -412,10 +412,10 @@ static void lane2_assoc_ind(struct net_device *dev, uint8_t *mac_addr,
412 continue; /* someone should read the spec */ 412 continue; /* someone should read the spec */
413 } 413 }
414 dprintk("this MPS has %d MAC addresses\n", number_of_mps_macs); 414 dprintk("this MPS has %d MAC addresses\n", number_of_mps_macs);
415 415
416 /* ok, now we can go and tell our daemon the control address of MPS */ 416 /* ok, now we can go and tell our daemon the control address of MPS */
417 send_set_mps_ctrl_addr(tlvs, mpc); 417 send_set_mps_ctrl_addr(tlvs, mpc);
418 418
419 tlvs = copy_macs(mpc, mac_addr, tlvs, number_of_mps_macs, mpoa_device_type); 419 tlvs = copy_macs(mpc, mac_addr, tlvs, number_of_mps_macs, mpoa_device_type);
420 if (tlvs == NULL) return; 420 if (tlvs == NULL) return;
421 } 421 }
@@ -474,7 +474,7 @@ static int send_via_shortcut(struct sk_buff *skb, struct mpoa_client *mpc)
474 iph = (struct iphdr *)buff; 474 iph = (struct iphdr *)buff;
475 ipaddr = iph->daddr; 475 ipaddr = iph->daddr;
476 476
477 ddprintk("mpoa: (%s) send_via_shortcut: ipaddr 0x%x\n", mpc->dev->name, ipaddr); 477 ddprintk("mpoa: (%s) send_via_shortcut: ipaddr 0x%x\n", mpc->dev->name, ipaddr);
478 478
479 entry = mpc->in_ops->get(ipaddr, mpc); 479 entry = mpc->in_ops->get(ipaddr, mpc);
480 if (entry == NULL) { 480 if (entry == NULL) {
@@ -483,15 +483,15 @@ static int send_via_shortcut(struct sk_buff *skb, struct mpoa_client *mpc)
483 return 1; 483 return 1;
484 } 484 }
485 if (mpc->in_ops->cache_hit(entry, mpc) != OPEN){ /* threshold not exceeded or VCC not ready */ 485 if (mpc->in_ops->cache_hit(entry, mpc) != OPEN){ /* threshold not exceeded or VCC not ready */
486 ddprintk("mpoa: (%s) send_via_shortcut: cache_hit: returns != OPEN\n", mpc->dev->name); 486 ddprintk("mpoa: (%s) send_via_shortcut: cache_hit: returns != OPEN\n", mpc->dev->name);
487 mpc->in_ops->put(entry); 487 mpc->in_ops->put(entry);
488 return 1; 488 return 1;
489 } 489 }
490 490
491 ddprintk("mpoa: (%s) send_via_shortcut: using shortcut\n", mpc->dev->name); 491 ddprintk("mpoa: (%s) send_via_shortcut: using shortcut\n", mpc->dev->name);
492 /* MPOA spec A.1.4, MPOA client must decrement IP ttl at least by one */ 492 /* MPOA spec A.1.4, MPOA client must decrement IP ttl at least by one */
493 if (iph->ttl <= 1) { 493 if (iph->ttl <= 1) {
494 ddprintk("mpoa: (%s) send_via_shortcut: IP ttl = %u, using LANE\n", mpc->dev->name, iph->ttl); 494 ddprintk("mpoa: (%s) send_via_shortcut: IP ttl = %u, using LANE\n", mpc->dev->name, iph->ttl);
495 mpc->in_ops->put(entry); 495 mpc->in_ops->put(entry);
496 return 1; 496 return 1;
497 } 497 }
@@ -529,7 +529,7 @@ static int mpc_send_packet(struct sk_buff *skb, struct net_device *dev)
529 struct mpoa_client *mpc; 529 struct mpoa_client *mpc;
530 struct ethhdr *eth; 530 struct ethhdr *eth;
531 int i = 0; 531 int i = 0;
532 532
533 mpc = find_mpc_by_lec(dev); /* this should NEVER fail */ 533 mpc = find_mpc_by_lec(dev); /* this should NEVER fail */
534 if(mpc == NULL) { 534 if(mpc == NULL) {
535 printk("mpoa: (%s) mpc_send_packet: no MPC found\n", dev->name); 535 printk("mpoa: (%s) mpc_send_packet: no MPC found\n", dev->name);
@@ -549,7 +549,7 @@ static int mpc_send_packet(struct sk_buff *skb, struct net_device *dev)
549 549
550 non_ip: 550 non_ip:
551 retval = mpc->old_hard_start_xmit(skb,dev); 551 retval = mpc->old_hard_start_xmit(skb,dev);
552 552
553 return retval; 553 return retval;
554} 554}
555 555
@@ -569,11 +569,11 @@ static int atm_mpoa_vcc_attach(struct atm_vcc *vcc, void __user *arg)
569 ipaddr = ioc_data.ipaddr; 569 ipaddr = ioc_data.ipaddr;
570 if (ioc_data.dev_num < 0 || ioc_data.dev_num >= MAX_LEC_ITF) 570 if (ioc_data.dev_num < 0 || ioc_data.dev_num >= MAX_LEC_ITF)
571 return -EINVAL; 571 return -EINVAL;
572 572
573 mpc = find_mpc_by_itfnum(ioc_data.dev_num); 573 mpc = find_mpc_by_itfnum(ioc_data.dev_num);
574 if (mpc == NULL) 574 if (mpc == NULL)
575 return -EINVAL; 575 return -EINVAL;
576 576
577 if (ioc_data.type == MPC_SOCKET_INGRESS) { 577 if (ioc_data.type == MPC_SOCKET_INGRESS) {
578 in_entry = mpc->in_ops->get(ipaddr, mpc); 578 in_entry = mpc->in_ops->get(ipaddr, mpc);
579 if (in_entry == NULL || in_entry->entry_state < INGRESS_RESOLVED) { 579 if (in_entry == NULL || in_entry->entry_state < INGRESS_RESOLVED) {
@@ -604,7 +604,7 @@ static void mpc_vcc_close(struct atm_vcc *vcc, struct net_device *dev)
604 struct mpoa_client *mpc; 604 struct mpoa_client *mpc;
605 in_cache_entry *in_entry; 605 in_cache_entry *in_entry;
606 eg_cache_entry *eg_entry; 606 eg_cache_entry *eg_entry;
607 607
608 mpc = find_mpc_by_lec(dev); 608 mpc = find_mpc_by_lec(dev);
609 if (mpc == NULL) { 609 if (mpc == NULL) {
610 printk("mpoa: (%s) mpc_vcc_close: close for unknown MPC\n", dev->name); 610 printk("mpoa: (%s) mpc_vcc_close: close for unknown MPC\n", dev->name);
@@ -640,14 +640,14 @@ static void mpc_push(struct atm_vcc *vcc, struct sk_buff *skb)
640 struct mpoa_client *mpc; 640 struct mpoa_client *mpc;
641 __be32 tag; 641 __be32 tag;
642 char *tmp; 642 char *tmp;
643 643
644 ddprintk("mpoa: (%s) mpc_push:\n", dev->name); 644 ddprintk("mpoa: (%s) mpc_push:\n", dev->name);
645 if (skb == NULL) { 645 if (skb == NULL) {
646 dprintk("mpoa: (%s) mpc_push: null skb, closing VCC\n", dev->name); 646 dprintk("mpoa: (%s) mpc_push: null skb, closing VCC\n", dev->name);
647 mpc_vcc_close(vcc, dev); 647 mpc_vcc_close(vcc, dev);
648 return; 648 return;
649 } 649 }
650 650
651 skb->dev = dev; 651 skb->dev = dev;
652 if (memcmp(skb->data, &llc_snap_mpoa_ctrl, sizeof(struct llc_snap_hdr)) == 0) { 652 if (memcmp(skb->data, &llc_snap_mpoa_ctrl, sizeof(struct llc_snap_hdr)) == 0) {
653 struct sock *sk = sk_atm(vcc); 653 struct sock *sk = sk_atm(vcc);
@@ -693,11 +693,11 @@ static void mpc_push(struct atm_vcc *vcc, struct sk_buff *skb)
693 dev_kfree_skb_any(skb); 693 dev_kfree_skb_any(skb);
694 return; 694 return;
695 } 695 }
696 696
697 /* 697 /*
698 * See if ingress MPC is using shortcut we opened as a return channel. 698 * See if ingress MPC is using shortcut we opened as a return channel.
699 * This means we have a bi-directional vcc opened by us. 699 * This means we have a bi-directional vcc opened by us.
700 */ 700 */
701 if (eg->shortcut == NULL) { 701 if (eg->shortcut == NULL) {
702 eg->shortcut = vcc; 702 eg->shortcut = vcc;
703 printk("mpoa: (%s) mpc_push: egress SVC in use\n", dev->name); 703 printk("mpoa: (%s) mpc_push: egress SVC in use\n", dev->name);
@@ -743,7 +743,7 @@ static int atm_mpoa_mpoad_attach (struct atm_vcc *vcc, int arg)
743 struct mpoa_client *mpc; 743 struct mpoa_client *mpc;
744 struct lec_priv *priv; 744 struct lec_priv *priv;
745 int err; 745 int err;
746 746
747 if (mpcs == NULL) { 747 if (mpcs == NULL) {
748 init_timer(&mpc_timer); 748 init_timer(&mpc_timer);
749 mpc_timer_refresh(); 749 mpc_timer_refresh();
@@ -755,7 +755,7 @@ static int atm_mpoa_mpoad_attach (struct atm_vcc *vcc, int arg)
755 return err; 755 return err;
756 } 756 }
757 } 757 }
758 758
759 mpc = find_mpc_by_itfnum(arg); 759 mpc = find_mpc_by_itfnum(arg);
760 if (mpc == NULL) { 760 if (mpc == NULL) {
761 dprintk("mpoa: mpoad_attach: allocating new mpc for itf %d\n", arg); 761 dprintk("mpoa: mpoad_attach: allocating new mpc for itf %d\n", arg);
@@ -776,7 +776,7 @@ static int atm_mpoa_mpoad_attach (struct atm_vcc *vcc, int arg)
776 dev_put(mpc->dev); 776 dev_put(mpc->dev);
777 mpc->dev = NULL; 777 mpc->dev = NULL;
778 } else 778 } else
779 priv->lane2_ops->associate_indicator = lane2_assoc_ind; 779 priv->lane2_ops->associate_indicator = lane2_assoc_ind;
780 } 780 }
781 781
782 mpc->mpoad_vcc = vcc; 782 mpc->mpoad_vcc = vcc;
@@ -788,7 +788,7 @@ static int atm_mpoa_mpoad_attach (struct atm_vcc *vcc, int arg)
788 if (mpc->dev) { 788 if (mpc->dev) {
789 char empty[ATM_ESA_LEN]; 789 char empty[ATM_ESA_LEN];
790 memset(empty, 0, ATM_ESA_LEN); 790 memset(empty, 0, ATM_ESA_LEN);
791 791
792 start_mpc(mpc, mpc->dev); 792 start_mpc(mpc, mpc->dev);
793 /* set address if mpcd e.g. gets killed and restarted. 793 /* set address if mpcd e.g. gets killed and restarted.
794 * If we do not do it now we have to wait for the next LE_ARP 794 * If we do not do it now we have to wait for the next LE_ARP
@@ -806,7 +806,7 @@ static void send_set_mps_ctrl_addr(char *addr, struct mpoa_client *mpc)
806 struct k_message mesg; 806 struct k_message mesg;
807 807
808 memcpy (mpc->mps_ctrl_addr, addr, ATM_ESA_LEN); 808 memcpy (mpc->mps_ctrl_addr, addr, ATM_ESA_LEN);
809 809
810 mesg.type = SET_MPS_CTRL_ADDR; 810 mesg.type = SET_MPS_CTRL_ADDR;
811 memcpy(mesg.MPS_ctrl, addr, ATM_ESA_LEN); 811 memcpy(mesg.MPS_ctrl, addr, ATM_ESA_LEN);
812 msg_to_mpoad(&mesg, mpc); 812 msg_to_mpoad(&mesg, mpc);
@@ -828,7 +828,7 @@ static void mpoad_close(struct atm_vcc *vcc)
828 printk("mpoa: mpoad_close: close for non-present mpoad\n"); 828 printk("mpoa: mpoad_close: close for non-present mpoad\n");
829 return; 829 return;
830 } 830 }
831 831
832 mpc->mpoad_vcc = NULL; 832 mpc->mpoad_vcc = NULL;
833 if (mpc->dev) { 833 if (mpc->dev) {
834 struct lec_priv *priv = (struct lec_priv *)mpc->dev->priv; 834 struct lec_priv *priv = (struct lec_priv *)mpc->dev->priv;
@@ -844,7 +844,7 @@ static void mpoad_close(struct atm_vcc *vcc)
844 atm_return(vcc, skb->truesize); 844 atm_return(vcc, skb->truesize);
845 kfree_skb(skb); 845 kfree_skb(skb);
846 } 846 }
847 847
848 printk("mpoa: (%s) going down\n", 848 printk("mpoa: (%s) going down\n",
849 (mpc->dev) ? mpc->dev->name : "<unknown>"); 849 (mpc->dev) ? mpc->dev->name : "<unknown>");
850 module_put(THIS_MODULE); 850 module_put(THIS_MODULE);
@@ -857,11 +857,11 @@ static void mpoad_close(struct atm_vcc *vcc)
857 */ 857 */
858static int msg_from_mpoad(struct atm_vcc *vcc, struct sk_buff *skb) 858static int msg_from_mpoad(struct atm_vcc *vcc, struct sk_buff *skb)
859{ 859{
860 860
861 struct mpoa_client *mpc = find_mpc_by_vcc(vcc); 861 struct mpoa_client *mpc = find_mpc_by_vcc(vcc);
862 struct k_message *mesg = (struct k_message*)skb->data; 862 struct k_message *mesg = (struct k_message*)skb->data;
863 atomic_sub(skb->truesize, &sk_atm(vcc)->sk_wmem_alloc); 863 atomic_sub(skb->truesize, &sk_atm(vcc)->sk_wmem_alloc);
864 864
865 if (mpc == NULL) { 865 if (mpc == NULL) {
866 printk("mpoa: msg_from_mpoad: no mpc found\n"); 866 printk("mpoa: msg_from_mpoad: no mpc found\n");
867 return 0; 867 return 0;
@@ -938,7 +938,7 @@ int msg_to_mpoad(struct k_message *mesg, struct mpoa_client *mpc)
938 skb_put(skb, sizeof(struct k_message)); 938 skb_put(skb, sizeof(struct k_message));
939 memcpy(skb->data, mesg, sizeof(struct k_message)); 939 memcpy(skb->data, mesg, sizeof(struct k_message));
940 atm_force_charge(mpc->mpoad_vcc, skb->truesize); 940 atm_force_charge(mpc->mpoad_vcc, skb->truesize);
941 941
942 sk = sk_atm(mpc->mpoad_vcc); 942 sk = sk_atm(mpc->mpoad_vcc);
943 skb_queue_tail(&sk->sk_receive_queue, skb); 943 skb_queue_tail(&sk->sk_receive_queue, skb);
944 sk->sk_data_ready(sk, skb->len); 944 sk->sk_data_ready(sk, skb->len);
@@ -955,7 +955,7 @@ static int mpoa_event_listener(struct notifier_block *mpoa_notifier, unsigned lo
955 dev = (struct net_device *)dev_ptr; 955 dev = (struct net_device *)dev_ptr;
956 if (dev->name == NULL || strncmp(dev->name, "lec", 3)) 956 if (dev->name == NULL || strncmp(dev->name, "lec", 3))
957 return NOTIFY_DONE; /* we are only interested in lec:s */ 957 return NOTIFY_DONE; /* we are only interested in lec:s */
958 958
959 switch (event) { 959 switch (event) {
960 case NETDEV_REGISTER: /* a new lec device was allocated */ 960 case NETDEV_REGISTER: /* a new lec device was allocated */
961 priv = (struct lec_priv *)dev->priv; 961 priv = (struct lec_priv *)dev->priv;
@@ -1043,7 +1043,7 @@ static void MPOA_trigger_rcvd(struct k_message *msg, struct mpoa_client *mpc)
1043 mpc->in_ops->put(entry); 1043 mpc->in_ops->put(entry);
1044 return; 1044 return;
1045 } 1045 }
1046 1046
1047 if(entry->entry_state == INGRESS_INVALID){ 1047 if(entry->entry_state == INGRESS_INVALID){
1048 entry->entry_state = INGRESS_RESOLVING; 1048 entry->entry_state = INGRESS_RESOLVING;
1049 msg->type = SND_MPOA_RES_RQST; 1049 msg->type = SND_MPOA_RES_RQST;
@@ -1053,7 +1053,7 @@ static void MPOA_trigger_rcvd(struct k_message *msg, struct mpoa_client *mpc)
1053 mpc->in_ops->put(entry); 1053 mpc->in_ops->put(entry);
1054 return; 1054 return;
1055 } 1055 }
1056 1056
1057 printk("mpoa: (%s) MPOA_trigger_rcvd: entry already in resolving state\n", 1057 printk("mpoa: (%s) MPOA_trigger_rcvd: entry already in resolving state\n",
1058 (mpc->dev) ? mpc->dev->name : "<unknown>"); 1058 (mpc->dev) ? mpc->dev->name : "<unknown>");
1059 mpc->in_ops->put(entry); 1059 mpc->in_ops->put(entry);
@@ -1062,7 +1062,7 @@ static void MPOA_trigger_rcvd(struct k_message *msg, struct mpoa_client *mpc)
1062 1062
1063/* 1063/*
1064 * Things get complicated because we have to check if there's an egress 1064 * Things get complicated because we have to check if there's an egress
1065 * shortcut with suitable traffic parameters we could use. 1065 * shortcut with suitable traffic parameters we could use.
1066 */ 1066 */
1067static void check_qos_and_open_shortcut(struct k_message *msg, struct mpoa_client *client, in_cache_entry *entry) 1067static void check_qos_and_open_shortcut(struct k_message *msg, struct mpoa_client *client, in_cache_entry *entry)
1068{ 1068{
@@ -1079,7 +1079,7 @@ static void check_qos_and_open_shortcut(struct k_message *msg, struct mpoa_clien
1079 else if(eg_entry->shortcut->qos.txtp.max_pcr > 0) 1079 else if(eg_entry->shortcut->qos.txtp.max_pcr > 0)
1080 entry->shortcut = eg_entry->shortcut; 1080 entry->shortcut = eg_entry->shortcut;
1081 } 1081 }
1082 if(entry->shortcut){ 1082 if(entry->shortcut){
1083 dprintk("mpoa: (%s) using egress SVC to reach %u.%u.%u.%u\n",client->dev->name, NIPQUAD(dst_ip)); 1083 dprintk("mpoa: (%s) using egress SVC to reach %u.%u.%u.%u\n",client->dev->name, NIPQUAD(dst_ip));
1084 client->eg_ops->put(eg_entry); 1084 client->eg_ops->put(eg_entry);
1085 return; 1085 return;
@@ -1094,7 +1094,7 @@ static void check_qos_and_open_shortcut(struct k_message *msg, struct mpoa_clien
1094 { 1094 {
1095 msg->qos = qos->qos; 1095 msg->qos = qos->qos;
1096 printk("mpoa: (%s) trying to get a CBR shortcut\n",client->dev->name); 1096 printk("mpoa: (%s) trying to get a CBR shortcut\n",client->dev->name);
1097 } 1097 }
1098 else memset(&msg->qos,0,sizeof(struct atm_qos)); 1098 else memset(&msg->qos,0,sizeof(struct atm_qos));
1099 msg_to_mpoad(msg, client); 1099 msg_to_mpoad(msg, client);
1100 return; 1100 return;
@@ -1111,7 +1111,7 @@ static void MPOA_res_reply_rcvd(struct k_message *msg, struct mpoa_client *mpc)
1111 printk("\nmpoa: (%s) ARGH, received res. reply for an entry that doesn't exist.\n", mpc->dev->name); 1111 printk("\nmpoa: (%s) ARGH, received res. reply for an entry that doesn't exist.\n", mpc->dev->name);
1112 return; 1112 return;
1113 } 1113 }
1114 ddprintk(" entry_state = %d ", entry->entry_state); 1114 ddprintk(" entry_state = %d ", entry->entry_state);
1115 1115
1116 if (entry->entry_state == INGRESS_RESOLVED) { 1116 if (entry->entry_state == INGRESS_RESOLVED) {
1117 printk("\nmpoa: (%s) MPOA_res_reply_rcvd for RESOLVED entry!\n", mpc->dev->name); 1117 printk("\nmpoa: (%s) MPOA_res_reply_rcvd for RESOLVED entry!\n", mpc->dev->name);
@@ -1126,7 +1126,7 @@ static void MPOA_res_reply_rcvd(struct k_message *msg, struct mpoa_client *mpc)
1126 ddprintk("entry->shortcut = %p\n", entry->shortcut); 1126 ddprintk("entry->shortcut = %p\n", entry->shortcut);
1127 1127
1128 if(entry->entry_state == INGRESS_RESOLVING && entry->shortcut != NULL){ 1128 if(entry->entry_state == INGRESS_RESOLVING && entry->shortcut != NULL){
1129 entry->entry_state = INGRESS_RESOLVED; 1129 entry->entry_state = INGRESS_RESOLVED;
1130 mpc->in_ops->put(entry); 1130 mpc->in_ops->put(entry);
1131 return; /* Shortcut already open... */ 1131 return; /* Shortcut already open... */
1132 } 1132 }
@@ -1137,7 +1137,7 @@ static void MPOA_res_reply_rcvd(struct k_message *msg, struct mpoa_client *mpc)
1137 mpc->in_ops->put(entry); 1137 mpc->in_ops->put(entry);
1138 return; 1138 return;
1139 } 1139 }
1140 1140
1141 check_qos_and_open_shortcut(msg, mpc, entry); 1141 check_qos_and_open_shortcut(msg, mpc, entry);
1142 entry->entry_state = INGRESS_RESOLVED; 1142 entry->entry_state = INGRESS_RESOLVED;
1143 mpc->in_ops->put(entry); 1143 mpc->in_ops->put(entry);
@@ -1169,13 +1169,13 @@ static void ingress_purge_rcvd(struct k_message *msg, struct mpoa_client *mpc)
1169 } while (entry != NULL); 1169 } while (entry != NULL);
1170 1170
1171 return; 1171 return;
1172} 1172}
1173 1173
1174static void egress_purge_rcvd(struct k_message *msg, struct mpoa_client *mpc) 1174static void egress_purge_rcvd(struct k_message *msg, struct mpoa_client *mpc)
1175{ 1175{
1176 __be32 cache_id = msg->content.eg_info.cache_id; 1176 __be32 cache_id = msg->content.eg_info.cache_id;
1177 eg_cache_entry *entry = mpc->eg_ops->get_by_cache_id(cache_id, mpc); 1177 eg_cache_entry *entry = mpc->eg_ops->get_by_cache_id(cache_id, mpc);
1178 1178
1179 if (entry == NULL) { 1179 if (entry == NULL) {
1180 dprintk("mpoa: (%s) egress_purge_rcvd: purge for a non-existing entry\n", mpc->dev->name); 1180 dprintk("mpoa: (%s) egress_purge_rcvd: purge for a non-existing entry\n", mpc->dev->name);
1181 return; 1181 return;
@@ -1188,7 +1188,7 @@ static void egress_purge_rcvd(struct k_message *msg, struct mpoa_client *mpc)
1188 mpc->eg_ops->put(entry); 1188 mpc->eg_ops->put(entry);
1189 1189
1190 return; 1190 return;
1191} 1191}
1192 1192
1193static void purge_egress_shortcut(struct atm_vcc *vcc, eg_cache_entry *entry) 1193static void purge_egress_shortcut(struct atm_vcc *vcc, eg_cache_entry *entry)
1194{ 1194{
@@ -1259,7 +1259,7 @@ static void MPOA_cache_impos_rcvd( struct k_message * msg, struct mpoa_client *
1259{ 1259{
1260 uint16_t holding_time; 1260 uint16_t holding_time;
1261 eg_cache_entry *entry = mpc->eg_ops->get_by_cache_id(msg->content.eg_info.cache_id, mpc); 1261 eg_cache_entry *entry = mpc->eg_ops->get_by_cache_id(msg->content.eg_info.cache_id, mpc);
1262 1262
1263 holding_time = msg->content.eg_info.holding_time; 1263 holding_time = msg->content.eg_info.holding_time;
1264 dprintk("mpoa: (%s) MPOA_cache_impos_rcvd: entry = %p, holding_time = %u\n", 1264 dprintk("mpoa: (%s) MPOA_cache_impos_rcvd: entry = %p, holding_time = %u\n",
1265 mpc->dev->name, entry, holding_time); 1265 mpc->dev->name, entry, holding_time);
@@ -1272,13 +1272,13 @@ static void MPOA_cache_impos_rcvd( struct k_message * msg, struct mpoa_client *
1272 mpc->eg_ops->update(entry, holding_time); 1272 mpc->eg_ops->update(entry, holding_time);
1273 return; 1273 return;
1274 } 1274 }
1275 1275
1276 write_lock_irq(&mpc->egress_lock); 1276 write_lock_irq(&mpc->egress_lock);
1277 mpc->eg_ops->remove_entry(entry, mpc); 1277 mpc->eg_ops->remove_entry(entry, mpc);
1278 write_unlock_irq(&mpc->egress_lock); 1278 write_unlock_irq(&mpc->egress_lock);
1279 1279
1280 mpc->eg_ops->put(entry); 1280 mpc->eg_ops->put(entry);
1281 1281
1282 return; 1282 return;
1283} 1283}
1284 1284
@@ -1328,7 +1328,7 @@ static void set_mps_mac_addr_rcvd(struct k_message *msg, struct mpoa_client *cli
1328 return; 1328 return;
1329 } 1329 }
1330 client->number_of_mps_macs = 1; 1330 client->number_of_mps_macs = 1;
1331 1331
1332 return; 1332 return;
1333} 1333}
1334 1334
@@ -1364,7 +1364,7 @@ static void mpc_timer_refresh(void)
1364 mpc_timer.data = mpc_timer.expires; 1364 mpc_timer.data = mpc_timer.expires;
1365 mpc_timer.function = mpc_cache_check; 1365 mpc_timer.function = mpc_cache_check;
1366 add_timer(&mpc_timer); 1366 add_timer(&mpc_timer);
1367 1367
1368 return; 1368 return;
1369} 1369}
1370 1370
@@ -1373,7 +1373,7 @@ static void mpc_cache_check( unsigned long checking_time )
1373 struct mpoa_client *mpc = mpcs; 1373 struct mpoa_client *mpc = mpcs;
1374 static unsigned long previous_resolving_check_time; 1374 static unsigned long previous_resolving_check_time;
1375 static unsigned long previous_refresh_time; 1375 static unsigned long previous_refresh_time;
1376 1376
1377 while( mpc != NULL ){ 1377 while( mpc != NULL ){
1378 mpc->in_ops->clear_count(mpc); 1378 mpc->in_ops->clear_count(mpc);
1379 mpc->eg_ops->clear_expired(mpc); 1379 mpc->eg_ops->clear_expired(mpc);
@@ -1388,7 +1388,7 @@ static void mpc_cache_check( unsigned long checking_time )
1388 mpc = mpc->next; 1388 mpc = mpc->next;
1389 } 1389 }
1390 mpc_timer_refresh(); 1390 mpc_timer_refresh();
1391 1391
1392 return; 1392 return;
1393} 1393}
1394 1394
diff --git a/net/atm/mpc.h b/net/atm/mpc.h
index 51f460d005c3..24c386c35f57 100644
--- a/net/atm/mpc.h
+++ b/net/atm/mpc.h
@@ -12,32 +12,32 @@
12int msg_to_mpoad(struct k_message *msg, struct mpoa_client *mpc); 12int msg_to_mpoad(struct k_message *msg, struct mpoa_client *mpc);
13 13
14struct mpoa_client { 14struct mpoa_client {
15 struct mpoa_client *next; 15 struct mpoa_client *next;
16 struct net_device *dev; /* lec in question */ 16 struct net_device *dev; /* lec in question */
17 int dev_num; /* e.g. 2 for lec2 */ 17 int dev_num; /* e.g. 2 for lec2 */
18 int (*old_hard_start_xmit)(struct sk_buff *skb, struct net_device *dev); 18 int (*old_hard_start_xmit)(struct sk_buff *skb, struct net_device *dev);
19 struct atm_vcc *mpoad_vcc; /* control channel to mpoad */ 19 struct atm_vcc *mpoad_vcc; /* control channel to mpoad */
20 uint8_t mps_ctrl_addr[ATM_ESA_LEN]; /* MPS control ATM address */ 20 uint8_t mps_ctrl_addr[ATM_ESA_LEN]; /* MPS control ATM address */
21 uint8_t our_ctrl_addr[ATM_ESA_LEN]; /* MPC's control ATM address */ 21 uint8_t our_ctrl_addr[ATM_ESA_LEN]; /* MPC's control ATM address */
22 22
23 rwlock_t ingress_lock; 23 rwlock_t ingress_lock;
24 struct in_cache_ops *in_ops; /* ingress cache operations */ 24 struct in_cache_ops *in_ops; /* ingress cache operations */
25 in_cache_entry *in_cache; /* the ingress cache of this MPC */ 25 in_cache_entry *in_cache; /* the ingress cache of this MPC */
26 26
27 rwlock_t egress_lock; 27 rwlock_t egress_lock;
28 struct eg_cache_ops *eg_ops; /* egress cache operations */ 28 struct eg_cache_ops *eg_ops; /* egress cache operations */
29 eg_cache_entry *eg_cache; /* the egress cache of this MPC */ 29 eg_cache_entry *eg_cache; /* the egress cache of this MPC */
30 30
31 uint8_t *mps_macs; /* array of MPS MAC addresses, >=1 */ 31 uint8_t *mps_macs; /* array of MPS MAC addresses, >=1 */
32 int number_of_mps_macs; /* number of the above MAC addresses */ 32 int number_of_mps_macs; /* number of the above MAC addresses */
33 struct mpc_parameters parameters; /* parameters for this client */ 33 struct mpc_parameters parameters; /* parameters for this client */
34}; 34};
35 35
36 36
37struct atm_mpoa_qos { 37struct atm_mpoa_qos {
38 struct atm_mpoa_qos *next; 38 struct atm_mpoa_qos *next;
39 __be32 ipaddr; 39 __be32 ipaddr;
40 struct atm_qos qos; 40 struct atm_qos qos;
41}; 41};
42 42
43 43
diff --git a/net/atm/mpoa_caches.c b/net/atm/mpoa_caches.c
index 697a081533b5..24799e3e78f7 100644
--- a/net/atm/mpoa_caches.c
+++ b/net/atm/mpoa_caches.c
@@ -369,7 +369,7 @@ static eg_cache_entry *eg_cache_get_by_vcc(struct atm_vcc *vcc, struct mpoa_clie
369 while (entry != NULL){ 369 while (entry != NULL){
370 if (entry->shortcut == vcc) { 370 if (entry->shortcut == vcc) {
371 atomic_inc(&entry->use); 371 atomic_inc(&entry->use);
372 read_unlock_irqrestore(&mpc->egress_lock, flags); 372 read_unlock_irqrestore(&mpc->egress_lock, flags);
373 return entry; 373 return entry;
374 } 374 }
375 entry = entry->next; 375 entry = entry->next;
@@ -388,7 +388,7 @@ static eg_cache_entry *eg_cache_get_by_src_ip(__be32 ipaddr, struct mpoa_client
388 while(entry != NULL){ 388 while(entry != NULL){
389 if(entry->latest_ip_addr == ipaddr) { 389 if(entry->latest_ip_addr == ipaddr) {
390 atomic_inc(&entry->use); 390 atomic_inc(&entry->use);
391 read_unlock_irq(&mpc->egress_lock); 391 read_unlock_irq(&mpc->egress_lock);
392 return entry; 392 return entry;
393 } 393 }
394 entry = entry->next; 394 entry = entry->next;
diff --git a/net/atm/mpoa_caches.h b/net/atm/mpoa_caches.h
index 84de977def2e..8e5f78cf0be1 100644
--- a/net/atm/mpoa_caches.h
+++ b/net/atm/mpoa_caches.h
@@ -12,66 +12,66 @@ struct mpoa_client;
12void atm_mpoa_init_cache(struct mpoa_client *mpc); 12void atm_mpoa_init_cache(struct mpoa_client *mpc);
13 13
14typedef struct in_cache_entry { 14typedef struct in_cache_entry {
15 struct in_cache_entry *next; 15 struct in_cache_entry *next;
16 struct in_cache_entry *prev; 16 struct in_cache_entry *prev;
17 struct timeval tv; 17 struct timeval tv;
18 struct timeval reply_wait; 18 struct timeval reply_wait;
19 struct timeval hold_down; 19 struct timeval hold_down;
20 uint32_t packets_fwded; 20 uint32_t packets_fwded;
21 uint16_t entry_state; 21 uint16_t entry_state;
22 uint32_t retry_time; 22 uint32_t retry_time;
23 uint32_t refresh_time; 23 uint32_t refresh_time;
24 uint32_t count; 24 uint32_t count;
25 struct atm_vcc *shortcut; 25 struct atm_vcc *shortcut;
26 uint8_t MPS_ctrl_ATM_addr[ATM_ESA_LEN]; 26 uint8_t MPS_ctrl_ATM_addr[ATM_ESA_LEN];
27 struct in_ctrl_info ctrl_info; 27 struct in_ctrl_info ctrl_info;
28 atomic_t use; 28 atomic_t use;
29} in_cache_entry; 29} in_cache_entry;
30 30
31struct in_cache_ops{ 31struct in_cache_ops{
32 in_cache_entry *(*add_entry)(__be32 dst_ip, 32 in_cache_entry *(*add_entry)(__be32 dst_ip,
33 struct mpoa_client *client); 33 struct mpoa_client *client);
34 in_cache_entry *(*get)(__be32 dst_ip, struct mpoa_client *client); 34 in_cache_entry *(*get)(__be32 dst_ip, struct mpoa_client *client);
35 in_cache_entry *(*get_with_mask)(__be32 dst_ip, 35 in_cache_entry *(*get_with_mask)(__be32 dst_ip,
36 struct mpoa_client *client, 36 struct mpoa_client *client,
37 __be32 mask); 37 __be32 mask);
38 in_cache_entry *(*get_by_vcc)(struct atm_vcc *vcc, 38 in_cache_entry *(*get_by_vcc)(struct atm_vcc *vcc,
39 struct mpoa_client *client); 39 struct mpoa_client *client);
40 void (*put)(in_cache_entry *entry); 40 void (*put)(in_cache_entry *entry);
41 void (*remove_entry)(in_cache_entry *delEntry, 41 void (*remove_entry)(in_cache_entry *delEntry,
42 struct mpoa_client *client ); 42 struct mpoa_client *client );
43 int (*cache_hit)(in_cache_entry *entry, 43 int (*cache_hit)(in_cache_entry *entry,
44 struct mpoa_client *client); 44 struct mpoa_client *client);
45 void (*clear_count)(struct mpoa_client *client); 45 void (*clear_count)(struct mpoa_client *client);
46 void (*check_resolving)(struct mpoa_client *client); 46 void (*check_resolving)(struct mpoa_client *client);
47 void (*refresh)(struct mpoa_client *client); 47 void (*refresh)(struct mpoa_client *client);
48 void (*destroy_cache)(struct mpoa_client *mpc); 48 void (*destroy_cache)(struct mpoa_client *mpc);
49}; 49};
50 50
51typedef struct eg_cache_entry{ 51typedef struct eg_cache_entry{
52 struct eg_cache_entry *next; 52 struct eg_cache_entry *next;
53 struct eg_cache_entry *prev; 53 struct eg_cache_entry *prev;
54 struct timeval tv; 54 struct timeval tv;
55 uint8_t MPS_ctrl_ATM_addr[ATM_ESA_LEN]; 55 uint8_t MPS_ctrl_ATM_addr[ATM_ESA_LEN];
56 struct atm_vcc *shortcut; 56 struct atm_vcc *shortcut;
57 uint32_t packets_rcvd; 57 uint32_t packets_rcvd;
58 uint16_t entry_state; 58 uint16_t entry_state;
59 __be32 latest_ip_addr; /* The src IP address of the last packet */ 59 __be32 latest_ip_addr; /* The src IP address of the last packet */
60 struct eg_ctrl_info ctrl_info; 60 struct eg_ctrl_info ctrl_info;
61 atomic_t use; 61 atomic_t use;
62} eg_cache_entry; 62} eg_cache_entry;
63 63
64struct eg_cache_ops{ 64struct eg_cache_ops{
65 eg_cache_entry *(*add_entry)(struct k_message *msg, struct mpoa_client *client); 65 eg_cache_entry *(*add_entry)(struct k_message *msg, struct mpoa_client *client);
66 eg_cache_entry *(*get_by_cache_id)(__be32 cache_id, struct mpoa_client *client); 66 eg_cache_entry *(*get_by_cache_id)(__be32 cache_id, struct mpoa_client *client);
67 eg_cache_entry *(*get_by_tag)(__be32 cache_id, struct mpoa_client *client); 67 eg_cache_entry *(*get_by_tag)(__be32 cache_id, struct mpoa_client *client);
68 eg_cache_entry *(*get_by_vcc)(struct atm_vcc *vcc, struct mpoa_client *client); 68 eg_cache_entry *(*get_by_vcc)(struct atm_vcc *vcc, struct mpoa_client *client);
69 eg_cache_entry *(*get_by_src_ip)(__be32 ipaddr, struct mpoa_client *client); 69 eg_cache_entry *(*get_by_src_ip)(__be32 ipaddr, struct mpoa_client *client);
70 void (*put)(eg_cache_entry *entry); 70 void (*put)(eg_cache_entry *entry);
71 void (*remove_entry)(eg_cache_entry *entry, struct mpoa_client *client); 71 void (*remove_entry)(eg_cache_entry *entry, struct mpoa_client *client);
72 void (*update)(eg_cache_entry *entry, uint16_t holding_time); 72 void (*update)(eg_cache_entry *entry, uint16_t holding_time);
73 void (*clear_expired)(struct mpoa_client *client); 73 void (*clear_expired)(struct mpoa_client *client);
74 void (*destroy_cache)(struct mpoa_client *mpc); 74 void (*destroy_cache)(struct mpoa_client *mpc);
75}; 75};
76 76
77 77
@@ -85,7 +85,7 @@ struct eg_cache_ops{
85/* VCC states */ 85/* VCC states */
86 86
87#define OPEN 1 87#define OPEN 1
88#define CLOSED 0 88#define CLOSED 0
89 89
90/* Egress cache entry states */ 90/* Egress cache entry states */
91 91
diff --git a/net/atm/mpoa_proc.c b/net/atm/mpoa_proc.c
index 3844c85d602f..43315af10309 100644
--- a/net/atm/mpoa_proc.c
+++ b/net/atm/mpoa_proc.c
@@ -2,7 +2,7 @@
2#ifdef CONFIG_PROC_FS 2#ifdef CONFIG_PROC_FS
3#include <linux/errno.h> 3#include <linux/errno.h>
4#include <linux/kernel.h> 4#include <linux/kernel.h>
5#include <linux/string.h> 5#include <linux/string.h>
6#include <linux/mm.h> 6#include <linux/mm.h>
7#include <linux/module.h> 7#include <linux/module.h>
8#include <linux/proc_fs.h> 8#include <linux/proc_fs.h>
@@ -16,7 +16,7 @@
16 16
17/* 17/*
18 * mpoa_proc.c: Implementation MPOA client's proc 18 * mpoa_proc.c: Implementation MPOA client's proc
19 * file system statistics 19 * file system statistics
20 */ 20 */
21 21
22#if 1 22#if 1
@@ -32,7 +32,7 @@ extern struct proc_dir_entry *atm_proc_root; /* from proc.c. */
32 32
33static int proc_mpc_open(struct inode *inode, struct file *file); 33static int proc_mpc_open(struct inode *inode, struct file *file);
34static ssize_t proc_mpc_write(struct file *file, const char __user *buff, 34static ssize_t proc_mpc_write(struct file *file, const char __user *buff,
35 size_t nbytes, loff_t *ppos); 35 size_t nbytes, loff_t *ppos);
36 36
37static int parse_qos(const char *buff); 37static int parse_qos(const char *buff);
38 38
@@ -52,18 +52,18 @@ static struct file_operations mpc_file_operations = {
52 * Returns the state of an ingress cache entry as a string 52 * Returns the state of an ingress cache entry as a string
53 */ 53 */
54static const char *ingress_state_string(int state){ 54static const char *ingress_state_string(int state){
55 switch(state) { 55 switch(state) {
56 case INGRESS_RESOLVING: 56 case INGRESS_RESOLVING:
57 return "resolving "; 57 return "resolving ";
58 break; 58 break;
59 case INGRESS_RESOLVED: 59 case INGRESS_RESOLVED:
60 return "resolved "; 60 return "resolved ";
61 break; 61 break;
62 case INGRESS_INVALID: 62 case INGRESS_INVALID:
63 return "invalid "; 63 return "invalid ";
64 break; 64 break;
65 case INGRESS_REFRESHING: 65 case INGRESS_REFRESHING:
66 return "refreshing "; 66 return "refreshing ";
67 break; 67 break;
68 default: 68 default:
69 return ""; 69 return "";
@@ -74,15 +74,15 @@ static const char *ingress_state_string(int state){
74 * Returns the state of an egress cache entry as a string 74 * Returns the state of an egress cache entry as a string
75 */ 75 */
76static const char *egress_state_string(int state){ 76static const char *egress_state_string(int state){
77 switch(state) { 77 switch(state) {
78 case EGRESS_RESOLVED: 78 case EGRESS_RESOLVED:
79 return "resolved "; 79 return "resolved ";
80 break; 80 break;
81 case EGRESS_PURGE: 81 case EGRESS_PURGE:
82 return "purge "; 82 return "purge ";
83 break; 83 break;
84 case EGRESS_INVALID: 84 case EGRESS_INVALID:
85 return "invalid "; 85 return "invalid ";
86 break; 86 break;
87 default: 87 default:
88 return ""; 88 return "";
@@ -135,7 +135,7 @@ static int mpc_show(struct seq_file *m, void *v)
135 return 0; 135 return 0;
136 } 136 }
137 137
138 seq_printf(m, "\nInterface %d:\n\n", mpc->dev_num); 138 seq_printf(m, "\nInterface %d:\n\n", mpc->dev_num);
139 seq_printf(m, "Ingress Entries:\nIP address State Holding time Packets fwded VPI VCI\n"); 139 seq_printf(m, "Ingress Entries:\nIP address State Holding time Packets fwded VPI VCI\n");
140 do_gettimeofday(&now); 140 do_gettimeofday(&now);
141 141
@@ -163,7 +163,7 @@ static int mpc_show(struct seq_file *m, void *v)
163 egress_state_string(eg_entry->entry_state), 163 egress_state_string(eg_entry->entry_state),
164 (eg_entry->ctrl_info.holding_time-(now.tv_sec-eg_entry->tv.tv_sec)), 164 (eg_entry->ctrl_info.holding_time-(now.tv_sec-eg_entry->tv.tv_sec)),
165 eg_entry->packets_rcvd); 165 eg_entry->packets_rcvd);
166 166
167 /* latest IP address */ 167 /* latest IP address */
168 temp = (unsigned char *)&eg_entry->latest_ip_addr; 168 temp = (unsigned char *)&eg_entry->latest_ip_addr;
169 sprintf(ip_string, "%d.%d.%d.%d", temp[0], temp[1], temp[2], temp[3]); 169 sprintf(ip_string, "%d.%d.%d.%d", temp[0], temp[1], temp[2], temp[3]);
@@ -190,51 +190,51 @@ static int proc_mpc_open(struct inode *inode, struct file *file)
190} 190}
191 191
192static ssize_t proc_mpc_write(struct file *file, const char __user *buff, 192static ssize_t proc_mpc_write(struct file *file, const char __user *buff,
193 size_t nbytes, loff_t *ppos) 193 size_t nbytes, loff_t *ppos)
194{ 194{
195 char *page, *p; 195 char *page, *p;
196 unsigned len; 196 unsigned len;
197 197
198 if (nbytes == 0) 198 if (nbytes == 0)
199 return 0; 199 return 0;
200 200
201 if (nbytes >= PAGE_SIZE) 201 if (nbytes >= PAGE_SIZE)
202 nbytes = PAGE_SIZE-1; 202 nbytes = PAGE_SIZE-1;
203 203
204 page = (char *)__get_free_page(GFP_KERNEL); 204 page = (char *)__get_free_page(GFP_KERNEL);
205 if (!page) 205 if (!page)
206 return -ENOMEM; 206 return -ENOMEM;
207 207
208 for (p = page, len = 0; len < nbytes; p++, len++) { 208 for (p = page, len = 0; len < nbytes; p++, len++) {
209 if (get_user(*p, buff++)) { 209 if (get_user(*p, buff++)) {
210 free_page((unsigned long)page); 210 free_page((unsigned long)page);
211 return -EFAULT; 211 return -EFAULT;
212 } 212 }
213 if (*p == '\0' || *p == '\n') 213 if (*p == '\0' || *p == '\n')
214 break; 214 break;
215 } 215 }
216 216
217 *p = '\0'; 217 *p = '\0';
218 218
219 if (!parse_qos(page)) 219 if (!parse_qos(page))
220 printk("mpoa: proc_mpc_write: could not parse '%s'\n", page); 220 printk("mpoa: proc_mpc_write: could not parse '%s'\n", page);
221
222 free_page((unsigned long)page);
221 223
222 free_page((unsigned long)page); 224 return len;
223
224 return len;
225} 225}
226 226
227static int parse_qos(const char *buff) 227static int parse_qos(const char *buff)
228{ 228{
229 /* possible lines look like this 229 /* possible lines look like this
230 * add 130.230.54.142 tx=max_pcr,max_sdu rx=max_pcr,max_sdu 230 * add 130.230.54.142 tx=max_pcr,max_sdu rx=max_pcr,max_sdu
231 */ 231 */
232 unsigned char ip[4]; 232 unsigned char ip[4];
233 int tx_pcr, tx_sdu, rx_pcr, rx_sdu; 233 int tx_pcr, tx_sdu, rx_pcr, rx_sdu;
234 __be32 ipaddr; 234 __be32 ipaddr;
235 struct atm_qos qos; 235 struct atm_qos qos;
236 236
237 memset(&qos, 0, sizeof(struct atm_qos)); 237 memset(&qos, 0, sizeof(struct atm_qos));
238 238
239 if (sscanf(buff, "del %hhu.%hhu.%hhu.%hhu", 239 if (sscanf(buff, "del %hhu.%hhu.%hhu.%hhu",
240 ip, ip+1, ip+2, ip+3) == 4) { 240 ip, ip+1, ip+2, ip+3) == 4) {
@@ -250,14 +250,14 @@ static int parse_qos(const char *buff)
250 ip, ip+1, ip+2, ip+3, &tx_pcr, &tx_sdu, &rx_pcr, &rx_sdu) != 8) 250 ip, ip+1, ip+2, ip+3, &tx_pcr, &tx_sdu, &rx_pcr, &rx_sdu) != 8)
251 return 0; 251 return 0;
252 252
253 ipaddr = *(__be32 *)ip; 253 ipaddr = *(__be32 *)ip;
254 qos.txtp.traffic_class = ATM_CBR; 254 qos.txtp.traffic_class = ATM_CBR;
255 qos.txtp.max_pcr = tx_pcr; 255 qos.txtp.max_pcr = tx_pcr;
256 qos.txtp.max_sdu = tx_sdu; 256 qos.txtp.max_sdu = tx_sdu;
257 qos.rxtp.traffic_class = ATM_CBR; 257 qos.rxtp.traffic_class = ATM_CBR;
258 qos.rxtp.max_pcr = rx_pcr; 258 qos.rxtp.max_pcr = rx_pcr;
259 qos.rxtp.max_sdu = rx_sdu; 259 qos.rxtp.max_sdu = rx_sdu;
260 qos.aal = ATM_AAL5; 260 qos.aal = ATM_AAL5;
261 dprintk("mpoa: mpoa_proc.c: parse_qos(): setting qos paramameters to tx=%d,%d rx=%d,%d\n", 261 dprintk("mpoa: mpoa_proc.c: parse_qos(): setting qos paramameters to tx=%d,%d rx=%d,%d\n",
262 qos.txtp.max_pcr, 262 qos.txtp.max_pcr,
263 qos.txtp.max_sdu, 263 qos.txtp.max_sdu,
@@ -276,11 +276,11 @@ int mpc_proc_init(void)
276{ 276{
277 struct proc_dir_entry *p; 277 struct proc_dir_entry *p;
278 278
279 p = create_proc_entry(STAT_FILE_NAME, 0, atm_proc_root); 279 p = create_proc_entry(STAT_FILE_NAME, 0, atm_proc_root);
280 if (!p) { 280 if (!p) {
281 printk(KERN_ERR "Unable to initialize /proc/atm/%s\n", STAT_FILE_NAME); 281 printk(KERN_ERR "Unable to initialize /proc/atm/%s\n", STAT_FILE_NAME);
282 return -ENOMEM; 282 return -ENOMEM;
283 } 283 }
284 p->proc_fops = &mpc_file_operations; 284 p->proc_fops = &mpc_file_operations;
285 p->owner = THIS_MODULE; 285 p->owner = THIS_MODULE;
286 return 0; 286 return 0;
diff --git a/net/atm/proc.c b/net/atm/proc.c
index 739866bfe9e9..190f49ce2cad 100644
--- a/net/atm/proc.c
+++ b/net/atm/proc.c
@@ -86,7 +86,7 @@ static int __vcc_walk(struct sock **sock, int family, int *bucket, loff_t l)
86 break; 86 break;
87 } 87 }
88 l--; 88 l--;
89 } 89 }
90try_again: 90try_again:
91 for (; sk; sk = sk_next(sk)) { 91 for (; sk; sk = sk_next(sk)) {
92 l -= compare_family(sk, family); 92 l -= compare_family(sk, family);
@@ -205,7 +205,7 @@ static void vcc_info(struct seq_file *seq, struct atm_vcc *vcc)
205 seq_printf(seq, "%p ", vcc); 205 seq_printf(seq, "%p ", vcc);
206 if (!vcc->dev) 206 if (!vcc->dev)
207 seq_printf(seq, "Unassigned "); 207 seq_printf(seq, "Unassigned ");
208 else 208 else
209 seq_printf(seq, "%3d %3d %5d ", vcc->dev->number, vcc->vpi, 209 seq_printf(seq, "%3d %3d %5d ", vcc->dev->number, vcc->vpi,
210 vcc->vci); 210 vcc->vci);
211 switch (sk->sk_family) { 211 switch (sk->sk_family) {
@@ -249,7 +249,7 @@ static int atm_dev_seq_show(struct seq_file *seq, void *v)
249 static char atm_dev_banner[] = 249 static char atm_dev_banner[] =
250 "Itf Type ESI/\"MAC\"addr " 250 "Itf Type ESI/\"MAC\"addr "
251 "AAL(TX,err,RX,err,drop) ... [refcnt]\n"; 251 "AAL(TX,err,RX,err,drop) ... [refcnt]\n";
252 252
253 if (v == (void *)1) 253 if (v == (void *)1)
254 seq_puts(seq, atm_dev_banner); 254 seq_puts(seq, atm_dev_banner);
255 else { 255 else {
@@ -257,21 +257,21 @@ static int atm_dev_seq_show(struct seq_file *seq, void *v)
257 257
258 atm_dev_info(seq, dev); 258 atm_dev_info(seq, dev);
259 } 259 }
260 return 0; 260 return 0;
261} 261}
262 262
263static struct seq_operations atm_dev_seq_ops = { 263static struct seq_operations atm_dev_seq_ops = {
264 .start = atm_dev_seq_start, 264 .start = atm_dev_seq_start,
265 .next = atm_dev_seq_next, 265 .next = atm_dev_seq_next,
266 .stop = atm_dev_seq_stop, 266 .stop = atm_dev_seq_stop,
267 .show = atm_dev_seq_show, 267 .show = atm_dev_seq_show,
268}; 268};
269 269
270static int atm_dev_seq_open(struct inode *inode, struct file *file) 270static int atm_dev_seq_open(struct inode *inode, struct file *file)
271{ 271{
272 return seq_open(file, &atm_dev_seq_ops); 272 return seq_open(file, &atm_dev_seq_ops);
273} 273}
274 274
275static struct file_operations devices_seq_fops = { 275static struct file_operations devices_seq_fops = {
276 .open = atm_dev_seq_open, 276 .open = atm_dev_seq_open,
277 .read = seq_read, 277 .read = seq_read,
@@ -281,7 +281,7 @@ static struct file_operations devices_seq_fops = {
281 281
282static int pvc_seq_show(struct seq_file *seq, void *v) 282static int pvc_seq_show(struct seq_file *seq, void *v)
283{ 283{
284 static char atm_pvc_banner[] = 284 static char atm_pvc_banner[] =
285 "Itf VPI VCI AAL RX(PCR,Class) TX(PCR,Class)\n"; 285 "Itf VPI VCI AAL RX(PCR,Class) TX(PCR,Class)\n";
286 286
287 if (v == (void *)1) 287 if (v == (void *)1)
@@ -316,31 +316,31 @@ static struct file_operations pvc_seq_fops = {
316 316
317static int vcc_seq_show(struct seq_file *seq, void *v) 317static int vcc_seq_show(struct seq_file *seq, void *v)
318{ 318{
319 if (v == (void *)1) { 319 if (v == (void *)1) {
320 seq_printf(seq, sizeof(void *) == 4 ? "%-8s%s" : "%-16s%s", 320 seq_printf(seq, sizeof(void *) == 4 ? "%-8s%s" : "%-16s%s",
321 "Address ", "Itf VPI VCI Fam Flags Reply " 321 "Address ", "Itf VPI VCI Fam Flags Reply "
322 "Send buffer Recv buffer [refcnt]\n"); 322 "Send buffer Recv buffer [refcnt]\n");
323 } else { 323 } else {
324 struct vcc_state *state = seq->private; 324 struct vcc_state *state = seq->private;
325 struct atm_vcc *vcc = atm_sk(state->sk); 325 struct atm_vcc *vcc = atm_sk(state->sk);
326 326
327 vcc_info(seq, vcc); 327 vcc_info(seq, vcc);
328 } 328 }
329 return 0; 329 return 0;
330} 330}
331 331
332static struct seq_operations vcc_seq_ops = { 332static struct seq_operations vcc_seq_ops = {
333 .start = vcc_seq_start, 333 .start = vcc_seq_start,
334 .next = vcc_seq_next, 334 .next = vcc_seq_next,
335 .stop = vcc_seq_stop, 335 .stop = vcc_seq_stop,
336 .show = vcc_seq_show, 336 .show = vcc_seq_show,
337}; 337};
338 338
339static int vcc_seq_open(struct inode *inode, struct file *file) 339static int vcc_seq_open(struct inode *inode, struct file *file)
340{ 340{
341 return __vcc_seq_open(inode, file, 0, &vcc_seq_ops); 341 return __vcc_seq_open(inode, file, 0, &vcc_seq_ops);
342} 342}
343 343
344static struct file_operations vcc_seq_fops = { 344static struct file_operations vcc_seq_fops = {
345 .open = vcc_seq_open, 345 .open = vcc_seq_open,
346 .read = seq_read, 346 .read = seq_read,
@@ -350,7 +350,7 @@ static struct file_operations vcc_seq_fops = {
350 350
351static int svc_seq_show(struct seq_file *seq, void *v) 351static int svc_seq_show(struct seq_file *seq, void *v)
352{ 352{
353 static char atm_svc_banner[] = 353 static char atm_svc_banner[] =
354 "Itf VPI VCI State Remote\n"; 354 "Itf VPI VCI State Remote\n";
355 355
356 if (v == (void *)1) 356 if (v == (void *)1)
@@ -472,7 +472,7 @@ static void atm_proc_dirs_remove(void)
472 static struct atm_proc_entry *e; 472 static struct atm_proc_entry *e;
473 473
474 for (e = atm_proc_ents; e->name; e++) { 474 for (e = atm_proc_ents; e->name; e++) {
475 if (e->dirent) 475 if (e->dirent)
476 remove_proc_entry(e->name, atm_proc_root); 476 remove_proc_entry(e->name, atm_proc_root);
477 } 477 }
478 remove_proc_entry("net/atm", NULL); 478 remove_proc_entry("net/atm", NULL);
diff --git a/net/atm/pvc.c b/net/atm/pvc.c
index b2148b43a426..848e6e191cc7 100644
--- a/net/atm/pvc.c
+++ b/net/atm/pvc.c
@@ -72,7 +72,7 @@ static int pvc_setsockopt(struct socket *sock, int level, int optname,
72 72
73 73
74static int pvc_getsockopt(struct socket *sock, int level, int optname, 74static int pvc_getsockopt(struct socket *sock, int level, int optname,
75 char __user *optval, int __user *optlen) 75 char __user *optval, int __user *optlen)
76{ 76{
77 struct sock *sk = sock->sk; 77 struct sock *sk = sock->sk;
78 int error; 78 int error;
@@ -91,7 +91,7 @@ static int pvc_getname(struct socket *sock,struct sockaddr *sockaddr,
91 struct atm_vcc *vcc = ATM_SD(sock); 91 struct atm_vcc *vcc = ATM_SD(sock);
92 92
93 if (!vcc->dev || !test_bit(ATM_VF_ADDR,&vcc->flags)) return -ENOTCONN; 93 if (!vcc->dev || !test_bit(ATM_VF_ADDR,&vcc->flags)) return -ENOTCONN;
94 *sockaddr_len = sizeof(struct sockaddr_atmpvc); 94 *sockaddr_len = sizeof(struct sockaddr_atmpvc);
95 addr = (struct sockaddr_atmpvc *) sockaddr; 95 addr = (struct sockaddr_atmpvc *) sockaddr;
96 addr->sap_family = AF_ATMPVC; 96 addr->sap_family = AF_ATMPVC;
97 addr->sap_addr.itf = vcc->dev->number; 97 addr->sap_addr.itf = vcc->dev->number;
diff --git a/net/atm/raw.c b/net/atm/raw.c
index 3e57b17ca523..4df7cdd72aa1 100644
--- a/net/atm/raw.c
+++ b/net/atm/raw.c
@@ -56,12 +56,12 @@ static int atm_send_aal0(struct atm_vcc *vcc,struct sk_buff *skb)
56 * still work 56 * still work
57 */ 57 */
58 if (!capable(CAP_NET_ADMIN) && 58 if (!capable(CAP_NET_ADMIN) &&
59 (((u32 *) skb->data)[0] & (ATM_HDR_VPI_MASK | ATM_HDR_VCI_MASK)) != 59 (((u32 *) skb->data)[0] & (ATM_HDR_VPI_MASK | ATM_HDR_VCI_MASK)) !=
60 ((vcc->vpi << ATM_HDR_VPI_SHIFT) | (vcc->vci << ATM_HDR_VCI_SHIFT))) 60 ((vcc->vpi << ATM_HDR_VPI_SHIFT) | (vcc->vci << ATM_HDR_VCI_SHIFT)))
61 { 61 {
62 kfree_skb(skb); 62 kfree_skb(skb);
63 return -EADDRNOTAVAIL; 63 return -EADDRNOTAVAIL;
64 } 64 }
65 return vcc->dev->ops->send(vcc,skb); 65 return vcc->dev->ops->send(vcc,skb);
66} 66}
67 67
diff --git a/net/atm/resources.c b/net/atm/resources.c
index 529f7e64aa2c..1bcf6dc8d409 100644
--- a/net/atm/resources.c
+++ b/net/atm/resources.c
@@ -142,8 +142,8 @@ void atm_dev_deregister(struct atm_dev *dev)
142 set_bit(ATM_DF_REMOVED, &dev->flags); 142 set_bit(ATM_DF_REMOVED, &dev->flags);
143 143
144 /* 144 /*
145 * if we remove current device from atm_devs list, new device 145 * if we remove current device from atm_devs list, new device
146 * with same number can appear, such we need deregister proc, 146 * with same number can appear, such we need deregister proc,
147 * release async all vccs and remove them from vccs list too 147 * release async all vccs and remove them from vccs list too
148 */ 148 */
149 mutex_lock(&atm_dev_mutex); 149 mutex_lock(&atm_dev_mutex);
@@ -228,7 +228,7 @@ int atm_dev_ioctl(unsigned int cmd, void __user *arg)
228 *tmp_p++ = dev->number; 228 *tmp_p++ = dev->number;
229 } 229 }
230 mutex_unlock(&atm_dev_mutex); 230 mutex_unlock(&atm_dev_mutex);
231 error = ((copy_to_user(buf, tmp_buf, size)) || 231 error = ((copy_to_user(buf, tmp_buf, size)) ||
232 put_user(size, &iobuf->length)) 232 put_user(size, &iobuf->length))
233 ? -EFAULT : 0; 233 ? -EFAULT : 0;
234 kfree(tmp_buf); 234 kfree(tmp_buf);
@@ -247,7 +247,7 @@ int atm_dev_ioctl(unsigned int cmd, void __user *arg)
247 if (!(dev = try_then_request_module(atm_dev_lookup(number), 247 if (!(dev = try_then_request_module(atm_dev_lookup(number),
248 "atm-device-%d", number))) 248 "atm-device-%d", number)))
249 return -ENODEV; 249 return -ENODEV;
250 250
251 switch (cmd) { 251 switch (cmd) {
252 case ATM_GETTYPE: 252 case ATM_GETTYPE:
253 size = strlen(dev->type) + 1; 253 size = strlen(dev->type) + 1;
@@ -390,7 +390,7 @@ int atm_dev_ioctl(unsigned int cmd, void __user *arg)
390 goto done; 390 goto done;
391 } 391 }
392 } 392 }
393 393
394 if (size) 394 if (size)
395 error = put_user(size, &sioc->length) 395 error = put_user(size, &sioc->length)
396 ? -EFAULT : 0; 396 ? -EFAULT : 0;
@@ -414,15 +414,15 @@ static __inline__ void *dev_get_idx(loff_t left)
414 414
415void *atm_dev_seq_start(struct seq_file *seq, loff_t *pos) 415void *atm_dev_seq_start(struct seq_file *seq, loff_t *pos)
416{ 416{
417 mutex_lock(&atm_dev_mutex); 417 mutex_lock(&atm_dev_mutex);
418 return *pos ? dev_get_idx(*pos) : (void *) 1; 418 return *pos ? dev_get_idx(*pos) : (void *) 1;
419} 419}
420 420
421void atm_dev_seq_stop(struct seq_file *seq, void *v) 421void atm_dev_seq_stop(struct seq_file *seq, void *v)
422{ 422{
423 mutex_unlock(&atm_dev_mutex); 423 mutex_unlock(&atm_dev_mutex);
424} 424}
425 425
426void *atm_dev_seq_next(struct seq_file *seq, void *v, loff_t *pos) 426void *atm_dev_seq_next(struct seq_file *seq, void *v, loff_t *pos)
427{ 427{
428 ++*pos; 428 ++*pos;
diff --git a/net/atm/signaling.h b/net/atm/signaling.h
index 434ead455714..08b2a69cc572 100644
--- a/net/atm/signaling.h
+++ b/net/atm/signaling.h
@@ -1,7 +1,7 @@
1/* net/atm/signaling.h - ATM signaling */ 1/* net/atm/signaling.h - ATM signaling */
2 2
3/* Written 1995-2000 by Werner Almesberger, EPFL LRC/ICA */ 3/* Written 1995-2000 by Werner Almesberger, EPFL LRC/ICA */
4 4
5 5
6#ifndef NET_ATM_SIGNALING_H 6#ifndef NET_ATM_SIGNALING_H
7#define NET_ATM_SIGNALING_H 7#define NET_ATM_SIGNALING_H
diff --git a/net/atm/svc.c b/net/atm/svc.c
index 3a180cfd7b48..876ec7b47a2f 100644
--- a/net/atm/svc.c
+++ b/net/atm/svc.c
@@ -89,7 +89,7 @@ static int svc_release(struct socket *sock)
89 clear_bit(ATM_VF_READY, &vcc->flags); 89 clear_bit(ATM_VF_READY, &vcc->flags);
90 /* VCC pointer is used as a reference, so we must not free it 90 /* VCC pointer is used as a reference, so we must not free it
91 (thereby subjecting it to re-use) before all pending connections 91 (thereby subjecting it to re-use) before all pending connections
92 are closed */ 92 are closed */
93 svc_disconnect(vcc); 93 svc_disconnect(vcc);
94 vcc_release(sock); 94 vcc_release(sock);
95 } 95 }
@@ -144,7 +144,7 @@ static int svc_bind(struct socket *sock,struct sockaddr *sockaddr,
144 error = -EUNATCH; 144 error = -EUNATCH;
145 goto out; 145 goto out;
146 } 146 }
147 if (!sk->sk_err) 147 if (!sk->sk_err)
148 set_bit(ATM_VF_BOUND,&vcc->flags); 148 set_bit(ATM_VF_BOUND,&vcc->flags);
149 error = -sk->sk_err; 149 error = -sk->sk_err;
150out: 150out:
@@ -229,7 +229,7 @@ static int svc_connect(struct socket *sock,struct sockaddr *sockaddr,
229 * This is tricky: 229 * This is tricky:
230 * Kernel ---close--> Demon 230 * Kernel ---close--> Demon
231 * Kernel <--close--- Demon 231 * Kernel <--close--- Demon
232 * or 232 * or
233 * Kernel ---close--> Demon 233 * Kernel ---close--> Demon
234 * Kernel <--error--- Demon 234 * Kernel <--error--- Demon
235 * or 235 * or
@@ -470,13 +470,13 @@ static int svc_setsockopt(struct socket *sock, int level, int optname,
470 } 470 }
471 set_bit(ATM_VF_HASSAP, &vcc->flags); 471 set_bit(ATM_VF_HASSAP, &vcc->flags);
472 break; 472 break;
473 case SO_MULTIPOINT: 473 case SO_MULTIPOINT:
474 if (level != SOL_ATM || optlen != sizeof(int)) { 474 if (level != SOL_ATM || optlen != sizeof(int)) {
475 error = -EINVAL; 475 error = -EINVAL;
476 goto out; 476 goto out;
477 } 477 }
478 if (get_user(value, (int __user *) optval)) { 478 if (get_user(value, (int __user *) optval)) {
479 error = -EFAULT; 479 error = -EFAULT;
480 goto out; 480 goto out;
481 } 481 }
482 if (value == 1) { 482 if (value == 1) {
@@ -486,7 +486,7 @@ static int svc_setsockopt(struct socket *sock, int level, int optname,
486 } else { 486 } else {
487 error = -EINVAL; 487 error = -EINVAL;
488 } 488 }
489 break; 489 break;
490 default: 490 default:
491 error = vcc_setsockopt(sock, level, optname, 491 error = vcc_setsockopt(sock, level, optname,
492 optval, optlen); 492 optval, optlen);
@@ -539,7 +539,7 @@ static int svc_addparty(struct socket *sock, struct sockaddr *sockaddr,
539 set_bit(ATM_VF_WAITING, &vcc->flags); 539 set_bit(ATM_VF_WAITING, &vcc->flags);
540 prepare_to_wait(sk->sk_sleep, &wait, TASK_INTERRUPTIBLE); 540 prepare_to_wait(sk->sk_sleep, &wait, TASK_INTERRUPTIBLE);
541 sigd_enq(vcc, as_addparty, NULL, NULL, 541 sigd_enq(vcc, as_addparty, NULL, NULL,
542 (struct sockaddr_atmsvc *) sockaddr); 542 (struct sockaddr_atmsvc *) sockaddr);
543 if (flags & O_NONBLOCK) { 543 if (flags & O_NONBLOCK) {
544 finish_wait(sk->sk_sleep, &wait); 544 finish_wait(sk->sk_sleep, &wait);
545 error = -EINPROGRESS; 545 error = -EINPROGRESS;
@@ -587,26 +587,26 @@ out:
587 587
588static int svc_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) 588static int svc_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
589{ 589{
590 int error, ep_ref; 590 int error, ep_ref;
591 struct sockaddr_atmsvc sa; 591 struct sockaddr_atmsvc sa;
592 struct atm_vcc *vcc = ATM_SD(sock); 592 struct atm_vcc *vcc = ATM_SD(sock);
593 593
594 switch (cmd) { 594 switch (cmd) {
595 case ATM_ADDPARTY: 595 case ATM_ADDPARTY:
596 if (!test_bit(ATM_VF_SESSION, &vcc->flags)) 596 if (!test_bit(ATM_VF_SESSION, &vcc->flags))
597 return -EINVAL; 597 return -EINVAL;
598 if (copy_from_user(&sa, (void __user *) arg, sizeof(sa))) 598 if (copy_from_user(&sa, (void __user *) arg, sizeof(sa)))
599 return -EFAULT; 599 return -EFAULT;
600 error = svc_addparty(sock, (struct sockaddr *) &sa, sizeof(sa), 0); 600 error = svc_addparty(sock, (struct sockaddr *) &sa, sizeof(sa), 0);
601 break; 601 break;
602 case ATM_DROPPARTY: 602 case ATM_DROPPARTY:
603 if (!test_bit(ATM_VF_SESSION, &vcc->flags)) 603 if (!test_bit(ATM_VF_SESSION, &vcc->flags))
604 return -EINVAL; 604 return -EINVAL;
605 if (copy_from_user(&ep_ref, (void __user *) arg, sizeof(int))) 605 if (copy_from_user(&ep_ref, (void __user *) arg, sizeof(int)))
606 return -EFAULT; 606 return -EFAULT;
607 error = svc_dropparty(sock, ep_ref); 607 error = svc_dropparty(sock, ep_ref);
608 break; 608 break;
609 default: 609 default:
610 error = vcc_ioctl(sock, cmd, arg); 610 error = vcc_ioctl(sock, cmd, arg);
611 } 611 }
612 612