linux-mips
[Top] [All Lists]

[PATCH net-next v2 04/17] tx4939: use __ethtool_get_ksettings

To: "David S. Miller" <davem@davemloft.net>, Ben Hutchings <ben@decadent.org.uk>, Amir Vadai <amirv@mellanox.com>, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linux-api@vger.kernel.org, linux-mips@linux-mips.org, fcoe-devel@open-fcoe.org
Subject: [PATCH net-next v2 04/17] tx4939: use __ethtool_get_ksettings
From: David Decotigny <ddecotig@gmail.com>
Date: Wed, 4 Feb 2015 11:53:28 -0800
Cc: Eric Dumazet <edumazet@google.com>, Eugenia Emantayev <eugenia@mellanox.co.il>, Or Gerlitz <ogerlitz@mellanox.com>, Ido Shamay <idos@mellanox.com>, Joe Perches <joe@perches.com>, Saeed Mahameed <saeedm@mellanox.com>, Govindarajulu Varadarajan <_govind@gmx.com>, Venkata Duvvuru <VenkatKumar.Duvvuru@Emulex.Com>, Jeff Kirsher <jeffrey.t.kirsher@intel.com>, Eyal Perry <eyalpe@mellanox.com>, Pravin B Shelar <pshelar@nicira.com>, Ed Swierk <eswierk@skyportsystems.com>, Upinder Malhi <umalhi@cisco.com>, Robert Love <robert.w.love@intel.com>, "James E.J. Bottomley" <JBottomley@parallels.com>, David Decotigny <decot@googlers.com>
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=/Ss4o1J1GmUatA3aFcs6efKoVCGBmGYjDNY7Q+3WALc=; b=y/EYmOcOzZLr7QrTiAWoBtntzwbLPHT+fJ/MglUbXBHPVblwkgT8vj8aIDRABsSN10 ocEiWugE8B8bcCs0HRQnpvGhiYfhUy/KWvJOy44PrmkgG9OeieD2SuAS4MWa2ztE/K/L B5f6C+37RunJonTCJlZjELeIQLqam1ca119J++UyGf2UbsMVpAmyyvLr45zSwFFSxTOp pN4c/oTX1xGOhVjdni0Lg4HCGRaaj5EUMWKqu17AmIXnbH7MPUtwCaJtkv6j77RjQYrL sJtXtQo9FMJ3RxBhmUjnjyssglowK8KdA+dGtP+hGTQ6EuQnPk10HHjye3+V8LLVL07P 8M3w==
In-reply-to: <1423079621-1374-1-git-send-email-ddecotig@gmail.com>
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <1423079621-1374-1-git-send-email-ddecotig@gmail.com>
Sender: linux-mips-bounce@linux-mips.org
From: David Decotigny <decot@googlers.com>

Signed-off-by: David Decotigny <decot@googlers.com>
---
 arch/mips/txx9/generic/setup_tx4939.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/arch/mips/txx9/generic/setup_tx4939.c 
b/arch/mips/txx9/generic/setup_tx4939.c
index e3733cd..4a3ebf6 100644
--- a/arch/mips/txx9/generic/setup_tx4939.c
+++ b/arch/mips/txx9/generic/setup_tx4939.c
@@ -320,11 +320,12 @@ void __init tx4939_sio_init(unsigned int sclk, unsigned 
int cts_mask)
 #if IS_ENABLED(CONFIG_TC35815)
 static u32 tx4939_get_eth_speed(struct net_device *dev)
 {
-       struct ethtool_cmd cmd;
-       if (__ethtool_get_settings(dev, &cmd))
+       struct ethtool_ksettings cmd;
+
+       if (__ethtool_get_ksettings(dev, &cmd))
                return 100;     /* default 100Mbps */
 
-       return ethtool_cmd_speed(&cmd);
+       return cmd.parent.speed;
 }
 
 static int tx4939_netdev_event(struct notifier_block *this,
-- 
2.2.0.rc0.207.ga3a616c


<Prev in Thread] Current Thread [Next in Thread>