From 058ac0ddc5077bccdb629a1c09a195012f29d4b3 Mon Sep 17 00:00:00 2001 From: Thomas Monjalon Date: Mon, 29 Mar 2021 09:28:53 +0200 Subject: [PATCH] drivers/net: remove useless autoneg capability The flag ETH_LINK_SPEED_AUTONEG is 0, so it cannot be used in a capability bitmap. Having 0 in speed capability means all speeds are accepted. Signed-off-by: Thomas Monjalon Acked-by: Ajit Khaparde Reviewed-by: Ferruh Yigit --- drivers/net/bnxt/bnxt_ethdev.c | 2 -- drivers/net/mlx5/linux/mlx5_ethdev_os.c | 4 ---- 2 files changed, 6 deletions(-) diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c index 2bd889b15b..d346f96d7a 100644 --- a/drivers/net/bnxt/bnxt_ethdev.c +++ b/drivers/net/bnxt/bnxt_ethdev.c @@ -889,8 +889,6 @@ uint32_t bnxt_get_speed_capabilities(struct bnxt *bp) if (bp->link_info->auto_mode == HWRM_PORT_PHY_QCFG_OUTPUT_AUTO_MODE_NONE) speed_capa |= ETH_LINK_SPEED_FIXED; - else - speed_capa |= ETH_LINK_SPEED_AUTONEG; return speed_capa; } diff --git a/drivers/net/mlx5/linux/mlx5_ethdev_os.c b/drivers/net/mlx5/linux/mlx5_ethdev_os.c index e8aaa0d36a..4365c55b81 100644 --- a/drivers/net/mlx5/linux/mlx5_ethdev_os.c +++ b/drivers/net/mlx5/linux/mlx5_ethdev_os.c @@ -432,8 +432,6 @@ mlx5_link_update_unlocked_gset(struct rte_eth_dev *dev, else dev_link.link_speed = link_speed; priv->link_speed_capa = 0; - if (edata.supported & SUPPORTED_Autoneg) - priv->link_speed_capa |= ETH_LINK_SPEED_AUTONEG; if (edata.supported & (SUPPORTED_1000baseT_Full | SUPPORTED_1000baseKX_Full)) priv->link_speed_capa |= ETH_LINK_SPEED_1G; @@ -540,8 +538,6 @@ mlx5_link_update_unlocked_gs(struct rte_eth_dev *dev, sc = ecmd->link_mode_masks[0] | ((uint64_t)ecmd->link_mode_masks[1] << 32); priv->link_speed_capa = 0; - if (sc & MLX5_BITSHIFT(ETHTOOL_LINK_MODE_Autoneg_BIT)) - priv->link_speed_capa |= ETH_LINK_SPEED_AUTONEG; if (sc & (MLX5_BITSHIFT(ETHTOOL_LINK_MODE_1000baseT_Full_BIT) | MLX5_BITSHIFT(ETHTOOL_LINK_MODE_1000baseKX_Full_BIT))) priv->link_speed_capa |= ETH_LINK_SPEED_1G; -- 2.20.1