aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2020-05-21 17:18:00 -0700
committerDavid S. Miller <davem@davemloft.net>2020-05-21 17:18:00 -0700
commit2a330b533462bea0967e723ff12787daa5a608f8 (patch)
treeff7397ca188b6e6ffd74a1c272aaffcc3d09fa51 /include
parentb0301a5a288d804374b194e755180967ff7a295b (diff)
parent68ff5e14759e7ac1aac7bc75ac5b935e390fa2b3 (diff)
downloadkernel_replicant_linux-2a330b533462bea0967e723ff12787daa5a608f8.tar.gz
kernel_replicant_linux-2a330b533462bea0967e723ff12787daa5a608f8.tar.bz2
kernel_replicant_linux-2a330b533462bea0967e723ff12787daa5a608f8.zip
Merge branch 'provide-KAPI-for-SQI'
Oleksij Rempel says: ==================== provide KAPI for SQI This patches are extending ethtool netlink interface to export Signal Quality Index (SQI). SQI provided by 100Base-T1 PHYs and can be used for cable diagnostic. Compared to a typical cable tests, this value can be only used after link is established. changes v3: - rename __ethtool_get_sqi* to linkstate_get_sqi*. And move this functions to the net/ethtool/linkstate.c - protect linkstate_get_sqi* with locking changes v2: - use u32 instead of u8 for SQI - add SQI_MAX field and callbacks - some style fixes in the rst. - do not convert index to shifted index. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/linux/phy.h2
-rw-r--r--include/uapi/linux/ethtool_netlink.h2
2 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/phy.h b/include/linux/phy.h
index 467aa8bf9f64..2bcdf19ed3b4 100644
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -723,6 +723,8 @@ struct phy_driver {
struct ethtool_tunable *tuna,
const void *data);
int (*set_loopback)(struct phy_device *dev, bool enable);
+ int (*get_sqi)(struct phy_device *dev);
+ int (*get_sqi_max)(struct phy_device *dev);
};
#define to_phy_driver(d) container_of(to_mdio_common_driver(d), \
struct phy_driver, mdiodrv)
diff --git a/include/uapi/linux/ethtool_netlink.h b/include/uapi/linux/ethtool_netlink.h
index 2881af411f76..e6f109b76c9a 100644
--- a/include/uapi/linux/ethtool_netlink.h
+++ b/include/uapi/linux/ethtool_netlink.h
@@ -232,6 +232,8 @@ enum {
ETHTOOL_A_LINKSTATE_UNSPEC,
ETHTOOL_A_LINKSTATE_HEADER, /* nest - _A_HEADER_* */
ETHTOOL_A_LINKSTATE_LINK, /* u8 */
+ ETHTOOL_A_LINKSTATE_SQI, /* u32 */
+ ETHTOOL_A_LINKSTATE_SQI_MAX, /* u32 */
/* add new constants above here */
__ETHTOOL_A_LINKSTATE_CNT,