netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Elliot Ayrey <elliot.ayrey@alliedtelesis.co.nz>
To: Marcin Wojtas <marcin.s.wojtas@gmail.com>,
	Russell King <linux@armlinux.org.uk>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	Elliot Ayrey <elliot.ayrey@alliedtelesis.co.nz>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>
Subject: [PATCH] net: mvpp2: Add EEE get/set to mvpp2 driver
Date: Thu, 18 Jan 2024 14:57:48 +1300	[thread overview]
Message-ID: <20240118015748.3507954-1-elliot.ayrey@alliedtelesis.co.nz> (raw)

Fill in the missing .get_eee and .set_eee functions for the mvpp2
driver.

Signed-off-by: Elliot Ayrey <elliot.ayrey@alliedtelesis.co.nz>
---
 .../net/ethernet/marvell/mvpp2/mvpp2_main.c   | 22 +++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
index 820b1fabe297..85dc06c85b31 100644
--- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
+++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
@@ -5701,6 +5701,26 @@ static int mvpp2_ethtool_set_rxfh(struct net_device *dev,
 	return ret;
 }
 
+static int mvpp2_get_eee(struct net_device *dev, struct ethtool_eee *edata)
+{
+	int ret = -EOPNOTSUPP;
+
+	if (dev->phydev)
+		ret = phy_ethtool_get_eee(dev->phydev, edata);
+
+	return ret;
+}
+
+static int mvpp2_set_eee(struct net_device *dev, struct ethtool_eee *edata)
+{
+	int ret = -EOPNOTSUPP;
+
+	if (dev->phydev)
+		ret = phy_ethtool_set_eee(dev->phydev, edata);
+
+	return ret;
+}
+
 /* Device ops */
 
 static const struct net_device_ops mvpp2_netdev_ops = {
@@ -5743,6 +5763,8 @@ static const struct ethtool_ops mvpp2_eth_tool_ops = {
 	.get_rxfh_indir_size	= mvpp2_ethtool_get_rxfh_indir_size,
 	.get_rxfh		= mvpp2_ethtool_get_rxfh,
 	.set_rxfh		= mvpp2_ethtool_set_rxfh,
+	.get_eee		= mvpp2_get_eee,
+	.set_eee		= mvpp2_set_eee,
 };
 
 /* Used for PPv2.1, or PPv2.2 with the old Device Tree binding that
-- 
2.43.0


             reply	other threads:[~2024-01-18  1:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-18  1:57 Elliot Ayrey [this message]
2024-01-18  8:36 ` [PATCH] net: mvpp2: Add EEE get/set to mvpp2 driver Russell King (Oracle)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240118015748.3507954-1-elliot.ayrey@alliedtelesis.co.nz \
    --to=elliot.ayrey@alliedtelesis.co.nz \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=marcin.s.wojtas@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).