diff options
Diffstat (limited to 'drivers/net/hamradio/mkiss.c')
-rw-r--r-- | drivers/net/hamradio/mkiss.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/net/hamradio/mkiss.c b/drivers/net/hamradio/mkiss.c index db4b7f1603f6..fc9c57893f8a 100644 --- a/drivers/net/hamradio/mkiss.c +++ b/drivers/net/hamradio/mkiss.c | |||
@@ -36,6 +36,7 @@ | |||
36 | #include <linux/skbuff.h> | 36 | #include <linux/skbuff.h> |
37 | #include <linux/if_arp.h> | 37 | #include <linux/if_arp.h> |
38 | #include <linux/jiffies.h> | 38 | #include <linux/jiffies.h> |
39 | #include <linux/compat.h> | ||
39 | 40 | ||
40 | #include <net/ax25.h> | 41 | #include <net/ax25.h> |
41 | 42 | ||
@@ -898,6 +899,23 @@ static int mkiss_ioctl(struct tty_struct *tty, struct file *file, | |||
898 | return err; | 899 | return err; |
899 | } | 900 | } |
900 | 901 | ||
902 | #ifdef CONFIG_COMPAT | ||
903 | static long mkiss_compat_ioctl(struct tty_struct *tty, struct file *file, | ||
904 | unsigned int cmd, unsigned long arg) | ||
905 | { | ||
906 | switch (arg) { | ||
907 | case SIOCGIFNAME: | ||
908 | case SIOCGIFENCAP: | ||
909 | case SIOCSIFENCAP: | ||
910 | case SIOCSIFHWADDR: | ||
911 | return mkiss_ioctl(tty, file, cmd, | ||
912 | (unsigned long)compat_ptr(arg)); | ||
913 | } | ||
914 | |||
915 | return -ENOIOCTLCMD; | ||
916 | } | ||
917 | #endif | ||
918 | |||
901 | /* | 919 | /* |
902 | * Handle the 'receiver data ready' interrupt. | 920 | * Handle the 'receiver data ready' interrupt. |
903 | * This function is called by the 'tty_io' module in the kernel when | 921 | * This function is called by the 'tty_io' module in the kernel when |
@@ -972,6 +990,9 @@ static struct tty_ldisc_ops ax_ldisc = { | |||
972 | .open = mkiss_open, | 990 | .open = mkiss_open, |
973 | .close = mkiss_close, | 991 | .close = mkiss_close, |
974 | .ioctl = mkiss_ioctl, | 992 | .ioctl = mkiss_ioctl, |
993 | #ifdef CONFIG_COMPAT | ||
994 | .compat_ioctl = mkiss_compat_ioctl, | ||
995 | #endif | ||
975 | .receive_buf = mkiss_receive_buf, | 996 | .receive_buf = mkiss_receive_buf, |
976 | .write_wakeup = mkiss_write_wakeup | 997 | .write_wakeup = mkiss_write_wakeup |
977 | }; | 998 | }; |