From patchwork Mon Oct 5 13:31:24 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Valentine Barshak X-Patchwork-Id: 35014 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id C87F0B7BBB for ; Tue, 6 Oct 2009 00:37:20 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758812AbZJENb6 (ORCPT ); Mon, 5 Oct 2009 09:31:58 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756598AbZJENb6 (ORCPT ); Mon, 5 Oct 2009 09:31:58 -0400 Received: from 93.100.123.135.pool.sknt.ru ([93.100.123.135]:34293 "EHLO localhost.localdomain" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1756594AbZJENb6 (ORCPT ); Mon, 5 Oct 2009 09:31:58 -0400 Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by localhost.localdomain (8.14.3/8.14.3) with ESMTP id n95DVOCl011730; Mon, 5 Oct 2009 17:31:24 +0400 Received: (from vaxon@localhost) by localhost.localdomain (8.14.3/8.14.3/Submit) id n95DVOeV011729; Mon, 5 Oct 2009 17:31:24 +0400 X-Authentication-Warning: localhost.localdomain: vaxon set sender to vbarshak@ru.mvista.com using -f Date: Mon, 5 Oct 2009 17:31:24 +0400 From: Valentine Barshak To: Olof Johansson Cc: linuxppc-dev@ozlabs.org, netdev@vger.kernel.org, jgarzik@pobox.com Subject: [PATCH] pasemi_mac: ethtool set settings support Message-ID: <20091005133124.GA11717@ru.mvista.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <4AC9ED9B.5040400@ru.mvista.com> User-Agent: Mutt/1.5.18 (2008-05-17) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Add ethtool set settings to pasemi_mac_ethtool. Signed-off-by: Valentine Barshak Acked-by: Olof Johansson --- drivers/net/pasemi_mac_ethtool.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff -pruN linux-2.6.orig/drivers/net/pasemi_mac_ethtool.c linux-2.6/drivers/net/pasemi_mac_ethtool.c --- linux-2.6.orig/drivers/net/pasemi_mac_ethtool.c 2009-10-05 16:24:14.000000000 +0400 +++ linux-2.6./drivers/net/pasemi_mac_ethtool.c 2009-10-05 16:27:08.000000000 +0400 @@ -77,6 +77,19 @@ pasemi_mac_ethtool_get_settings(struct n return phy_ethtool_gset(phydev, cmd); } +static int +pasemi_mac_ethtool_set_settings(struct net_device *netdev, + struct ethtool_cmd *cmd) +{ + struct pasemi_mac *mac = netdev_priv(netdev); + struct phy_device *phydev = mac->phydev; + + if (!phydev) + return -EOPNOTSUPP; + + return phy_ethtool_sset(phydev, cmd); +} + static void pasemi_mac_ethtool_get_drvinfo(struct net_device *netdev, struct ethtool_drvinfo *drvinfo) @@ -150,6 +163,7 @@ static void pasemi_mac_get_strings(struc const struct ethtool_ops pasemi_mac_ethtool_ops = { .get_settings = pasemi_mac_ethtool_get_settings, + .set_settings = pasemi_mac_ethtool_set_settings, .get_drvinfo = pasemi_mac_ethtool_get_drvinfo, .get_msglevel = pasemi_mac_ethtool_get_msglevel, .set_msglevel = pasemi_mac_ethtool_set_msglevel,