drivers/net: remove useless autoneg capability
authorThomas Monjalon <thomas@monjalon.net>
Mon, 29 Mar 2021 07:28:53 +0000 (09:28 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 1 Apr 2021 13:16:53 +0000 (15:16 +0200)
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 <thomas@monjalon.net>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
drivers/net/bnxt/bnxt_ethdev.c
drivers/net/mlx5/linux/mlx5_ethdev_os.c

index 2bd889b..d346f96 100644 (file)
@@ -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;
 }
index e8aaa0d..4365c55 100644 (file)
@@ -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;