mlxsw: spectrum: Initialize advertised speeds to supported speeds
authorIdo Schimmel <idosch@mellanox.com>
Wed, 26 Feb 2020 08:39:19 +0000 (09:39 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 27 Feb 2020 04:44:42 +0000 (20:44 -0800)
commitb401ff8541ee9a6912ad0f64e6a706cf03780467
tree6d27bc2e62123a0500e81121308eecd373c28ee8
parent8a29581eb001523f51cf6ad2051df12cd41ffe6b
mlxsw: spectrum: Initialize advertised speeds to supported speeds

During port initialization the driver instructs the device to only
advertise speeds that can be supported by the port's current width.

Since the device now returns the supported speeds based on the port's
current width, the driver no longer needs to compute the speeds that can
be advertised.

Simplify port initialization by setting the advertised speeds to the
queried supported speeds.

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>
drivers/net/ethernet/mellanox/mlxsw/spectrum.c
drivers/net/ethernet/mellanox/mlxsw/spectrum.h