- port, cleanup Emulab ICMP Ping Of Death (IPOD) patch from 2.4.x
[linux-2.6.git] / drivers / net / sundance.c
index 838c9c5..44c7aa5 100644 (file)
@@ -148,15 +148,6 @@ static char *media[MAX_UNITS];
 #define TX_TIMEOUT  (4*HZ)
 #define PKT_BUF_SZ             1536    /* Size of each temporary Rx buffer.*/
 
-#ifndef __KERNEL__
-#define __KERNEL__
-#endif
-#if !defined(__OPTIMIZE__)
-#warning  You must compile this file with the correct options!
-#warning  See the last lines of the source file.
-#error You must compile this driver with "-O".
-#endif
-
 /* Include files, designed to support most kernel versions 2.0.0 and later. */
 #include <linux/module.h>
 #include <linux/kernel.h>
@@ -1576,7 +1567,7 @@ static int __set_mac_addr(struct net_device *dev)
 }
        
 
-static int netdev_ethtool_ioctl(struct net_device *dev, void *useraddr)
+static int netdev_ethtool_ioctl(struct net_device *dev, void __user *useraddr)
 {
        struct netdev_private *np = dev->priv;
        u32 ethcmd;
@@ -1659,7 +1650,6 @@ static int netdev_ethtool_ioctl(struct net_device *dev, void *useraddr)
 static int netdev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
 {
        struct netdev_private *np = dev->priv;
-       struct mii_ioctl_data *data = (struct mii_ioctl_data *) & rq->ifr_data;
        int rc;
        int i;
        long ioaddr = dev->base_addr;
@@ -1668,11 +1658,11 @@ static int netdev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
                return -EINVAL;
 
        if (cmd == SIOCETHTOOL)
-               rc = netdev_ethtool_ioctl(dev, (void *) rq->ifr_data);
+               rc = netdev_ethtool_ioctl(dev, rq->ifr_data);
 
        else {
                spin_lock_irq(&np->lock);
-               rc = generic_mii_ioctl(&np->mii_if, data, cmd, NULL);
+               rc = generic_mii_ioctl(&np->mii_if, if_mii(rq), cmd, NULL);
                spin_unlock_irq(&np->lock);
        }
        switch (cmd) {