mirror of
https://github.com/torvalds/linux.git
synced 2024-11-24 21:21:41 +00:00
4a52dd8fef
In case ethernet driver is enabled and INET is disabled, selftest will
fail to build.
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Fixes: 3e1e58d64c
("net: add generic selftest support")
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Acked-by: Randy Dunlap <rdunlap@infradead.org> # build-tested
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Link: https://lore.kernel.org/r/20210428130947.29649-1-o.rempel@pengutronix.de
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
32 lines
582 B
C
32 lines
582 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef _NET_SELFTESTS
|
|
#define _NET_SELFTESTS
|
|
|
|
#include <linux/ethtool.h>
|
|
|
|
#if IS_ENABLED(CONFIG_NET_SELFTESTS)
|
|
|
|
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);
|
|
|
|
#else
|
|
|
|
static inline void net_selftest(struct net_device *ndev, struct ethtool_test *etest,
|
|
u64 *buf)
|
|
{
|
|
}
|
|
|
|
static inline int net_selftest_get_count(void)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
static inline void net_selftest_get_strings(u8 *data)
|
|
{
|
|
}
|
|
|
|
#endif
|
|
#endif /* _NET_SELFTESTS */
|