diff options
author | Oleksij Rempel <o.rempel@pengutronix.de> | 2021-04-19 15:01:03 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-04-21 01:08:02 +0200 |
commit | 3e1e58d64c3d0a6789f9d865936c4ce46b20f3f5 (patch) | |
tree | 9a503c9833f37c934e8ae38f8fbcf47c7b520215 /include/net/selftests.h | |
parent | net: phy: genphy_loopback: add link speed configuration (diff) | |
download | linux-3e1e58d64c3d0a6789f9d865936c4ce46b20f3f5.tar.xz linux-3e1e58d64c3d0a6789f9d865936c4ce46b20f3f5.zip |
net: add generic selftest support
Port some parts of the stmmac selftest and reuse it as basic generic selftest
library. This patch was tested with following combinations:
- iMX6DL FEC -> AT8035
- iMX6DL FEC -> SJA1105Q switch -> KSZ8081
- iMX6DL FEC -> SJA1105Q switch -> KSZ9031
- AR9331 ag71xx -> AR9331 PHY
- AR9331 ag71xx -> AR9331 switch -> AR9331 PHY
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/selftests.h')
-rw-r--r-- | include/net/selftests.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/net/selftests.h b/include/net/selftests.h new file mode 100644 index 000000000000..9993b9498cf3 --- /dev/null +++ b/include/net/selftests.h @@ -0,0 +1,12 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _NET_SELFTESTS +#define _NET_SELFTESTS + +#include <linux/ethtool.h> + +void net_selftest(struct net_device *ndev, struct ethtool_test *etest, + u64 *buf); +int net_selftest_get_count(void); +void net_selftest_get_strings(u8 *data); + +#endif /* _NET_SELFTESTS */ |