diff options
author | Phil Reid <preid@electromag.com.au> | 2015-10-30 04:43:55 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-11-01 17:05:43 -0500 |
commit | e6dbe1eb2db0d7a14991c06278dd3030c45fb825 (patch) | |
tree | 06a2fcc215a59301eb5840f7df9cf93a5ee1de4e | |
parent | fc2a263bb0604642703cda6cba5ac1ffb1935440 (diff) |
stmmac: Correctly report PTP capabilities.
priv->hwts_*_en indicate if timestamping is enabled/disabled at run
time. But priv->dma_cap.time_stamp and priv->dma_cap.atime_stamp
indicates HW is support for PTPv1/PTPv2.
Signed-off-by: Phil Reid <preid@electromag.com.au>
Acked-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c index 771cda2a48b2..2e51b816a7e8 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c | |||
@@ -721,10 +721,13 @@ static int stmmac_get_ts_info(struct net_device *dev, | |||
721 | { | 721 | { |
722 | struct stmmac_priv *priv = netdev_priv(dev); | 722 | struct stmmac_priv *priv = netdev_priv(dev); |
723 | 723 | ||
724 | if ((priv->hwts_tx_en) && (priv->hwts_rx_en)) { | 724 | if ((priv->dma_cap.time_stamp || priv->dma_cap.atime_stamp)) { |
725 | 725 | ||
726 | info->so_timestamping = SOF_TIMESTAMPING_TX_HARDWARE | | 726 | info->so_timestamping = SOF_TIMESTAMPING_TX_SOFTWARE | |
727 | SOF_TIMESTAMPING_TX_HARDWARE | | ||
728 | SOF_TIMESTAMPING_RX_SOFTWARE | | ||
727 | SOF_TIMESTAMPING_RX_HARDWARE | | 729 | SOF_TIMESTAMPING_RX_HARDWARE | |
730 | SOF_TIMESTAMPING_SOFTWARE | | ||
728 | SOF_TIMESTAMPING_RAW_HARDWARE; | 731 | SOF_TIMESTAMPING_RAW_HARDWARE; |
729 | 732 | ||
730 | if (priv->ptp_clock) | 733 | if (priv->ptp_clock) |