[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1585959695-26523-1-git-send-email-f.fainelli@gmail.com>
Date: Fri, 3 Apr 2020 17:21:35 -0700
From: Florian Fainelli <f.fainelli@...il.com>
To: netdev@...r.kernel.org
Cc: mkubecek@...e.cz, linville@...driver.com, davem@...emloft.net,
andrew@...n.ch, vivien.didelot@...il.com,
Florian Fainelli <f.fainelli@...il.com>
Subject: [PATCH] ethtool.c: Report transceiver correctly
After the transition to the extended link settings ioctl API, the
kernel, up until commit 9b3004953503462a4fab31b85e44ae446d48f0bd
("ethtool: drop get_settings and set_settings callbacks") would support
the legacy link settings operation and report the transceiver type.
After this commit, we lost that information although the Linux PHY
library populates it correctly even with get_link_ksettings() method.
Ensure that we report the transceiver type correctly for such cases.
Fixes: 33133abf3b77 ("ethtool.c: add support for ETHTOOL_xLINKSETTINGS ioctls")
Signed-off-by: Florian Fainelli <f.fainelli@...il.com>
---
ethtool.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ethtool.c b/ethtool.c
index 1b4e08b6e60f..21748fc909eb 100644
--- a/ethtool.c
+++ b/ethtool.c
@@ -2497,8 +2497,8 @@ do_ioctl_glinksettings(struct cmd_context *ctx)
if (link_usettings == NULL)
return NULL;
- /* keep transceiver 0 */
memcpy(&link_usettings->base, &ecmd.req, sizeof(link_usettings->base));
+ link_usettings->deprecated.transceiver = ecmd.req.transceiver;
/* copy link mode bitmaps */
u32_offs = 0;
--
2.7.4
Powered by blists - more mailing lists