Commit 4454929c authored by Kamal Heib's avatar Kamal Heib Committed by Jakub Kicinski

net/mlx4_en: Use ethtool_puts to fill selftest strings

Use the ethtool_puts helper to print the selftest strings into the
ethtool strings interface.
Signed-off-by: default avatarKamal Heib <kheib@redhat.com>
Reviewed-by: default avatarSimon Horman <horms@kernel.org>
Link: https://lore.kernel.org/r/20240617172329.239819-3-kheib@redhat.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent e52e0103
...@@ -459,10 +459,10 @@ static void mlx4_en_get_strings(struct net_device *dev, ...@@ -459,10 +459,10 @@ static void mlx4_en_get_strings(struct net_device *dev,
switch (stringset) { switch (stringset) {
case ETH_SS_TEST: case ETH_SS_TEST:
for (i = 0; i < MLX4_EN_NUM_SELF_TEST - 2; i++) for (i = 0; i < MLX4_EN_NUM_SELF_TEST - 2; i++)
strcpy(data + i * ETH_GSTRING_LEN, mlx4_en_test_names[i]); ethtool_puts(&data, mlx4_en_test_names[i]);
if (priv->mdev->dev->caps.flags & MLX4_DEV_CAP_FLAG_UC_LOOPBACK) if (priv->mdev->dev->caps.flags & MLX4_DEV_CAP_FLAG_UC_LOOPBACK)
for (; i < MLX4_EN_NUM_SELF_TEST; i++) for (; i < MLX4_EN_NUM_SELF_TEST; i++)
strcpy(data + i * ETH_GSTRING_LEN, mlx4_en_test_names[i]); ethtool_puts(&data, mlx4_en_test_names[i]);
break; break;
case ETH_SS_STATS: case ETH_SS_STATS:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment