Thread (7 messages) flat view 7 messages, 3 authors, 2021-10-28

Re: [PATCH ethtool 1/2] netlink: settings: Correct duplicate condition

From: Michal Kubecek <hidden>
Date: 2021-10-27 20:13:20

On Wed, Oct 27, 2021 at 08:11:39PM +0200, bage@linutronix.de wrote:
quoted hunk ↗ jump to hunk
From: Bastian Germann <redacted>

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 <redacted>
---
 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 =
Fixes: 10cc3ea337d1 ("netlink: partial netlink handler for gset (no option)")
Acked-by: Michal Kubecek <redacted>

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help