Skip to content

Commit

Permalink
drivers: net: ppp: Driver for point-to-point protocol
Browse files Browse the repository at this point in the history
The ppp driver uses uart_pipe driver for data transfer.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
  • Loading branch information
jukkar committed Jul 29, 2019
1 parent 64bdad2 commit aa46bac
Show file tree
Hide file tree
Showing 3 changed files with 709 additions and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/CMakeLists.txt
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@


zephyr_sources_ifdef(CONFIG_SLIP slip.c) zephyr_sources_ifdef(CONFIG_SLIP slip.c)
zephyr_sources_ifdef(CONFIG_NET_LOOPBACK loopback.c) zephyr_sources_ifdef(CONFIG_NET_LOOPBACK loopback.c)
zephyr_sources_ifdef(CONFIG_NET_PPP ppp.c)
67 changes: 67 additions & 0 deletions drivers/net/Kconfig
Original file line number Original file line Diff line number Diff line change
@@ -1,5 +1,72 @@
# Kconfig - Misc network drivers configuration options # Kconfig - Misc network drivers configuration options
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0

#
# PPP options
#
menuconfig NET_PPP
bool "Point-to-point (PPP) UART based driver"
depends on NET_L2_PPP
select UART_PIPE
select UART_INTERRUPT_DRIVEN

if NET_PPP

config NET_PPP_DRV_NAME
string "PPP Driver name"
default "ppp"
help
This option sets the driver name

config NET_PPP_UART_PIPE_BUF_LEN
int "Buffer length when reading from UART"
default 8
help
This options sets the size of the UART pipe buffer where data
is being read to.

config NET_PPP_MTU
int "PPP MTU"
default 1500
range 80 1500
help
This option sets the MTU for the PPP connection.
The value is only used when fragmenting the network
data into net_buf's.

config NET_PPP_VERIFY_FCS
bool "Verify that received FCS is valid"
default y
help
If you have a reliable link, then it might make sense
to disable this as it takes some time to verify the received
packet.

config NET_PPP_CALC_FCS
bool "Calculate FCS for the sent packet"
default y
help
If you have a reliable link, then it might make sense
to disable this as it takes some time to calculate the FCS for
the sent packet.

config PPP_MAC_ADDR
string "MAC address for the interface"
help
Specify a MAC address for the PPP interface in the form of
six hex 8-bit chars separated by colons (e.g.:
aa:33:cc:22:e2:c0). The default is an empty string, which
means the code will make 00:00:5E:00:53:XX, where XX will be
random.

module = NET_PPP
module-dep = LOG
module-str = Log level for ppp driver
module-help = Sets log level for ppp driver.
source "subsys/net/Kconfig.template.log_config.net"

endif # NET_PPP

# #
# SLIP options # SLIP options
# #
Expand Down
Loading

0 comments on commit aa46bac

Please sign in to comment.