linux/net/ethtool/cabletest.c

// SPDX-License-Identifier: GPL-2.0-only

#include <linux/phy.h>
#include <linux/ethtool_netlink.h>
#include "netlink.h"
#include "common.h"

/* 802.3 standard allows 100 meters for BaseT cables. However longer
 * cables might work, depending on the quality of the cables and the
 * PHY. So allow testing for up to 150 meters.
 */
#define MAX_CABLE_LENGTH_CM

const struct nla_policy ethnl_cable_test_act_policy[] =;

static int ethnl_cable_test_started(struct phy_device *phydev, u8 cmd)
{}

int ethnl_act_cable_test(struct sk_buff *skb, struct genl_info *info)
{}

int ethnl_cable_test_alloc(struct phy_device *phydev, u8 cmd)
{}
EXPORT_SYMBOL_GPL();

void ethnl_cable_test_free(struct phy_device *phydev)
{}
EXPORT_SYMBOL_GPL();

void ethnl_cable_test_finished(struct phy_device *phydev)
{}
EXPORT_SYMBOL_GPL();

int ethnl_cable_test_result(struct phy_device *phydev, u8 pair, u8 result)
{}
EXPORT_SYMBOL_GPL();

int ethnl_cable_test_fault_length(struct phy_device *phydev, u8 pair, u32 cm)
{}
EXPORT_SYMBOL_GPL();

static const struct nla_policy cable_test_tdr_act_cfg_policy[] =;

const struct nla_policy ethnl_cable_test_tdr_act_policy[] =;

/* CABLE_TEST_TDR_ACT */
static int ethnl_act_cable_test_tdr_cfg(const struct nlattr *nest,
					struct genl_info *info,
					struct phy_tdr_config *cfg)
{}

int ethnl_act_cable_test_tdr(struct sk_buff *skb, struct genl_info *info)
{}

int ethnl_cable_test_amplitude(struct phy_device *phydev,
			       u8 pair, s16 mV)
{}
EXPORT_SYMBOL_GPL();

int ethnl_cable_test_pulse(struct phy_device *phydev, u16 mV)
{}
EXPORT_SYMBOL_GPL();

int ethnl_cable_test_step(struct phy_device *phydev, u32 first, u32 last,
			  u32 step)
{}
EXPORT_SYMBOL_GPL();