Commit f1a082a6 authored by Michael Chan's avatar Michael Chan Committed by David S. Miller

bnxt_en: Extend autoneg to all speeds.

Allow all autoneg speeds aupported by firmware to be advertised.  If
the advertising parameter is 0, then all supported speeds will be
advertised.

Remove BNXT_ALL_COPPER_ETHTOOL_SPEED which is no longer used as all
supported speeds can be advertised.
Signed-off-by: default avatarMichael Chan <mchan@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 4b32cacc
...@@ -757,10 +757,6 @@ struct bnxt_ntuple_filter { ...@@ -757,10 +757,6 @@ struct bnxt_ntuple_filter {
#define BNXT_FLTR_UPDATE 1 #define BNXT_FLTR_UPDATE 1
}; };
#define BNXT_ALL_COPPER_ETHTOOL_SPEED \
(ADVERTISED_100baseT_Full | ADVERTISED_1000baseT_Full | \
ADVERTISED_10000baseT_Full)
struct bnxt_link_info { struct bnxt_link_info {
u8 media_type; u8 media_type;
u8 transceiver; u8 transceiver;
......
...@@ -696,16 +696,10 @@ static int bnxt_set_settings(struct net_device *dev, struct ethtool_cmd *cmd) ...@@ -696,16 +696,10 @@ static int bnxt_set_settings(struct net_device *dev, struct ethtool_cmd *cmd)
return rc; return rc;
if (cmd->autoneg == AUTONEG_ENABLE) { if (cmd->autoneg == AUTONEG_ENABLE) {
if (link_info->media_type != PORT_PHY_QCFG_RESP_MEDIA_TYPE_TP) { u32 supported_spds = bnxt_fw_to_ethtool_support_spds(link_info);
netdev_err(dev, "Media type doesn't support autoneg\n");
rc = -EINVAL; if (cmd->advertising & ~(supported_spds | ADVERTISED_Autoneg |
goto set_setting_exit; ADVERTISED_TP | ADVERTISED_FIBRE)) {
}
if (cmd->advertising & ~(BNXT_ALL_COPPER_ETHTOOL_SPEED |
ADVERTISED_Autoneg |
ADVERTISED_TP |
ADVERTISED_Pause |
ADVERTISED_Asym_Pause)) {
netdev_err(dev, "Unsupported advertising mask (adv: 0x%x)\n", netdev_err(dev, "Unsupported advertising mask (adv: 0x%x)\n",
cmd->advertising); cmd->advertising);
rc = -EINVAL; rc = -EINVAL;
......
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