net/mlx5e: Advertise globaly supported FEC modes
authorAya Levin <ayal@mellanox.com>
Tue, 11 Feb 2020 22:32:50 +0000 (14:32 -0800)
committerSaeed Mahameed <saeedm@mellanox.com>
Wed, 19 Feb 2020 03:17:30 +0000 (19:17 -0800)
commit2132b71f78d207b63974fc7d6eced9c5e886c405
tree6ecda2413a3e6eb66463b496d31c4a339aa6c7b7
parent4bd9d5070b92da012f2715cf8e4859acb78b8f35
net/mlx5e: Advertise globaly supported FEC modes

Ethtool advertise supported link modes on an interface. Per each FEC
mode, query if there is a link type which supports it. If so, add this
FEC mode to the supported FEC modes list. Prior to this patch, ethtool
advertised only the supported FEC modes on the current link type.
Add an explicit mapping between internal FEC modes and ethtool link mode
bits. With this change, adding new FEC modes in the downstream patch
would be easier.

Signed-off-by: Aya Levin <ayal@mellanox.com>
Reviewed-by: Eran Ben Elisha <eranbe@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/en/port.c
drivers/net/ethernet/mellanox/mlx5/core/en/port.h
drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c