summaryrefslogtreecommitdiff
path: root/include/net/dsa.h
diff options
context:
space:
mode:
authorBrandon Streiff <brandon.streiff@ni.com>2018-02-14 01:07:48 +0100
committerDavid S. Miller <davem@davemloft.net>2018-02-14 14:33:37 -0500
commit0336369d3a4d65c9332476b618ff3bb9b41045e1 (patch)
treeeae9faa3c3a54f4c24205f0891c62eb282426dd2 /include/net/dsa.h
parent4eb3be2937670aecf8bbd52a95b6e9238a9bd7aa (diff)
net: dsa: forward hardware timestamping ioctls to switch driver
This patch adds support to the dsa slave network device so that switch drivers can implement the SIOC[GS]HWTSTAMP ioctls and the ethtool timestamp-info interface. Signed-off-by: Brandon Streiff <brandon.streiff@ni.com> Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/dsa.h')
-rw-r--r--include/net/dsa.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/net/dsa.h b/include/net/dsa.h
index 6cb602dd970c..4c0df83dddaf 100644
--- a/include/net/dsa.h
+++ b/include/net/dsa.h
@@ -19,6 +19,7 @@
#include <linux/workqueue.h>
#include <linux/of.h>
#include <linux/ethtool.h>
+#include <linux/net_tstamp.h>
#include <net/devlink.h>
#include <net/switchdev.h>
@@ -368,6 +369,12 @@ struct dsa_switch_ops {
struct ethtool_wolinfo *w);
/*
+ * ethtool timestamp info
+ */
+ int (*get_ts_info)(struct dsa_switch *ds, int port,
+ struct ethtool_ts_info *ts);
+
+ /*
* Suspend and resume
*/
int (*suspend)(struct dsa_switch *ds);
@@ -469,6 +476,14 @@ struct dsa_switch_ops {
int port, struct net_device *br);
void (*crosschip_bridge_leave)(struct dsa_switch *ds, int sw_index,
int port, struct net_device *br);
+
+ /*
+ * PTP functionality
+ */
+ int (*port_hwtstamp_get)(struct dsa_switch *ds, int port,
+ struct ifreq *ifr);
+ int (*port_hwtstamp_set)(struct dsa_switch *ds, int port,
+ struct ifreq *ifr);
};
struct dsa_switch_driver {