Thread (9 messages) flat view 9 messages, 3 authors, 2020-05-20

Re: [PATCH net-next v1 1/2] ethtool: provide UAPI for PHY Signal Quality Index (SQI)

From: Andrew Lunn <andrew@lunn.ch>
Date: 2020-05-19 14:03:59
Also in: lkml

quoted hunk ↗ jump to hunk
--- a/net/ethtool/common.c
+++ b/net/ethtool/common.c
@@ -310,6 +310,16 @@ int __ethtool_get_link(struct net_device *dev)
 	return netif_running(dev) && dev->ethtool_ops->get_link(dev);
 }
 
+int __ethtool_get_sqi(struct net_device *dev)
+{
+	struct phy_device *phydev = dev->phydev;
+
+	if (!phydev->drv->get_sqi)
+		return -EOPNOTSUPP;
+
+	return phydev->drv->get_sqi(phydev);
+}
+
You are only providing access via netlink ethtool? There is no ioctl
method to get this. If so, i wonder if common.c is the correct place
for this, or if it should be moved into linkstate.c. You can then drop
the __.

Michal?

	Andrew
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help