From: Ladislav Michl <oss-lists@triops.cz>
To: Michal Kubecek <mkubecek@suse.cz>
Cc: netdev@vger.kernel.org
Subject: [PATCH ethtool] netlink: fix duplex setting
Date: Tue, 27 Jun 2023 13:09:03 +0200 [thread overview]
Message-ID: <ZJrDT9k52oFTf/vs@lenoch> (raw)
From: Ladislav Michl <ladis@linux-mips.org>
nl_parse_lookup_u8 handler is used with duplex_values defined as
lookup_entry_u32. While it still works on little endian machines,
duplex is always 0 (DUPLEX_HALF) on big endian ones...
Fixes: 392b12e38747 ("netlink: add netlink handler for sset (-s)")
Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
---
netlink/settings.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/netlink/settings.c b/netlink/settings.c
index 4fd75d2..9aad8d9 100644
--- a/netlink/settings.c
+++ b/netlink/settings.c
@@ -1089,7 +1089,7 @@ static const struct bitset_parser_data advertise_parser_data = {
.force_hex = true,
};
-static const struct lookup_entry_u32 duplex_values[] = {
+static const struct lookup_entry_u8 duplex_values[] = {
{ .arg = "half", .val = DUPLEX_HALF },
{ .arg = "full", .val = DUPLEX_FULL },
{}
--
2.39.2
next reply other threads:[~2023-06-27 11:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-27 11:09 Ladislav Michl [this message]
2023-07-01 22:30 ` [PATCH ethtool] netlink: fix duplex setting 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=ZJrDT9k52oFTf/vs@lenoch \
--to=oss-lists@triops.cz \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.