ethtool: netlink: do not return SQI value if link is down
authorOleksij Rempel <o.rempel@pengutronix.de>
Tue, 9 Jul 2024 06:19:43 +0000 (08:19 +0200)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 11 Jul 2024 09:19:07 +0000 (11:19 +0200)
commitc184cf94e73b04ff7048d045f5413899bc664788
treed4c67bcd87891f2f96ea6e4b359bd21f2ff7233b
parentf2aeb7306a898e1cbd03963d376f4b6656ca2b55
ethtool: netlink: do not return SQI value if link is down

Do not attach SQI value if link is down. "SQI values are only valid if
link-up condition is present" per OpenAlliance specification of
100Base-T1 Interoperability Test suite [1]. The same rule would apply
for other link types.

[1] https://opensig.org/automotive-ethernet-specifications/#

Fixes: 806602191592 ("ethtool: provide UAPI for PHY Signal Quality Index (SQI)")
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Woojung Huh <woojung.huh@microchip.com>
Link: https://patch.msgid.link/20240709061943.729381-1-o.rempel@pengutronix.de
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
net/ethtool/linkstate.c