diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/compat_ioctl.c | 113 |
1 files changed, 1 insertions, 112 deletions
diff --git a/fs/compat_ioctl.c b/fs/compat_ioctl.c index c54eaab71a19..ddefb8851a98 100644 --- a/fs/compat_ioctl.c +++ b/fs/compat_ioctl.c | |||
@@ -58,7 +58,6 @@ | |||
58 | #include <linux/syscalls.h> | 58 | #include <linux/syscalls.h> |
59 | #include <linux/i2c.h> | 59 | #include <linux/i2c.h> |
60 | #include <linux/i2c-dev.h> | 60 | #include <linux/i2c-dev.h> |
61 | #include <linux/wireless.h> | ||
62 | #include <linux/atalk.h> | 61 | #include <linux/atalk.h> |
63 | #include <linux/loop.h> | 62 | #include <linux/loop.h> |
64 | 63 | ||
@@ -1759,64 +1758,6 @@ static int do_i2c_smbus_ioctl(unsigned int fd, unsigned int cmd, unsigned long a | |||
1759 | return sys_ioctl(fd, cmd, (unsigned long)tdata); | 1758 | return sys_ioctl(fd, cmd, (unsigned long)tdata); |
1760 | } | 1759 | } |
1761 | 1760 | ||
1762 | struct compat_iw_point { | ||
1763 | compat_caddr_t pointer; | ||
1764 | __u16 length; | ||
1765 | __u16 flags; | ||
1766 | }; | ||
1767 | |||
1768 | static int do_wireless_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg) | ||
1769 | { | ||
1770 | struct iwreq __user *iwr; | ||
1771 | struct iwreq __user *iwr_u; | ||
1772 | struct iw_point __user *iwp; | ||
1773 | struct compat_iw_point __user *iwp_u; | ||
1774 | compat_caddr_t pointer_u; | ||
1775 | void __user *pointer; | ||
1776 | __u16 length, flags; | ||
1777 | int ret; | ||
1778 | |||
1779 | iwr_u = compat_ptr(arg); | ||
1780 | iwp_u = (struct compat_iw_point __user *) &iwr_u->u.data; | ||
1781 | iwr = compat_alloc_user_space(sizeof(*iwr)); | ||
1782 | if (iwr == NULL) | ||
1783 | return -ENOMEM; | ||
1784 | |||
1785 | iwp = &iwr->u.data; | ||
1786 | |||
1787 | if (!access_ok(VERIFY_WRITE, iwr, sizeof(*iwr))) | ||
1788 | return -EFAULT; | ||
1789 | |||
1790 | if (__copy_in_user(&iwr->ifr_ifrn.ifrn_name[0], | ||
1791 | &iwr_u->ifr_ifrn.ifrn_name[0], | ||
1792 | sizeof(iwr->ifr_ifrn.ifrn_name))) | ||
1793 | return -EFAULT; | ||
1794 | |||
1795 | if (__get_user(pointer_u, &iwp_u->pointer) || | ||
1796 | __get_user(length, &iwp_u->length) || | ||
1797 | __get_user(flags, &iwp_u->flags)) | ||
1798 | return -EFAULT; | ||
1799 | |||
1800 | if (__put_user(compat_ptr(pointer_u), &iwp->pointer) || | ||
1801 | __put_user(length, &iwp->length) || | ||
1802 | __put_user(flags, &iwp->flags)) | ||
1803 | return -EFAULT; | ||
1804 | |||
1805 | ret = sys_ioctl(fd, cmd, (unsigned long) iwr); | ||
1806 | |||
1807 | if (__get_user(pointer, &iwp->pointer) || | ||
1808 | __get_user(length, &iwp->length) || | ||
1809 | __get_user(flags, &iwp->flags)) | ||
1810 | return -EFAULT; | ||
1811 | |||
1812 | if (__put_user(ptr_to_compat(pointer), &iwp_u->pointer) || | ||
1813 | __put_user(length, &iwp_u->length) || | ||
1814 | __put_user(flags, &iwp_u->flags)) | ||
1815 | return -EFAULT; | ||
1816 | |||
1817 | return ret; | ||
1818 | } | ||
1819 | |||
1820 | /* Since old style bridge ioctl's endup using SIOCDEVPRIVATE | 1761 | /* Since old style bridge ioctl's endup using SIOCDEVPRIVATE |
1821 | * for some operations; this forces use of the newer bridge-utils that | 1762 | * for some operations; this forces use of the newer bridge-utils that |
1822 | * use compatiable ioctls | 1763 | * use compatiable ioctls |
@@ -2501,36 +2442,6 @@ COMPATIBLE_IOCTL(I2C_TENBIT) | |||
2501 | COMPATIBLE_IOCTL(I2C_PEC) | 2442 | COMPATIBLE_IOCTL(I2C_PEC) |
2502 | COMPATIBLE_IOCTL(I2C_RETRIES) | 2443 | COMPATIBLE_IOCTL(I2C_RETRIES) |
2503 | COMPATIBLE_IOCTL(I2C_TIMEOUT) | 2444 | COMPATIBLE_IOCTL(I2C_TIMEOUT) |
2504 | /* wireless */ | ||
2505 | COMPATIBLE_IOCTL(SIOCSIWCOMMIT) | ||
2506 | COMPATIBLE_IOCTL(SIOCGIWNAME) | ||
2507 | COMPATIBLE_IOCTL(SIOCSIWNWID) | ||
2508 | COMPATIBLE_IOCTL(SIOCGIWNWID) | ||
2509 | COMPATIBLE_IOCTL(SIOCSIWFREQ) | ||
2510 | COMPATIBLE_IOCTL(SIOCGIWFREQ) | ||
2511 | COMPATIBLE_IOCTL(SIOCSIWMODE) | ||
2512 | COMPATIBLE_IOCTL(SIOCGIWMODE) | ||
2513 | COMPATIBLE_IOCTL(SIOCSIWSENS) | ||
2514 | COMPATIBLE_IOCTL(SIOCGIWSENS) | ||
2515 | COMPATIBLE_IOCTL(SIOCSIWRANGE) | ||
2516 | COMPATIBLE_IOCTL(SIOCSIWPRIV) | ||
2517 | COMPATIBLE_IOCTL(SIOCSIWSTATS) | ||
2518 | COMPATIBLE_IOCTL(SIOCSIWAP) | ||
2519 | COMPATIBLE_IOCTL(SIOCGIWAP) | ||
2520 | COMPATIBLE_IOCTL(SIOCSIWRATE) | ||
2521 | COMPATIBLE_IOCTL(SIOCGIWRATE) | ||
2522 | COMPATIBLE_IOCTL(SIOCSIWRTS) | ||
2523 | COMPATIBLE_IOCTL(SIOCGIWRTS) | ||
2524 | COMPATIBLE_IOCTL(SIOCSIWFRAG) | ||
2525 | COMPATIBLE_IOCTL(SIOCGIWFRAG) | ||
2526 | COMPATIBLE_IOCTL(SIOCSIWTXPOW) | ||
2527 | COMPATIBLE_IOCTL(SIOCGIWTXPOW) | ||
2528 | COMPATIBLE_IOCTL(SIOCSIWRETRY) | ||
2529 | COMPATIBLE_IOCTL(SIOCGIWRETRY) | ||
2530 | COMPATIBLE_IOCTL(SIOCSIWPOWER) | ||
2531 | COMPATIBLE_IOCTL(SIOCGIWPOWER) | ||
2532 | COMPATIBLE_IOCTL(SIOCSIWAUTH) | ||
2533 | COMPATIBLE_IOCTL(SIOCGIWAUTH) | ||
2534 | /* hiddev */ | 2445 | /* hiddev */ |
2535 | COMPATIBLE_IOCTL(HIDIOCGVERSION) | 2446 | COMPATIBLE_IOCTL(HIDIOCGVERSION) |
2536 | COMPATIBLE_IOCTL(HIDIOCAPPLICATION) | 2447 | COMPATIBLE_IOCTL(HIDIOCAPPLICATION) |
@@ -2761,29 +2672,7 @@ COMPATIBLE_IOCTL(USBDEVFS_IOCTL32) | |||
2761 | HANDLE_IOCTL(I2C_FUNCS, w_long) | 2672 | HANDLE_IOCTL(I2C_FUNCS, w_long) |
2762 | HANDLE_IOCTL(I2C_RDWR, do_i2c_rdwr_ioctl) | 2673 | HANDLE_IOCTL(I2C_RDWR, do_i2c_rdwr_ioctl) |
2763 | HANDLE_IOCTL(I2C_SMBUS, do_i2c_smbus_ioctl) | 2674 | HANDLE_IOCTL(I2C_SMBUS, do_i2c_smbus_ioctl) |
2764 | /* wireless */ | 2675 | /* bridge */ |
2765 | HANDLE_IOCTL(SIOCGIWRANGE, do_wireless_ioctl) | ||
2766 | HANDLE_IOCTL(SIOCGIWPRIV, do_wireless_ioctl) | ||
2767 | HANDLE_IOCTL(SIOCGIWSTATS, do_wireless_ioctl) | ||
2768 | HANDLE_IOCTL(SIOCSIWSPY, do_wireless_ioctl) | ||
2769 | HANDLE_IOCTL(SIOCGIWSPY, do_wireless_ioctl) | ||
2770 | HANDLE_IOCTL(SIOCSIWTHRSPY, do_wireless_ioctl) | ||
2771 | HANDLE_IOCTL(SIOCGIWTHRSPY, do_wireless_ioctl) | ||
2772 | HANDLE_IOCTL(SIOCSIWMLME, do_wireless_ioctl) | ||
2773 | HANDLE_IOCTL(SIOCGIWAPLIST, do_wireless_ioctl) | ||
2774 | HANDLE_IOCTL(SIOCSIWSCAN, do_wireless_ioctl) | ||
2775 | HANDLE_IOCTL(SIOCGIWSCAN, do_wireless_ioctl) | ||
2776 | HANDLE_IOCTL(SIOCSIWESSID, do_wireless_ioctl) | ||
2777 | HANDLE_IOCTL(SIOCGIWESSID, do_wireless_ioctl) | ||
2778 | HANDLE_IOCTL(SIOCSIWNICKN, do_wireless_ioctl) | ||
2779 | HANDLE_IOCTL(SIOCGIWNICKN, do_wireless_ioctl) | ||
2780 | HANDLE_IOCTL(SIOCSIWENCODE, do_wireless_ioctl) | ||
2781 | HANDLE_IOCTL(SIOCGIWENCODE, do_wireless_ioctl) | ||
2782 | HANDLE_IOCTL(SIOCSIWGENIE, do_wireless_ioctl) | ||
2783 | HANDLE_IOCTL(SIOCGIWGENIE, do_wireless_ioctl) | ||
2784 | HANDLE_IOCTL(SIOCSIWENCODEEXT, do_wireless_ioctl) | ||
2785 | HANDLE_IOCTL(SIOCGIWENCODEEXT, do_wireless_ioctl) | ||
2786 | HANDLE_IOCTL(SIOCSIWPMKSA, do_wireless_ioctl) | ||
2787 | HANDLE_IOCTL(SIOCSIFBR, old_bridge_ioctl) | 2676 | HANDLE_IOCTL(SIOCSIFBR, old_bridge_ioctl) |
2788 | HANDLE_IOCTL(SIOCGIFBR, old_bridge_ioctl) | 2677 | HANDLE_IOCTL(SIOCGIFBR, old_bridge_ioctl) |
2789 | /* Not implemented in the native kernel */ | 2678 | /* Not implemented in the native kernel */ |