net: netdevsim: use mock PHC driver
[linux-block.git] / drivers / net / netdevsim / ethtool.c
index ffd9f84b6644359b77cc8f862e83a634916bcb0c..bd546d4d26c68135a917b144196f8b8a8098dc8e 100644 (file)
@@ -140,6 +140,16 @@ nsim_set_fecparam(struct net_device *dev, struct ethtool_fecparam *fecparam)
        return 0;
 }
 
+static int nsim_get_ts_info(struct net_device *dev,
+                           struct ethtool_ts_info *info)
+{
+       struct netdevsim *ns = netdev_priv(dev);
+
+       info->phc_index = mock_phc_index(ns->phc);
+
+       return 0;
+}
+
 static const struct ethtool_ops nsim_ethtool_ops = {
        .supported_coalesce_params      = ETHTOOL_COALESCE_ALL_PARAMS,
        .get_pause_stats                = nsim_get_pause_stats,
@@ -153,6 +163,7 @@ static const struct ethtool_ops nsim_ethtool_ops = {
        .set_channels                   = nsim_set_channels,
        .get_fecparam                   = nsim_get_fecparam,
        .set_fecparam                   = nsim_set_fecparam,
+       .get_ts_info                    = nsim_get_ts_info,
 };
 
 static void nsim_ethtool_ring_init(struct netdevsim *ns)