net: Add CONFIG_NET_NATIVE option for selecting native IP

Allow user to disable native IP stack and use offloaded IP
stack instead. It is also possible to enable both at the same
time if needed.

Fixes #18105

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This commit is contained in:
Jukka Rissanen 2019-08-09 14:49:35 +03:00
commit 6cf1da486d
26 changed files with 560 additions and 188 deletions

View file

@ -1,5 +1,8 @@
# SPDX-License-Identifier: Apache-2.0
zephyr_sources_ifdef(CONFIG_SLIP slip.c)
zephyr_sources_ifdef(CONFIG_NET_LOOPBACK loopback.c)
if(CONFIG_NET_NATIVE)
zephyr_sources_ifdef(CONFIG_SLIP slip.c)
zephyr_sources_ifdef(CONFIG_NET_PPP ppp.c)
endif()

View file

@ -7,6 +7,7 @@
menuconfig NET_PPP
bool "Point-to-point (PPP) UART based driver"
depends on NET_L2_PPP
depends on NET_NATIVE
select UART_PIPE
select UART_INTERRUPT_DRIVEN
@ -73,6 +74,7 @@ endif # NET_PPP
menuconfig SLIP
bool "SLIP driver"
depends on (!QEMU_TARGET || NET_QEMU_SLIP)
depends on NET_NATIVE
select UART_PIPE
select UART_INTERRUPT_DRIVEN