[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211027181140.46971-3-bage@linutronix.de>
Date: Wed, 27 Oct 2021 20:11:40 +0200
From: bage@...utronix.de
To: Michal Kubecek <mkubecek@...e.cz>
Cc: netdev@...r.kernel.org, Bastian Germann <bage@...utronix.de>
Subject: [PATCH ethtool 2/2] netlink: settings: Drop port filter for MDI-X
From: Bastian Germann <bage@...utronix.de>
The port == PORT_TP condition on printing linkinfo's MDI-X field prevents
ethtool from printing that info even if it is present and valid, e.g. with
the port being MII and still having that info.
Signed-off-by: Bastian Germann <bage@...utronix.de>
---
netlink/settings.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/netlink/settings.c b/netlink/settings.c
index c4f5d61..4da251b 100644
--- a/netlink/settings.c
+++ b/netlink/settings.c
@@ -560,8 +560,7 @@ int linkinfo_reply_cb(const struct nlmsghdr *nlhdr, void *data)
print_enum(names_transceiver, ARRAY_SIZE(names_transceiver),
val, "Transceiver");
}
- if (tb[ETHTOOL_A_LINKINFO_TP_MDIX] && tb[ETHTOOL_A_LINKINFO_TP_MDIX_CTRL] &&
- port == PORT_TP) {
+ if (tb[ETHTOOL_A_LINKINFO_TP_MDIX] && tb[ETHTOOL_A_LINKINFO_TP_MDIX_CTRL]) {
uint8_t mdix = mnl_attr_get_u8(tb[ETHTOOL_A_LINKINFO_TP_MDIX]);
uint8_t mdix_ctrl =
mnl_attr_get_u8(tb[ETHTOOL_A_LINKINFO_TP_MDIX_CTRL]);
--
2.30.2
Powered by blists - more mailing lists