net: phylink: support validated pause and autoneg in fixed-link
authorIvan Bornyakov <i.bornyakov@metrotek.ru>
Fri, 10 Feb 2023 15:46:27 +0000 (18:46 +0300)
committerDavid S. Miller <davem@davemloft.net>
Wed, 15 Feb 2023 10:35:27 +0000 (10:35 +0000)
commit894341ad3ad7dfbced8556efe92a9ebfd5924bd6
tree600d2146cfe3caf0b235264c2e692e2ab272a09c
parentfe33311c3e371855c4f4c0ab8a5fce5b9a9fdafd
net: phylink: support validated pause and autoneg in fixed-link

In fixed-link setup phylink_parse_fixedlink() unconditionally sets
Pause, Asym_Pause and Autoneg bits to "supported" bitmap, while MAC may
not support these.

This leads to ethtool reporting:

 > Supported pause frame use: Symmetric Receive-only
 > Supports auto-negotiation: Yes

regardless of what is actually supported.

Instead of unconditionally set Pause, Asym_Pause and Autoneg it is
sensible to set them according to validated "supported" bitmap, i.e. the
result of phylink_validate().

Signed-off-by: Ivan Bornyakov <i.bornyakov@metrotek.ru>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/phylink.c