René van Dorst 6e1a4496f5 ramips: phy: at803x: Select SFP interface mode that both sides supports.
Currently sfp_select_interface() return the fastest interface that
the sfp modules supports even if the phy don't support that mode.

For example an GPON module that support both 2500basex and 1000basex.
Currently sfp_select_interface() picks 2500basex instead of 1000basex.

So limit the interfaces which both sides supports before calling
sfp_select_interface() or return an error if we don't have match.

Reviewed-by: John Thomson <git@johnthomson.fastmail.com.au>
Tested-by: Braihan Cantera <bcanterac@gmail.com> [MikroTik RB760iGS + Nokia G-010S-A 3FE46541AA SFP]
Tested-by: John Thomson <git@johnthomson.fastmail.com.au> [Mikrotik rb760igs + SFP SM/LC, SFP base1000T, SFP+ passive DAC]
Signed-off-by: René van Dorst <opensource@vdorst.com>
2020-11-23 22:53:15 +01:00
..
2020-11-10 13:11:32 +01:00
2020-11-18 21:13:46 +01:00
2020-11-10 13:11:32 +01:00
2020-11-18 21:13:46 +01:00
2020-11-10 13:11:32 +01:00
2020-11-01 14:44:06 +01:00
2020-11-18 21:13:46 +01:00
2020-11-18 21:13:46 +01:00
2020-11-10 13:11:32 +01:00
2020-11-18 21:13:46 +01:00
2020-11-10 13:11:32 +01:00
2020-11-10 13:11:32 +01:00
2020-11-18 21:13:46 +01:00
2020-10-15 17:46:54 +02:00
2020-11-12 18:21:55 +01:00