ixp4xx_eth: Support the get_ts_info ethtool method.
Signed-off-by: Richard Cochran <richardcochran@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
a85bbddd08
commit
509a7c2572
@@ -1002,12 +1002,41 @@ static int ixp4xx_nway_reset(struct net_device *dev)
|
||||
return phy_start_aneg(port->phydev);
|
||||
}
|
||||
|
||||
int ixp46x_phc_index = -1;
|
||||
|
||||
static int ixp4xx_get_ts_info(struct net_device *dev,
|
||||
struct ethtool_ts_info *info)
|
||||
{
|
||||
if (!cpu_is_ixp46x()) {
|
||||
info->so_timestamping =
|
||||
SOF_TIMESTAMPING_TX_SOFTWARE |
|
||||
SOF_TIMESTAMPING_RX_SOFTWARE |
|
||||
SOF_TIMESTAMPING_SOFTWARE;
|
||||
info->phc_index = -1;
|
||||
return 0;
|
||||
}
|
||||
info->so_timestamping =
|
||||
SOF_TIMESTAMPING_TX_HARDWARE |
|
||||
SOF_TIMESTAMPING_RX_HARDWARE |
|
||||
SOF_TIMESTAMPING_RAW_HARDWARE;
|
||||
info->phc_index = ixp46x_phc_index;
|
||||
info->tx_types =
|
||||
(1 << HWTSTAMP_TX_OFF) |
|
||||
(1 << HWTSTAMP_TX_ON);
|
||||
info->rx_filters =
|
||||
(1 << HWTSTAMP_FILTER_NONE) |
|
||||
(1 << HWTSTAMP_FILTER_PTP_V1_L4_SYNC) |
|
||||
(1 << HWTSTAMP_FILTER_PTP_V1_L4_DELAY_REQ);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct ethtool_ops ixp4xx_ethtool_ops = {
|
||||
.get_drvinfo = ixp4xx_get_drvinfo,
|
||||
.get_settings = ixp4xx_get_settings,
|
||||
.set_settings = ixp4xx_set_settings,
|
||||
.nway_reset = ixp4xx_nway_reset,
|
||||
.get_link = ethtool_op_get_link,
|
||||
.get_ts_info = ixp4xx_get_ts_info,
|
||||
};
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user