Add CDC Ethernet Emulation Model function driver. This usb network
function can be used for ethernet over USB. Ethernet packet are
encapsulated within EEM packets. An EEM pkt contains 2-byte header
and 4-byte sentinel (or crc).
Note that EEM packets can be split across USB packets but shall not
be split across USB transfers.
Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
Consider media connected when interface is selected by the host and
disconnected on device diconnection.
Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
This patch introduce doc for settings subsystem
with FCB and File System beck-ends.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
As the l2_data section might contain different size context elements
like "struct ethernet_context" for Ethernet and "void *" for
Dummy L2, remove the __net_l2_start and __net_l2_end variables so
that user does not accidentally try to use them as that would not work.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Noticed a typo in the first sentence, then some missing articles further
down, and some other clarity and grammar edits came along.
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
Move posix layer from 'kernel' to 'lib' folder as it is not
a core kernel feature.
Fixed posix header file dependencies as part of the move and
also removed NEWLIBC related macros from posix headers.
Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com>
Modernize macOS instructions to fit the latest packages offered by
Homebrew and macOS High Sierra.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Ports F and G are not present on some STM32L0 parts, so
for these parts port H external interrupt should be enabled
by writing value 0x5 instead of 0x7 to SYSCFG_EXTICRn registers
(see e.g. RM0367, 10.2.4).
Signed-off-by: Ilya Tagunov <tagunil@gmail.com>
Expand the contents of the smp_svr sample documentation so that it
covers all steps needed to perform DFU over BLE.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Add documentation for two closely-related subystems: dfu and mgmt, which
are currently undocumented.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Add a reference to the MCUboot flash partition doc so we can link to it
from other documentation pages.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Although very unlikely, make sure that if the net_recv_data() is
called with NULL network interface or packet, we recover that and
return error to the caller.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The test "net/utils" fails to build on olimexino_stm32
due to "region `SRAM' overflowed by 192 bytes".
Disabling I2C and SPI on board level the test build fine.
Moreover, according to issue #6858, we will only configure
board valuable HW and connectors on board level and the
user should enable what is needed on application level.
Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
User is able to take a network interface down or bring it up.
The command syntax is "net iface [up|down] [index]"
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
We would like to offer the capability to have memory pool heap data
structures that are usable from user mode threads. The current
k_mem_pool implementation uses IRQ locking and system-wide membership
lists that make it incompatible with user mode constraints.
However, much of the existing memory pool code can be abstracted to some
common functions that are used by both k_mem_pool and the new
sys_mem_pool implementations.
The sys_mem_pool implementation has the following differences:
* The alloc/free APIs work directly with pointers, no internal memory
block structures are exposed to the end user. A pointer to the source
pool is provided for allocation, but freeing memory just requires the
pointer and nothing else.
* k_mem_pool uses IRQ locks and required very fine-grained locking in
order to not affect system latency. sys_mem_pools just use a semaphore
to protect the pool data structures at the API level, since there aren't
implications for system responsiveness with this kind of concurrency
control.
* sys_mem_pools do not support the notion of timeouts for requesting
memory.
* sys_mem_pools are specified at compile time with macros, just like
kernel memory pools. Alternative forms of specification at runtime
will be a later enhancement.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
The DEVICE_NAME_GET() macro should be used instead of fixed
string when creating a device pointer in net_if_dev structure.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Added support for the HiFive1 board from SiFive
Signed-off-by: Tomasz Michalak <tmichalak@antmicro.com>
Signed-off-by: Karol Gugala <kgugala@antmicro.com>
Signed-off-by: Tomasz Jurtsch <tjurtsch@antmicro.com>
Set the received network packet priority according to VLAN priority.
Currently this mapping is 1:1 but can be changed if needed.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Currently the VLAN priority is the same as packet priority but
if such conversion is needed, then this function can be used
for such conversion.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This enables / fixes VLAN support in mcux ethernet driver.
The commit contains these changes for enabling VLAN:
* Increase the size of the ethernet frame if VLAN is enabled.
* Enable VLAN in chip if VLAN is enabled
* If VLAN is enabled, then the iface in context struct should
not be used directly as there can be multiple VLAN iface
related to this physical device.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This application just enables VLAN tag for ethernet interface.
Set CONFIG_SAMPLE_VLAN_TAG option to define the desired VLAN tag.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Add commands to add, remove or get information about VLANs
attached to network interfaces.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Add tests to verify the bit manipulation functions in net/vlan.h
file. Also check that we can check if given network interface has
VLAN enabled or not. Verify also that received network packet
contains correct VLAN tag.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This allows creation of virtual lan (VLAN) networks. VLAN support is
only available for ethernet network technology.
Fixes#3234
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Removing ${} variable evaluation fixes the issue.
For sam4s_xplained:
Before:
/repos/zephyr/samples/hello_world/build$ make VERBOSE=1 | grep march
/repos/zephyr/samples/hello_world/build$
After:
/repos/zephyr/samples/hello_world/build$ make VERBOSE=1 | grep march
...
-mthumb -mcpu=cortex-m4 -march=armv7e-m
...
Signed-off-by: Paolo Teti <paolo.teti@gmail.com>
Some of the sanitycheck tests were having too small limit for
network buffers when compiling for sam_e70_xplained board.
Increase the buffer limits when testing this for this board.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
As we have E70 ethernet driver enabled, we need to enable the
generic ethernet L2 driver too so that the ethernet is actually
useful.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Currently sleep and usleep functions are into unistd.h file.
unistd includes toold chain secific unistd.h file and this file
too has declaration for these functions. This is in conflict when
posix specific unistd.h is included.
Signed-off-by: Youvedeep Singh <youvedeep.singh@intel.com>
Clarify the difference between the buffer length and threshold Kconfig
options available in the nRF5 entropy driver.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Improve the documentation of entropy_nrf5.c by adding a comment that
clarifies it's characteristics.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Update Kconfiglib to upstream revision 981d24aff7654 (+ local Zephyr
modifications) to get commit 981d24aff7654 ("Set is_menuconfig True on
the top menu") in. It will be needed by the menuconfig implementation.
Origin: https://github.com/zephyrproject-rtos/Kconfiglib/tree/zephyr
Signed-off-by: Ulf Magnusson <ulfalizer@gmail.com>
Logical or is unsufficent for setting up new tmod: it's required to
remove previous one first. Indeed, 0 as tmod is valid (tx-rx mode), but
previous tmod could be 10 or 01, so a logical or will keep the previous
tmod leading to a bogus transaction.
Fixing also a rebase issue visible when debug mode is enabled. Slave
callback is a left over from a test on spi slave.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
There's a small but real chance of a race-condition when sending
messages to the local node (through the local network interface) that
expected parameters will be NULL in the message handles. Add
appropriate NULL checks for them.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>