diff options
Diffstat (limited to 'include/net/dsa.h')
-rw-r--r-- | include/net/dsa.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/include/net/dsa.h b/include/net/dsa.h index 6cb602dd970c..0ad17b63684d 100644 --- a/include/net/dsa.h +++ b/include/net/dsa.h | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/workqueue.h> | 19 | #include <linux/workqueue.h> |
20 | #include <linux/of.h> | 20 | #include <linux/of.h> |
21 | #include <linux/ethtool.h> | 21 | #include <linux/ethtool.h> |
22 | #include <linux/net_tstamp.h> | ||
22 | #include <net/devlink.h> | 23 | #include <net/devlink.h> |
23 | #include <net/switchdev.h> | 24 | #include <net/switchdev.h> |
24 | 25 | ||
@@ -101,6 +102,7 @@ struct dsa_platform_data { | |||
101 | }; | 102 | }; |
102 | 103 | ||
103 | struct packet_type; | 104 | struct packet_type; |
105 | struct dsa_switch; | ||
104 | 106 | ||
105 | struct dsa_device_ops { | 107 | struct dsa_device_ops { |
106 | struct sk_buff *(*xmit)(struct sk_buff *skb, struct net_device *dev); | 108 | struct sk_buff *(*xmit)(struct sk_buff *skb, struct net_device *dev); |
@@ -368,6 +370,12 @@ struct dsa_switch_ops { | |||
368 | struct ethtool_wolinfo *w); | 370 | struct ethtool_wolinfo *w); |
369 | 371 | ||
370 | /* | 372 | /* |
373 | * ethtool timestamp info | ||
374 | */ | ||
375 | int (*get_ts_info)(struct dsa_switch *ds, int port, | ||
376 | struct ethtool_ts_info *ts); | ||
377 | |||
378 | /* | ||
371 | * Suspend and resume | 379 | * Suspend and resume |
372 | */ | 380 | */ |
373 | int (*suspend)(struct dsa_switch *ds); | 381 | int (*suspend)(struct dsa_switch *ds); |
@@ -469,6 +477,18 @@ struct dsa_switch_ops { | |||
469 | int port, struct net_device *br); | 477 | int port, struct net_device *br); |
470 | void (*crosschip_bridge_leave)(struct dsa_switch *ds, int sw_index, | 478 | void (*crosschip_bridge_leave)(struct dsa_switch *ds, int sw_index, |
471 | int port, struct net_device *br); | 479 | int port, struct net_device *br); |
480 | |||
481 | /* | ||
482 | * PTP functionality | ||
483 | */ | ||
484 | int (*port_hwtstamp_get)(struct dsa_switch *ds, int port, | ||
485 | struct ifreq *ifr); | ||
486 | int (*port_hwtstamp_set)(struct dsa_switch *ds, int port, | ||
487 | struct ifreq *ifr); | ||
488 | bool (*port_txtstamp)(struct dsa_switch *ds, int port, | ||
489 | struct sk_buff *clone, unsigned int type); | ||
490 | bool (*port_rxtstamp)(struct dsa_switch *ds, int port, | ||
491 | struct sk_buff *skb, unsigned int type); | ||
472 | }; | 492 | }; |
473 | 493 | ||
474 | struct dsa_switch_driver { | 494 | struct dsa_switch_driver { |