]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
ethtool-util: move and rebreak comments
authorYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 20 May 2021 20:32:17 +0000 (05:32 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 23 May 2021 02:40:15 +0000 (11:40 +0900)
src/shared/ethtool-util.c

index da47aff72010bbf229cff3b2f99dfff6b1342cb7..11e6992981301ddcb5ad341d189d7f724810b03c 100644 (file)
@@ -805,12 +805,6 @@ static int set_sset(int fd, struct ifreq *ifr, const struct ethtool_link_usettin
         return 0;
 }
 
-/* If autonegotiation is disabled, the speed and duplex represent the fixed link
- * mode and are writable if the driver supports multiple link modes. If it is
- * enabled then they are read-only. If the link is up they represent the negotiated
- * link mode; if the link is down, the speed is 0, %SPEED_UNKNOWN or the highest
- * enabled speed and @duplex is %DUPLEX_UNKNOWN or the best enabled duplex mode.
- */
 int ethtool_set_glinksettings(
                 int *fd,
                 const char *ifname,
@@ -828,6 +822,12 @@ int ethtool_set_glinksettings(
         assert(ifname);
         assert(advertise);
 
+        /* If autonegotiation is disabled, the speed and duplex represent the fixed link mode and are
+         * writable if the driver supports multiple link modes. If it is enabled then they are
+         * read-only. If the link is up they represent the negotiated link mode; if the link is down,
+         * the speed is 0, %SPEED_UNKNOWN or the highest enabled speed and @duplex is %DUPLEX_UNKNOWN
+         * or the best enabled duplex mode. */
+
         if (autonegotiation != AUTONEG_DISABLE && memeqzero(advertise, sizeof(uint32_t) * N_ADVERTISE)) {
                 log_debug("ethtool: autonegotiation is unset or enabled, the speed and duplex are not writable.");
                 return 0;