Oleksij Rempel | 3e1e58d | 2021-04-19 15:01:03 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
| 2 | #ifndef _NET_SELFTESTS |
| 3 | #define _NET_SELFTESTS |
| 4 | |
| 5 | #include <linux/ethtool.h> |
| 6 | |
Oleksij Rempel | 4a52dd8 | 2021-04-28 15:09:46 +0200 | [diff] [blame] | 7 | #if IS_ENABLED(CONFIG_NET_SELFTESTS) |
| 8 | |
Oleksij Rempel | 3e1e58d | 2021-04-19 15:01:03 +0200 | [diff] [blame] | 9 | void net_selftest(struct net_device *ndev, struct ethtool_test *etest, |
| 10 | u64 *buf); |
| 11 | int net_selftest_get_count(void); |
| 12 | void net_selftest_get_strings(u8 *data); |
| 13 | |
Oleksij Rempel | 4a52dd8 | 2021-04-28 15:09:46 +0200 | [diff] [blame] | 14 | #else |
| 15 | |
| 16 | static inline void net_selftest(struct net_device *ndev, struct ethtool_test *etest, |
| 17 | u64 *buf) |
| 18 | { |
| 19 | } |
| 20 | |
| 21 | static inline int net_selftest_get_count(void) |
| 22 | { |
| 23 | return 0; |
| 24 | } |
| 25 | |
| 26 | static inline void net_selftest_get_strings(u8 *data) |
| 27 | { |
| 28 | } |
| 29 | |
| 30 | #endif |
Oleksij Rempel | 3e1e58d | 2021-04-19 15:01:03 +0200 | [diff] [blame] | 31 | #endif /* _NET_SELFTESTS */ |