aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/hamradio/6pack.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/hamradio/6pack.c')
-rw-r--r--drivers/net/hamradio/6pack.c22
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
783static 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
780static struct tty_ldisc_ops sp_ldisc = { 799static 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};