summaryrefslogtreecommitdiff
path: root/include/linux/ethtool.h
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2026-03-12 20:44:42 +0300
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2026-03-12 20:44:42 +0300
commit0421ccdfad0d92713a812a5aeb7d07b0ea7213c8 (patch)
tree9a648660192c72df7e815216f0908fdabc735f0c /include/linux/ethtool.h
parent6d4b67a2a76a4ff2393fe88119ae4332821b82b4 (diff)
parent1f318b96cc84d7c2ab792fcc0bfd42a7ca890681 (diff)
downloadlinux-0421ccdfad0d92713a812a5aeb7d07b0ea7213c8.tar.xz
Merge tag 'v7.0-rc3' into next
Sync up with the mainline to brig up the latest changes, specifically changes to ALPS driver.
Diffstat (limited to 'include/linux/ethtool.h')
-rw-r--r--include/linux/ethtool.h36
1 files changed, 33 insertions, 3 deletions
diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h
index 5c9162193d26..798abec67a1b 100644
--- a/include/linux/ethtool.h
+++ b/include/linux/ethtool.h
@@ -216,13 +216,43 @@ static inline u8 *ethtool_rxfh_context_key(struct ethtool_rxfh_context *ctx)
void ethtool_rxfh_context_lost(struct net_device *dev, u32 context_id);
struct link_mode_info {
- int speed;
- u8 lanes;
- u8 duplex;
+ int speed;
+ u8 lanes;
+ u8 min_pairs;
+ u8 pairs;
+ u8 duplex;
+ u16 mediums;
};
extern const struct link_mode_info link_mode_params[];
+enum ethtool_link_medium {
+ ETHTOOL_LINK_MEDIUM_BASET = 0,
+ ETHTOOL_LINK_MEDIUM_BASEK,
+ ETHTOOL_LINK_MEDIUM_BASES,
+ ETHTOOL_LINK_MEDIUM_BASEC,
+ ETHTOOL_LINK_MEDIUM_BASEL,
+ ETHTOOL_LINK_MEDIUM_BASED,
+ ETHTOOL_LINK_MEDIUM_BASEE,
+ ETHTOOL_LINK_MEDIUM_BASEF,
+ ETHTOOL_LINK_MEDIUM_BASEV,
+ ETHTOOL_LINK_MEDIUM_BASEMLD,
+ ETHTOOL_LINK_MEDIUM_NONE,
+
+ __ETHTOOL_LINK_MEDIUM_LAST,
+};
+
+#define ETHTOOL_MEDIUM_FIBER_BITS (BIT(ETHTOOL_LINK_MEDIUM_BASES) | \
+ BIT(ETHTOOL_LINK_MEDIUM_BASEL) | \
+ BIT(ETHTOOL_LINK_MEDIUM_BASEF))
+
+enum ethtool_link_medium ethtool_str_to_medium(const char *str);
+
+static inline int ethtool_linkmode_n_pairs(unsigned int mode)
+{
+ return link_mode_params[mode].pairs;
+}
+
/* declare a link mode bitmap */
#define __ETHTOOL_DECLARE_LINK_MODE_MASK(name) \
DECLARE_BITMAP(name, __ETHTOOL_LINK_MODE_MASK_NBITS)