Signed-off-by: Christoph Hellwig <[EMAIL PROTECTED]>
Index: arch/um/drivers/net_kern.c =================================================================== --- 13b1e48f4f3700603ed258c41e9e39978babf5ee/arch/um/drivers/net_kern.c (mode:100644) +++ uncommitted/arch/um/drivers/net_kern.c (mode:100644) @@ -244,34 +244,18 @@ return err; } -static int uml_net_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) +static void uml_net_get_drvinfo(struct net_device *dev, + struct ethtool_drvinfo *info) { - static const struct ethtool_drvinfo info = { - .cmd = ETHTOOL_GDRVINFO, - .driver = DRIVER_NAME, - .version = "42", - }; - void *useraddr; - u32 ethcmd; - - switch (cmd) { - case SIOCETHTOOL: - useraddr = ifr->ifr_data; - if (copy_from_user(ðcmd, useraddr, sizeof(ethcmd))) - return -EFAULT; - switch (ethcmd) { - case ETHTOOL_GDRVINFO: - if (copy_to_user(useraddr, &info, sizeof(info))) - return -EFAULT; - return 0; - default: - return -EOPNOTSUPP; - } - default: - return -EINVAL; - } + strcpy(info->driver, DRIVER_NAME); + strcpy(info->version, "42"); } +static struct ethtool_ops uml_net_ethtool_ops = { + .get_drvinfo = uml_net_get_drvinfo, + .get_link = ethtool_op_get_link, +}; + void uml_net_user_timer_expire(unsigned long _conn) { #ifdef undef @@ -360,7 +344,7 @@ dev->tx_timeout = uml_net_tx_timeout; dev->set_mac_address = uml_net_set_mac; dev->change_mtu = uml_net_change_mtu; - dev->do_ioctl = uml_net_ioctl; + dev->ethtool_ops = ¨_net_ethtool_ops; dev->watchdog_timeo = (HZ >> 1); dev->irq = UM_ETH_IRQ; Index: drivers/net/cris/eth_v10.c =================================================================== - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html