[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211027181140.46971-2-bage@linutronix.de>
Date: Wed, 27 Oct 2021 20:11:39 +0200
From: bage@...utronix.de
To: Michal Kubecek <mkubecek@...e.cz>
Cc: netdev@...r.kernel.org, Bastian Germann <bage@...utronix.de>
Subject: [PATCH ethtool 1/2] netlink: settings: Correct duplicate condition
From: Bastian Germann <bage@...utronix.de>
tb's fields ETHTOOL_A_LINKINFO_TP_MDIX and ETHTOOL_A_LINKINFO_TP_MDIX_CTRL
are used in this case. The condition is duplicate for the former. Fix that.
Signed-off-by: Bastian Germann <bage@...utronix.de>
---
netlink/settings.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/netlink/settings.c b/netlink/settings.c
index 6d10a07..c4f5d61 100644
--- a/netlink/settings.c
+++ b/netlink/settings.c
@@ -560,7 +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] &&
+ if (tb[ETHTOOL_A_LINKINFO_TP_MDIX] && tb[ETHTOOL_A_LINKINFO_TP_MDIX_CTRL] &&
port == PORT_TP) {
uint8_t mdix = mnl_attr_get_u8(tb[ETHTOOL_A_LINKINFO_TP_MDIX]);
uint8_t mdix_ctrl =
--
2.30.2
Powered by blists - more mailing lists