diff options
author | James Morris <jmorris@namei.org> | 2009-12-09 11:01:03 +0300 |
---|---|---|
committer | James Morris <jmorris@namei.org> | 2009-12-09 11:01:03 +0300 |
commit | 1ad1f10cd915744bbe52b19423653b38287d827d (patch) | |
tree | ae072aace36b45a55d80b8cbf1b6d92523a88ea0 /drivers/net/hamradio/6pack.c | |
parent | 08e3daff217059c84c360cc71212686e0a7995af (diff) | |
parent | 2b876f95d03e226394b5d360c86127cbefaf614b (diff) | |
download | linux-1ad1f10cd915744bbe52b19423653b38287d827d.tar.xz |
Merge branch 'master' into next
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 @@ #include <linux/ip.h> #include <linux/tcp.h> #include <linux/semaphore.h> +#include <linux/compat.h> #include <asm/atomic.h> #define SIXPACK_VERSION "Revision: 0.3.0" @@ -777,6 +778,23 @@ static int sixpack_ioctl(struct tty_struct *tty, struct file *file, return err; } +#ifdef CONFIG_COMPAT +static long sixpack_compat_ioctl(struct tty_struct * tty, struct file * file, + unsigned int cmd, unsigned long arg) +{ + switch (cmd) { + case SIOCGIFNAME: + case SIOCGIFENCAP: + case SIOCSIFENCAP: + case SIOCSIFHWADDR: + return sixpack_ioctl(tty, file, cmd, + (unsigned long)compat_ptr(arg)); + } + + return -ENOIOCTLCMD; +} +#endif + static struct tty_ldisc_ops sp_ldisc = { .owner = THIS_MODULE, .magic = TTY_LDISC_MAGIC, @@ -784,6 +802,9 @@ static struct tty_ldisc_ops sp_ldisc = { .open = sixpack_open, .close = sixpack_close, .ioctl = sixpack_ioctl, +#ifdef CONFIG_COMPAT + .compat_ioctl = sixpack_compat_ioctl, +#endif .receive_buf = sixpack_receive_buf, .write_wakeup = sixpack_write_wakeup, }; |