No need to inline the net_if_ipv6_addr_lookup_by_iface() function
as it is used multiple times in ipv6.c
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Add a function which returns proper network interface to send either
IPv4 or IPv6 network packet to corresponding destination address.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Make sure that net_if_ipv6_select_src_iface() returns correct network
interface for a given destination address.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Add a function that will return the network interface that would
be used when sending a IPv6 network packet to specific IPv6 destination
address.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Most of this code is unreachable with priority queues disabled because
of queue id validation.
Fixes#9295.
Signed-off-by: Tomasz Gorochowik <tgorochowik@antmicro.com>
This patch aligns documentation to changes in imagetool.py released
in mcuboot 1.2 (latest release).
Also adds note about workaround for possible timeout while erasing
image-slot on some devices (like nRF52840 SoC)
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
A bug in the jlink application made it impossible to use OpenSDA
firmware with the mimxrt1052 device name, so we used the generic
Cortex-M7 device name as a workaround. This bug was fixed in jlink
V6.32h (2018-07-05), so now we can use the more specific device name.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
Flashing support was added to the jlink runner in commit
9f57d11d9b, but the OpenSDA document
wasn't updated accordingly. Update it now.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
For example for Bluetooth IPSP, it is not needed to join solicited
node multicast group address.
From https://tools.ietf.org/html/rfc7668#section-3.2.2 :
"""
There is no need for 6LN to join the solicited-node multicast address,
since 6LBR will know device addresses and hence link-local addresses
of all connected 6LNs.
"""
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
There was a remaining reference to a doc/Makefile that needed
to be changed to CMakeLists.txt
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
The application does nothing useful, it just enables Link Layer
Discovery Protocol support which starts to send LLDP network packets
to ethernet network interface. Note that the LLDP packets are only
sent to those network interfaces that claim to support LLDP.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Enable LLDP TX support on the slip ethernet driver.
Now when CONFIG_NET_LLDP is enabled, one can easily verify on a sniffer
(i.e. wireshark) that LLDP frames are being sent at the configured
interval with all mandatory TLVs enabled.
Signed-off-by: Jesus Sanchez-Palencia <jesus.sanchez-palencia@intel.com>
The LLDP protocol defines 2 separate agents, the Transmitters and
the Receivers. For the context of Zephyr, we are only interested in
the Tx agent, thus we drop any LLDP frames received by Zephyr.
LLDP frames are basically composed by an ethernet header followed by
the LLDP Protocol Data Unit (LLDPDU). The LLDPDU is composed by several
TLVs, some of them being mandatory and some optional.
Our approach here is having TLVs fully configured from Kconfig, thus
having the entire LLDPDU constructed on build time.
The commit adds NET_ETH_PTYPE_LLDP definition and related handling.
If CONFIG_NET_LLDP is enabled then ethernet_context has a pointer to
the struct net_lldpdu that belongs to that ethernet interface. Also
when CONFIG_NET_LLDP is enabled, the LLDP state machine will start to
send packets when network interface is coming up.
Currently the LLDP state machine is just a k_delayed_work() sending the
LLDPDU at a given period (defined by CONFIG_NET_LLDP_TX_INTERVAL).
Fixes#3233
Signed-off-by: Jesus Sanchez-Palencia <jesus.sanchez-palencia@intel.com>
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Since we're now copying the whole doc/ folder into the output folder,
there's no need anymore to copy certain files by hand.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
The LwM2M engine will cleanup the net_app_ctx if there are
errors during initialization. The clean up calls here in
RD client are duplicated.
Signed-off-by: Michael Scott <mike@foundries.io>
- Remove NET_LOG / NET_BUF_LOG settings, instead just enable SYS_LOG
- Simplify by also removing SYS_LOG_SHOW_COLOR, INIT_STACKS and
NET_STATISTICS. These can be enabled by user if wanted/needed.
Signed-off-by: Michael Scott <mike@foundries.io>
To avoid having to refer to non-rst files artificially in order to get
them copied into the destination folder, make a raw full copy of the
doc/ folder instead of copying only the .rst files.
Fixes#9128
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Table captions and figure captions, by default, appear in different
locations. Move table captions below the table to match figures.
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
Variables 'names' is copying value from 'reduced' dict and gives
illusion that any computation could be done on copied data.
Problem is that later computation on 'names' will modify data in
'reduced'.
Use deepcopy in order to avoid erasing thing in reduced.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
'defs' variable is used and passed as a parameter in the vast
majority of the functions of extract_dts_includes script.
Set this variable global
Do the same with 'struct' variable for upcoming change.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Make sure that string to integer conversions are checked properly
so that we are not trying to use the return value from strtol()
if the string is not a number.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Allow user to configure a program that is executed after the
network interface is created and IP address is setup.
This can be used e.g., to start wireshark to capture
the network traffic of the interface.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Default value 2 was not enough for mcast addresses table.
Core stack adding mcast addresses on various reasons. Also
coaps_client trying to create mcast context for some purpose.
mcast address is not in lookup table, so binding fails. Add
CoAP sample related mcast address to table and then bind the
context.
Fixes#9131
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
Let's add an overlay file to enable using the WNC-M14A2A LTE-M
modem with the LwM2M client.
Also, update documentation for it's use.
Signed-off-by: Michael Scott <mike@foundries.io>
These settings enable use of the WNC-M14A2A LTE-M modem as the default
network interface for the nRF52840-DK board (nrf52840_pca10056).
They include the following settings when MODEM_WNCM14A2A is selected:
- UARTE1 pin setup
- DTS / DTS fixup additions for WNC-M14A2A
- Kconfig settings for modem driver
Signed-off-by: Michael Scott <mike@foundries.io>
These settings enable use of the WNC-M14A2A LTE-M modem as the default
network interface instead of ethernet.
They include the following settings when MODEM_WNCM14A2A is selected:
- UART 2 setup
- Avoid ETH_0 setup due to pin conflicts
- DTS addition for WNC-M14A2A
- Kconfig settings for modem driver
Signed-off-by: Michael Scott <mike@foundries.io>
Add a set of modem shell commands to support modem development.
Start with:
modem list: Lists all registered modems and related information
modem send <modem receiver index> <command>: Send command to modem
Signed-off-by: Michael Scott <mike@foundries.io>
The WNC-M14A2A (LTE / LTE-M) modem is presented as an Arduino-
compatible shield via AT&T's IoT Starter Kit v1.0. It was
originally intended to work with the FRDM-K64F board, but
in theory as long as the right pins are configured it can
work with any board that supports Arduino-compatible headers.
The driver utilizes the CONFIG_NET_OFFLOAD setting to avoid the
normal handling of IP packets, and instead uses a socket-like
UART interface to handle incoming and outgoing data.
Signed-off-by: Michael Scott <mike@foundries.io>
Modem drivers need a fast buffer-based receiver for passing data
back and forth from the UART to the driver. This provides an
efficient configuarable driver which merely sends and receives
but doesn't process the data, that's left up to the modem driver.
Signed-off-by: Michael Scott <mike@foundries.io>
This change moves the logic for linearize and append_bytes from
the net_pkt sources into the net_buf sources where it can be
made available to layers which to not depend on net_pkt. It also,
adds a new net_buf_skip() function which can be used to iterated
through a list of net_buf (freeing the buffers as it goes).
For the append_bytes function to be generic in nature, a net_buf
allocator callback was created. Callers of append_bytes pass in
the callback which determines where the resulting net_buf is
allocated from.
Also, the dst buffer in linearize is now cleared prior to copy
(this was an addition from the code moved from net_pkt).
In order to preserve existing callers, the original functions are
left in the net_pkt layer, but now merely act as wrappers.
Signed-off-by: Michael Scott <mike@foundries.io>
This is a finishing commit in 802.1Qav support for SAM GMAC. It adds a
possibility to get and set all parameters required by the standard.
Note that to be fully compliant it requires a proper system
configuration, but the prioritizing mechanisms will work just fine
without it so it is not enforced in any way.
Signed-off-by: Tomasz Gorochowik <tgorochowik@antmicro.com>
If the application is using TC configuration compatible with HW
configuration (equal number of traffic classes and hardware queues)
setup the screening registers and chose queues based on the chosen TC
mapping.
Use the VLAN priority and hard-coded mappings only as a fallback.
Signed-off-by: Tomasz Gorochowik <tgorochowik@antmicro.com>
Updating Qav params made it implicitly enable the Qav support itself.
Since we can now control the on/off status with a management request,
this is not a desired behavior.
Make it read the original register value before updating params and then
writing back what it was before.
Additionally we now have to explicitly enable Qav support in init.
Signed-off-by: Tomasz Gorochowik <tgorochowik@antmicro.com>
The standard (and therefore the upper layer) is using bits per second,
the registers in SAM GMAC uses bytes per second - do the conversion
before writing the reg.
Signed-off-by: Tomasz Gorochowik <tgorochowik@antmicro.com>
With this commit all Qav parameters are tested and the fake driver
properly stores and recalculates info about all the Qav parameters to
make them available for read-back.
Signed-off-by: Tomasz Gorochowik <tgorochowik@antmicro.com>
This are all the parameters defined by the standard (12.21.1).
Additionally the parameters that are read-only are validated in the
ethernet_set_config callback.
Signed-off-by: Tomasz Gorochowik <tgorochowik@antmicro.com>