summaryrefslogtreecommitdiff
path: root/include/soc
diff options
context:
space:
mode:
authorYangbo Lu <yangbo.lu@nxp.com>2019-11-20 16:23:15 +0800
committerDavid S. Miller <davem@davemloft.net>2019-11-21 14:39:02 -0800
commite23a7b3e8daa4be3d91544d8ba210f96d2266de9 (patch)
tree3464410c0dce1b20cfe4f73050ccc1b070472195 /include/soc
parentf145922ddcaa1cb9688b3d053622c98d9f9a7fff (diff)
net: mscc: ocelot: convert to use ocelot_get_txtstamp()
The method getting TX timestamp by reading timestamp FIFO and matching skbs list is common for DSA Felix driver too. So move code out of ocelot_board.c, convert to use ocelot_get_txtstamp() function and export it. Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/soc')
-rw-r--r--include/soc/mscc/ocelot.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/include/soc/mscc/ocelot.h b/include/soc/mscc/ocelot.h
index 2bac4bc34cf6..1a5cb1b2ac5d 100644
--- a/include/soc/mscc/ocelot.h
+++ b/include/soc/mscc/ocelot.h
@@ -406,6 +406,13 @@ struct ocelot_ops {
int (*reset)(struct ocelot *ocelot);
};
+struct ocelot_skb {
+ struct list_head head;
+ struct sk_buff *skb;
+ u8 id;
+};
+
+
struct ocelot_port {
struct ocelot *ocelot;
@@ -536,6 +543,6 @@ int ocelot_vlan_del(struct ocelot *ocelot, int port, u16 vid);
int ocelot_hwstamp_get(struct ocelot *ocelot, int port, struct ifreq *ifr);
int ocelot_hwstamp_set(struct ocelot *ocelot, int port, struct ifreq *ifr);
int ocelot_ptp_gettime64(struct ptp_clock_info *ptp, struct timespec64 *ts);
-void ocelot_get_hwtimestamp(struct ocelot *ocelot, struct timespec64 *ts);
+void ocelot_get_txtstamp(struct ocelot *ocelot);
#endif