hc
2023-11-06 1622ff3442ff6aecc1f538cda437379d1f6a4a93
kernel/drivers/net/ethernet/stmicro/stmmac/stmmac.h
....@@ -217,10 +217,27 @@
217217 int stmmac_mdio_unregister(struct net_device *ndev);
218218 int stmmac_mdio_register(struct net_device *ndev);
219219 int stmmac_mdio_reset(struct mii_bus *mii);
220
-void stmmac_set_ethtool_ops(struct net_device *netdev);
221220
221
+#ifdef CONFIG_STMMAC_ETHTOOL
222
+void stmmac_set_ethtool_ops(struct net_device *netdev);
223
+#else
224
+static inline void stmmac_set_ethtool_ops(struct net_device *netdev)
225
+{
226
+}
227
+#endif
228
+
229
+#ifdef CONFIG_STMMAC_PTP
222230 void stmmac_ptp_register(struct stmmac_priv *priv);
223231 void stmmac_ptp_unregister(struct stmmac_priv *priv);
232
+#else
233
+static inline void stmmac_ptp_register(struct stmmac_priv *priv)
234
+{
235
+}
236
+
237
+static inline void stmmac_ptp_unregister(struct stmmac_priv *priv)
238
+{
239
+}
240
+#endif
224241 int stmmac_resume(struct device *dev);
225242 int stmmac_suspend(struct device *dev);
226243 int stmmac_dvr_remove(struct device *dev);