Blame SOURCES/0009-settings-simplify-link_mode_info-initializers.patch

4f6fcd
From f99224132fba926ac0fb736748586ecdd51bb9d4 Mon Sep 17 00:00:00 2001
4f6fcd
From: Michal Kubecek <mkubecek@suse.cz>
4f6fcd
Date: Sun, 23 Aug 2020 21:40:36 +0200
4f6fcd
Subject: [PATCH 09/17] settings: simplify link_mode_info[] initializers
4f6fcd
4f6fcd
Use macro helpers to make link_mode_info[] initializers easier to read and
4f6fcd
less prone to mistakes. As a bonus, this gets rid of "missing field
4f6fcd
initializer" warnings in netlink/settings.c
4f6fcd
4f6fcd
This commit should have no effect on resulting code (checked with gcc-11
4f6fcd
and -O2).
4f6fcd
4f6fcd
Signed-off-by: Michal Kubecek <mkubecek@suse.cz>
4f6fcd
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
4f6fcd
(cherry picked from commit 5319fae14254df9cb38cb2db0a4e39973c3fc1d8)
4f6fcd
---
4f6fcd
 netlink/settings.c | 236 +++++++++++++++++----------------------------
4f6fcd
 1 file changed, 86 insertions(+), 150 deletions(-)
4f6fcd
4f6fcd
diff --git a/netlink/settings.c b/netlink/settings.c
4f6fcd
index 2b9c6e7a782c..d1da995b434c 100644
4f6fcd
--- a/netlink/settings.c
4f6fcd
+++ b/netlink/settings.c
4f6fcd
@@ -64,160 +64,96 @@ static const char *const names_transceiver[] = {
4f6fcd
  * there is little chance of getting them separated any time soon so let's
4f6fcd
  * sort them out ourselves
4f6fcd
  */
4f6fcd
+#define __REAL(_speed) \
4f6fcd
+	{ .class = LM_CLASS_REAL, .speed = _speed, .duplex = DUPLEX_FULL }
4f6fcd
+#define __HALF_DUPLEX(_speed) \
4f6fcd
+	{ .class = LM_CLASS_REAL, .speed = _speed, .duplex = DUPLEX_HALF }
4f6fcd
+#define __SPECIAL(_class) \
4f6fcd
+	{ .class = LM_CLASS_ ## _class }
4f6fcd
+
4f6fcd
 static const struct link_mode_info link_modes[] = {
4f6fcd
-	[ETHTOOL_LINK_MODE_10baseT_Half_BIT] =
4f6fcd
-		{ LM_CLASS_REAL,	10,	DUPLEX_HALF },
4f6fcd
-	[ETHTOOL_LINK_MODE_10baseT_Full_BIT] =
4f6fcd
-		{ LM_CLASS_REAL,	10,	DUPLEX_FULL },
4f6fcd
-	[ETHTOOL_LINK_MODE_100baseT_Half_BIT] =
4f6fcd
-		{ LM_CLASS_REAL,	100,	DUPLEX_HALF },
4f6fcd
-	[ETHTOOL_LINK_MODE_100baseT_Full_BIT] =
4f6fcd
-		{ LM_CLASS_REAL,	100,	DUPLEX_FULL },
4f6fcd
-	[ETHTOOL_LINK_MODE_1000baseT_Half_BIT] =
4f6fcd
-		{ LM_CLASS_REAL,	1000,	DUPLEX_HALF },
4f6fcd
-	[ETHTOOL_LINK_MODE_1000baseT_Full_BIT] =
4f6fcd
-		{ LM_CLASS_REAL,	1000,	DUPLEX_FULL },
4f6fcd
-	[ETHTOOL_LINK_MODE_Autoneg_BIT] =
4f6fcd
-		{ LM_CLASS_AUTONEG },
4f6fcd
-	[ETHTOOL_LINK_MODE_TP_BIT] =
4f6fcd
-		{ LM_CLASS_PORT },
4f6fcd
-	[ETHTOOL_LINK_MODE_AUI_BIT] =
4f6fcd
-		{ LM_CLASS_PORT },
4f6fcd
-	[ETHTOOL_LINK_MODE_MII_BIT] =
4f6fcd
-		{ LM_CLASS_PORT },
4f6fcd
-	[ETHTOOL_LINK_MODE_FIBRE_BIT] =
4f6fcd
-		{ LM_CLASS_PORT },
4f6fcd
-	[ETHTOOL_LINK_MODE_BNC_BIT] =
4f6fcd
-		{ LM_CLASS_PORT },
4f6fcd
-	[ETHTOOL_LINK_MODE_10000baseT_Full_BIT] =
4f6fcd
-		{ LM_CLASS_REAL,	10000,	DUPLEX_FULL },
4f6fcd
-	[ETHTOOL_LINK_MODE_Pause_BIT] =
4f6fcd
-		{ LM_CLASS_PAUSE },
4f6fcd
-	[ETHTOOL_LINK_MODE_Asym_Pause_BIT] =
4f6fcd
-		{ LM_CLASS_PAUSE },
4f6fcd
-	[ETHTOOL_LINK_MODE_2500baseX_Full_BIT] =
4f6fcd
-		{ LM_CLASS_REAL,	2500,	DUPLEX_FULL },
4f6fcd
-	[ETHTOOL_LINK_MODE_Backplane_BIT] =
4f6fcd
-		{ LM_CLASS_PORT },
4f6fcd
-	[ETHTOOL_LINK_MODE_1000baseKX_Full_BIT] =
4f6fcd
-		{ LM_CLASS_REAL,	1000,	DUPLEX_FULL },
4f6fcd
-	[ETHTOOL_LINK_MODE_10000baseKX4_Full_BIT] =
4f6fcd
-		{ LM_CLASS_REAL,	10000,	DUPLEX_FULL },
4f6fcd
-	[ETHTOOL_LINK_MODE_10000baseKR_Full_BIT] =
4f6fcd
-		{ LM_CLASS_REAL,	10000,	DUPLEX_FULL },
4f6fcd
-	[ETHTOOL_LINK_MODE_10000baseR_FEC_BIT] =
4f6fcd
-		{ LM_CLASS_REAL,	10000,	DUPLEX_FULL },
4f6fcd
-	[ETHTOOL_LINK_MODE_20000baseMLD2_Full_BIT] =
4f6fcd
-		{ LM_CLASS_REAL,	20000,	DUPLEX_FULL },
4f6fcd
-	[ETHTOOL_LINK_MODE_20000baseKR2_Full_BIT] =
4f6fcd
-		{ LM_CLASS_REAL,	20000,	DUPLEX_FULL },
4f6fcd
-	[ETHTOOL_LINK_MODE_40000baseKR4_Full_BIT] =
4f6fcd
-		{ LM_CLASS_REAL,	40000,	DUPLEX_FULL },
4f6fcd
-	[ETHTOOL_LINK_MODE_40000baseCR4_Full_BIT] =
4f6fcd
-		{ LM_CLASS_REAL,	40000,	DUPLEX_FULL },
4f6fcd
-	[ETHTOOL_LINK_MODE_40000baseSR4_Full_BIT] =
4f6fcd
-		{ LM_CLASS_REAL,	40000,	DUPLEX_FULL },
4f6fcd
-	[ETHTOOL_LINK_MODE_40000baseLR4_Full_BIT] =
4f6fcd
-		{ LM_CLASS_REAL,	40000,	DUPLEX_FULL },
4f6fcd
-	[ETHTOOL_LINK_MODE_56000baseKR4_Full_BIT] =
4f6fcd
-		{ LM_CLASS_REAL,	56000,	DUPLEX_FULL },
4f6fcd
-	[ETHTOOL_LINK_MODE_56000baseCR4_Full_BIT] =
4f6fcd
-		{ LM_CLASS_REAL,	56000,	DUPLEX_FULL },
4f6fcd
-	[ETHTOOL_LINK_MODE_56000baseSR4_Full_BIT] =
4f6fcd
-		{ LM_CLASS_REAL,	56000,	DUPLEX_FULL },
4f6fcd
-	[ETHTOOL_LINK_MODE_56000baseLR4_Full_BIT] =
4f6fcd
-		{ LM_CLASS_REAL,	56000,	DUPLEX_FULL },
4f6fcd
-	[ETHTOOL_LINK_MODE_25000baseCR_Full_BIT] =
4f6fcd
-		{ LM_CLASS_REAL,	25000,	DUPLEX_FULL },
4f6fcd
-	[ETHTOOL_LINK_MODE_25000baseKR_Full_BIT] =
4f6fcd
-		{ LM_CLASS_REAL,	25000,	DUPLEX_FULL },
4f6fcd
-	[ETHTOOL_LINK_MODE_25000baseSR_Full_BIT] =
4f6fcd
-		{ LM_CLASS_REAL,	25000,	DUPLEX_FULL },
4f6fcd
-	[ETHTOOL_LINK_MODE_50000baseCR2_Full_BIT] =
4f6fcd
-		{ LM_CLASS_REAL,	50000,	DUPLEX_FULL },
4f6fcd
-	[ETHTOOL_LINK_MODE_50000baseKR2_Full_BIT] =
4f6fcd
-		{ LM_CLASS_REAL,	50000,	DUPLEX_FULL },
4f6fcd
-	[ETHTOOL_LINK_MODE_100000baseKR4_Full_BIT] =
4f6fcd
-		{ LM_CLASS_REAL,	100000,	DUPLEX_FULL },
4f6fcd
-	[ETHTOOL_LINK_MODE_100000baseSR4_Full_BIT] =
4f6fcd
-		{ LM_CLASS_REAL,	100000,	DUPLEX_FULL },
4f6fcd
-	[ETHTOOL_LINK_MODE_100000baseCR4_Full_BIT] =
4f6fcd
-		{ LM_CLASS_REAL,	100000,	DUPLEX_FULL },
4f6fcd
-	[ETHTOOL_LINK_MODE_100000baseLR4_ER4_Full_BIT] =
4f6fcd
-		{ LM_CLASS_REAL,	100000,	DUPLEX_FULL },
4f6fcd
-	[ETHTOOL_LINK_MODE_50000baseSR2_Full_BIT] =
4f6fcd
-		{ LM_CLASS_REAL,	50000,	DUPLEX_FULL },
4f6fcd
-	[ETHTOOL_LINK_MODE_1000baseX_Full_BIT] =
4f6fcd
-		{ LM_CLASS_REAL,	1000,	DUPLEX_FULL },
4f6fcd
-	[ETHTOOL_LINK_MODE_10000baseCR_Full_BIT] =
4f6fcd
-		{ LM_CLASS_REAL,	10000,	DUPLEX_FULL },
4f6fcd
-	[ETHTOOL_LINK_MODE_10000baseSR_Full_BIT] =
4f6fcd
-		{ LM_CLASS_REAL,	10000,	DUPLEX_FULL },
4f6fcd
-	[ETHTOOL_LINK_MODE_10000baseLR_Full_BIT] =
4f6fcd
-		{ LM_CLASS_REAL,	10000,	DUPLEX_FULL },
4f6fcd
-	[ETHTOOL_LINK_MODE_10000baseLRM_Full_BIT] =
4f6fcd
-		{ LM_CLASS_REAL,	10000,	DUPLEX_FULL },
4f6fcd
-	[ETHTOOL_LINK_MODE_10000baseER_Full_BIT] =
4f6fcd
-		{ LM_CLASS_REAL,	10000,	DUPLEX_FULL },
4f6fcd
-	[ETHTOOL_LINK_MODE_2500baseT_Full_BIT] =
4f6fcd
-		{ LM_CLASS_REAL,	2500,	DUPLEX_FULL },
4f6fcd
-	[ETHTOOL_LINK_MODE_5000baseT_Full_BIT] =
4f6fcd
-		{ LM_CLASS_REAL,	5000,	DUPLEX_FULL },
4f6fcd
-	[ETHTOOL_LINK_MODE_FEC_NONE_BIT] =
4f6fcd
-		{ LM_CLASS_FEC },
4f6fcd
-	[ETHTOOL_LINK_MODE_FEC_RS_BIT] =
4f6fcd
-		{ LM_CLASS_FEC },
4f6fcd
-	[ETHTOOL_LINK_MODE_FEC_BASER_BIT] =
4f6fcd
-		{ LM_CLASS_FEC },
4f6fcd
-	[ETHTOOL_LINK_MODE_50000baseKR_Full_BIT] =
4f6fcd
-		{ LM_CLASS_REAL,	50000,	DUPLEX_FULL },
4f6fcd
-	[ETHTOOL_LINK_MODE_50000baseSR_Full_BIT] =
4f6fcd
-		{ LM_CLASS_REAL,	50000,	DUPLEX_FULL },
4f6fcd
-	[ETHTOOL_LINK_MODE_50000baseCR_Full_BIT] =
4f6fcd
-		{ LM_CLASS_REAL,	50000,	DUPLEX_FULL },
4f6fcd
-	[ETHTOOL_LINK_MODE_50000baseLR_ER_FR_Full_BIT] =
4f6fcd
-		{ LM_CLASS_REAL,	50000,	DUPLEX_FULL },
4f6fcd
-	[ETHTOOL_LINK_MODE_50000baseDR_Full_BIT] =
4f6fcd
-		{ LM_CLASS_REAL,	50000,	DUPLEX_FULL },
4f6fcd
-	[ETHTOOL_LINK_MODE_100000baseKR2_Full_BIT] =
4f6fcd
-		{ LM_CLASS_REAL,	100000,	DUPLEX_FULL },
4f6fcd
-	[ETHTOOL_LINK_MODE_100000baseSR2_Full_BIT] =
4f6fcd
-		{ LM_CLASS_REAL,	100000,	DUPLEX_FULL },
4f6fcd
-	[ETHTOOL_LINK_MODE_100000baseCR2_Full_BIT] =
4f6fcd
-		{ LM_CLASS_REAL,	100000,	DUPLEX_FULL },
4f6fcd
-	[ETHTOOL_LINK_MODE_100000baseLR2_ER2_FR2_Full_BIT] =
4f6fcd
-		{ LM_CLASS_REAL,	100000,	DUPLEX_FULL },
4f6fcd
-	[ETHTOOL_LINK_MODE_100000baseDR2_Full_BIT] =
4f6fcd
-		{ LM_CLASS_REAL,	100000,	DUPLEX_FULL },
4f6fcd
-	[ETHTOOL_LINK_MODE_200000baseKR4_Full_BIT] =
4f6fcd
-		{ LM_CLASS_REAL,	200000,	DUPLEX_FULL },
4f6fcd
-	[ETHTOOL_LINK_MODE_200000baseSR4_Full_BIT] =
4f6fcd
-		{ LM_CLASS_REAL,	200000,	DUPLEX_FULL },
4f6fcd
-	[ETHTOOL_LINK_MODE_200000baseLR4_ER4_FR4_Full_BIT] =
4f6fcd
-		{ LM_CLASS_REAL,	200000,	DUPLEX_FULL },
4f6fcd
-	[ETHTOOL_LINK_MODE_200000baseDR4_Full_BIT] =
4f6fcd
-		{ LM_CLASS_REAL,	200000,	DUPLEX_FULL },
4f6fcd
-	[ETHTOOL_LINK_MODE_200000baseCR4_Full_BIT] =
4f6fcd
-		{ LM_CLASS_REAL,	200000,	DUPLEX_FULL },
4f6fcd
-	[ETHTOOL_LINK_MODE_100baseT1_Full_BIT] =
4f6fcd
-		{ LM_CLASS_REAL,	100,	DUPLEX_FULL },
4f6fcd
-	[ETHTOOL_LINK_MODE_1000baseT1_Full_BIT] =
4f6fcd
-		{ LM_CLASS_REAL,	1000,	DUPLEX_FULL },
4f6fcd
-	[ETHTOOL_LINK_MODE_400000baseKR8_Full_BIT] =
4f6fcd
-		{ LM_CLASS_REAL,	400000,	DUPLEX_FULL },
4f6fcd
-	[ETHTOOL_LINK_MODE_400000baseSR8_Full_BIT] =
4f6fcd
-		{ LM_CLASS_REAL,	400000,	DUPLEX_FULL },
4f6fcd
-	[ETHTOOL_LINK_MODE_400000baseLR8_ER8_FR8_Full_BIT] =
4f6fcd
-		{ LM_CLASS_REAL,	400000,	DUPLEX_FULL },
4f6fcd
-	[ETHTOOL_LINK_MODE_400000baseDR8_Full_BIT] =
4f6fcd
-		{ LM_CLASS_REAL,	400000,	DUPLEX_FULL },
4f6fcd
-	[ETHTOOL_LINK_MODE_400000baseCR8_Full_BIT] =
4f6fcd
-		{ LM_CLASS_REAL,	400000,	DUPLEX_FULL },
4f6fcd
-	[ETHTOOL_LINK_MODE_FEC_LLRS_BIT] =
4f6fcd
-		{ LM_CLASS_FEC },
4f6fcd
+	[ETHTOOL_LINK_MODE_10baseT_Half_BIT]		= __HALF_DUPLEX(10),
4f6fcd
+	[ETHTOOL_LINK_MODE_10baseT_Full_BIT]		= __REAL(10),
4f6fcd
+	[ETHTOOL_LINK_MODE_100baseT_Half_BIT]		= __HALF_DUPLEX(100),
4f6fcd
+	[ETHTOOL_LINK_MODE_100baseT_Full_BIT]		= __REAL(100),
4f6fcd
+	[ETHTOOL_LINK_MODE_1000baseT_Half_BIT]		= __HALF_DUPLEX(1000),
4f6fcd
+	[ETHTOOL_LINK_MODE_1000baseT_Full_BIT]		= __REAL(1000),
4f6fcd
+	[ETHTOOL_LINK_MODE_Autoneg_BIT]			= __SPECIAL(AUTONEG),
4f6fcd
+	[ETHTOOL_LINK_MODE_TP_BIT]			= __SPECIAL(PORT),
4f6fcd
+	[ETHTOOL_LINK_MODE_AUI_BIT]			= __SPECIAL(PORT),
4f6fcd
+	[ETHTOOL_LINK_MODE_MII_BIT]			= __SPECIAL(PORT),
4f6fcd
+	[ETHTOOL_LINK_MODE_FIBRE_BIT]			= __SPECIAL(PORT),
4f6fcd
+	[ETHTOOL_LINK_MODE_BNC_BIT]			= __SPECIAL(PORT),
4f6fcd
+	[ETHTOOL_LINK_MODE_10000baseT_Full_BIT]		= __REAL(10000),
4f6fcd
+	[ETHTOOL_LINK_MODE_Pause_BIT]			= __SPECIAL(PAUSE),
4f6fcd
+	[ETHTOOL_LINK_MODE_Asym_Pause_BIT]		= __SPECIAL(PAUSE),
4f6fcd
+	[ETHTOOL_LINK_MODE_2500baseX_Full_BIT]		= __REAL(2500),
4f6fcd
+	[ETHTOOL_LINK_MODE_Backplane_BIT]		= __SPECIAL(PORT),
4f6fcd
+	[ETHTOOL_LINK_MODE_1000baseKX_Full_BIT]		= __REAL(1000),
4f6fcd
+	[ETHTOOL_LINK_MODE_10000baseKX4_Full_BIT]	= __REAL(10000),
4f6fcd
+	[ETHTOOL_LINK_MODE_10000baseKR_Full_BIT]	= __REAL(10000),
4f6fcd
+	[ETHTOOL_LINK_MODE_10000baseR_FEC_BIT]		= __REAL(10000),
4f6fcd
+	[ETHTOOL_LINK_MODE_20000baseMLD2_Full_BIT]	= __REAL(20000),
4f6fcd
+	[ETHTOOL_LINK_MODE_20000baseKR2_Full_BIT]	= __REAL(20000),
4f6fcd
+	[ETHTOOL_LINK_MODE_40000baseKR4_Full_BIT]	= __REAL(40000),
4f6fcd
+	[ETHTOOL_LINK_MODE_40000baseCR4_Full_BIT]	= __REAL(40000),
4f6fcd
+	[ETHTOOL_LINK_MODE_40000baseSR4_Full_BIT]	= __REAL(40000),
4f6fcd
+	[ETHTOOL_LINK_MODE_40000baseLR4_Full_BIT]	= __REAL(40000),
4f6fcd
+	[ETHTOOL_LINK_MODE_56000baseKR4_Full_BIT]	= __REAL(56000),
4f6fcd
+	[ETHTOOL_LINK_MODE_56000baseCR4_Full_BIT]	= __REAL(56000),
4f6fcd
+	[ETHTOOL_LINK_MODE_56000baseSR4_Full_BIT]	= __REAL(56000),
4f6fcd
+	[ETHTOOL_LINK_MODE_56000baseLR4_Full_BIT]	= __REAL(56000),
4f6fcd
+	[ETHTOOL_LINK_MODE_25000baseCR_Full_BIT]	= __REAL(25000),
4f6fcd
+	[ETHTOOL_LINK_MODE_25000baseKR_Full_BIT]	= __REAL(25000),
4f6fcd
+	[ETHTOOL_LINK_MODE_25000baseSR_Full_BIT]	= __REAL(25000),
4f6fcd
+	[ETHTOOL_LINK_MODE_50000baseCR2_Full_BIT]	= __REAL(50000),
4f6fcd
+	[ETHTOOL_LINK_MODE_50000baseKR2_Full_BIT]	= __REAL(50000),
4f6fcd
+	[ETHTOOL_LINK_MODE_100000baseKR4_Full_BIT]	= __REAL(100000),
4f6fcd
+	[ETHTOOL_LINK_MODE_100000baseSR4_Full_BIT]	= __REAL(100000),
4f6fcd
+	[ETHTOOL_LINK_MODE_100000baseCR4_Full_BIT]	= __REAL(100000),
4f6fcd
+	[ETHTOOL_LINK_MODE_100000baseLR4_ER4_Full_BIT]	= __REAL(100000),
4f6fcd
+	[ETHTOOL_LINK_MODE_50000baseSR2_Full_BIT]	= __REAL(50000),
4f6fcd
+	[ETHTOOL_LINK_MODE_1000baseX_Full_BIT]		= __REAL(1000),
4f6fcd
+	[ETHTOOL_LINK_MODE_10000baseCR_Full_BIT]	= __REAL(10000),
4f6fcd
+	[ETHTOOL_LINK_MODE_10000baseSR_Full_BIT]	= __REAL(10000),
4f6fcd
+	[ETHTOOL_LINK_MODE_10000baseLR_Full_BIT]	= __REAL(10000),
4f6fcd
+	[ETHTOOL_LINK_MODE_10000baseLRM_Full_BIT]	= __REAL(10000),
4f6fcd
+	[ETHTOOL_LINK_MODE_10000baseER_Full_BIT]	= __REAL(10000),
4f6fcd
+	[ETHTOOL_LINK_MODE_2500baseT_Full_BIT]		= __REAL(2500),
4f6fcd
+	[ETHTOOL_LINK_MODE_5000baseT_Full_BIT]		= __REAL(5000),
4f6fcd
+	[ETHTOOL_LINK_MODE_FEC_NONE_BIT]		= __SPECIAL(FEC),
4f6fcd
+	[ETHTOOL_LINK_MODE_FEC_RS_BIT]			= __SPECIAL(FEC),
4f6fcd
+	[ETHTOOL_LINK_MODE_FEC_BASER_BIT]		= __SPECIAL(FEC),
4f6fcd
+	[ETHTOOL_LINK_MODE_50000baseKR_Full_BIT]	= __REAL(50000),
4f6fcd
+	[ETHTOOL_LINK_MODE_50000baseSR_Full_BIT]	= __REAL(50000),
4f6fcd
+	[ETHTOOL_LINK_MODE_50000baseCR_Full_BIT]	= __REAL(50000),
4f6fcd
+	[ETHTOOL_LINK_MODE_50000baseLR_ER_FR_Full_BIT]	= __REAL(50000),
4f6fcd
+	[ETHTOOL_LINK_MODE_50000baseDR_Full_BIT]	= __REAL(50000),
4f6fcd
+	[ETHTOOL_LINK_MODE_100000baseKR2_Full_BIT]	= __REAL(100000),
4f6fcd
+	[ETHTOOL_LINK_MODE_100000baseSR2_Full_BIT]	= __REAL(100000),
4f6fcd
+	[ETHTOOL_LINK_MODE_100000baseCR2_Full_BIT]	= __REAL(100000),
4f6fcd
+	[ETHTOOL_LINK_MODE_100000baseLR2_ER2_FR2_Full_BIT] = __REAL(100000),
4f6fcd
+	[ETHTOOL_LINK_MODE_100000baseDR2_Full_BIT]	= __REAL(100000),
4f6fcd
+	[ETHTOOL_LINK_MODE_200000baseKR4_Full_BIT]	= __REAL(200000),
4f6fcd
+	[ETHTOOL_LINK_MODE_200000baseSR4_Full_BIT]	= __REAL(200000),
4f6fcd
+	[ETHTOOL_LINK_MODE_200000baseLR4_ER4_FR4_Full_BIT] = __REAL(200000),
4f6fcd
+	[ETHTOOL_LINK_MODE_200000baseDR4_Full_BIT]	= __REAL(200000),
4f6fcd
+	[ETHTOOL_LINK_MODE_200000baseCR4_Full_BIT]	= __REAL(200000),
4f6fcd
+	[ETHTOOL_LINK_MODE_100baseT1_Full_BIT]		= __REAL(100),
4f6fcd
+	[ETHTOOL_LINK_MODE_1000baseT1_Full_BIT]		= __REAL(1000),
4f6fcd
+	[ETHTOOL_LINK_MODE_400000baseKR8_Full_BIT]	= __REAL(400000),
4f6fcd
+	[ETHTOOL_LINK_MODE_400000baseSR8_Full_BIT]	= __REAL(400000),
4f6fcd
+	[ETHTOOL_LINK_MODE_400000baseLR8_ER8_FR8_Full_BIT] = __REAL(400000),
4f6fcd
+	[ETHTOOL_LINK_MODE_400000baseDR8_Full_BIT]	= __REAL(400000),
4f6fcd
+	[ETHTOOL_LINK_MODE_400000baseCR8_Full_BIT]	= __REAL(400000),
4f6fcd
+	[ETHTOOL_LINK_MODE_FEC_LLRS_BIT]		= __SPECIAL(FEC),
4f6fcd
 };
4f6fcd
 const unsigned int link_modes_count = ARRAY_SIZE(link_modes);
4f6fcd
 
4f6fcd
+#undef __REAL
4f6fcd
+#undef __HALF_DUPLEX
4f6fcd
+#undef __SPECIAL
4f6fcd
+
4f6fcd
 static bool lm_class_match(unsigned int mode, enum link_mode_class class)
4f6fcd
 {
4f6fcd
 	unsigned int mode_class = (mode < link_modes_count) ?
4f6fcd
-- 
4f6fcd
2.26.2
4f6fcd