]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit7a9fdf86f1a0a08d453ab952980e7d21f4e35f5f
tree6d27bc2e62123a0500e81121308eecd373c28ee8
parentc6a982975b5ff409bff0b93a1ae9668ce3758d0e
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