diff options
author | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
---|---|---|
committer | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
commit | ada47b5fe13d89735805b566185f4885f5a3f750 (patch) | |
tree | 644b88f8a71896307d71438e9b3af49126ffb22b /drivers/net/hamradio/6pack.c | |
parent | 43e98717ad40a4ae64545b5ba047c7b86aa44f4f (diff) | |
parent | 3280f21d43ee541f97f8cda5792150d2dbec20d5 (diff) |
Merge branch 'wip-2.6.34' into old-private-masterarchived-private-master
Diffstat (limited to 'drivers/net/hamradio/6pack.c')
-rw-r--r-- | drivers/net/hamradio/6pack.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/drivers/net/hamradio/6pack.c b/drivers/net/hamradio/6pack.c index fb588301a05d..4b52c767ad05 100644 --- a/drivers/net/hamradio/6pack.c +++ b/drivers/net/hamradio/6pack.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/errno.h> | 24 | #include <linux/errno.h> |
25 | #include <linux/netdevice.h> | 25 | #include <linux/netdevice.h> |
26 | #include <linux/timer.h> | 26 | #include <linux/timer.h> |
27 | #include <linux/slab.h> | ||
27 | #include <net/ax25.h> | 28 | #include <net/ax25.h> |
28 | #include <linux/etherdevice.h> | 29 | #include <linux/etherdevice.h> |
29 | #include <linux/skbuff.h> | 30 | #include <linux/skbuff.h> |
@@ -34,6 +35,7 @@ | |||
34 | #include <linux/ip.h> | 35 | #include <linux/ip.h> |
35 | #include <linux/tcp.h> | 36 | #include <linux/tcp.h> |
36 | #include <linux/semaphore.h> | 37 | #include <linux/semaphore.h> |
38 | #include <linux/compat.h> | ||
37 | #include <asm/atomic.h> | 39 | #include <asm/atomic.h> |
38 | 40 | ||
39 | #define SIXPACK_VERSION "Revision: 0.3.0" | 41 | #define SIXPACK_VERSION "Revision: 0.3.0" |
@@ -777,6 +779,23 @@ static int sixpack_ioctl(struct tty_struct *tty, struct file *file, | |||
777 | return err; | 779 | return err; |
778 | } | 780 | } |
779 | 781 | ||
782 | #ifdef CONFIG_COMPAT | ||
783 | static long sixpack_compat_ioctl(struct tty_struct * tty, struct file * file, | ||
784 | unsigned int cmd, unsigned long arg) | ||
785 | { | ||
786 | switch (cmd) { | ||
787 | case SIOCGIFNAME: | ||
788 | case SIOCGIFENCAP: | ||
789 | case SIOCSIFENCAP: | ||
790 | case SIOCSIFHWADDR: | ||
791 | return sixpack_ioctl(tty, file, cmd, | ||
792 | (unsigned long)compat_ptr(arg)); | ||
793 | } | ||
794 | |||
795 | return -ENOIOCTLCMD; | ||
796 | } | ||
797 | #endif | ||
798 | |||
780 | static struct tty_ldisc_ops sp_ldisc = { | 799 | static struct tty_ldisc_ops sp_ldisc = { |
781 | .owner = THIS_MODULE, | 800 | .owner = THIS_MODULE, |
782 | .magic = TTY_LDISC_MAGIC, | 801 | .magic = TTY_LDISC_MAGIC, |
@@ -784,6 +803,9 @@ static struct tty_ldisc_ops sp_ldisc = { | |||
784 | .open = sixpack_open, | 803 | .open = sixpack_open, |
785 | .close = sixpack_close, | 804 | .close = sixpack_close, |
786 | .ioctl = sixpack_ioctl, | 805 | .ioctl = sixpack_ioctl, |
806 | #ifdef CONFIG_COMPAT | ||
807 | .compat_ioctl = sixpack_compat_ioctl, | ||
808 | #endif | ||
787 | .receive_buf = sixpack_receive_buf, | 809 | .receive_buf = sixpack_receive_buf, |
788 | .write_wakeup = sixpack_write_wakeup, | 810 | .write_wakeup = sixpack_write_wakeup, |
789 | }; | 811 | }; |