aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wan
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wan')
-rw-r--r--drivers/net/wan/x25_asy.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/net/wan/x25_asy.c b/drivers/net/wan/x25_asy.c
index 27945049c9e1..3c325d77939b 100644
--- a/drivers/net/wan/x25_asy.c
+++ b/drivers/net/wan/x25_asy.c
@@ -33,6 +33,7 @@
33#include <linux/lapb.h> 33#include <linux/lapb.h>
34#include <linux/init.h> 34#include <linux/init.h>
35#include <linux/rtnetlink.h> 35#include <linux/rtnetlink.h>
36#include <linux/compat.h>
36#include "x25_asy.h" 37#include "x25_asy.h"
37 38
38#include <net/x25device.h> 39#include <net/x25device.h>
@@ -705,6 +706,21 @@ static int x25_asy_ioctl(struct tty_struct *tty, struct file *file,
705 } 706 }
706} 707}
707 708
709#ifdef CONFIG_COMPAT
710static long x25_asy_compat_ioctl(struct tty_struct *tty, struct file *file,
711 unsigned int cmd, unsigned long arg)
712{
713 switch (cmd) {
714 case SIOCGIFNAME:
715 case SIOCSIFHWADDR:
716 return x25_asy_ioctl(tty, file, cmd,
717 (unsigned long)compat_ptr(arg));
718 }
719
720 return -ENOIOCTLCMD;
721}
722#endif
723
708static int x25_asy_open_dev(struct net_device *dev) 724static int x25_asy_open_dev(struct net_device *dev)
709{ 725{
710 struct x25_asy *sl = netdev_priv(dev); 726 struct x25_asy *sl = netdev_priv(dev);
@@ -754,6 +770,9 @@ static struct tty_ldisc_ops x25_ldisc = {
754 .open = x25_asy_open_tty, 770 .open = x25_asy_open_tty,
755 .close = x25_asy_close_tty, 771 .close = x25_asy_close_tty,
756 .ioctl = x25_asy_ioctl, 772 .ioctl = x25_asy_ioctl,
773#ifdef CONFIG_COMPAT
774 .compat_ioctl = x25_asy_compat_ioctl,
775#endif
757 .receive_buf = x25_asy_receive_buf, 776 .receive_buf = x25_asy_receive_buf,
758 .write_wakeup = x25_asy_write_wakeup, 777 .write_wakeup = x25_asy_write_wakeup,
759}; 778};