diff mbox series

[ethtool] netlink: settings: Fix PHYAD printing

Message ID 20250117225019.3912340-1-florian.fainelli@broadcom.com (mailing list archive)
State New
Delegated to: Michal Kubecek
Headers show
Series [ethtool] netlink: settings: Fix PHYAD printing | expand

Checks

Context Check Description
netdev/tree_selection success Not a local patch

Commit Message

Florian Fainelli Jan. 17, 2025, 10:50 p.m. UTC
The PHY address was printed in hexadecimal rather than decimal as it
used to be and is expected.

Fixes: bd1341cd2146 ("add json support for base command")
Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
---
 netlink/settings.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/netlink/settings.c b/netlink/settings.c
index b9b3ba9ed836..300825839e4e 100644
--- a/netlink/settings.c
+++ b/netlink/settings.c
@@ -605,7 +605,7 @@  int linkinfo_reply_cb(const struct nlmsghdr *nlhdr, void *data)
 		uint8_t val = mnl_attr_get_u8(tb[ETHTOOL_A_LINKINFO_PHYADDR]);
 
 		print_banner(nlctx);
-		print_uint(PRINT_ANY, "phyad", "\tPHYAD: %x\n", val);
+		print_uint(PRINT_ANY, "phyad", "\tPHYAD: %u\n", val);
 	}
 	if (tb[ETHTOOL_A_LINKINFO_TRANSCEIVER]) {
 		uint8_t val;