lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200928144403.19484-3-dmurphy@ti.com>
Date:   Mon, 28 Sep 2020 09:44:03 -0500
From:   Dan Murphy <dmurphy@...com>
To:     <mkubecek@...e.cz>
CC:     <netdev@...r.kernel.org>, Dan Murphy <dmurphy@...com>
Subject: [PATCH ethtool v3 3/3] Update link mode tables for fiber

Update the link mode tables to include 100base Fx Full and Half duplex
modes.

Signed-off-by: Dan Murphy <dmurphy@...com>
---
 ethtool.8.in       | 2 ++
 ethtool.c          | 6 ++++++
 netlink/settings.c | 2 ++
 3 files changed, 10 insertions(+)

diff --git a/ethtool.8.in b/ethtool.8.in
index d0921949b37e..7c6e23e28ffa 100644
--- a/ethtool.8.in
+++ b/ethtool.8.in
@@ -794,6 +794,8 @@ lB	l	lB.
 0x8000000000000000000000	400000baseLR4_ER4_FR4 Full
 0x10000000000000000000000	400000baseDR4 Full
 0x20000000000000000000000	400000baseCR4 Full
+0x40000000000000000000000	100baseFX Half
+0x80000000000000000000000	100baseFX Full
 .TE
 .TP
 .BI phyad \ N
diff --git a/ethtool.c b/ethtool.c
index 974b14063de2..39a1862a72a4 100644
--- a/ethtool.c
+++ b/ethtool.c
@@ -463,6 +463,8 @@ static void init_global_link_mode_masks(void)
 		ETHTOOL_LINK_MODE_400000baseLR4_ER4_FR4_Full_BIT,
 		ETHTOOL_LINK_MODE_400000baseDR4_Full_BIT,
 		ETHTOOL_LINK_MODE_400000baseCR4_Full_BIT,
+		ETHTOOL_LINK_MODE_100baseFX_Half_BIT,
+		ETHTOOL_LINK_MODE_100baseFX_Full_BIT,
 	};
 	static const enum ethtool_link_mode_bit_indices
 		additional_advertised_flags_bits[] = {
@@ -669,6 +671,10 @@ static void dump_link_caps(const char *prefix, const char *an_prefix,
 		  "400000baseDR4/Full" },
 		{ 0, ETHTOOL_LINK_MODE_400000baseCR4_Full_BIT,
 		  "400000baseCR4/Full" },
+		{ 0, ETHTOOL_LINK_MODE_100baseFX_Half_BIT,
+		  "100baseFx/Half" },
+		{ 1, ETHTOOL_LINK_MODE_100baseFX_Full_BIT,
+		  "100baseFx/Full" },
 	};
 	int indent;
 	int did1, new_line_pend;
diff --git a/netlink/settings.c b/netlink/settings.c
index 3059d4d0d0b7..41a2e5af1945 100644
--- a/netlink/settings.c
+++ b/netlink/settings.c
@@ -162,6 +162,8 @@ static const struct link_mode_info link_modes[] = {
 	[ETHTOOL_LINK_MODE_400000baseLR4_ER4_FR4_Full_BIT] = __REAL(400000),
 	[ETHTOOL_LINK_MODE_400000baseDR4_Full_BIT]	= __REAL(400000),
 	[ETHTOOL_LINK_MODE_400000baseCR4_Full_BIT]	= __REAL(400000),
+	[ETHTOOL_LINK_MODE_100baseFX_Half_BIT]		= __HALF_DUPLEX(100),
+	[ETHTOOL_LINK_MODE_100baseFX_Full_BIT]		= __REAL(100),
 };
 const unsigned int link_modes_count = ARRAY_SIZE(link_modes);
 
-- 
2.28.0.585.ge1cfff676549

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ