]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - net/core/ethtool.c
net: ethtool: remove error check for legacy setting transceiver type
[mirror_ubuntu-bionic-kernel.git] / net / core / ethtool.c
index 6a582ae4c5d972360736a966f02729bf22a64599..9a9a3d77e3274fc3e115fe73470f18bc93be6364 100644 (file)
@@ -436,7 +436,7 @@ bool ethtool_convert_link_mode_to_legacy_u32(u32 *legacy_u32,
 EXPORT_SYMBOL(ethtool_convert_link_mode_to_legacy_u32);
 
 /* return false if legacy contained non-0 deprecated fields
- * transceiver/maxtxpkt/maxrxpkt. rest of ksettings always updated
+ * maxtxpkt/maxrxpkt. rest of ksettings always updated
  */
 static bool
 convert_legacy_settings_to_link_ksettings(
@@ -451,8 +451,7 @@ convert_legacy_settings_to_link_ksettings(
         * deprecated legacy fields, and they should not use
         * %ETHTOOL_GLINKSETTINGS/%ETHTOOL_SLINKSETTINGS
         */
-       if (legacy_settings->transceiver ||
-           legacy_settings->maxtxpkt ||
+       if (legacy_settings->maxtxpkt ||
            legacy_settings->maxrxpkt)
                retval = false;
 
@@ -525,6 +524,8 @@ convert_link_ksettings_to_legacy_settings(
                = link_ksettings->base.eth_tp_mdix;
        legacy_settings->eth_tp_mdix_ctrl
                = link_ksettings->base.eth_tp_mdix_ctrl;
+       legacy_settings->transceiver
+               = link_ksettings->base.transceiver;
        return retval;
 }