ethtool.c: Report transceiver correctly
Subsystems (2)
PATCH 1/1 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.
--- ethtool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
ethtool.c +1 -1
@@ -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 ;
Signature · 1 line
2.7.4
Quoted 11 lines · Florian Fainelli
After the transition to the extended link settings ioctl API, the kernel, up until commit
9b3004953503462a4fab31b85e44ae446d48f0bd("ethtool: dropget_settingsandset_settingscallbacks") 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 withget_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 <[email protected]>
Thanks (belatedly) -- queued for next release!
John
Signature · 2 lines
John W. Linville Someday the world will need a hero, and you [email protected] might be all we have. Be ready.