aboutsummaryrefslogtreecommitdiff
path: root/include/net.h
diff options
context:
space:
mode:
authorSimon Glass2023-01-17 10:47:28 -0700
committerTom Rini2023-01-23 18:11:39 -0500
commit70dd88657b45e5439bf762507f2e1c44c2dee289 (patch)
tree5328a26970a170591162b9b316409e6820069201 /include/net.h
parentf43b2df3e068cc7be1aa5656c0c3223e270bba63 (diff)
sandbox: Allow ethernet bootdevs to be disabled for tests
Most tests don't want these and can create a lot of noise. Add a way to disable them. Use that in tests, with a flag provided to enable them for tests that need this feature. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/net.h')
-rw-r--r--include/net.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/net.h b/include/net.h
index ee08f3307ec..759d4669df1 100644
--- a/include/net.h
+++ b/include/net.h
@@ -886,4 +886,20 @@ static inline struct in_addr env_get_ip(char *var)
*/
void reset_phy(void);
+#if CONFIG_IS_ENABLED(NET)
+/**
+ * eth_set_enable_bootdevs() - Enable or disable binding of Ethernet bootdevs
+ *
+ * These get in the way of bootstd testing, so are normally disabled by tests.
+ * This provide control of this setting. It only affects binding of Ethernet
+ * devices, so if that has already happened, this flag does nothing.
+ *
+ * @enable: true to enable binding of bootdevs when binding new Ethernet
+ * devices, false to disable it
+ */
+void eth_set_enable_bootdevs(bool enable);
+#else
+static inline void eth_set_enable_bootdevs(bool enable) {}
+#endif
+
#endif /* __NET_H__ */