diff options
author | Ido Schimmel <idosch@mellanox.com> | 2016-09-12 13:26:25 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-09-13 18:16:33 +0200 |
commit | 0213424adad63bfea08ef19cd6c997648ddcf44e (patch) | |
tree | 826d03f6de40f21477519decf985049563413625 /drivers | |
parent | mlxsw: spectrum: Report link partner's advertised speeds (diff) | |
download | linux-0213424adad63bfea08ef19cd6c997648ddcf44e.tar.xz linux-0213424adad63bfea08ef19cd6c997648ddcf44e.zip |
mlxsw: spectrum: Report port type according to operational speed
In case port isn't operational we shouldn't report the port type, but
instead return PORT_OTHER. This is consistent with most other drivers
that return PORT_OTHER when media type can't be determined.
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c index 07930cc1fa60..38e4f03f9d9f 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c @@ -1828,7 +1828,6 @@ static int mlxsw_sp_port_get_settings(struct net_device *dev, mlxsw_sp_from_ptys_speed_duplex(netif_carrier_ok(dev), eth_proto_oper, cmd); - eth_proto_oper = eth_proto_oper ? eth_proto_oper : eth_proto_cap; cmd->port = mlxsw_sp_port_connector_port(eth_proto_oper); if (autoneg_status == MLXSW_REG_PTYS_AN_STATUS_OK && eth_proto_lp) |