Thread (9 messages) flat view 9 messages, 4 authors, 2020-07-02
STALE2249d

Revision v1 of 2 in this series.

Revisions (2)
  1. v1 current
  2. v2 [diff vs current]

[PATCH net-next 1/4] net: Add cable test netdevice operations

From: Florian Fainelli <f.fainelli@gmail.com>
Date: 2020-07-02 04:29:55
Also in: lkml
Subsystem: networking drivers, networking [general], the rest · Maintainers: Andrew Lunn, "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Linus Torvalds

In preparation for decoupling the ethtool cable test from the PHY
library, add definitions for two new network device operations:

* ndo_cable_test_start
* ndo_cable_test_tdr_start

In a subsequent patch we will start making use of those.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
 include/linux/netdevice.h | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 39e28e11863c..43f640579973 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -936,6 +936,8 @@ struct dev_ifalias {
 
 struct devlink;
 struct tlsdev_ops;
+struct phy_tdr_config;
+struct netlink_ext_ack;
 
 struct netdev_name_node {
 	struct hlist_node hlist;
@@ -1278,6 +1280,13 @@ struct netdev_net_notifier {
  * int (*ndo_tunnel_ctl)(struct net_device *dev, struct ip_tunnel_parm *p,
  *			 int cmd);
  *	Add, change, delete or get information on an IPv4 tunnel.
+ * int (*ndo_cable_test_start)(struct net_device *dev,
+ *			       struct netlink_ext_ack *extack);
+ *	Start a cable test.
+ * int (*ndo_cable_test_tdr_start)(struct net_device *dev,
+ *				   struct netlink_ext_ack *extack,
+ *				   const struct phy_tdr_config *config);
+ *	Start a raw TDR (Time Domain Reflectometry) cable test.
  */
 struct net_device_ops {
 	int			(*ndo_init)(struct net_device *dev);
@@ -1485,6 +1494,11 @@ struct net_device_ops {
 	struct devlink_port *	(*ndo_get_devlink_port)(struct net_device *dev);
 	int			(*ndo_tunnel_ctl)(struct net_device *dev,
 						  struct ip_tunnel_parm *p, int cmd);
+	int			(*ndo_cable_test_start)(struct net_device *dev,
+							struct netlink_ext_ack *exact);
+	int			(*ndo_cable_test_tdr_start)(struct net_device *dev,
+							    struct netlink_ext_ack *exact,
+							    const struct phy_tdr_config *config);
 };
 
 /**
-- 
2.25.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help