selftests.h 582 B

12345678910111213141516171819202122232425262728293031
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef _NET_SELFTESTS
  3. #define _NET_SELFTESTS
  4. #include <linux/ethtool.h>
  5. #if IS_ENABLED(CONFIG_NET_SELFTESTS)
  6. void net_selftest(struct net_device *ndev, struct ethtool_test *etest,
  7. u64 *buf);
  8. int net_selftest_get_count(void);
  9. void net_selftest_get_strings(u8 *data);
  10. #else
  11. static inline void net_selftest(struct net_device *ndev, struct ethtool_test *etest,
  12. u64 *buf)
  13. {
  14. }
  15. static inline int net_selftest_get_count(void)
  16. {
  17. return 0;
  18. }
  19. static inline void net_selftest_get_strings(u8 *data)
  20. {
  21. }
  22. #endif
  23. #endif /* _NET_SELFTESTS */