diff options
Diffstat (limited to 'drivers/net/hamradio/6pack.c')
-rw-r--r-- | drivers/net/hamradio/6pack.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/net/hamradio/6pack.c b/drivers/net/hamradio/6pack.c index fb588301a05d..689b9bd377a5 100644 --- a/drivers/net/hamradio/6pack.c +++ b/drivers/net/hamradio/6pack.c | |||
@@ -34,6 +34,7 @@ | |||
34 | #include <linux/ip.h> | 34 | #include <linux/ip.h> |
35 | #include <linux/tcp.h> | 35 | #include <linux/tcp.h> |
36 | #include <linux/semaphore.h> | 36 | #include <linux/semaphore.h> |
37 | #include <linux/compat.h> | ||
37 | #include <asm/atomic.h> | 38 | #include <asm/atomic.h> |
38 | 39 | ||
39 | #define SIXPACK_VERSION "Revision: 0.3.0" | 40 | #define SIXPACK_VERSION "Revision: 0.3.0" |
@@ -777,6 +778,23 @@ static int sixpack_ioctl(struct tty_struct *tty, struct file *file, | |||
777 | return err; | 778 | return err; |
778 | } | 779 | } |
779 | 780 | ||
781 | #ifdef CONFIG_COMPAT | ||
782 | static long sixpack_compat_ioctl(struct tty_struct * tty, struct file * file, | ||
783 | unsigned int cmd, unsigned long arg) | ||
784 | { | ||
785 | switch (cmd) { | ||
786 | case SIOCGIFNAME: | ||
787 | case SIOCGIFENCAP: | ||
788 | case SIOCSIFENCAP: | ||
789 | case SIOCSIFHWADDR: | ||
790 | return sixpack_ioctl(tty, file, cmd, | ||
791 | (unsigned long)compat_ptr(arg)); | ||
792 | } | ||
793 | |||
794 | return -ENOIOCTLCMD; | ||
795 | } | ||
796 | #endif | ||
797 | |||
780 | static struct tty_ldisc_ops sp_ldisc = { | 798 | static struct tty_ldisc_ops sp_ldisc = { |
781 | .owner = THIS_MODULE, | 799 | .owner = THIS_MODULE, |
782 | .magic = TTY_LDISC_MAGIC, | 800 | .magic = TTY_LDISC_MAGIC, |
@@ -784,6 +802,9 @@ static struct tty_ldisc_ops sp_ldisc = { | |||
784 | .open = sixpack_open, | 802 | .open = sixpack_open, |
785 | .close = sixpack_close, | 803 | .close = sixpack_close, |
786 | .ioctl = sixpack_ioctl, | 804 | .ioctl = sixpack_ioctl, |
805 | #ifdef CONFIG_COMPAT | ||
806 | .compat_ioctl = sixpack_compat_ioctl, | ||
807 | #endif | ||
787 | .receive_buf = sixpack_receive_buf, | 808 | .receive_buf = sixpack_receive_buf, |
788 | .write_wakeup = sixpack_write_wakeup, | 809 | .write_wakeup = sixpack_write_wakeup, |
789 | }; | 810 | }; |