Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

airo: use ndo_siocdevprivate

The airo driver overloads SIOCDEVPRIVATE ioctls with another
set based on SIOCIWFIRSTPRIV. Only the first ones actually
work (also in compat mode) as the others do not get passed
down any more.

Change it over to ndo_siocdevprivate for clarification.

Cc: Kalle Valo <kvalo@codeaurora.org>
Cc: linux-wireless@vger.kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Arnd Bergmann and committed by
David S. Miller
ae6af012 25ec92fb

+8 -7
+8 -7
drivers/net/wireless/cisco/airo.c
··· 1144 1144 static irqreturn_t airo_interrupt(int irq, void* dev_id); 1145 1145 static int airo_thread(void *data); 1146 1146 static void timer_func(struct net_device *dev); 1147 - static int airo_ioctl(struct net_device *dev, struct ifreq *rq, int cmd); 1147 + static int airo_siocdevprivate(struct net_device *dev, struct ifreq *rq, void __user *, int cmd); 1148 1148 static struct iw_statistics *airo_get_wireless_stats(struct net_device *dev); 1149 1149 #ifdef CISCO_EXT 1150 1150 static int readrids(struct net_device *dev, aironet_ioctl *comp); ··· 2664 2664 .ndo_start_xmit = airo_start_xmit11, 2665 2665 .ndo_get_stats = airo_get_stats, 2666 2666 .ndo_set_mac_address = airo_set_mac_address, 2667 - .ndo_do_ioctl = airo_ioctl, 2667 + .ndo_siocdevprivate = airo_siocdevprivate, 2668 2668 }; 2669 2669 2670 2670 static void wifi_setup(struct net_device *dev) ··· 2764 2764 .ndo_get_stats = airo_get_stats, 2765 2765 .ndo_set_rx_mode = airo_set_multicast_list, 2766 2766 .ndo_set_mac_address = airo_set_mac_address, 2767 - .ndo_do_ioctl = airo_ioctl, 2767 + .ndo_siocdevprivate = airo_siocdevprivate, 2768 2768 .ndo_validate_addr = eth_validate_addr, 2769 2769 }; 2770 2770 ··· 2775 2775 .ndo_get_stats = airo_get_stats, 2776 2776 .ndo_set_rx_mode = airo_set_multicast_list, 2777 2777 .ndo_set_mac_address = airo_set_mac_address, 2778 - .ndo_do_ioctl = airo_ioctl, 2778 + .ndo_siocdevprivate = airo_siocdevprivate, 2779 2779 .ndo_validate_addr = eth_validate_addr, 2780 2780 }; 2781 2781 ··· 7661 7661 * Javier Achirica did a great job of merging code from the unnamed CISCO 7662 7662 * developer that added support for flashing the card. 7663 7663 */ 7664 - static int airo_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) 7664 + static int airo_siocdevprivate(struct net_device *dev, struct ifreq *rq, 7665 + void __user *data, int cmd) 7665 7666 { 7666 7667 int rc = 0; 7667 7668 struct airo_info *ai = dev->ml_priv; ··· 7679 7678 { 7680 7679 int val = AIROMAGIC; 7681 7680 aironet_ioctl com; 7682 - if (copy_from_user(&com, rq->ifr_data, sizeof(com))) 7681 + if (copy_from_user(&com, data, sizeof(com))) 7683 7682 rc = -EFAULT; 7684 7683 else if (copy_to_user(com.data, (char *)&val, sizeof(val))) 7685 7684 rc = -EFAULT; ··· 7695 7694 */ 7696 7695 { 7697 7696 aironet_ioctl com; 7698 - if (copy_from_user(&com, rq->ifr_data, sizeof(com))) { 7697 + if (copy_from_user(&com, data, sizeof(com))) { 7699 7698 rc = -EFAULT; 7700 7699 break; 7701 7700 }