drivers: net: adding NET_DRIVERS menuconfig

Fixes: #38403

Adding NET_DRIVERS menuconfig so that network drivers are grouped
together in its own menu entry under drivers, similar to most other
drivers.

This further has the advantages that `CONFIG_NET_DRIVERS` can be used
for testing to determine if network drivers has been selected.

This changed revealed a dependency loop where both `select` (for SLIP)
and `depends` (for PPP) which both depends on NET_DRIVERS` where in use
in the dependency tree for Qemu networking, especially NET_SLIP_TAP.

This is handled by defaulting `NET_DRIVERS` to `y` when building for a
Qemu target.
`SLIP` had a dependency to `!QEMU_TARGET || NET_QEMU_SLIP`. This is
changed so that SLIP prompt depends on `!QEMU_TARGET` which provides
full user control in hardware but makes the symbol promptless on Qemu
targets.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
This commit is contained in:
Torsten Rasmussen 2021-09-10 15:53:31 +02:00 committed by Carles Cufí
commit 8e64038559
25 changed files with 37 additions and 5 deletions

View file

@ -1,6 +1,11 @@
# Misc network drivers configuration options
# SPDX-License-Identifier: Apache-2.0
menuconfig NET_DRIVERS
bool "Network Drivers"
if NET_DRIVERS
#
# PPP options
#
@ -90,8 +95,7 @@ endif # NET_PPP
# SLIP options
#
menuconfig SLIP
bool "SLIP driver"
depends on (!QEMU_TARGET || NET_QEMU_SLIP)
bool "SLIP driver" if !QEMU_TARGET
depends on NET_NATIVE
select UART_PIPE
select UART_INTERRUPT_DRIVEN
@ -149,3 +153,5 @@ module-help = Sets log level for network loopback driver.
source "subsys/net/Kconfig.template.log_config.net"
endif
endif # NET_DRIVERS