From: bage@linutronix.de
To: mkubecek@suse.cz
Cc: Bastian Germann <bage@linutronix.de>, netdev@vger.kernel.org
Subject: [PATCH ethtool v2 1/1] netlink: settings: Correct duplicate condition
Date: Tue, 9 Nov 2021 18:21:25 +0100 [thread overview]
Message-ID: <20211109172125.10505-2-bage@linutronix.de> (raw)
In-Reply-To: <20211109172125.10505-1-bage@linutronix.de>
From: Bastian Germann <bage@linutronix.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@linutronix.de>
Fixes: 10cc3ea337d1 ("netlink: partial netlink handler for gset (no option)")
Acked-by: Michal Kubecek <mkubecek@suse.cz>
---
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
next prev parent reply other threads:[~2021-11-09 17:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-09 17:21 [PATCH ethtool v2 0/1] Fix condition for showing MDI-X status bage
2021-11-09 17:21 ` bage [this message]
2021-11-09 20:40 ` patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211109172125.10505-2-bage@linutronix.de \
--to=bage@linutronix.de \
--cc=mkubecek@suse.cz \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).