core: cleanup logging of set-link for speed/autoneg

There is no point in logging the current speed/duplex. OK, with
the "*", we could at least see whether the printed values are
to be set, or are currently configured on the interface.

But mixing these two outputs is confusing and meaningless.
Either log what we are about to do, or what the current configuration
is. Not a mix of both.
This commit is contained in:
Thomas Haller 2021-08-30 19:27:49 +02:00
parent 5c789c030a
commit ea2b965ac2
No known key found for this signature in database
GPG key ID: 29C2366E4DFC5728

View file

@ -934,13 +934,10 @@ link_negotiation_set(NMDevice *device)
_LOGD(LOGD_DEVICE, "set-link: configure auto-negotiation");
else {
_LOGD(LOGD_DEVICE,
"set-link: configure %snegotiation (%u Mbit%s, %s duplex%s)",
"set-link: configure %snegotiation (%u Mbit, %s duplex)",
autoneg ? "auto-" : "static ",
speed ?: link_speed,
speed ? "" : "*",
duplex ? nm_platform_link_duplex_type_to_string(duplex)
: nm_platform_link_duplex_type_to_string(link_duplex),
duplex ? "" : "*");
speed,
nm_platform_link_duplex_type_to_string(duplex));
}
if (!priv->ethtool_prev_set) {