@@ -703,7 +703,6 @@ struct fec_enet_private {
void fec_ptp_init(struct platform_device *pdev, int irq_idx);
void fec_ptp_stop(struct platform_device *pdev);
void fec_ptp_start_cyclecounter(struct net_device *ndev);
-void fec_ptp_disable_hwts(struct net_device *ndev);
int fec_ptp_set(struct net_device *ndev, struct kernel_hwtstamp_config *config,
struct netlink_ext_ack *extack);
void fec_ptp_get(struct net_device *ndev, struct kernel_hwtstamp_config *config);
@@ -3924,11 +3924,8 @@ static int fec_hwtstamp_set(struct net_device *ndev,
struct fec_enet_private *fep = netdev_priv(ndev);
struct phy_device *phydev = ndev->phydev;
- if (phy_has_hwtstamp(phydev)) {
- fec_ptp_disable_hwts(ndev);
-
+ if (phy_has_hwtstamp(phydev))
return phy_mii_ioctl(phydev, config->ifr, SIOCSHWTSTAMP);
- }
if (!fep->bufdesc_ex)
return -EOPNOTSUPP;
@@ -606,18 +606,6 @@ static int fec_ptp_enable(struct ptp_clock_info *ptp,
}
}
-/**
- * fec_ptp_disable_hwts - disable hardware time stamping
- * @ndev: pointer to net_device
- */
-void fec_ptp_disable_hwts(struct net_device *ndev)
-{
- struct fec_enet_private *fep = netdev_priv(ndev);
-
- fep->hwts_tx_en = 0;
- fep->hwts_rx_en = 0;
-}
-
int fec_ptp_set(struct net_device *ndev, struct kernel_hwtstamp_config *config,
struct netlink_ext_ack *extack)
{