mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
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>
This commit is contained in:
committed by
David S. Miller
parent
f145922ddc
commit
e23a7b3e8d
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user