Skip to content

Commit 71891e2

Browse files
shemmingerdavem330
authored andcommitted
ethtool: do not print warning for applications using legacy API
In kernel log ths message appears on every boot: "warning: `NetworkChangeNo' uses legacy ethtool link settings API, link modes are only partially reported" When ethtool link settings API changed, it started complaining about usages of old API. Ironically, the original patch was from google but the application using the legacy API is chrome. Linux ABI is fixed as much as possible. The kernel must not break it and should not complain about applications using legacy API's. This patch just removes the warning since using legacy API's in Linux is perfectly acceptable. Fixes: 3f1ac7a ("net: ethtool: add new ETHTOOL_xLINKSETTINGS API") Signed-off-by: Stephen Hemminger <[email protected]> Signed-off-by: David Decotigny <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent bd30ffc commit 71891e2

File tree

1 file changed

+2
-13
lines changed

1 file changed

+2
-13
lines changed

net/core/ethtool.c

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -770,15 +770,6 @@ static int ethtool_set_link_ksettings(struct net_device *dev,
770770
return dev->ethtool_ops->set_link_ksettings(dev, &link_ksettings);
771771
}
772772

773-
static void
774-
warn_incomplete_ethtool_legacy_settings_conversion(const char *details)
775-
{
776-
char name[sizeof(current->comm)];
777-
778-
pr_info_once("warning: `%s' uses legacy ethtool link settings API, %s\n",
779-
get_task_comm(name, current), details);
780-
}
781-
782773
/* Query device for its ethtool_cmd settings.
783774
*
784775
* Backward compatibility note: for compatibility with legacy ethtool,
@@ -805,10 +796,8 @@ static int ethtool_get_settings(struct net_device *dev, void __user *useraddr)
805796
&link_ksettings);
806797
if (err < 0)
807798
return err;
808-
if (!convert_link_ksettings_to_legacy_settings(&cmd,
809-
&link_ksettings))
810-
warn_incomplete_ethtool_legacy_settings_conversion(
811-
"link modes are only partially reported");
799+
convert_link_ksettings_to_legacy_settings(&cmd,
800+
&link_ksettings);
812801

813802
/* send a sensible cmd tag back to user */
814803
cmd.cmd = ETHTOOL_GSET;

0 commit comments

Comments
 (0)