From patchwork Sun Jan 1 19:47:01 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philippe Reynes X-Patchwork-Id: 9492955 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 16E0062AB3 for ; Sun, 1 Jan 2017 19:47:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 06D261FFC9 for ; Sun, 1 Jan 2017 19:47:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EE1C922376; Sun, 1 Jan 2017 19:47:13 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 919071FFC9 for ; Sun, 1 Jan 2017 19:47:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932357AbdAATrL (ORCPT ); Sun, 1 Jan 2017 14:47:11 -0500 Received: from mail-wm0-f65.google.com ([74.125.82.65]:34970 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932350AbdAATrK (ORCPT ); Sun, 1 Jan 2017 14:47:10 -0500 Received: by mail-wm0-f65.google.com with SMTP id l2so54033838wml.2; Sun, 01 Jan 2017 11:47:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=Gkb9UQXQLZvTMfoB3oItgemK4bjGlcgJifcfKavPgwc=; b=YNW/8J/2mGcs1v6TKbt30ysv7nd9v38QT/0sKt4mM7tWq6vdfZh7/y9G/TdfYIQfgp bqjFO6kyIhNfLjRbEYgaY9nq4w8HUFKPbBwTSayswtpWzknSz5V2vbWIzzE3UgJk5m+9 l+tHH4gZdxnBHBrVb6gdQQW9CW9VZLjHiZwWHfvk30mfskyxXhGqxD0W0DWNFEINjiGt 7N/TPh9QptTuPs1Pkgr/y3F9vQ8Kj4crky08GsTalNSQ2QwnllMjL3g5sHU7fL9Tlp8M KbUsYBG+X4OuITMsUvRekQ8Z59gPVFXUnF/UGSXnB5x4FElj/Xu75qbkBvB632aaA/dx mqxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=Gkb9UQXQLZvTMfoB3oItgemK4bjGlcgJifcfKavPgwc=; b=hWico2vH98HMD1upvuM6+B8DCywVerlv3+PHoHpiDkBtlF1UlZrpFpEdSg3zzOQIjj 9SX4hElzXYBBl7w5yKKf4m2EuvRgbQhYGNiSqeed/+M00x0oq6lm11bGHP51nWnJD4E5 mOoJTcMfl6PZt3pCIBxOToctJouGAUgJDENijbL4aQhlLIGZmsh+k1vKJop7nIo0wIDj EXJE99029x+QZBHPkS+JROCtRRwqcLDaGZSO0EuPSrq+6jKeQe4MlLPoVT1MZoD2yIGV px5TTzW8TnG+jdf/r0seBMiTu4FiYohGhNhfD7nbv1vopJn/myJkMaX0deWPIzlza0g9 O6ng== X-Gm-Message-State: AIkVDXL4Aby2cLUmCUoK0/kylOInngkGJoXneNX5wGE3FB2Y+DXbEQRajjbsDFMbCS+cRg== X-Received: by 10.28.134.204 with SMTP id i195mr44877492wmd.77.1483300028669; Sun, 01 Jan 2017 11:47:08 -0800 (PST) Received: from localhost.localdomain (bny93-7-88-161-33-221.fbx.proxad.net. [88.161.33.221]) by smtp.gmail.com with ESMTPSA id r7sm84336660wjp.43.2017.01.01.11.47.07 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 01 Jan 2017 11:47:07 -0800 (PST) From: Philippe Reynes To: davem@davemloft.net, mugunthanvnm@ti.com, a@unstable.cc, fw@strlen.de, jarod@redhat.com Cc: netdev@vger.kernel.org, linux-parisc@vger.kernel.org, linux-kernel@vger.kernel.org, Philippe Reynes Subject: [PATCH] net: dec: winbond-840: use new api ethtool_{get|set}_link_ksettings Date: Sun, 1 Jan 2017 20:47:01 +0100 Message-Id: <1483300021-21783-1-git-send-email-tremyfr@gmail.com> X-Mailer: git-send-email 1.7.4.4 Sender: linux-parisc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-parisc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. Signed-off-by: Philippe Reynes --- drivers/net/ethernet/dec/tulip/winbond-840.c | 14 ++++++++------ 1 files changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/net/ethernet/dec/tulip/winbond-840.c b/drivers/net/ethernet/dec/tulip/winbond-840.c index bc9bf88..d1f2f3c 100644 --- a/drivers/net/ethernet/dec/tulip/winbond-840.c +++ b/drivers/net/ethernet/dec/tulip/winbond-840.c @@ -1391,25 +1391,27 @@ static void netdev_get_drvinfo (struct net_device *dev, struct ethtool_drvinfo * strlcpy(info->bus_info, pci_name(np->pci_dev), sizeof(info->bus_info)); } -static int netdev_get_settings(struct net_device *dev, struct ethtool_cmd *cmd) +static int netdev_get_link_ksettings(struct net_device *dev, + struct ethtool_link_ksettings *cmd) { struct netdev_private *np = netdev_priv(dev); int rc; spin_lock_irq(&np->lock); - rc = mii_ethtool_gset(&np->mii_if, cmd); + rc = mii_ethtool_get_link_ksettings(&np->mii_if, cmd); spin_unlock_irq(&np->lock); return rc; } -static int netdev_set_settings(struct net_device *dev, struct ethtool_cmd *cmd) +static int netdev_set_link_ksettings(struct net_device *dev, + const struct ethtool_link_ksettings *cmd) { struct netdev_private *np = netdev_priv(dev); int rc; spin_lock_irq(&np->lock); - rc = mii_ethtool_sset(&np->mii_if, cmd); + rc = mii_ethtool_set_link_ksettings(&np->mii_if, cmd); spin_unlock_irq(&np->lock); return rc; @@ -1439,12 +1441,12 @@ static void netdev_set_msglevel(struct net_device *dev, u32 value) static const struct ethtool_ops netdev_ethtool_ops = { .get_drvinfo = netdev_get_drvinfo, - .get_settings = netdev_get_settings, - .set_settings = netdev_set_settings, .nway_reset = netdev_nway_reset, .get_link = netdev_get_link, .get_msglevel = netdev_get_msglevel, .set_msglevel = netdev_set_msglevel, + .get_link_ksettings = netdev_get_link_ksettings, + .set_link_ksettings = netdev_set_link_ksettings, }; static int netdev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)