aboutsummaryrefslogtreecommitdiffstats
path: root/net/atm/svc.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/atm/svc.c')
-rw-r--r--net/atm/svc.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/net/atm/svc.c b/net/atm/svc.c
index 8fb54dc870b3..7b831b526d0b 100644
--- a/net/atm/svc.c
+++ b/net/atm/svc.c
@@ -608,6 +608,22 @@ static int svc_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
608 return error; 608 return error;
609} 609}
610 610
611#ifdef CONFIG_COMPAT
612static int svc_compat_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
613{
614 /* The definition of ATM_ADDPARTY uses the size of struct atm_iobuf.
615 But actually it takes a struct sockaddr_atmsvc, which doesn't need
616 compat handling. So all we have to do is fix up cmd... */
617 if (cmd == COMPAT_ATM_ADDPARTY)
618 cmd = ATM_ADDPARTY;
619
620 if (cmd == ATM_ADDPARTY || cmd == ATM_DROPPARTY)
621 return svc_ioctl(sock, cmd, arg);
622 else
623 return vcc_compat_ioctl(sock, cmd, arg);
624}
625#endif /* CONFIG_COMPAT */
626
611static const struct proto_ops svc_proto_ops = { 627static const struct proto_ops svc_proto_ops = {
612 .family = PF_ATMSVC, 628 .family = PF_ATMSVC,
613 .owner = THIS_MODULE, 629 .owner = THIS_MODULE,
@@ -620,6 +636,9 @@ static const struct proto_ops svc_proto_ops = {
620 .getname = svc_getname, 636 .getname = svc_getname,
621 .poll = vcc_poll, 637 .poll = vcc_poll,
622 .ioctl = svc_ioctl, 638 .ioctl = svc_ioctl,
639#ifdef CONFIG_COMPAT
640 .compat_ioctl = svc_compat_ioctl,
641#endif
623 .listen = svc_listen, 642 .listen = svc_listen,
624 .shutdown = svc_shutdown, 643 .shutdown = svc_shutdown,
625 .setsockopt = svc_setsockopt, 644 .setsockopt = svc_setsockopt,