ethtool: fix half-duplex / full-duplex confusion (#6209)
authorSusant Sahani <ssahani@users.noreply.github.com>
Fri, 30 Jun 2017 16:55:21 +0000 (16:55 +0000)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 30 Jun 2017 16:55:21 +0000 (12:55 -0400)
The values that we used for half-duplex and full-duplex in ethtool_set_glinksettings were
reversed wrt. what the kernel uses.

src/udev/net/ethtool-util.h

index a4beedf..27ce0e0 100644 (file)
@@ -29,8 +29,8 @@ struct link_config;
 /* we can't use DUPLEX_ prefix, as it
  * clashes with <linux/ethtool.h> */
 typedef enum Duplex {
-        DUP_FULL,
-        DUP_HALF,
+        DUP_HALF = DUPLEX_HALF,
+        DUP_FULL = DUPLEX_FULL,
         _DUP_MAX,
         _DUP_INVALID = -1
 } Duplex;