]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
net/mlx5e: Remove the false indication of software timestamping support
authorAlaa Hleihel <alaa@mellanox.com>
Sun, 25 Nov 2018 09:46:09 +0000 (11:46 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 9 Jan 2019 16:14:45 +0000 (17:14 +0100)
[ Upstream commit 4765420439e758bfa4808392d18b0a4cb6f06065 ]

mlx5 driver falsely advertises support of software timestamping.
Fix it by removing the false indication.

Fixes: ef9814deafd0 ("net/mlx5e: Add HW timestamping (TS) support")
Signed-off-by: Alaa Hleihel <alaa@mellanox.com>
Reviewed-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c

index d12e9fc0d76b8272105ca1d0de7ba00dea88df88..d9db3ad3d765572ced3bde877f06d7dd11869828 100644 (file)
@@ -1417,21 +1417,15 @@ static int mlx5e_set_pauseparam(struct net_device *netdev,
 int mlx5e_ethtool_get_ts_info(struct mlx5e_priv *priv,
                              struct ethtool_ts_info *info)
 {
-       int ret;
-
-       ret = ethtool_op_get_ts_info(priv->netdev, info);
-       if (ret)
-               return ret;
-
        info->phc_index = priv->tstamp.ptp ?
                          ptp_clock_index(priv->tstamp.ptp) : -1;
 
        if (!MLX5_CAP_GEN(priv->mdev, device_frequency_khz))
                return 0;
 
-       info->so_timestamping |= SOF_TIMESTAMPING_TX_HARDWARE |
-                                SOF_TIMESTAMPING_RX_HARDWARE |
-                                SOF_TIMESTAMPING_RAW_HARDWARE;
+       info->so_timestamping = SOF_TIMESTAMPING_TX_HARDWARE |
+                               SOF_TIMESTAMPING_RX_HARDWARE |
+                               SOF_TIMESTAMPING_RAW_HARDWARE;
 
        info->tx_types = BIT(HWTSTAMP_TX_OFF) |
                         BIT(HWTSTAMP_TX_ON);