#include <linux/rtnetlink.h>
#include <linux/skbuff.h>
#include <linux/ethtool.h>
-#include <linux/mii.h>
/* enable PIO instead of MMIO, if CONFIG_EEPRO100_PIO is selected */
#ifdef CONFIG_EEPRO100_PIO
return &sp->stats;
}
-static int netdev_ethtool_ioctl(struct net_device *dev, void *useraddr)
+static int netdev_ethtool_ioctl(struct net_device *dev, void __user *useraddr)
{
u32 ethcmd;
struct speedo_private *sp = netdev_priv(dev);
static int speedo_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
{
struct speedo_private *sp = netdev_priv(dev);
- struct mii_ioctl_data *data = (struct mii_ioctl_data *)&rq->ifr_data;
+ struct mii_ioctl_data *data = if_mii(rq);
int phy = sp->phy[0] & 0x1f;
int saved_acpi;
int t;
pci_set_power_state(sp->pdev, saved_acpi);
return 0;
case SIOCETHTOOL:
- return netdev_ethtool_ioctl(dev, (void *) rq->ifr_data);
+ return netdev_ethtool_ioctl(dev, rq->ifr_data);
default:
return -EOPNOTSUPP;
}