bnxt_en: extend media types to supported and autoneg modes
authorEdwin Peer <edwin.peer@broadcom.com>
Fri, 20 Oct 2023 21:27:57 +0000 (14:27 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sun, 22 Oct 2023 10:41:46 +0000 (11:41 +0100)
commit5d4e1bf60664b5c62deebdb5857bcbf277fa944e
tree29bdae9f691781d3a836551cbd7373fa0432c3d9
parent64d20aea6e4bb04fd52e25ea0058bb5767f92c40
bnxt_en: extend media types to supported and autoneg modes

The current driver code does not accurately report the supported and
advertised link modes.  It basically always assumes the media type
is copper for any particular speed.  Utilize the recently added link
mode mappings to accurately report fully qualified ethtool link modes for
advertised and supported speeds.

If the media type is known, we will report the supported link modes for
that media only.  If the media is not known, we will report all possible
supported link modes.  The user can now specify any supported link modes
(including NRZ and PAM4) to advertise for autoneg.  It used to only accept
copper NRZ modes.

Signed-off-by: Edwin Peer <edwin.peer@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c