path: root/drivers/net/dsa/sja1105/sja1105_ptp.h
diff options
authorVladimir Oltean <olteanv@gmail.com>2019-11-12 02:11:53 +0200
committerDavid S. Miller <davem@davemloft.net>2019-11-14 14:50:35 -0800
commit41603d78b3626cf0da8aa562ecc2a276033db76c (patch)
treecce0f98e5b7ef9a579a9ed043875a6f23ac476b3 /drivers/net/dsa/sja1105/sja1105_ptp.h
parentcxgb4: Fix an error code in cxgb4_mqprio_alloc_hw_resources() (diff)
net: dsa: sja1105: Make the PTP command read-write
The PTPSTRTSCH and PTPSTOPSCH bits are actually readable and indicate whether the time-aware scheduler is running or not. We will be using that for monitoring the scheduler in the next patch, so refactor the PTP command API in order to allow that. Signed-off-by: Vladimir Oltean <olteanv@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/sja1105/sja1105_ptp.h')
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/net/dsa/sja1105/sja1105_ptp.h b/drivers/net/dsa/sja1105/sja1105_ptp.h
index 19e707db7e8c..83d9d4ae6d3a 100644
--- a/drivers/net/dsa/sja1105/sja1105_ptp.h
+++ b/drivers/net/dsa/sja1105/sja1105_ptp.h
@@ -39,11 +39,11 @@ int sja1105_ptp_clock_register(struct dsa_switch *ds);
void sja1105_ptp_clock_unregister(struct dsa_switch *ds);
-int sja1105et_ptp_cmd(const struct dsa_switch *ds,
- const struct sja1105_ptp_cmd *cmd);
+void sja1105et_ptp_cmd_packing(u8 *buf, struct sja1105_ptp_cmd *cmd,
+ enum packing_op op);
-int sja1105pqrs_ptp_cmd(const struct dsa_switch *ds,
- const struct sja1105_ptp_cmd *cmd);
+void sja1105pqrs_ptp_cmd_packing(u8 *buf, struct sja1105_ptp_cmd *cmd,
+ enum packing_op op);
int sja1105_get_ts_info(struct dsa_switch *ds, int port,
struct ethtool_ts_info *ts);
@@ -110,9 +110,9 @@ static inline int __sja1105_ptp_adjtime(struct dsa_switch *ds, s64 delta)
return 0;
-#define sja1105et_ptp_cmd NULL
+#define sja1105et_ptp_cmd_packing NULL
-#define sja1105pqrs_ptp_cmd NULL
+#define sja1105pqrs_ptp_cmd_packing NULL
#define sja1105_get_ts_info NULL