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 =--
2.30.2