Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
[linux-2.6-block.git] / drivers / net / tun.c
index 34cc3c590aa5c5c49509159d8fbf0f0cfcfca988..16dfb4cb1980121afe2264d5d332c88f9f91d537 100644 (file)
@@ -2442,18 +2442,16 @@ static struct miscdevice tun_miscdev = {
 
 /* ethtool interface */
 
-static int tun_get_settings(struct net_device *dev, struct ethtool_cmd *cmd)
-{
-       cmd->supported          = 0;
-       cmd->advertising        = 0;
-       ethtool_cmd_speed_set(cmd, SPEED_10);
-       cmd->duplex             = DUPLEX_FULL;
-       cmd->port               = PORT_TP;
-       cmd->phy_address        = 0;
-       cmd->transceiver        = XCVR_INTERNAL;
-       cmd->autoneg            = AUTONEG_DISABLE;
-       cmd->maxtxpkt           = 0;
-       cmd->maxrxpkt           = 0;
+static int tun_get_link_ksettings(struct net_device *dev,
+                                 struct ethtool_link_ksettings *cmd)
+{
+       ethtool_link_ksettings_zero_link_mode(cmd, supported);
+       ethtool_link_ksettings_zero_link_mode(cmd, advertising);
+       cmd->base.speed         = SPEED_10;
+       cmd->base.duplex        = DUPLEX_FULL;
+       cmd->base.port          = PORT_TP;
+       cmd->base.phy_address   = 0;
+       cmd->base.autoneg       = AUTONEG_DISABLE;
        return 0;
 }
 
@@ -2516,7 +2514,6 @@ static int tun_set_coalesce(struct net_device *dev,
 }
 
 static const struct ethtool_ops tun_ethtool_ops = {
-       .get_settings   = tun_get_settings,
        .get_drvinfo    = tun_get_drvinfo,
        .get_msglevel   = tun_get_msglevel,
        .set_msglevel   = tun_set_msglevel,
@@ -2524,6 +2521,7 @@ static const struct ethtool_ops tun_ethtool_ops = {
        .get_ts_info    = ethtool_op_get_ts_info,
        .get_coalesce   = tun_get_coalesce,
        .set_coalesce   = tun_set_coalesce,
+       .get_link_ksettings = tun_get_link_ksettings,
 };
 
 static int tun_queue_resize(struct tun_struct *tun)